summaryrefslogtreecommitdiffstats
path: root/gcc/fortran
Commit message (Collapse)AuthorAgeFilesLines
...
* 2012-01-09 Paul Thomas <pault@gcc.gnu.org>pault2012-01-093-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/51791 * interface.c (matching_typebound_op): Drill down through possible parentheses to obtain base expression. Do not test for 'class_ok' but, instead for the class structure components. * resolve.c (resolve_ordinary_assign): Extend error message for polymorphic assignment to advise checking for specific subroutine. PR fortran/51792 * resolve.c (resolve_typebound_function): Restore 'static' to declaration. 2012-01-09 Paul Thomas <pault@gcc.gnu.org> PR fortran/51791 * gfortran.dg/typebound_operator_7.f03: Insert parentheses around base object in first assignment in main program. * gfortran.dg/typebound_operator_10.f03: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183032 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-01-09 Mikael Morin <mikael@gcc.gnu.org>mikael2012-01-092-1/+7
| | | | | | | | | | | | | | | PR fortran/51758 * trans-array.c (gfc_walk_elemental_function_args): Skip over NULL() actual arguments. 2012-01-09 Tobias Burnus <burnus@net-b.de> PR fortran/51758 * gfortran.dg/optional_absent_2.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183024 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-01-09 Tobias Burnus <burnus@net-b.de>burnus2012-01-092-3/+14
| | | | | | | | | | * gfortran.texi: Bump copyright year. (Fortran 2003 Status): Update polymorphism item, add item for generic interface with DT name. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183018 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-01-09 Tobias Burnus <burnus@net-b.de>burnus2012-01-095-103/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/51578 * gfortran.h (gfc_use_list): * match.h (gfc_use_module): Rename to ... (gfc_use_modules): ... this. * module.c (use_locus, specified_nonint, specified_int): Remove global variable. (module_name): Change type to const char*, used with gfc_get_string. (module_list): New global variable. (free_rename): Free argument not global var. (gfc_match_use): Save match to module_list. (load_generic_interfaces, read_module): Don't free symtree. (write_dt_extensions, gfc_dump_module): Fix module-name I/O due to the type change of module_name. (write_symbol0, write_generic): Optimize due to the type change. (import_iso_c_binding_module, use_iso_fortran_env_module): Use locus of rename->where. (gfc_use_module): Take module_list as argument. (gfc_use_modules): New function. (gfc_module_init_2, gfc_module_done_2): Init module_list, rename_list. * parse.c (last_was_use_stmt): New global variable. (use_modules): New function. (decode_specification_statement, decode_statement): Move USE match up and call use_modules. (next_free, next_fixed): Call use_modules. (accept_statement): Don't call gfc_module_use. 2012-01-09 Tobias Burnus <burnus@net-b.de> PR fortran/51578 * gfortran.dg/use_17.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183010 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-01-09 Richard Guenther <rguenther@suse.de>rguenth2012-01-092-4086/+4091
| | | | | | | Rotate changelogs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183007 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-01-06 Tobias Burnus <burnus@net-b.de>burnus2012-01-0612-140/+330
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * trans-openmp.c (gfc_omp_clause_dtor, * gfc_trans_omp_array_reduction): Update call to gfc_trans_dealloc_allocated. * trans.c (gfc_allocate_using_malloc): Fix spacing. (gfc_allocate_allocatable): For gfc_allocate_using_lib, jump to label_finish when an error occurs. (gfc_deallocate_with_status): Call caf_deregister for -fcoarray=lib. * trans.h (gfc_allocate_allocatable, * gfc_deallocate_with_status): Update prototype. (gfor_fndecl_caf_deregister): New tree symbol. * trans-expr.c (gfc_conv_procedure_call): Update gfc_deallocate_with_status and gfc_trans_dealloc_allocated calls. * trans-array.c (gfc_array_allocate, * gfc_trans_dealloc_allocated, structure_alloc_comps, gfc_trans_deferred_array): Ditto. (gfc_array_deallocate): Handle coarrays with -fcoarray=lib. * trans-array.h (gfc_array_deallocate, gfc_array_allocate, gfc_trans_dealloc_allocated): Update prototypes. * trans-stmt.c (gfc_trans_sync): Fix indentation. (gfc_trans_allocate): Fix errmsg padding and label handling. (gfc_trans_deallocate): Ditto and handle -fcoarray=lib. * expr.c (gfc_is_coarray): Fix algorithm for BT_CLASS. * libgfortran.h (GFC_STAT_STOPPED_IMAGE): Use large value to avoid other stats accidentally matching this one. * trans-decl.c (gfor_fndecl_caf_deregister): New global var. (gfc_build_builtin_function_decls): Fix prototype decl of caf_register and add decl for caf_deregister. (gfc_trans_deferred_vars): Handle CAF vars with -fcoarrays=lib. * trans-intrinsic.c (conv_intrinsic_move_alloc): Update call to gfc_deallocate_with_status. 2012-01-06 Tobias Burnus <burnus@net-b.de> * caf/single.c (_gfortran_caf_register, * _gfortran_caf_deregister): Fix token handling. * caf/mpi.c (_gfortran_caf_register, _gfortran_caf_deregister): * Ditto. * caf/libcaf.h (STAT_STOPPED_IMAGE): Sync with libgfortran.h. (_gfortran_caf_register, _gfortran_caf_deregister): Update prototype. 2012-01-06 Tobias Burnus <burnus@net-b.de> * gfortran.dg/deallocate_stat_2.f90: New. * coarray/allocate_errgmsg.f90: New. * gfortran.dg/coarray_lib_alloc_1.f90: New. * gfortran.dg/coarray_lib_alloc_2.f90: New. * coarray/subobject_1.f90: Fix for num_images > 1. * gfortran.dg/deallocate_stat.f90: Update due to changed stat= handling. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182951 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-01-05 Paul Thomas <pault@gcc.gnu.org>pault2012-01-052-0/+40
| | | | | | | | | | | | | | | | | | PR fortran/PR48946 * resolve.c (resolve_typebound_static): If the typebound procedure is 'deferred' try to find the correct specific procedure in the derived type operator space itself. 2012-01-05 Paul Thomas <pault@gcc.gnu.org> PR fortran/PR48946 * gfortran.dg/typebound_operator_9.f03: This is now a copy of the old typebound_operator_8.f03. * gfortran.dg/typebound_operator_8.f03: New version of typebound_operator_7.f03 with 'u' a derived type instead of a class object. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182929 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/50981mikael2012-01-045-6/+54
| | | | | | | | | | | | | | * trans-array.h (gfc_walk_elemental_function_args): New argument. * trans-intrinsic.c (gfc_walk_intrinsic_function): Update call. * trans-stmt.c (gfc_trans_call): Ditto. * trans-array.c (gfc_walk_function_expr): Ditto. (gfc_walk_elemental_function_args): Get the dummy argument list if possible. Check that the dummy and the actual argument are both optional, and set can_be_null_ref accordingly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182875 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/50981mikael2012-01-044-5/+34
| | | | | | | | | | | | * trans.h (struct gfc_ss_info): New field data::scalar::can_be_null_ref * trans-array.c: If the reference can be NULL, save the reference instead of the value. * trans-expr.c (gfc_conv_expr): If we have saved a reference, dereference it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182874 138bc75d-0d04-0410-961f-82ee72b054a4
* * trans-expr.c (gfc_conv_expr): Move address taking...mikael2012-01-042-2/+6
| | | | | | | | (gfc_conv_expr_reference): ... here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182873 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig2012-01-042-2/+12
| | | | | | | | | | | | | | | | PR fortran/49693 * trans-common.c (create_common): Update copyright years. Mark variables as used to avoid warnings about unused variables in common blocks. 2012-01-04 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/49693 * gfortran.dg/common_17.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182869 138bc75d-0d04-0410-961f-82ee72b054a4
* * gfortran.h (struct gfc_expr): Add missing "struct"hp2012-01-032-1/+6
| | | | | | | qualifier for member base_expr. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182826 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-01-02 Paul Thomas <pault@gcc.gnu.org>pault2012-01-027-170/+346
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/51529 * trans-array.c (gfc_array_allocate): Null allocated memory of newly allocted class arrays. PR fortran/46262 PR fortran/46328 PR fortran/51052 * interface.c(build_compcall_for_operator): Add a type to the expression. * trans-expr.c (conv_base_obj_fcn_val): New function. (gfc_conv_procedure_call): Use base_expr to detect non-variable base objects and, ensuring that there is a temporary variable, build up the typebound call using conv_base_obj_fcn_val. (gfc_trans_class_assign): Pick out class procedure pointer assignments and do the assignment with no further prcessing. (gfc_trans_class_array_init_assign, gfc_trans_class_init_assign gfc_trans_class_assign): Move to top of file. * gfortran.h : Add 'base_expr' field to gfc_expr. * resolve.c (get_declared_from_expr): Add 'types' argument to switch checking of derived types on or off. (resolve_typebound_generic_call): Set the new argument. (resolve_typebound_function, resolve_typebound_subroutine): Set 'types' argument for get_declared_from_expr appropriately. Identify base expression, if not a variable, in the argument list of class valued calls. Assign it to the 'base_expr' field of the final expression. Strip away all references after the last class reference. 2012-01-02 Paul Thomas <pault@gcc.gnu.org> PR fortran/46262 PR fortran/46328 PR fortran/51052 * gfortran.dg/typebound_operator_7.f03: New. * gfortran.dg/typebound_operator_8.f03: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182796 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-01-02 Tobias Burnus <burnus@net-b.de>burnus2012-01-022-6/+17
| | | | | | | | | | | | | | | | PR fortran/51682 * trans-intrinsic.c (trans_this_image, trans_image_index, trans_num_images, conv_intrinsic_cobound): Fold_convert the caf_num_images/caf_this_images variables to the correct int kind. 2012-01-02 Tobias Burnus <burnus@net-b.de> PR fortran/51682 * gfortran.dg/coarray/image_index_3.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182781 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/jakub2012-01-012-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | * gcc.c (process_command): Update copyright notice dates. * gcov.c (print_version): Likewise. * gcov-dump.c (print_version): Likewise. * mips-tfile.c (main): Likewise. * mips-tdump.c (main): Likewise. gcc/fortran/ * gfortranspec.c (lang_specific_driver): Update copyright notice dates. gcc/java/ * jcf-dump.c (version): Update copyright notice dates. libmudflap/ * mf-runtime.c (__mf_usage): Update copyright notice dates. libjava/ * gnu/gcj/convert/Convert.java (version): Update copyright notice dates. * gnu/gcj/tools/gcj_dbtool/Main.java (main): Likewise. libjava/classpath/ * gnu/java/rmi/registry/RegistryImpl.java (version): Update copyright notice dates. * tools/gnu/classpath/tools/orbd/Main.java (run): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182773 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-31 Thomas König <tkoenig@gcc.gnu.org>tkoenig2011-12-313-16/+42
| | | | | | | | | | | | | | | | | | | | PR fortran/51502 * expr.c (gfc_check_vardef_context): When determining implicit pure status, also check for variable definition context. Walk up namespaces until a procedure is found to reset the implict pure attribute. * resolve.c (gfc_implicit_pure): Walk up namespaces until a procedure is found. 2011-12-31 Thomas König <tkoenig@gcc.gnu.org> PR fortran/51502 * lib/gcc-dg.exp (scan-module-absence): New function. * gfortran.dg/implicit_pure_2.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182754 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-29 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig2011-12-292-6/+41
| | | | | | | | | | | | | | | | * dependency.c (gfc_dep_compare_functions): Document new behavior for REALs and complex. Add comment to cases where only INTEGERs are handled. Compare REAL and COMPLEX constants, returning 0 and -2 only. Add assert to make sure that only integer constants are compared. 2011-12-29 Thomas Koenig <tkoenig@gcc.gnu.org> * gfortran.dg/function_optimize_9.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182720 138bc75d-0d04-0410-961f-82ee72b054a4
* * ChangeLog: Fix entry.toon2011-12-281-0/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182708 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-19 Tobias Burnus <burnus@net-b.de>burnus2011-12-192-0/+7
| | | | | | | | | | | | | | | PR fortran/51605 * parse.c (gfc_fixup_sibling_symbols): Regard FL_LABEL as local symbol. 2011-12-19 Tobias Burnus <burnus@net-b.de> PR fortran/51605 * gfortran.dg/block_10.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182497 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-19 Tobias Burnus <burnus@net-b.de>burnus2011-12-194-8/+34
| | | | | | | | | | | | | | | | | | | | PR fortran/51605 * match.c (gfc_match_select_type): Handle scalar polymophic coarrays. (select_type_set_tmp, ): Ditto; avoid segfault if !class_ok. * primary.c (gfc_match_rvalue): Avoid segfault if !class_ok. * resolve.c (resolve_select_type): Ditto. (resolve_assoc_var): Fix setting the TARGET attribute for polymorphic selectors which are pointers. 2011-12-19 Tobias Burnus <burnus@net-b.de> PR fortran/51605 * gfortran.dg/select_type_25.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182484 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-19 Tobias Burnus <burnus@net-b.de>burnus2011-12-193-41/+111
| | | | | | | | | | | | | | | | * check.c (coarray_check): Add class ref if needed. * resolve.c (resolve_fl_var_and_proc, resolve_fl_derived0, resolve_symbol): Fix checking for BT_CLASS. 2011-12-19 Tobias Burnus <burnus@net-b.de> * gfortran.dg/coarray_poly_3.f90: New. * coarray/poly_run_1.f90: Enable some previously commented code. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182471 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-15 Paul Thomas <pault@gcc.gnu.org>pault2011-12-154-4/+12
| | | | | | | | | | | | | | | | | * trans-expr.c (gfc_walk_function_expr): Detect elemental procedure components as well as elemental procedures. * trans-array.c (gfc_conv_procedure_call): Ditto. * trans-decl.c (gfc_trans_deferred_vars): Correct erroneous break for class pointers to continue. 2011-12-15 Paul Thomas <pault@gcc.gnu.org> * gfortran.dg/class_array_3.f03: Remove explicit indexing of A%disp() to use scalarizer. * gfortran.dg/class_array_9.f03: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182389 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-15 Toon Moene <toon@moene.org>toon2011-12-153-3/+9
| | | | | | | | | | | | PR fortran/51310 * resolve.c (build_default_init_expr): Allow non-allocatable, non-compile-time-constant-shape arrays to have a default initializer. * invoke.texi: Delete the restriction on automatic arrays not git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182384 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-15 Tobias Burnus <burnus@net-b.de>burnus2011-12-152-0/+17
| | | | | | | | | | | | | PR fortran/51550 PR fortran/47545 PR fortran/49050 PR fortran/51075 * resolve.c (resolve_fl_derived0): Print not-implemented error for deferred-length character components. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182372 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-15 Tobias Burnus <burnus@net-b.de>burnus2011-12-154-79/+42
| | | | | | | | | | | | | | | | | | | | * primary.c (gfc_match_varspec): Match array spec for polymorphic coarrays. (gfc_match_rvalue): If a symbol of unknown flavor has a codimension, mark it as a variable. * simplify.c (gfc_simplify_image_index): Directly call simplify_cobound. * trans-intrinsic.c (trans_this_image): Fix handling of corank = 1 arrays. 2011-12-15 Tobias Burnus <burnus@net-b.de> * gfortran.dg/coarray/poly_run_3.f90: New. * gfortran.dg/coarray/poly_run_2.f90: Enable comment-out test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182371 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/51517jakub2011-12-152-11/+28
| | | | | | | | | | | | * trans-decl.c (gfc_get_symbol_decl): Don't set DECL_INITAL on span. (gfc_trans_deferred_vars): Instead add its runtime initialization here. * tree-ssa-coalesce.c (coalesce_ssa_name): For !optimize, test !DECL_IGNORED_P instead of !DECL_ARTIFICIAL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182362 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-11 Tobias Burnus <burnus@net-b.de>burnus2011-12-112-14/+30
| | | | | | | | | | | | | | | | PR fortran/50923 * trans-decl.c (generate_local_decl): Set TREE_NO_WARNING only if the front end has printed a warning. (gfc_generate_function_code): Fix unset-result warning. 2011-12-11 Tobias Burnus <burnus@net-b.de> PR fortran/50923 * gfortran.dg/warn_function_without_result_2.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182211 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-11 Paul Thomas <pault@gcc.gnu.org>pault2011-12-1119-215/+1210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tobias Burnus <burnus@gcc.gnu.org> PR fortran/41539 PR fortran/43214 PR fortran/43969 PR fortran/44568 PR fortran/46356 PR fortran/46990 PR fortran/49074 * interface.c(symbol_rank): Return the rank of the _data component of class objects. (compare_parameter): Also compare the derived type of the class _data component for type mismatch. Similarly, return 1 if the formal and _data ranks match. (compare_actual_formal): Do not compare storage sizes for class expressions. It is an error if an actual class array, passed to a formal class array is not full. * trans-expr.c (gfc_class_data_get, gfc_class_vptr_get, gfc_vtable_field_get, gfc_vtable_hash_get, gfc_vtable_size_get, gfc_vtable_extends_get, gfc_vtable_def_init_get, gfc_vtable_copy_get): New functions for class API. (gfc_conv_derived_to_class): For an array reference in an elemental procedure call retain the ss to provide the scalarized array reference. Moved in file. (gfc_conv_class_to_class): New function. (gfc_conv_subref_array_arg): Use the type of the class _data component as a basetype. (gfc_conv_procedure_call): Ensure that class array expressions have both the _data reference and an array reference. Use gfc_conv_class_to_class to handle class arrays for elemental functions in scalarized loops, class array elements and full class arrays. Use a call to gfc_conv_subref_array_arg in order that the copy-in/copy-out for passing class arrays to derived type arrays occurs correctly. (gfc_conv_expr): If it is missing, add the _data component between a class object or component and an array reference. (gfc_trans_class_array_init_assign): New function. (gfc_trans_class_init_assign): Call it for array expressions. * trans-array.c (gfc_add_loop_ss_code): Do not use a temp for class scalars since their size will depend on the dynamic type. (build_class_array_ref): New function. (gfc_conv_scalarized_array_ref): Call build_class_array_ref. (gfc_array_init_size): Add extra argument, expr3, that represents the SOURCE argument. If present,use this for the element size. (gfc_array_allocate): Also add argument expr3 and use it when calling gfc_array_init_size. (structure_alloc_comps): Enable class arrays. * class.c (gfc_add_component_ref): Carry over the derived type of the _data component. (gfc_add_class_array_ref): New function. (class_array_ref_detected): New static function. (gfc_is_class_array_ref): New function that calls previous. (gfc_is_class_scalar_expr): New function. (gfc_build_class_symbol): Throw not implemented error for assumed size class arrays. Remove error that prevents CLASS arrays. (gfc_build_class_symbol): Prevent pointer/allocatable conflict. Also unset codimension. (gfc_find_derived_vtab): Make 'copy' elemental and set the intent of the arguments accordingly.: * trans-array.h : Update prototype for gfc_array_allocate. * array.c (gfc_array_dimen_size): Return failure if class expr. (gfc_array_size): Likewise. * gfortran.h : New prototypes for gfc_add_class_array_ref, gfc_is_class_array_ref and gfc_is_class_scalar_expr. * trans-stmt.c (trans_associate_var): Exclude class targets from test. Move the allocation of the _vptr to an earlier time for class objects. (trans_associate_var): Assign the descriptor directly for class arrays. (gfc_trans_allocate): Add expr3 to gfc_array_allocate arguments. Convert array element references into sections. Do not invoke gfc_conv_procedure_call, use gfc_trans_call instead. * expr.c (gfc_get_corank): Fix for BT_CLASS. (gfc_is_simply_contiguous): Exclude class from test. * trans.c (gfc_build_array_ref): Include class array refs. * trans.h : Include prototypes for class API functions that are new in trans-expr. Define GFC_DECL_CLASS(node). * resolve.c (check_typebound_baseobject ): Remove error for non-scalar base object. (resolve_allocate_expr): Ensure that class _data component is present. If array, call gfc_expr_to_intialize. (resolve_select): Remove scalar error for SELECT statement as a temporary measure. (resolve_assoc_var): Update 'target' (aka 'selector') as needed. Ensure that the target expression has the right rank. (resolve_select_type): Ensure that target expressions have a valid locus. (resolve_allocate_expr, resolve_fl_derived0): Fix for BT_CLASS. * trans-decl.c (gfc_get_symbol_decl): Set GFC_DECL_CLASS, where appropriate. (gfc_trans_deferred_vars): Get class arrays right. * match.c(select_type_set_tmp): Add array spec to temporary. (gfc_match_select_type): Allow class arrays. * check.c (array_check): Ensure that class arrays have refs. (dim_corank_check, dim_rank_check): Retrun success if class. * primary.c (gfc_match_varspec): Fix for class arrays and co-arrays. Make sure that class _data is present. (gfc_match_rvalue): Handle class arrays. *trans-intrinsic.c (gfc_conv_intrinsic_size): Add class array reference. (gfc_conv_allocated): Add _data component to class expressions. (gfc_add_intrinsic_ss_code): ditto. * simplify.c (simplify_cobound): Fix for BT_CLASS. (simplify_bound): Return NULL for class arrays. (simplify_cobound): Obtain correct array_spec. Use cotype as appropriate. Use arrayspec for bounds. 2011-12-11 Paul Thomas <pault@gcc.gnu.org> Tobias Burnus <burnus@gcc.gnu.org> PR fortran/41539 PR fortran/43214 PR fortran/43969 PR fortran/44568 PR fortran/46356 PR fortran/46990 PR fortran/49074 * gfortran.dg/class_array_1.f03: New. * gfortran.dg/class_array_2.f03: New. * gfortran.dg/class_array_3.f03: New. * gfortran.dg/class_array_4.f03: New. * gfortran.dg/class_array_5.f03: New. * gfortran.dg/class_array_6.f03: New. * gfortran.dg/class_array_7.f03: New. * gfortran.dg/class_array_8.f03: New. * gfortran.dg/coarray_poly_1.f90: New. * gfortran.dg/coarray_poly_2.f90: New. * gfortran.dg/coarray/poly_run_1.f90: New. * gfortran.dg/coarray/poly_run_2.f90: New. * gfortran.dg/class_to_type_1.f03: New. * gfortran.dg/type_to_class_1.f03: New. * gfortran.dg/typebound_assignment_3.f03: Remove the error. * gfortran.dg/auto_dealloc_2.f90: Occurences of __builtin_free now 2. * gfortran.dg/class_19.f03: Occurences of __builtin_free now 8. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182210 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-11 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig2011-12-112-2/+46
| | | | | | | | | | | | | | | | | | | | PR fortran/50690 * frontend-passes.c (in_omp_workshare): New variable. (cfe_expr_0): Don't eliminiate common function if it would put the variable immediately into a WORKSHARE construct. (optimize_namespace): Set in_omp_workshare. (gfc_code_walker): Keep track of OMP PARALLEL and OMP WORKSHARE constructs. 2011-12-11 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/50690 * gfortran.dg/gomp/workshare2.f90: New test. * gfortran.dg/gomp/workshare3.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182208 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-10 Tobias Burnus <burnus@net-b.de>burnus2011-12-102-1/+5
| | | | | | | | * trans-decl.c (add_argument_checking): Fix syntax. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182194 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-10 Tobias Burnus <burnus@net-b.de>burnus2011-12-103-6/+11
| | | | | | | | | | | Kai Tietz <ktietz@redhat.com> * trans-decl.c (add_argument_checking): Check ts.deferred earlier. * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use %ld with long. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182190 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-08 Tobias Burnus <burnus@net-b.de>burnus2011-12-082-2/+10
| | | | | | | | | | | | | | | PR fortran/50815 * trans-decl.c (add_argument_checking): Skip bound checking for deferred-length strings. 2011-12-08 Tobias Burnus <burnus@net-b.de> PR fortran/50815 * gfortran.dg/bounds_check_16.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182134 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-08 Tobias Burnus <burnus@net-b.de>burnus2011-12-082-15/+21
| | | | | | | | | | | | | | | PR fortran/51378 * symbol.c (gfc_find_component): Fix access check of parent components. 2011-12-08 Tobias Burnus <burnus@net-b.de> PR fortran/51378 * gfortran.dg/private_type_14.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182133 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-08 Tobias Burnus <burnus@net-b.de>burnus2011-12-081-0/+7
| | | | | | | | | | | | | | | | | | PR fortran/51407 * io/transfer.c (require_numeric_type): New function. (formatted_transfer_scalar_read, formatted_transfer_scalar_write): Use it, allow BOZ edit descriptors with F2008. 2011-12-08 Tobias Burnus <burnus@net-b.de> PR fortran/51407 * gfortran.dg/io_real_boz_3.f90: New. * gfortran.dg/io_real_boz_4.f90: New. * gfortran.dg/io_real_boz_5.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182132 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-08 Tobias Burnus <burnus@net-b.de>burnus2011-12-082-10/+16
| | | | | | | | | | | | | | | PR fortran/51448 * fortran/trans-array.c (get_std_lbound): Fix handling of conversion functions. 2011-12-08 Tobias Burnus <burnus@net-b.de> PR fortran/51448 * gfortran.dg/realloc_on_assign_8.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182131 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-08 Toon Moene <toon@moene.org>toon2011-12-082-4/+18
| | | | | | | | | | PR fortran/51310 * invoke.texi: Itemize the cases for which -finit-<type>=<constant> doesn't work. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182127 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-06 Tobias Burnus <burnus@net-b.de>burnus2011-12-062-0/+9
| | | | | | | | | | | | | | | PR fortran/51435 * expr.c (gfc_has_default_initializer): Fix handling of DT with initialized pointer components. 2011-12-06 Tobias Burnus <burnus@net-b.de> PR fortran/51435 * gfortran.dg/default_initialization_5.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182059 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-05 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig2011-12-052-3/+19
| | | | | | | | | | | | | | | PR fortran/51338 * dependency.c (are_identical_variables): Handle case where end fields of substring references are NULL. 2011-12-05 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/51338 * gfortran.dg/assumed_charlen_substring_1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182024 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-04 Tobias Burnus <burnus@net-b.de>burnus2011-12-042-22/+7
| | | | | | | | | | | | | | | | PR fortran/51383 * resolve.c (find_array_spec): Use ref->u.c.component directly without starting from ts.u.derived. 2011-12-04 Tobias Burnus <burnus@net-b.de> PR fortran/51383 * gfortran.dg/associate_10.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181992 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-03 Tobias Burnus <burnus@net-b.de>burnus2011-12-033-8/+13
| | | | | | | | | | | | | | | | | | | PR fortran/48887 * match.c (select_type_set_tmp): Don't set allocatable/pointer attribute. * class.c (gfc_build_class_symbol): Handle attr.select_type_temporary. 2011-12-03 Tobias Burnus <burnus@net-b.de> PR fortran/48887 * gfortran.dg/select_type_24.f90: New. * gfortran.dg/select_type_23.f03: Add dg-error. * gfortran.dg/class_45a.f03: Add missing TARGET attribute. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181975 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-03 Tobias Burnus <burnus@net-b.de> ↵burnus2011-12-032-4/+30
| | | | | | | | | | | | | | PR fortran/50684 * check.c (variable_check): Fix intent(in) check. 2011-12-03 Tobias Burnus <burnus@net-b.de> PR fortran/50684 * gfortran.dg/move_alloc_8.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181967 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-03 Tobias Burnus <burnus@net-b.de>burnus2011-12-033-33/+69
| | | | | | | | | | | | | | | | | | | | * check.c (gfc_check_move_alloc): Allow nonpolymorphic FROM with polymorphic TO. * trans-intrinsic.c (conv_intrinsic_move_alloc): Handle nonpolymorphic FROM with polymorphic TO. 2011-12-03 Tobias Burnus <burnus@net-b.de> * gfortran.dg/select_type_23.f03: Revert Rev. 181801, i.e. remove the dg-error line. * gfortran.dg/move_alloc_5.f90: Ditto and change back to dg-do run. * gfortran.dg/move_alloc_9.f90: New. * gfortran.dg/move_alloc_10.f90: New git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181966 138bc75d-0d04-0410-961f-82ee72b054a4
* Make a few helper functions static.jb2011-12-012-2/+7
| | | | | | | | | | | 2011-12-01 Janne Blomqvist <jb@gcc.gnu.org> * module.c (dt_lower_string): Make static. (dt_upper_string): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181881 138bc75d-0d04-0410-961f-82ee72b054a4
* PR 25708 Avoid seeking when parsing strings and when peeking.jb2011-12-012-43/+122
| | | | | | | | | | | | | | | 2011-12-01 Janne Blomqvist <jb@gcc.gnu.org> PR fortran/25708 * module.c (parse_string): Read string into resizable array instead of parsing twice and seeking. (peek_atom): New implementation avoiding seeks. (require_atom): Save and set column and line explicitly for error handling. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181879 138bc75d-0d04-0410-961f-82ee72b054a4
* Don't call stat before opening a file.jb2011-12-012-8/+4
| | | | | | | | | | 2011-12-01 Janne Blomqvist <jb@gcc.gnu.org> * misc.c (gfc_open_file): Don't call stat. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181875 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-11-29 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig2011-11-292-15/+36
| | | | | | | | | | | | | | | | PR fortran/40958 * module.c (prev_module_line): New variable. (prev_module_column): New variable. (prev_character): New variable. (module_char): Update the new variables. (module_unget_char): New function. (parse_string): Use module_unget_char. (parse_integer): Likewise. (parse_name): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181810 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-11-29 Tobias Burnus <burnus@net-b.de>burnus2011-11-293-35/+125
| | | | | | | | | | | | | | | | | | | | | | PR fortran/51306 PR fortran/48700 * check.c (gfc_check_move_alloc): Make sure that from/to are both polymorphic or neither. * trans-intrinsic.c (conv_intrinsic_move_alloc): Cleanup, generate inline code. 2011-11-29 Tobias Burnus <burnus@net-b.de> PR fortran/51306 PR fortran/48700 * gfortran.dg/move_alloc_5.f90: Add dg-error. * gfortran.dg/select_type_23.f03: Add dg-error. * gfortran.dg/move_alloc_6.f90: New. * gfortran.dg/move_alloc_7.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181801 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-11-28 Tobias Burnus <burnus@net-b.de>burnus2011-11-282-7/+12
| | | | | | | | | | | | | | | | | | | Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/51308 * symbol.c (check_conflict): Ignore BIND(C) + PARAMETER conflicts for ISO_C_BINDING variables. (gen_special_c_interop_ptr): Don't mark c_ptr_null/c_funptr_null as SAVE. 2011-11-28 Tobias Burnus <burnus@net-b.de> PR fortran/51308 * gfortran.dg/iso_c_binding_compiler_4.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181778 138bc75d-0d04-0410-961f-82ee72b054a4
* * trans-array.c (set_loop_bounds): Remove dead conditions.mikael2011-11-252-2/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181731 138bc75d-0d04-0410-961f-82ee72b054a4
* fortran/mikael2011-11-252-1/+8
| | | | | | | | | | | | | | | | PR fortran/51250 PR fortran/43829 * trans-array.c (gfc_trans_create_temp_array): Get dimension from the right gfc_ss struct. testsuite/ PR fortran/51250 PR fortran/43829 * gfortran.dg/inline_sum_3.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181730 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud