aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
AgeCommit message (Collapse)AuthorFilesLines
2013-07-30re PR fortran/57530 ([OOP] Wrongly rejects type_pointer => class_target ↵Tobias Burnus3-0/+17
(which have identical declared type)) 2013-07-30 Tobias Burnus <burnus@net-b.de> PR fortran/57530 * symbol.c (gfc_type_compatible): A type is type compatible with a class if both have the same declared type. * interface.c (compare_type): Reject CLASS/TYPE even if they are type compatible. From-SVN: r201329
2013-07-30re PR fortran/57530 ([OOP] Wrongly rejects type_pointer => class_target ↵Tobias Burnus2-7/+104
(which have identical declared type)) 2013-07-30 Tobias Burnus <burnus@net-b.de> PR fortran/57530 * trans-expr.c (gfc_trans_class_assign): Handle CLASS array functions. (gfc_trans_pointer_assign): Ditto and support pointer assignment of a polymorphic var to a nonpolymorphic var. 2013-07-30 Tobias Burnus <burnus@net-b.de> PR fortran/57530 * gfortran.dg/pointer_assign_8.f90: New. * gfortran.dg/pointer_assign_9.f90: New. * gfortran.dg/pointer_assign_10.f90: New. * gfortran.dg/pointer_assign_11.f90: New. From-SVN: r201328
2013-07-29match.c (gfc_match_call): Exit loop after setting i.Po-Chun Chang6-5/+33
* match.c (gfc_match_call): Exit loop after setting i. * resolve.c (resolve_variable): Exit loop after setting seen. * expr.c (gfc_check_pointer_assign): Exit loop after setting * warn. * trans-array.c (set_loop_bounds): Exit loop after setting nonoptional_arr. * trans-io.c (gfc_trans_transfer): Exit loop after setting * seen_vector. From-SVN: r201316
2013-07-28re PR fortran/58009 (Elements with same value in vector subscript in ↵Thomas Koenig2-0/+51
variable definition context) 2013-07-28 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/58009 * expr.c (gfc_check_vardef_context): Check for same values in vector expression subscripts. 2013-07-28 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/58009 * gfortran.dg/vector_subsript_7.f90: New test. From-SVN: r201294
2013-07-27re PR fortran/57991 (Enhance "Same actual argument associated" warning ↵Tobias Burnus2-1/+7
(-Waliasing)) 2013-07-27 Tobias Burnus <burnus@net-b.de> PR fortran/57991 * interface.c (check_some_aliasing): Also warn for intent * OUT/OUT. 2013-07-27 Tobias Burnus <burnus@net-b.de> PR fortran/57991 * gfortran.dg/warn_alias.f90: New. From-SVN: r201286
2013-07-27re PR fortran/57285 ([OOP] ICE on invalid: "gfc_array_dimen_size(): Bad ↵Janus Weil2-3/+5
dimension" due to SIZE intrinsic with invalid dim on CLASS dummy) 2013-07-27 Janus Weil <janus@gcc.gnu.org> PR fortran/57285 * check.c (dim_rank_check): Re-enable this check for CLASS arrays. 2013-07-27 Janus Weil <janus@gcc.gnu.org> PR fortran/57285 * gfortran.dg/class_array_19.f90: New. From-SVN: r201284
2013-07-25re PR fortran/57966 ([OOP] Using a TBP to specify the shape of a dummy argument)Janus Weil2-0/+12
2013-07-25 Janus Weil <janus@gcc.gnu.org> PR fortran/57966 * resolve.c (resolve_typebound_function): Make sure the declared type, including its type-bound procedures, is resolved before resolving the actual type-bound call. 2013-07-25 Janus Weil <janus@gcc.gnu.org> PR fortran/57966 * gfortran.dg/typebound_call_25.f90: New. From-SVN: r201254
2013-07-25re PR fortran/57639 ([OOP] ICE with polymorphism (and illegal code))Janus Weil3-2/+14
2013-07-25 Janus Weil <janus@gcc.gnu.org> PR fortran/57639 * interface.c (compare_parameter): Check for class_ok. * simplify.c (gfc_simplify_same_type_as): Ditto. 2013-07-25 Janus Weil <janus@gcc.gnu.org> PR fortran/57639 * gfortran.dg/unlimited_polymorphic_9.f90: New. From-SVN: r201239
2013-07-23decl.c: Fix comment typos.Ondřej Bílka5-6/+13
2013-07-23 Ondřej Bílka <neleai@seznam.cz> * decl.c: Fix comment typos. * interface.c: Likewise. * trans-array.c: Likewise. * trans.c: Likewise. From-SVN: r201162
2013-07-22re PR fortran/57906 (Coarray components: Assignment optimized away ↵Tobias Burnus3-4/+22
(gfortran.dg/coarray/lib_realloc_1.f90)) 2013-07-22 Tobias Burnus <burnus@net-b.de> PR fortran/57906 PR fortran/52052 * class.c (gfc_build_class_symbol): Set coarray_comp. * trans-array.c (structure_alloc_comps): For coarrays, directly use the data pointer address. 2013-07-22 Tobias Burnus <burnus@net-b.de> PR fortran/57906 PR fortran/52052 * coarray/lib_realloc_1.f90: Permit optimization. * gfortran.dg/coarray_31.f90: New. From-SVN: r201140
2013-07-22df-problems.c (can_move_insns_across): Exit loop once we find a non-fixed, ↵Po-Chun Chang2-1/+9
non-global register. * df-problems.c (can_move_insns_across): Exit loop once we find a non-fixed, non-global register. * ipa-pure-const.c (propagate_nothrow): Exit loop after setting can_throw. * omega.c (omega_eliminate_red): Break after setting red_found. (omega_problem_has_red_equations): Similarly after setting found. (omega_query_variable): Similarly after setting coupled. * trans-decl.c (gfc_build_dummy_array_decl): Exit loop after setting PACKED_PARTIAL. From-SVN: r201132
2013-07-22trans-array.c (gfc_array_allocate): Correct memory-leak patch.Tobias Burnus2-16/+22
2013-07-22 Tobias Burnus <burnus@net-b.de> * trans-array.c (gfc_array_allocate): Correct memory-leak patch. From-SVN: r201129
2013-07-22trans-array.c (gfc_array_allocate, [...]): Plug memory leak.Tobias Burnus2-6/+12
2013-07-22 Tobias Burnus <burnus@net-b.de> * trans-array.c (gfc_array_allocate, gfc_trans_deferred_array): Plug memory leak. From-SVN: r201125
2013-07-21trans-decl.c: Fix comment typos.Ondřej Bílka3-3/+8
2013-07-21 Ondřej Bílka <neleai@seznam.cz> * trans-decl.c: Fix comment typos. * trans-expr.c: Ditto. 2013-07-21 Ondřej Bílka <neleai@seznam.cz> * io/transfer.c: Fix comment typos. From-SVN: r201107
2013-07-21re PR fortran/56937 (Unnecessarily temporary with array-vector assignments)Thomas Koenig2-3/+24
2013-07-21 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/56937 * dependency.c (gfc_dep_resolver): Treat identical array subscripts as identical; don't unconditionally return a dependency if an array subscript is found. 2013-07-21 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/56937 * gfortran.dg/dependency_42.f90: New test. * gfortran.dg/dependency_43.f90: New test. From-SVN: r201094
2013-07-21re PR libfortran/35862 ([F2003] Implement new rounding modes for run time)Tobias Burnus2-0/+12
2013-07-21 Tobias Burnus <burnus@net-b.de> PR fortran/35862 * libgfortran.h (GFC_FPE_DOWNWARD, GFC_FPE_TONEAREST, GFC_FPE_TOWARDZERO, GFC_FPE_UPWARD): New defines. 2013-07-21 Tobias Burnus <burnus@net-b.de> PR fortran/35862 * libgfortran.h (set_fpu_rounding_mode, get_fpu_rounding_mode): New prototypes. * config/fpu-387.h (set_fpu_rounding_mode, get_fpu_rounding_mode): New functions. * config/fpu-aix.h (set_fpu_rounding_mode, get_fpu_rounding_mode): Ditto. * config/fpu-generic.h (set_fpu_rounding_mode, get_fpu_rounding_mode): Ditto. * config/fpu-glibc.h (set_fpu_rounding_mode, get_fpu_rounding_mode): Ditto. * config/fpu-sysv.h (set_fpu_rounding_mode, get_fpu_rounding_mode): Ditto. * configure.ac: Check for fp_rnd and fp_rnd_t. * io/io.h (enum unit_round): Use GFC_FPE_* for the value. * io/read.c (convert_real): Set FP ronding mode. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * config.h.in: Regenerate. * configure: Regenerate. 2013-07-21 Tobias Burnus <burnus@net-b.de> PR fortran/35862 * gfortran.dg/round_4.f90: New. Co-Authored-By: Uros Bizjak <ubizjak@gmail.com> From-SVN: r201093
2013-07-21re PR fortran/57894 (min/max required actual argument missing)Tobias Burnus2-3/+76
2013-07-21 Tobias Burnus <burnus@net-b.de> PR fortran/57894 * check.c (min_max_args): Add keyword= check. 2013-07-21 Tobias Burnus <burnus@net-b.de> PR fortran/57894 * gfortran.dg/min_max_conformance_2.f90: New. From-SVN: r201092
2013-07-17[multiple changes]Tobias Burnus2-8/+12
2013-07-17 Mikael Morin <mikael@gcc.gnu.org> Tobias Burnus <burnus@net-b.de> PR fortran/57895 * match.c (gfc_match_name): Ensure that the error message regarding -fdollar-ok gets printed. (gfc_match_common): Avoid multiple freeing. 2013-07-17 Tobias Burnus <burnus@net-b.de> PR fortran/57895 * gfortran.dg/dollar_sym_3.f: New. * gfortran.dg/dollar_sym_1.f90: Update dg-error. From-SVN: r201008
2013-07-16re PR fortran/57912 (gfortran/coarray/alloc_comp_2.f90 ICE)Tobias Burnus2-2/+7
2013-07-16 Tobias Burnus <burnus@net-b.de> PR fortran/57912 * trans-expr.c (gfc_trans_scalar_assign): Correct if condition for caf realloc. From-SVN: r200987
2013-07-15trans-array.h (gfc_deallocate_alloc_comp_no_caf, [...]): New prototype.Tobias Burnus6-32/+121
2013-07-15 Tobias Burnus <burnus@net-b.de> * trans-array.h (gfc_deallocate_alloc_comp_no_caf, gfc_reassign_alloc_comp_caf): New prototype. * trans-array.c (enum): Add DEALLOCATE_ALLOC_COMP_NO_CAF and COPY_ALLOC_COMP_CAF. (structure_alloc_comps): Handle it. (gfc_reassign_alloc_comp_caf, gfc_deallocate_alloc_comp_no_caf): New function. (gfc_alloc_allocatable_for_assignment): Call it. * trans-expr.c (gfc_trans_scalar_assign, gfc_trans_arrayfunc_assign, gfc_trans_assignment_1): Ditto. * parse.c (parse_derived): Correctly set coarray_comp. * resolve.c (resolve_symbol): Improve error wording. 2013-07-15 Tobias Burnus <burnus@net-b.de> * gfortran.dg/coarray_lib_realloc_1.f90: New. * gfortran.dg/coarray/lib_realloc_1.f90: New. * gfortran.dg/coarray_6.f90: Add dg-error. From-SVN: r200955
2013-07-15re PR fortran/37336 ([F03] Finish derived-type finalization)Tobias Burnus4-6/+127
2013-07-15 Tobias Burnus <burnus@net-b.de> PR fortran/37336 * trans.c (gfc_add_comp_finalizer_call): New function. * trans.h (gfc_add_comp_finalizer_call): New prototype. * trans-array.c (structure_alloc_comps): Call it. 2013-07-15 Tobias Burnus <burnus@net-b.de> PR fortran/37336 * gfortran.dg/finalize_18.f90: New. From-SVN: r200954
2013-07-14re PR fortran/52669 (No warning in unused private variable in modules)Thomas Koenig2-6/+22
2013-07-14 Thomas Koenig <tkoenig@gcc.gnu.org> Tobias Burnus <burnus@gcc.gnu.org> PR fortran/52669 * trans-decl.c (gfc_finish_var_decl): Move setting of PRIVATE for a module variable if the module has a private default or -fmodule-private is given to... (gfc_create_module_variable): here. Optionally warn about private module variable which is not used. 2013-07-14 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/52669 * fortran.dg/module_variable_1.f90: New test. * fortran.dg/module_variable_2.f90: New test. Co-Authored-By: Tobias Burnus <burnus@gcc.gnu.org> From-SVN: r200950
2013-07-08re PR fortran/57834 (C_F_POINTER (only with -std=): accepts only explicit- ↵Tobias Burnus2-6/+15
and assumed-size arrays for FPTR when SHAPE is present) 2013-07-08 Tobias Burnus <burnus@net-b.de> PR fortran/57834 * check.c (is_c_interoperable): Add special case for * c_f_pointer. (explicit-size, gfc_check_c_f_pointer, gfc_check_c_loc): Update call. 2013-07-08 Tobias Burnus <burnus@net-b.de> PR fortran/57834 * gfortran.dg/c_f_pointer_tests_8.f90: New. From-SVN: r200794
2013-07-08re PR fortran/50554 (INQUIRE cannot redefine DO index (r178939))Tobias Burnus2-2/+7
2013-07-08 Tobias Burnus <burnus@net-b.de> PR fortran/50554 * io.c (match_inquire_element): Add missing do-var check. 2013-07-08 Tobias Burnus <burnus@net-b.de> PR fortran/50554 * gfortran.dg/do_check_9.f90: New. From-SVN: r200790
2013-07-08re PR fortran/57785 (DOT_PRODUCT error with constant complex array)Tobias Burnus2-8/+19
2013-07-08 Tobias Burnus <burnus@net-b.de> PR fortran/57785 * simplify.c (compute_dot_product): Complex conjugate for dot_product. (gfc_simplify_dot_product, gfc_simplify_matmul): Update call. 2013-07-08 Tobias Burnus <burnus@net-b.de> PR fortran/57785 * gfortran.dg/dot_product_2.f90: New. From-SVN: r200786
2013-07-08re PR fortran/57469 (Erroneous warning for unused dummy arguments used in ↵Tobias Burnus2-2/+8
namelist) 2013-07-08 Tobias Burnus <burnus@net-b.de> PR fortran/57469 * trans-decl.c (generate_local_decl): Don't warn that a dummy is unused, when it is in a namelist. 2013-07-08 Tobias Burnus <burnus@net-b.de> PR fortran/57469 * gfortran.dg/warn_unused_dummy_argument_4.f90: New. From-SVN: r200785
2013-07-01re PR fortran/54788 (ICE on pointer-array element assignment)Dominique d'Humieres2-1/+6
2013-07-01 Dominique d'Humieres <dominiq@lps.ens.fr> PR fortran/54788 * array.c (spec_size): handle the case as==NULL. 2013-07-01 Dominique d'Humieres <dominiq@lps.ens.fr> PR fortran/54788 * gfortran.dg/pointer_remapping_8.f90: New. From-SVN: r200575
2013-06-26re PR fortran/29800 (-fbounds-check: For derived types, write not also ↵Tobias Burnus4-5/+44
compound name) 2013-06-26 Tobias Burnus <burnus@net-b.de> PR fortran/29800 * trans-array.c (gfc_conv_array_ref): Improve out-of-bounds diagnostic message. * trans-array.c (gfc_conv_array_ref): Update prototype. * trans-expr.c (gfc_conv_variable): Update call. 2013-06-26 Tobias Burnus <burnus@net-b.de> PR fortran/29800 * gfortran.dg/bounds_check_17.f90: New. From-SVN: r200425
2013-06-24[multiple changes]Tobias Burnus2-2/+26
2013-06-24 Steven G. Kargl <sgk@troutmask.apl.washington.edu> Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> Dominique d'Humieres <dominiq@lps.ens.fr> PR fortran/52413 * simplify.c (gfc_simplify_fraction): Fix the sign of negative values. 2013-06-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> Dominique d'Humieres <dominiq@lps.ens.fr> PR fortran/52413 * gfortran.dg/fraction.f90: New. From-SVN: r200361
2013-06-21trans-array.c (gfc_trans_deferred_array): Call the finalizer for ↵Tobias Burnus3-15/+39
nonallocatable local variables. 2013-06-21 Tobias Burnus <burnus@net-b.de> * trans-array.c (gfc_trans_deferred_array): Call the finalizer for nonallocatable local variables. * trans-decl.c (gfc_get_symbol_decl): Add local finalizable vars to the deferred list. (gfc_trans_deferred_vars): Call gfc_trans_deferred_array for those. 2013-06-21 Tobias Burnus <burnus@net-b.de> * gfortran.dg/finalize_17.f90: New. From-SVN: r200321
2013-06-21trans-array.c (gfc_alloc_allocatable_for_assignment): Allocate at least one ↵Tobias Burnus3-0/+11
byte. 2013-06-21 Tobias Burnus <burnus@net-b.de> * trans-array.c (gfc_alloc_allocatable_for_assignment): Allocate at least one byte. * trans-expr.c (alloc_scalar_allocatable_for_assignment): Ditto. 2013-06-21 Tobias Burnus <burnus@net-b.de> * gfortran.dg/realloc_on_assign_18.f90: New. From-SVN: r200320
2013-06-20resolve.c (get_temp_from_expr): Don't set FL_VARIABLE twice.Tobias Burnus2-1/+4
2013-06-20 Tobias Burnus <burnus@net-b.de> * resolve.c (get_temp_from_expr): Don't set FL_VARIABLE twice. From-SVN: r200234
2013-06-17gfortran.h (gfc_option_t): Add fpe_summary.Tobias Burnus7-17/+91
2013-06-17 Tobias Burnus <burnus@net-b.de> * gfortran.h (gfc_option_t): Add fpe_summary. * gfortran.texi (_gfortran_set_options): Update. * invoke.texi (-ffpe-summary): Add doc. * lang.opt (ffpe-summary): Add flag. * options.c (gfc_init_options, gfc_handle_option): Handle it. (gfc_handle_fpe_option): Renamed from gfc_handle_fpe_trap_option, also handle fpe_summary. * trans-decl.c (create_main_function): Update _gfortran_set_options call. 2013-06-17 Tobias Burnus <burnus@net-b.de> * libgfortran.h (compile_options_t) Add fpe_summary. (get_fpu_except_flags): New prototype. * runtime/compile_options.c (set_options, init_compile_options): Handle fpe_summary. * runtime/stop.c (report_exception): New function. (stop_numeric, stop_numeric_f08, stop_string, error_stop_string, error_stop_numeric): Call it. * config/fpu-387.h (get_fpu_except_flags): New function. * config/fpu-aix.h (get_fpu_except_flags): New function. * config/fpu-generic.h (get_fpu_except_flags): New function. * config/fpu-glibc.h (get_fpu_except_flags): New function. * config/fpu-glibc.h (get_fpu_except_flags): New function. * configure.ac: Check for fpxcp.h. * configure: Regenerate. * config.h.in: Regenerate. From-SVN: r200147
2013-06-15re PR fortran/49074 ([OOP] Defined assignment w/ CLASS arrays: Incomplete ↵Mikael Morin2-1/+10
error message) fortran/ PR fortran/49074 PR fortran/56136 * dependency.c (gfc_check_argument_var_dependency): Return 0 in the array constructor case. testsuite/ PR fortran/49074 PR fortran/56136 * gfortran.dg/typebound_assignment_5.f03: Check the absence of any packing. * gfortran.dg/typebound_assignment_6.f03: New. From-SVN: r200128
2013-06-14re PR fortran/57508 ([OOP] Intrinsic assignment+defined-assignment for ↵Tobias Burnus2-0/+10
comps: PROCEDURE attribute of '_F.DA0' conflicts with VARIABLE attribute) 2013-06-14 Tobias Burnus <burnus@net-b.de> PR fortran/57508 * resolve.c (get_temp_from_expr): Don't copy function result attributes to temporary. 2013-06-14 Tobias Burnus <burnus@net-b.de> PR fortran/57508 * gfortran.dg/defined_assignment_7.f90: New. From-SVN: r200089
2013-06-14re PR fortran/57596 (Wrong code for allocatable deferred-length strings)Tobias Burnus2-8/+46
2013-06-14 Tobias Burnus <burnus@net-b.de> PR fortran/57596 * trans-decl.c (gfc_trans_deferred_vars): Honor OPTIONAL for nullify and deferred-strings' length variable. 2013-06-14 Tobias Burnus <burnus@net-b.de> PR fortran/57596 * gfortran.dg/deferred_type_param_9.f90: New. From-SVN: r200084
2013-06-13re PR fortran/49074 ([OOP] Defined assignment w/ CLASS arrays: Incomplete ↵Mikael Morin2-20/+18
error message) fortran/ PR fortran/49074 * trans-expr.c (gfc_conv_variable): Don't walk the reference chain. Handle NULL array references. (gfc_conv_procedure_call): Remove code handling NULL array references. testsuite/ PR fortran/49074 * gfortran.dg/typebound_assignment_5.f03: New. From-SVN: r200069
2013-06-11re PR fortran/57535 ([OOP] ICE when allocating a CLASS function-result variable)Tobias Burnus2-1/+13
2013-06-11 Tobias Burnus <burnus@net-b.de> PR fortran/57535 * trans-array.c (build_class_array_ref): Fix ICE for function result variables. 2013-06-11 Tobias Burnus <burnus@net-b.de> PR fortran/57535 * gfortran.dg/class_array_18.f90: New. From-SVN: r199958
2013-06-08re PR fortran/37336 ([F03] Finish derived-type finalization)Tobias Burnus2-22/+47
2013-06-08 Tobias Burnus <burnus@net-b.de> PR fortran/37336 * trans-decl.c (init_intent_out_dt): Call finalizer when approriate. 2013-06-08 Tobias Burnus <burnus@net-b.de> PR fortran/37336 * gfortran.dg/finalize_10.f90: New. * gfortran.dg/auto_dealloc_2.f90: Update tree-dump. * gfortran.dg/finalize_15.f90: New. From-SVN: r199851
2013-06-08re PR fortran/57553 ([F08] Valid use of STORAGE_SIZE rejected, bad error ↵Tobias Burnus3-6/+13
message for invalid use) 2013-06-08 Tobias Burnus <burnus@net-b.de> PR fortran/57553 * simplify.c (gfc_simplify_storage_size): Handle literal strings. * trans-intrinsic.c (gfc_conv_intrinsic_storage_size): Add missing fold_convert. 2013-06-08 Tobias Burnus <burnus@net-b.de> PR fortran/57553 * gfortran.dg/storage_size_4.f90: New. From-SVN: r199850
2013-06-07re PR fortran/57549 (Bogus error with array constructor with derived-type ↵Tobias Burnus4-5/+16
typespec) 2013-06-07 Tobias Burnus <burnus@net-b.de> PR fortran/57549 * array.c (gfc_match_array_constructor): Call gfc_match_type_spec instead of gfc_match_decl_type_spec. * match.c (gfc_match_type_spec): Renamed from match_type_spec. (gfc_match_type_is, gfc_match_allocate): Update call. * match.h (gfc_match_type_spec): Add prototype. 2013-06-07 Tobias Burnus <burnus@net-b.de> PR fortran/57549 * gfortran.dg/array_constructor_48.f90: New. * gfortran.dg/array_constructor_type_14.f03: Correct test case. * gfortran.dg/array_constructor_type_15.f03: Ditto. From-SVN: r199820
2013-06-07re PR fortran/57556 ([OOP] ICE with move_alloc on polymorphic component with ↵Tobias Burnus2-1/+6
-fcheck=all) 2013-06-07 Tobias Burnus <burnus@net-b.de> PR fortran/57556 * trans.c (gfc_build_final_call): Init block before use. From-SVN: r199812
2013-06-06re PR fortran/57542 ([OOP] ICE on FINALization with specific options)Tobias Burnus2-2/+10
2013-06-06 Tobias Burnus <burnus@net-b.de> PR fortran/57542 * trans.c (gfc_build_final_call): Add se.pre to the block and modify the assert. 2013-06-06 Tobias Burnus <burnus@net-b.de> PR fortran/57542 * gfortran.dg/finalize_16.f90: New. From-SVN: r199736
2013-06-04re PR fortran/37336 ([F03] Finish derived-type finalization)Tobias Burnus9-151/+273
2013-06-03 Tobias Burnus <burnus@net-b.de> PR fortran/37336 * trans.h (gfc_build_final_call): Remove prototype. (gfc_add_finalizer_call): Add prototype. * trans-array.c (gfc_trans_dealloc_allocated): Support * finalization. (structure_alloc_comps): Update caller. (gfc_trans_deferred_array): Call finalizer. * trans-array.h (gfc_trans_dealloc_allocated): Update prototype. * trans-decl.c (gfc_trans_deferred_vars): Don't * deallocate/finalize variables of the main program. * trans-expr.c (gfc_conv_procedure_call): Support finalization. * trans-openmp.c (gfc_omp_clause_dtor, gfc_trans_omp_array_reduction): Update calls. * trans-stmt.c (gfc_trans_deallocate): Avoid double deallocation of alloc components. * trans.c (gfc_add_finalizer_call): New function. (gfc_deallocate_with_status, gfc_deallocate_scalar_with_status): Call it (gfc_build_final_call): Fix handling of scalar coarrays, move up in the file and make static. 2013-06-03 Tobias Burnus <burnus@net-b.de> PR fortran/37336 * gfortran.dg/finalize_12.f90: New. * gfortran.dg/alloc_comp_basics_1.f90: Add BLOCK for end of scope finalization. * gfortran.dg/alloc_comp_constructor_1.f90: Ditto. * gfortran.dg/allocatable_scalar_9.f90: Ditto. * gfortran.dg/auto_dealloc_2.f90: Ditto. * gfortran.dg/class_19.f03: Ditto. * gfortran.dg/coarray_lib_alloc_1.f90: Ditto. * gfortran.dg/coarray_lib_alloc_2.f90: Ditto. * gfortran.dg/extends_14.f03: Ditto. * gfortran.dg/move_alloc_4.f90: Ditto. * gfortran.dg/typebound_proc_27.f03: Ditto. From-SVN: r199643
2013-06-01configure.ac: Add AC_HEADER_TIOCGWINSZ macro.Janus Weil2-1/+34
2013-06-01 Janus Weil <janus@gcc.gnu.org> Mikael Morin <mikael@gcc.gnu.org> * configure.ac: Add AC_HEADER_TIOCGWINSZ macro. * config.in: Regenerated. * configure: Regenerated. 2013-06-01 Janus Weil <janus@gcc.gnu.org> Mikael Morin <mikael@gcc.gnu.org> * error.c (get_terminal_width): Only limit the width if we're outputting to a terminal. Try to determine width via ioctl. Co-Authored-By: Mikael Morin <mikael@gcc.gnu.org> From-SVN: r199585
2013-06-01decl.c (add_global_entry): Take locus.Tobias Burnus3-21/+35
2013-06-01 Tobias Burnus <burnus@net-b.de> * decl.c (add_global_entry): Take locus. (gfc_match_entry): Update call. (gfc_match_end): Better error location. * parse.c (parse_block_data, parse_module, add_global_procedure, add_global_program): Use better locus data. From-SVN: r199580
2013-05-31re PR fortran/57456 ([OOP] CLASS + CHARACTER ALLOCATE with typespec: For ↵Tobias Burnus4-5/+18
arrays, the typespec is ignored) 2013-05-31 Tobias Burnus <burnus@net-b.de> PR fortran/57456 * trans-array.c (gfc_array_init_size): Use passed type spec, when available. (gfc_array_allocate): Pass typespec on. * trans-array.h (gfc_array_allocate): Update prototype. * trans-stmt.c (gfc_trans_allocate): Pass typespec on. 2013-05-31 Tobias Burnus <burnus@net-b.de> PR fortran/57456 * gfortran.dg/class_array_17.f90: New. From-SVN: r199528
2013-05-31re PR fortran/54190 (TYPE(*)/assumed-rank: Type/rank check too relaxed for ↵Janus Weil5-44/+103
dummy procedure) 2013-05-31 Janus Weil <janus@gcc.gnu.org> PR fortran/54190 PR fortran/57217 * gfortran.h (gfc_terminal_width): Remove prototype. * error.c (get_terminal_width): Moved here from misc.c. Renamed. Try to determine terminal width from environment variable. * interface.c (compare_type, compare_rank): New functions. Fix assumed type/rank handling. (compare_type_rank, check_dummy_characteristics, check_result_characteristics, gfc_compare_interfaces): Use them. (symbol_rank): Slightly modified and moved. * misc.c (gfc_terminal_width): Moved to error.c. 2013-05-31 Janus Weil <janus@gcc.gnu.org> PR fortran/54190 PR fortran/57217 * gfortran.dg/dummy_procedure_5.f90: Modified error message. * gfortran.dg/interface_26.f90: Ditto. * gfortran.dg/proc_ptr_11.f90: Ditto. * gfortran.dg/proc_ptr_15.f90: Ditto. * gfortran.dg/proc_ptr_comp_20.f90: Ditto. * gfortran.dg/proc_ptr_comp_33.f90: Ditto. * gfortran.dg/proc_ptr_result_5.f90: Ditto. * gfortran.dg/typebound_override_1.f90: Ditto. * gfortran.dg/typebound_override_4.f90: Ditto. * gfortran.dg/typebound_proc_6.f03: Ditto. * gfortran.dg/assumed_type_7.f90: New test. * gfortran.dg/typebound_override_5.f90: New test. * gfortran.dg/typebound_override_6.f90: New test. * gfortran.dg/typebound_override_7.f90: New test. From-SVN: r199475
2013-05-30re PR fortran/54189 (ICE (segfault) with invalid assumed-size dummy)Janus Weil2-1/+6
2013-05-30 Janus Weil <janus@gcc.gnu.org> PR fortran/54189 * resolve.c (check_assumed_size_reference): Check for e->ref. 2013-05-30 Janus Weil <janus@gcc.gnu.org> PR fortran/54189 * gfortran.dg/assumed_size_1.f90: New. From-SVN: r199445
2013-05-30re PR fortran/57458 (TS29113: Wrongly rejects noncontiguous argument to ↵Tobias Burnus2-7/+14
assumed-rank when both are volatile/asynchronous) 2013-05-30 Tobias Burnus <burnus@net-b.de> PR fortran/57458 * interface.c (compare_parameter): Update C1239/C1240 constraint check for assumed-rank/TS29113. 2013-05-30 Tobias Burnus <burnus@net-b.de> PR fortran/57458 * gfortran.dg/assumed_rank_13.f90: New. From-SVN: r199437