aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/interface.c
AgeCommit message (Collapse)AuthorFilesLines
2017-03-22re PR fortran/79602 (translation: globally replace '%s' with %qs)Dominique d'Humieres1-3/+3
2017-03-22 Dominique d'Humieres <dominiq@lps.ens.fr> PR fortran/79602 * decl.c: Replace '%s' with %qs. * expr.c: Likewise. * interface.c: Likewise. * match.c: Likewise. * primary.c: Likewise. * resolve.c: Likewise. PR fortran/79844 PR fortran/80011 * io.c: Remove trailing spaces. * match.c: Likewise. * openmp.c: Likewise. * resolve.c: Likewise. * trans-intrinsic.c: Likewise. PR fortran/79853 * expr.c: Remove a double spaces. PR fortran/79859 * primary.c: Remove spurious quotes around %qs. From-SVN: r246391
2017-02-25re PR fortran/79597 (Incomplete error message "Expecting %<END INTERFACE ↵Dominique d'Humieres1-3/+3
OPERATOR") 2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr> PR fortran/79597 * interface.c (gfc_match_end_interface): Remove spurious comma and space, replace 'got %s' with 'got %qs'. 2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr> PR fortran/79597 * gfortran.dg/dtio_6.f90: Update test. 2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr> PR fortran/79601 * interface.c (check_dtio_arg_TKR_intent): Change 'intent' to 'INTENT'. 2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr> PR fortran/79601 * gfortran.dg/interface_operator_2.f90: New test. From-SVN: r245729
2017-02-20re PR fortran/79599 (typo in diagnostic gfc_error ("DTIO dummy argument at ↵Paul Thomas1-2/+2
%L be a scalar") 2017-02-20 Paul Thomas <pault@gcc.gnu.org> PR fortran/79599 * interface.c (check_dtio_arg_TKR_intent): Supply 'must' missing from error message. 2017-02-20 Paul Thomas <pault@gcc.gnu.org> PR fortran/79523 * interface.c (gfc_find_typebound_dtio_proc): Guard test for flavor attribute by checking that symbol is resolved. From-SVN: r245603
2017-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r243994
2016-12-27gfortran.h (gfc_error): Rename overload with OPT argument to...Jakub Jelinek1-29/+21
* gfortran.h (gfc_error): Rename overload with OPT argument to... (gfc_error_opt): ... this. * error.c (gfc_error): Rename overloads with OPT argument to... (gfc_error_opt): ... this. Adjust callers. (gfc_notify_std, gfc_error): Adjust callers. * resolve.c (resolve_structure_cons, resolve_global_procedure): Use gfc_error_opt instead of gfc_error. * interface.c (argument_rank_mismatch, compare_parameter, gfc_check_typebound_override): Likewise. Fix up formatting. From-SVN: r243941
2016-12-18re PR fortran/78592 (ICE in gfc_find_specific_dtio_proc, at ↵Janus Weil1-9/+11
fortran/interface.c:4939) 2016-12-18 Janus Weil <janus@gcc.gnu.org> PR fortran/78592 * interfac.c (gfc_find_specific_dtio_proc): Fixup for r243005, making sure that the generic list is followed through until the end. 2016-12-18 Janus Weil <janus@gcc.gnu.org> PR fortran/78592 * gfortran.dg/dtio_21.f90: New test. From-SVN: r243783
2016-12-15re PR fortran/78798 ([cleanup] some int-valued functions should be bool)Janus Weil1-178/+175
2016-12-15 Janus Weil <janus@gcc.gnu.org> PR fortran/78798 * gfortran.h (gfc_compare_derived_types,gfc_compare_types, gfc_compare_interfaces,gfc_has_vector_subscript): Return bool instead of int. * interface.c (compare_components): Ditto. (gfc_compare_union_types): Rename to compare_union_types, declare as static, return bool. (gfc_compare_derived_types): Return bool instead of int. (gfc_compare_types): Ditto. (compare_type): Ditto. (compare_rank): Ditto. (compare_type_rank): Ditto. (compare_type_rank_if): Ditto. (count_types_test): Ditto. (generic_correspondence): Ditto. (gfc_compare_interfaces): Ditto. (check_interface0): Ditto. (check_interface1): Ditto. (compare_allocatable): Ditto. (compare_parameter): Ditto. (gfc_has_vector_subscript): Ditto. (compare_actual_formal): Ditto. From-SVN: r243726
2016-12-15re PR fortran/78800 ([OOP] ICE in compare_parameter, at ↵Janus Weil1-9/+10
fortran/interface.c:2246) 2016-12-15 Janus Weil <janus@gcc.gnu.org> PR fortran/78800 * interface.c (compare_allocatable): Avoid additional errors on bad class declarations. (compare_parameter): Put the result of gfc_expr_attr into a variable, in order to avoid calling it multiple times. Exit early on bad class declarations to avoid ICE. 2016-12-15 Janus Weil <janus@gcc.gnu.org> PR fortran/78800 * gfortran.dg/unlimited_polymorphic_27.f90: New test case. From-SVN: r243691
2016-12-14re PR fortran/78672 (Gfortran test suite failures with a sanitized compiler)Andre Vehreschild1-31/+38
gcc/fortran/ChangeLog: 2016-12-14 Andre Vehreschild <vehre@gcc.gnu.org> PR fortran/78672 * array.c (gfc_find_array_ref): Add flag to return NULL when no ref is found instead of erroring out. * data.c (gfc_assign_data_value): Only constant expressions are valid for initializers. * gfortran.h: Reflect change of gfc_find_array_ref's signature. * interface.c (compare_actual_formal): Access the non-elemental array-ref. Prevent taking a REF_COMPONENT for a REF_ARRAY. Correct indentation. * module.c (load_omp_udrs): Clear typespec before reading into it. * trans-decl.c (gfc_build_qualified_array): Prevent accessing the array when it is a coarray. * trans-expr.c (gfc_conv_cst_int_power): Use wi::abs()-function instead of crutch preventing sanitizer's bickering here. * trans-stmt.c (gfc_trans_deallocate): Only get data-component when it is a descriptor-array here. From-SVN: r243647
2016-12-13re PR fortran/78737 ([OOP] linking error with deferred, undefined ↵Janus Weil1-11/+21
user-defined derived-type I/O) 2016-12-13 Janus Weil <janus@gcc.gnu.org> Paul Thomas <pault@gcc.gnu.org> PR fortran/78737 * gfortran.h (gfc_find_typebound_dtio_proc): New prototype. * interface.c (gfc_compare_interfaces): Whitespace fix. (gfc_find_typebound_dtio_proc): New function. (gfc_find_specific_dtio_proc): Use it. Improve error recovery. * trans-io.c (get_dtio_proc): Implement polymorphic calls to DTIO procedures. 2016-12-13 Janus Weil <janus@gcc.gnu.org> Paul Thomas <pault@gcc.gnu.org> PR fortran/78737 * gfortran.dg/dtio_19.f90: New test case. Co-Authored-By: Paul Thomas <pault@gcc.gnu.org> From-SVN: r243609
2016-11-30re PR fortran/78592 (ICE in gfc_find_specific_dtio_proc, at ↵Janus Weil1-7/+7
fortran/interface.c:4939) 2016-11-30 Janus Weil <janus@gcc.gnu.org> PR fortran/78592 * interface.c (gfc_find_specific_dtio_proc): Rearrange code to avoid dereferencing a null pointer. 2016-11-30 Janus Weil <janus@gcc.gnu.org> PR fortran/78592 * gfortran.dg/dtio_18.f90: New test case. From-SVN: r243005
2016-11-25re PR fortran/60853 ([OOP] Failure to disambiguate generic with unlimited ↵Janus Weil1-9/+1
polymorphic) 2016-11-25 Janus Weil <janus@gcc.gnu.org> PR fortran/60853 * interface.c (gfc_compare_interfaces): Remove bad special case for unlimited polymorphism. Refactor for loop. 2016-11-25 Janus Weil <janus@gcc.gnu.org> PR fortran/60853 * gfortran.dg/typebound_assignment_8.f90: New test case. From-SVN: r242880
2016-11-24re PR fortran/78500 (ICE in gfc_check_vardef_context, at fortran/expr.c:5289)Steven G. Kargl1-1/+1
2016-11-24 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/78500 * expr.c (gfc_check_vardef_contextm): Fix NULL pointer dereference. * interface.c (matching_typebound_op): Ditto. 2016-11-24 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/78500 * gfortran.dg/class_result_4.f90: New test. From-SVN: r242846
2016-11-10Fix some whitespace.Fritz O. Reese1-32/+32
gcc/fortran/ * decl.c (get_struct_decl, gfc_match_map, gfc_match_union): Fix whitespace. * interface.c (gfc_compare_union_types): Likewise. From-SVN: r242057
2016-11-09[multiple changes]Janus Weil1-0/+2
2016-11-09 Mikael Morin <mikael@gcc.gnu.org> Janus Weil <janus@gcc.gnu.org> PR fortran/46459 * interface.c (compare_actual_formal): Add safety checks to avoid ICE. 2016-11-09 Janus Weil <janus@gcc.gnu.org> PR fortran/46459 * gfortran.dg/volatile14.f90: New test. From-SVN: r242020
2016-11-02New warning -Wargument-mismatch for function argument mismatches.Fritz O. Reese1-11/+17
gcc/fortran/ * lang.opt, invoke.texi: New argument -Wargument-mismatch. * interface.c (compare_parameter, compare_actual_formal, gfc_check_typebound_override, argument_rank_mismatch): Control argument mismatch warnings with -Wargument-mismatch. * resolve.c (resolve_structure_cons, resolve_global_procedure): Ditto. gcc/testsuite/gfortran.dg/ * warn_argument_mismatch_1.f90: New test. From-SVN: r241795
2016-10-24re PR fortran/71895 (ICE in gfc_compare_derived_types, at ↵Steven G. Kargl1-1/+2
fortran/interface.c:520) 2016-10-24 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/71895 * interface.c (gfc_compare_derived_types): Convert gcc_assert() to a gfc_internal_error() to prevent an ICE. 2016-10-24 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/71895 * gfortran.dg/pr71895.f90: New test. From-SVN: r241493
2016-10-07Fix ICE due to map typespecs with different sized charlens being copied.Fritz Reese1-0/+11
2016-10-07 Fritz Reese <fritzoreese@gmail.com> Fix ICE due to map typespecs with different sized charlens being copied. gcc/fortran/ * interface.c (compare_components): Check charlen for BT_CHAR. gcc/testsuite/gfortran.dg/ * dec_union_11.f90: New testcase. From-SVN: r240875
2016-10-07re PR fortran/77406 (ICE in generic_correspondence, at fortran/interface.c:1123)Steven G. Kargl1-7/+18
2016-10-07 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/77406 * interface.c (gfc_compare_interfaces): Fix detection of ambiguous interface involving alternate return. (check_interface1): Improve error message and loci. 2016-10-07 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/77406 * gfortran.dg/pr77406.f90: New test. * gfortran.dg/assumed_type_3.f90: Update error messages. * gfortran.dg/defined_operators_1.f90: Ditto. * gfortran.dg/generic_26.f90: Ditto. * gfortran.dg/generic_7.f90: Ditto. * gfortran.dg/gomp/udr5.f90: Ditto. * gfortran.dg/gomp/udr7.f90: Ditto. * gfortran.dg/interface_1.f90: Ditto. * gfortran.dg/interface_37.f90: Ditto. * gfortran.dg/interface_5.f90: Ditto. * gfortran.dg/interface_6.f90: Ditto. * gfortran.dg/interface_7.f90 * gfortran.dg/no_arg_check_3.f90 * gfortran.dg/operator_5.f90 * gfortran.dg/proc_ptr_comp_20.f90: Ditto. From-SVN: r240870
2016-10-05Fix ICE due to comparison between UNION components.Fritz Reese1-5/+12
2016-10-05 Fritz Reese <fritzoreese@gmail.com> Fix ICE due to comparison between UNION components. gcc/fortran/ * interface.c (gfc_compare_types): Don't compare BT_UNION components until we know they're both UNIONs. * interface.c (gfc_compare_union_types): Guard against empty components. gcc/testsuite/gfortran.dg/ * dec_union_9.f90: New testcase. * dec_union_10.f90: New testcase. From-SVN: r240810
2016-09-30Fix ICE for maps with zero components.Fritz Reese1-4/+15
2016-09-30 Fritz Reese <fritzoreese@gmail.com> Fix ICE for maps with zero components. PR fortran/77764 * gcc/fortran/interface.c (gfc_compare_union_types): Null-guard map components. PR fortran/77764 * gcc/testsuite/gfortran.dg/dec_union_8.f90: New testcase. From-SVN: r240652
2016-09-30Fix ICE caused by union types comparing equal to structures.Fritz Reese1-0/+4
2016-09-30 Fritz Reese <fritzoreese@gmail.com> Fix ICE caused by union types comparing equal to structures. PR fortran/77782 * gcc/fortran/interface.c (gfc_compare_derived_types): Use gfc_compare_union_types to compare union types. PR fortran/77782 * gcc/testsuite/gfortran.dg/dec_structure_16.f90: New testcase. From-SVN: r240651
2016-09-27auto-inc-dec.c (try_merge): Remove break after return.Jakub Jelinek1-3/+0
* auto-inc-dec.c (try_merge): Remove break after return. * cselib.c (autoinc_split): Likewise. * explow.c (promote_mode): Likewise. * fixed-value.c (fixed_arithmetic): Likewise. * hsa.c (hsa_internal_fn::get_arity): Likewise. * rtlanal.c (modified_between_p, modified_in_p): Likewise. * trans-mem.c (get_attrs_for): Likewise. * tree-if-conv.c (if_convertible_stmt_p): Likewise. * tree-vrp.c (simplify_stmt_using_ranges): Likewise. * config/aarch64/aarch64-builtins.c (aarch64_fold_builtin): Likewise. * config/aarch64/aarch64.c (aarch64_get_condition_code_1): Likewise. * config/c6x/c6x.c (c6x_get_unit_specifier): Likewise. * config/cr16/cr16.c (legitimate_pic_operand_p): Likewise. * config/cris/cris.c (cris_op_str): Likewise. * config/mn10300/mn10300.c (cc_flags_for_code): Likewise. * config/tilepro/tilepro.c (tilepro_emit_setcc_internal_di): Likewise. c-family/ * c-ada-spec.c (print_ada_declaration): Remove break after return. objc/ * objc-act.c (continue_class): Remove break after return. (objc_maybe_printable_name): Likewise. fortran/ * dependency.c (gfc_dep_compare_expr): Remove break after return. * frontend-passes.c (optimize_op): Likewise. * interface.c (gfc_current_interface_head): Likewise. * symbol.c (check_conflict): Likewise. * trans-intrinsic.c (build_fix_expr): Likewise. ada/ * terminals.c (is_gui_app): Remove break after return. From-SVN: r240554
2016-09-26re PR fortran/48298 ([F03] User-Defined Derived-Type IO (DTIO))Paul Thomas1-0/+3
2016-09-26 Paul Thomas <pault@gcc.gnu.org> PR fortran/48298 * interface.c (gfc_find_specific_dtio_proc) : Return NULL if the derived type is broken, as indicated by a flavor other than FL_DERIVED. From-SVN: r240493
2016-09-22re PR fortran/48298 ([F03] User-Defined Derived-Type IO (DTIO))Paul Thomas1-1/+3
2016-09-22 Paul Thomas <pault@gcc.gnu.org> PR fortran/48298 * gfortran.h : Place the pseudo operators INTRINSIC_FORMATTED and INTRINSIC_UNFORMATTED after the sentinel in enum gfc_intrinsic_op so that they do not appear as place holders in module_write. * interface.c (dtio_op): Comment on the special nature of the pseudo operators INTRINSIC FORMATTED and INTRINSIC_UNFORMATTED. From-SVN: r240349
2016-09-22interface.c (check_dtio_interface1): Introduce errors for alternate returns ↵Paul Thomas1-2/+38
and incorrect numbers of arguments. 2016-09-22 Paul Thomas <pault@gcc.gnu.org> * interface.c (check_dtio_interface1): Introduce errors for alternate returns and incorrect numbers of arguments. (gfc_find_specific_dtio_proc): Return cleanly if the derived type either doesn't exist or has no namespace. 2016-09-22 Paul Thomas <pault@gcc.gnu.org> * gfortran.dg/dtio_11.f90: Correct for changed error messages. * gfortran.dg/dtio_13.f90: New test. From-SVN: r240342
2016-09-21re PR fortran/77657 (link error with implementation of user-defined derived ↵Paul Thomas1-1/+13
type input/output (UD-DTIO) in child extending abstract parent) 2016-09-21 Paul Thomas <pault@gcc.gnu.org> PR fortran/77657 * interface.c (gfc_find_specific_dtio_proc): Borrow trick from resolve_typebound_generic_call to find dtio procedures that over-ride those in the declared type. 2016-09-21 Paul Thomas <pault@gcc.gnu.org> PR fortran/77657 * gfortran.dg/dtio_12.f90: New test. From-SVN: r240301
2016-09-10re PR fortran/77532 ([F03] ICE in check_dtio_interface1, at ↵Paul Thomas1-6/+12
fortran/interface.c:4622) 2016-09-10 Paul Thomas <pault@gcc.gnu.org> Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/77532 ^ interface.c (check_dtio_arg_TKR_intent): Return after error. (check_dtio_interface1): Remove asserts, test for NULL and return if found. gfortran.dg/dtio_11.f90: new test. Co-Authored-By: Steven G. Kargl <kargl@gcc.gnu.org> From-SVN: r240074
2016-08-31[multiple changes]Paul Thomas1-17/+376
2016-08-31 Paul Thomas <pault@gcc.gnu.org> Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/48298 * decl.c (access_attr_decl): Include case INTERFACE_DTIO as appropriate. * gfortran.h : Add INTRINSIC_FORMATTED and INTRINSIC_UNFORMATTED to gfc_intrinsic_op. Add INTERFACE_DTIO to interface type. Add new enum 'dtio_codes'. Add bitfield 'has_dtio_procs' to symbol_attr. Add prototypes 'gfc_check_dtio_interfaces' and 'gfc_find_specific_dtio_proc'. * interface.c (dtio_op): New function. (gfc_match_generic_spec): Match generic DTIO interfaces. (gfc_match_interface): Treat DTIO interfaces in the same way as (gfc_current_interface_head): Add INTERFACE_DTIO appropriately. (check_dtio_arg_TKR_intent): New function. (check_dtio_interface1): New function. (gfc_check_dtio_interfaces): New function. (gfc_find_specific_dtio_proc): New function. * io.c : Add FMT_DT to format_token. (format_lex): Handle DTIO formatting. * match.c (gfc_op2string): Add DTIO operators. * resolve.c (derived_inaccessible): Ignore pointer components to enclosing derived type. (resolve_transfer): Resolve transfers that involve DTIO. procedures. Find the specific subroutine for the transfer and use its existence to over-ride some of the constraints on derived types. If the transfer is recursive, require that the subroutine be so qualified. (dtio_procs_present): New function. (resolve_fl_namelist): Remove inhibition of polymorphic objects in namelists if DTIO read and write subroutines exist. Likewise for derived types. (resolve_types): Invoke 'gfc_verify_dtio_procedures'. * symbol.c : Set 'dtio_procs' using 'minit'. * trans-decl.c (gfc_finish_var_decl): If a derived-type/class object is associated with DTIO procedures, make it TREE_STATIC. * trans-expr.c (gfc_get_vptr_from_expr): If the expression drills down to a PARM_DECL, extract the vptr correctly. (gfc_conv_derived_to_class): Check 'info' in the test for 'useflags'. If the se expression exists and is a pointer, use it as the class _data. * trans-io.c : Add IOCALL_X_DERIVED to iocall and the function prototype. Likewise for IOCALL_SET_NML_DTIO_VAL. (set_parameter_tree): Renamed from 'set_parameter_const', now returns void and has new tree argument. Calls modified to match new interface. (transfer_namelist_element): Transfer DTIO procedure pointer and vpointer using the new function IOCALL_SET_NML_DTIO_VAL. (get_dtio_proc): New function. (transfer_expr): Add new argument for the vptr field of class objects. Add the code to call the specific DTIO proc, convert derived types to class and call IOCALL_X_DERIVED. (trans_transfer): Add BT_CLASS to structures for treatment by the scalarizer. Obtain the vptr for the dynamic type, both for scalar and array transfer. 2016-08-31 Jerry DeLisle <jvdelisle@gcc.gnu.org> Paul Thomas <pault@gcc.gnu.org> PR libgfortran/48298 * gfortran.map : Flag _st_set_nml_dtio_var and _gfortran_transfer_derived. * io/format.c (format_lex): Detect DTIO formatting. (parse_format_list): Parse the DTIO format. (next_format): Include FMT_DT. * io/format.h : Likewise. Add structure 'udf' to structure 'fnode' to carry the IOTYPE string and the 'vlist'. * io/io.h : Add prototypes for the two types of DTIO subroutine and a typedef for gfc_class. Also, add to 'namelist_type' fields for the pointer to the DTIO procedure and the vtable. Add fields to struct st_parameter_dt for pointers to the two types of DTIO subroutine. Add to gfc_unit DTIO specific fields. (internal_proto): Add prototype for 'read_user_defined' and 'write_user_defined'. * io/list_read.c (check_buffers): Use the 'current_unit' field. (unget_char): Likewise. (eat_spaces): Likewise. (list_formatted_read_scalar): For case BT_CLASS, call the DTIO procedure. (nml_get_obj_data): Likewise when DTIO procedure is present,. * io/transfer.c : Export prototypes for 'transfer_derived' and 'transfer_derived_write'. (unformatted_read): For case BT_CLASS, call the DTIO procedure. (unformatted_write): Likewise. (formatted_transfer_scalar_read): Likewise. (formatted_transfer_scalar_write: Likewise. (transfer_derived): New function. (data_transfer_init): Set last_char if no child_dtio. (finalize_transfer): Return if child_dtio set. (st_write_done): Add condition for child_dtio not set. Add extra arguments for st_set_nml_var prototype. (set_nml_var): New function that contains the contents of the old version of st_set_nml_var. Also sets the 'dtio_sub' and 'vtable' fields of the 'nml' structure. (st_set_nml_var): Now just calls set_nml_var with 'dtio_sub' and 'vtable' NULL. (st_set_nml_dtio_var): New function that calls set_nml_var. * io/unit.c (get_external_unit): If the found unit child_dtio is non zero, don't do any mutex locking/unlocking. Just return the unit. * io/unix.c (tempfile_open): Revert to C style comment. * io/write.c (list_formatted_write_scalar): Do the DTIO call. (nml_write_obj): Add BT_CLASS and do the DTIO call. 2016-08-31 Jerry DeLisle <jvdelisle@gcc.gnu.org> Paul Thomas <pault@gcc.gnu.org> PR fortran/48298 * gfortran.dg/dtio_1.f90: New test. * gfortran.dg/dtio_2.f90: New test. * gfortran.dg/dtio_3.f90: New test. * gfortran.dg/dtio_4.f90: New test. * gfortran.dg/dtio_5.f90: New test. * gfortran.dg/dtio_6.f90: New test. * gfortran.dg/dtio_7.f90: New test. * gfortran.dg/dtio_8.f90: New test. * gfortran.dg/dtio_9.f90: New test. * gfortran.dg/dtio_10.f90: New test. From-SVN: r239880
2016-08-29Fix, reorganize, and clarify comparisons of anonymous types/components.Fritz Reese1-25/+37
2016-08-29 Fritz Reese <fritzoreese@gmail.com> Fix, reorganize, and clarify comparisons of anonymous types/components. PR fortran/77327 * interface.c (is_anonymous_component, is_anonymous_dt): New functions. * interface.c (compare_components, gfc_compare_derived_types): Use new functions. * gfortran.dg/dec_structure_13.f90: New testcase. From-SVN: r239819
2016-08-23interface.c (compare_components): Fix typo in name check conditional.Fritz Reese1-1/+1
2016-08-23 Fritz Reese <fritzoreese@gmail.com> gcc/fortran/ * interface.c (compare_components): Fix typo in name check conditional. From-SVN: r239706
2016-08-22re PR fortran/61318 (Improve error diagnostic by pointing to the expression ↵Steven G. Kargl1-1/+1
and not to declared-at of a USE-associated variable) 2016-08-22 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/61318 * interface.c (compare_parameter): Use better locus for error message. 2016-08-22 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/61318 * gfortran.dg/pr61318.f90: New test. From-SVN: r239667
2016-05-15re PR fortran/69603 (ICE: segfault with -fimplicit-none and ↵Harald Anlauf1-1/+1
proc_ptr_comp_24.f90) 2016-05-15 Harald Anlauf <anlauf@gmx.de> PR fortran/69603 * interface.c (compare_parameter): Check for non-NULL pointer. 2016-05-15 Harald Anlauf <anlauf@gmx.de> PR fortran/69603 * gfortran.dg/pr69603.f90: New testcase. From-SVN: r236253
2016-05-07re PR fortran/56226 (Add support for DEC UNION and MAP extensions)Fritz Reese1-54/+161
2016-05-07 Fritz Reese <fritzoreese@gmail.com> PR fortran/56226 * module.c (dt_upper_string): Rename to gfc_dt_upper_string (dt_lower_string): Likewise. * gfortran.h: Make new gfc_dt_upper/lower_string global. * class.c: Use gfc_dt_upper_string. * decl.c: Likewise. * symbol.c: Likewise. * resolve.c (resolve_component): New function. (resolve_fl_derived0): Move component loop code to resolve_component. * parse.c (check_component): New function. (parse_derived): Move loop code to check_component. * lang.opt, invoke.texi, options.c : New option -fdec-structure. * libgfortran.h (bt): New basic type BT_UNION. * gfortran.h (gfc_option): New option -fdec-structure. (gfc_get_union_type, gfc_compare_union_types): New prototypes. (gfc_bt_struct, gfc_fl_struct, case_bt_struct, case_fl_struct): New macros. (gfc_find_component): Change prototype. * match.h (gfc_match_member_sep, gfc_match_map, gfc_match_union, gfc_match_structure_decl): New prototypes. * parse.h (gfc_comp_struct): New macro. * symbol.c (gfc_find_component): Search for components in nested unions * class.c (insert_component_ref, gfc_add_component_ref, add_proc_comp, copy_vtab_proc_comps): Update calls to gfc_find_component. * primary.c (gfc_convert_to_structure_constructor): Likewise. * symbol.c (gfc_add_component): Likewise. * resolve.c (resolve_typebound_function, resolve_typebound_subroutine, resolve_typebound_procedure, resolve_component, resolve_fl_derived): Likewise. * expr.c (get_union_init, component_init): New functions. * decl.c (match_clist_expr, match_record_decl, get_struct_decl, gfc_match_map, gfc_match_union, gfc_match_structure_decl): Likewise. * interface.c (compare_components, gfc_compare_union_types): Likewise. * match.c (gfc_match_member_sep): Likewise. * parse.c (check_component, parse_union, parse_struct_map): Likewise. * resolve.c (resolve_fl_struct): Likewise. * symbol.c (find_union_component): Likewise. * trans-types.c (gfc_get_union_type): Likewise. * parse.c (parse_derived): Use new functions. * interface.c (gfc_compare_derived_types, gfc_compare_types): Likewise. * expr.c (gfc_default_initializer): Likewise. * gfortran.texi: Support for DEC structures, unions, and maps. * gfortran.h (gfc_statement, sym_flavor): Likewise. * check.c (gfc_check_kill_sub): Likewise. * expr.c (gfc_copy_expr, simplify_const_ref, gfc_has_default_initializer): Likewise. * decl.c (build_sym, match_data_constant, add_init_expr_to_sym, match_pointer_init, build_struct, variable_decl, gfc_match_decl_type_spec, gfc_mach_data-decl, gfc_match_entry, gfc_match_end, gfc_match_derived_decl): Likewise. * interface.c (check_interface0, check_interface1, gfc_search_interface): Likewise. * misc.c (gfc_basic_typename, gfc_typename): Likewise. * module.c (add_true_name, build_tnt, bt_types, mio_typespec, fix_mio_expr, load_needed, mio_symbol, read_module, write_symbol, gfc_get_module_backend_decl): Likewise. * parse.h (gfc_compile_state): Likewise. * parse.c (decode_specification_statement, decode_statement, gfc_ascii_statement, verify_st_order, parse_spec): Likewise. * primary.c (gfc_match_varspec, gfc_match_structure_constructor, gfc_match_rvalue, match_variable): Likewise. * resolve.c (find_arglists, resolve_structure_cons, is_illegal_recursion, resolve_generic_f, get_declared_from_expr, resolve_typebound_subroutine, resolve_allocate_expr, nonscalar_typebound_assign, generate_component_assignments, resolve_fl_variable_derived, check_defined_assignments, resolve_component, resolve_symbol, resolve_equivalence_derived): Likewise. * symbol.c (flavors, check_conflict, gfc_add_flavor, gfc_use_derived, gfc_restore_last_undo_checkpoint, gfc_type_compatible, gfc_find_dt_in_generic): Likewise. * trans-decl.c (gfc_get_module_backend_decl, create_function_arglist, gfc_create_module_variable, check_constant_initializer): Likewise. * trans-expr.c (gfc_conv_component_ref, gfc_conv_initializer, gfc_trans_alloc_subarray_assign, gfc_trans_subcomponent_assign, gfc_conv_structure, gfc_trans_scalar_assign, copyable_array_p): Likewise. * trans-io.c (transfer_namelist_element, transfer_expr, gfc_trans_transfer): Likewise. * trans-stmt.c (gfc_trans_deallocate): Likewise. * trans-types.c (gfc_typenode_for_spec, gfc_copy_dt_decls_ifequal, gfc_get_derived_type): Likewise. 2016-05-07 Fritz Reese <fritzoreese@gmail.com> PR fortran/56226 * gfortran.dg/dec_structure_1.f90: New testcase. * gfortran.dg/dec_structure_2.f90: Ditto. * gfortran.dg/dec_structure_3.f90: Ditto. * gfortran.dg/dec_structure_4.f90: Ditto. * gfortran.dg/dec_structure_5.f90: Ditto. * gfortran.dg/dec_structure_6.f90: Ditto. * gfortran.dg/dec_structure_7.f90: Ditto. * gfortran.dg/dec_structure_8.f90: Ditto. * gfortran.dg/dec_structure_9.f90: Ditto. * gfortran.dg/dec_structure_10.f90: Ditto. * gfortran.dg/dec_structure_11.f90: Ditto. * gfortran.dg/dec_union_1.f90: Ditto. * gfortran.dg/dec_union_2.f90: Ditto. * gfortran.dg/dec_union_3.f90: Ditto. * gfortran.dg/dec_union_4.f90: Ditto. * gfortran.dg/dec_union_5.f90: Ditto. * gfortran.dg/dec_union_6.f90: Ditto. * gfortran.dg/dec_union_7.f90: Ditto. From-SVN: r235999
2016-01-24[multiple changes]Jerry DeLisle1-1/+2
2016-01-23 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/69397 PR fortran/68442 * interface.c (gfc_arglist_matches_symbol): Replace assert with a return false if not a procedure. * resolve.c (resolve_generic_f): Test if we are resolving an initialization expression and adjust error message accordingly. 2016-01-24 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/69397 PR fortran/68442 * gfortran.dg/interface_38.f90: New test. * gfortran.dg/interface_39.f90: New test. From-SVN: r232780
2016-01-04Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r232055
2015-12-12re PR fortran/45859 ([Coarray, F2008, IR] Rejects valid actuals to coarray ↵Tobias Burnus1-5/+8
dummies) 2014-12-12 Tobias Burnus <burnus@net-b.de> gcc/fortran PR fortran/45859 * expr.c (gfc_is_simply_contiguous): Optionally permit array * elements. (gfc_check_pointer_assign): Update call. * interface.c (compare_parameter): Ditto. * trans-array.c (gfc_conv_array_parameter): Ditto. * trans-intrinsic.c (gfc_conv_intrinsic_transfer, conv_isocbinding_function): Ditto. * gfortran.h (gfc_is_simply_contiguous): Update prototype. gcc/testsuite/ PR fortran/45859 * gcc/testsuite/gfortran.dg/coarray_args_2.f90: Remove dg-error. From-SVN: r231585
2015-12-02check.c (gfc_check_event_query): New function.Tobias Burnus1-0/+28
2015-12-02 Tobias Burnus <burnus@net-b.de> Alessandro Fanfarillo <fanfarillo.gcc@gmail.com> * check.c (gfc_check_event_query): New function. * dump-parse-tree.c (show_code_node): Handle EXEC_EVENT_POST, EXEC_EVENT_WAIT. * expr.c (gfc_check_vardef_context): New check for event variables definition. * gfortran.h (gfc_statement): Add ST_EVENT_POST, ST_EVENT_WAIT. (gfc_isym_id): GFC_ISYM_EVENT_QUERY. (struct symbol_attribute): New field. (gfc_exec_op): Add EXEC_EVENT_POST and EXEC_EVENT_WAIT. * gfortran.texi: Document about new events functions and minor changes. * interface.c (compare_parameter): New check. (gfc_procedure_use): New check for explicit procedure interface. (add_subroutines): Add event_query. * intrinsic.h (gfc_check_event_query,gfc_resolve_event_query): New prototypes. * iresolve.c (gfc_resolve_event_query): New function. * iso-fortran-env.def (event_type): New type. * match.c (event_statement,gfc_match_event_post,gfc_match_event_wait): New functions. (gfc_match_name): New event post and event wait. * match.h (gfc_match_event_post,gfc_match_event_wait): New prototypes. * module.c (ab_attribute): Add AB_EVENT_COMP. (attr_bits): Likewise. (mio_symbol_attribute): Handle event_comp attribute. * parse.c (decode_statement): Add ST_EVENT_POST, ST_EVENT_WAIT. (next_statement): Add ST_EVENT_POST, ST_EVENT_WAIT. (gfc_ascii_statement): Add ST_EVENT_POST, ST_EVENT_WAIT. (parse_derived): Check for event_type components. * resolve.c (resolve_allocate_expr): Check for event variable def. (resolve_lock_unlock): Renamed to resolve_lock_unlock_event. It includes logic for locks and events. (gfc_resolve_code): Call it. (gfc_resolve_symbol): New check for event variable to be a corray. * st.c (gfc_free_statement): Handle new EXEC_EVENT_POST and EXEC_EVENT_WAIT. * trans-decl.c (gfor_fndecl_caf_event_post,gfor_fndecl_caf_event_wait, gfor_fndecl_caf_event_query): New global variables. (generate_coarray_sym_init): Checking for event_type. (gfc_conv_procedure_call): Check for C bind attribute. * trans-intrinsic.c (conv_intrinsic_event_query): New function. (conv_intrinsic_move_alloc): Call it. * trans-stmt.c (gfc_trans_lock_unlock): Passing address of actual argument. (gfc_trans_sync): Likewise. (gfc_trans_event_post_wait): New function. * trans-stmt.h (gfc_trans_event_post_wait): New prototype. * trans-types.c (gfc_get_derived_type): Integer_kind as event_type. * trans.c (gfc_allocate_using_lib): New argument and logic for events. (gfc_allocate_allocatable): Passing new argument. (trans_code): Handle EXEC_EVENT_POST, EXEC_EVENT_WAIT. * trans.h (gfc_coarray_type): New elements. (gfor_fndecl_caf_event_post,gfor_fndecl_caf_event_wait, gfor_fndecl_caf_event_query): Declare them. 2015-12-02 Tobias Burnus <burnus@net-b.de> Alessandro Fanfarillo <fanfarillo.gcc@gmail.com> * gfortran.dg/coarray/event_1.f90: New. * gfortran.dg/coarray/event_2.f90: New. Co-Authored-By: Alessandro Fanfarillo <fanfarillo.gcc@gmail.com> From-SVN: r231208
2015-10-30re PR fortran/36192 (ICE with wrong index types and bad parens)Steven G. Kargl1-1/+3
2015-10-30 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/36192 * interface.c (get_expr_storage_size): Check for INTEGER type before calling gmp routines. 2015-10-30 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/36192 * gfortran.dg/pr36192_1.f90: New test. From-SVN: r229590
2015-07-09flags.h: Don't include flag-types.h or options.h.Andrew MacLeod1-1/+1
2015-07-09 Andrew MacLeod <amacleod@redhat.com> * flags.h: Don't include flag-types.h or options.h. * opts-common.c: Adjust includes. * opts-global.c: Likewise. * common/config/epiphany/epiphany-common.c: Likewise. c * c-array-notation.c: Adjust includes for flags.h changes. * c-objc-common.c: Likewise. c-family * c-common.h: Adjust includes for flags.h changes. * stub-objc.c: Likewise. fortran * arith.c: Adjust includes for flags.h changes. * array.c: Likewise. * check.c: Likewise. * decl.c: Likewise. * error.c: Likewise. * expr.c: Likewise. * frontend-passes.c: Likewise. * interface.c: Likewise. * intrinsic.c: Likewise. * io.c: Likewise. * match.c: Likewise. * openmp.c: Likewise. * parse.c: Likewise. * primary.c: Likewise. * resolve.c: Likewise. * scanner.c: Likewise. * simplify.c: Likewise. * symbol.c: Likewise. * target-memory.c: Likewise. jit * dummy-frontend.c: Adjust includes for flags.h changes. * jit-common.h: Likewise. * jit-playback.c: Likewise. lto * lto-lang.c: Adjust includes for flags.h changes. From-SVN: r225608
2015-07-02re PR fortran/52846 ([F2008] Support submodules)Paul Thomas1-11/+13
2015-07-02 Paul Thomas <pault@gcc.gnu.org> PR fortran/52846 * decl.c (get_proc_name): Make a partially populated interface symbol to carry the characteristics of a module procedure and its result. (variable_decl): Declarations of dummies or results in the abreviated form of module procedure is an error. (gfc_match_import): IMPORT is not permitted in the interface declaration of module procedures. (match_attr_spec): Submodule variables have implicit save attribute for F2008 onwards. (gfc_match_prefix): Add 'module' as the a prefix and set the module_procedure attribute. (gfc_match_formal_arglist): For a module procedure keep the interface formal_arglist from the interface, match new the formal arguments and then compare the number and names of each. (gfc_match_procedure): Add case COMP_SUBMODULE. (gfc_match_function_decl, gfc_match_subroutine_decl): Set the module_procedure attribute. (gfc_match_entry, gfc_match_end): Add case COMP_SUBMODULE. If attr abr_modproc_decl is set, switch the message accordingly for subroutines and functions. (gfc_match_submod_proc): New function to match the abbreviated style of submodule declaration. * gfortran.h : Add ST_SUBMODULE and ST_END_SUBMODULE. Add the attribute bits 'used_in_submodule' and 'module_procedure'. Add the bit field 'abr_modproc_decl' to gfc_symbol. Add prototypes for 'gfc_copy_dummy_sym', 'gfc_check_dummy_characteristics' and 'gfc_check_result_characteristics'. * interface.c : Add the prefix 'gfc_' to the names of functions 'check_dummy(result)_characteristics' and all their references. * match.h : Add prototype for 'gfc_match_submod_proc' and 'gfc_match_submodule'. (check_sym_interfaces): A module procedure is not an error in a module procedure statment in a generic interface. * module.c (gfc_match_submodule): New function. Add handling for the 'module_procedure' attribute bit. (gfc_use_module): Make sure that a submodule cannot use itself. * parse.c (decode_statement): Set attr has_'import_set' for the interface declaration of module procedures. Handle a match occurring in 'gfc_match_submod_proc' and a match for 'submodule'. (gfc_enclosing_unit): Include the state COMP_SUBMODULE. (gfc_ascii_statement): Add END SUBMODULE. (accept_statement): Add ST_SUBMODULE. (parse_spec): Disallow statement functions in a submodule specification part. (parse_contained): Add ST_END_SUBMODULE and COMP_SUBMODULE twice each. (get_modproc_result): Copy the result symbol of the interface. (parse_progunit): Call it. (set_syms_host_assoc): Make symbols from the ancestor module and submodules use associated, as required by the standard and set all private components public. Module procedures 'external' attribute bit is reset and the 'used_in_submodule' bit is set. (parse_module): If this is a submodule, use the ancestor module and submodules. Traverse the namespace, calling 'set_syms_host_assoc'. Add ST_END_SUBMODULE and COMP_SUBMODULE. * parse.h : Add COMP_SUBMODULE. * primary.c (match_variable): Add COMP_SUBMODULE. * resolve.c (compare_fsyms): New function to compare the dummy characteristics of a module procedure with its interface. (resolve_fl_procedure): Compare the procedure, result and dummy characteristics of a module_procedure with its interface, using 'compare_fsyms' for the dummy arguments. * symbol.c (gfc_add_procedure): Suppress the check for existing procedures in the case of a module procedure. (gfc_add_explicit_interface): Skip checks that must fail for module procedures. (gfc_add_type): Allow a new type to be added to module procedures, their results or their dummy arguments. (gfc_copy_dummy_sym): New function to generate new dummy args and copy the characteristics from the interface. * trans-decl.c (gfc_sym_mangled_function_id): Module procedures must always have their names mangled as if they are symbols coming from a declaration in a module. (gfc_get_symbol_decl): Add 'used_in_submodule' to the assert. (gfc_finish_var_decl): Symbols with the 'used_in_submodule' bit set are set DECL_EXTERNAL as if they were use associated. 2015-07-02 Paul Thomas <pault@gcc.gnu.org> PR fortran/52846 * gfortran.dg/submodule_1.f90: New test * gfortran.dg/submodule_2.f90: New test * gfortran.dg/submodule_3.f90: New test * gfortran.dg/submodule_4.f90: New test * gfortran.dg/submodule_5.f90: New test * gfortran.dg/submodule_6.f90: New test * gfortran.dg/submodule_7.f90: New test From-SVN: r225354
2015-05-19Use std::swap instead of explicit swapsMikhail Maltsev1-8/+3
gcc/ * bb-reorder.c (fix_up_fall_thru_edges): Use std::swap instead of explicit swaps. * dojump.c (do_compare_rtx_and_jump): Likewise. * expmed.c (emit_store_flag_1): Likewise. * fibonacci_heap.h (fibonacci_heap::union_with): Likewise. * final.c (sprint_ul): Use std::reverse for reversing a string. * fold-const.c (extract_muldiv_1): Use std::swap. * genmodes.c (emit_mode_int_n): Likewise. * ifcvt.c (dead_or_predicable): Likewise. * ira-build.c (ira_merge_live_ranges): Likewise. (swap_allocno_copy_ends_if_necessary): Likewise. * ira.c (ira_setup_alts): Likewise. * loop-iv.c (iv_analyze_expr): Likewise. (implies_p): Likewise. (canon_condition): Likewise. * lra-constraints.c (swap_operands): Likewise. * lra-lives.c (lra_merge_live_ranges): Likewise. * omega.c (swap): Remove. (bswap): Remove. (omega_unprotect_1): Use std::swap. (omega_solve_geq): Likewise. * optabs.c (expand_binop_directly): Likewise. (expand_binop): Likewise. (emit_conditional_move): Likewise. (emit_conditional_add): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * reg-stack.c (emit_swap_insn): Likewise. (swap_to_top): Likewise. (compare_for_stack_reg): Likewise. (subst_asm_stack_regs): Likewise. * reload.c (find_reloads): Likewise. * reload1.c (gen_reload_chain_without_interm_reg_p): Likewise. * sel-sched.c (invoke_reorder_hooks): Likewise. (create_block_for_bookkeeping): Likewise. * tree-data-ref.c (lambda_matrix_row_exchange): Remove. (lambda_matrix_right_hermite): Use std::swap. * tree-ssa-coalesce.c (sort_coalesce_list): Likewise. * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise. * tree-ssa-loop-ivopts.c (iv_ca_delta_reverse): Likewise. * tree-ssa-math-opts.c (is_widening_mult_p): Likewise. * tree-ssa-phiopt.c (hoist_adjacent_loads): Likewise. * tree-ssa-reassoc.c (linearize_expr_tree): Likewise. * tree-ssa-threadedge.c (simplify_control_stmt_condition): Likewise. * tree-vrp.c (compare_ranges): Likewise. * var-tracking.c (add_with_sets): Likewise. (vt_find_locations): Likewise. gcc/c/ * c-typeck.c (build_array_ref): Use std::swap instead of explicit swaps gcc/cp/ * typeck.c (composite_pointer_type): Use std::swap instead of explicit swaps. gcc/c-family/ * c-common.c (shorten_compare): Use std::swap instead of explicit swaps. gcc/fortran/ * interface.c (compare_actual_formal): Use std::swap instead of explicit swaps. * trans-array.c (gfc_trans_scalarized_loop_end): Likewise. * trans-intrinsic.c (walk_inline_intrinsic_transpose): Likewise. From-SVN: r223332
2015-05-18re PR fortran/66057 (ICE for incomplete generic statement (gfc_match_generic))Steven G. Kargl1-2/+6
2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/66057 * interface.c(gfc_match_end_interface): Enforce F2008 C1202 (R1201). * match.c(gfc_op2string): Return 'none' for INTRINSIC_NONE. 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/66057 * gfortran.dg/interface_operator_1.f90: New tests. From-SVN: r223326
2015-05-05Fix indentation issues seen by -Wmisleading-indentationDavid Malcolm1-1/+1
gcc/ChangeLog: * auto-profile.c (afdo_find_equiv_class): Fix indentation so that it reflects the block structure. (afdo_propagate_edge): Likewise. (afdo_calculate_branch_prob): Likewise. (afdo_annotate_cfg): Likewise. * cfgcleanup.c (equal_different_set_p): Likewise. (try_crossjump_to_edge): Likewise. * cgraph.c (cgraph_node::verify_node): Likewise. * cgraphunit.c (expand_all_functions): Likewise. * config/i386/i386.c (ix86_expand_copysign): Likewise. (exact_dependency_1): Likewise. * dwarf2asm.c (dw2_output_indirect_constants): Likewise. * dwarf2out.c (tree_add_const_value_attribute_for_decl): Likewise. * gensupport.c (process_define_subst): Likewise. * lto-wrapper.c (merge_and_complain): Likewise. * tree-if-conv.c (if_convertible_bb_p): Likewise. * tree-ssa-loop-prefetch.c (find_or_create_group): Likewise. * tree-ssa-tail-merge.c (gsi_advance_fw_nondebug_nonlocal): Likewise. * tree-vect-data-refs.c (vect_grouped_load_supported): Likewise. * tree-vect-loop.c (vectorizable_reduction): Likewise. * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise. * tree-vect-stmts.c (vectorizable_shift): Likewise. * tree-vrp.c (vrp_finalize): Likewise. * tree.c (variably_modified_type_p): Likewise. gcc/cp/ChangeLog: * parser.c (cp_parser_asm_definition): Only test for error_mark_node if "outputs" was just set. (cp_parser_asm_definition): Likewise for "inputs". gcc/fortran/ChangeLog: * expr.c (check_inquiry): Fix indentation so that it reflects the block structure. * interface.c (compare_parameter): Likewise. * parse.c (parse_oacc_structured_block): Likewise. * target-memory.c (expr_to_char): Likewise. * trans-types.c (gfc_init_kinds): Likewise. libcpp/ChangeLog: * pch.c (cpp_valid_state): Fix indentation so that it reflects the block structure. From-SVN: r222823
2015-04-28interface.c (gfc_compare_types): Check for unlimited polymorphism flag in ↵Andre Vehreschild1-3/+14
the correct position indepent of the... gcc/fortran/ChangeLog: 2015-04-28 Andre Vehreschild <vehre@gmx.de> * interface.c (gfc_compare_types): Check for unlimited polymorphism flag in the correct position indepent of the _data component being present or not. This prevents a segfault, when the _data component is not present. * symbol.c (gfc_type_compatible): Same. gcc/testsuite/ChangeLog: 2015-04-28 Andre Vehreschild <vehre@gmx.de> * gfortran.dg/implicit_class_1.f90: Adding flag to check, if segfault is fixed. From-SVN: r222539
2015-02-01Always pass 0 or option number to gfc_warning*.Joseph Myers1-10/+12
Similar to the issue with fatal_error that I fixed in <https://gcc.gnu.org/ml/gcc-patches/2015-01/msg02690.html>, the overloads of gfc_warning and gfc_warning_now (with and without a first argument for an option number) also break gcc.pot regeneration because xgettext expects the translated string argument to be in a fixed position for a given function name. This patch applies the corresponding fix of always passing a first argument (option number or 0), just like the core diagnostic functions warning and warning_at, and removing the problem overloads without it. Bootstrapped with no regressions on x86_64-unknown-linux-gnu. * error.c (gfc_warning (const char *, ...), gfc_warning_now (const char *, ...)): Remove functions. * gfortran.h (gfc_warning (const char *, ...), gfc_warning_now (const char *, ...)): Remove declarations. * arith.c, check.c, data.c, decl.c, frontend-passes.c, interface.c, intrinsic.c, io.c, matchexp.c, module.c, openmp.c, options.c, parse.c, primary.c, resolve.c, scanner.c, symbol.c, trans-common.c, trans-const.c, trans-stmt.c: All callers of gfc_warning and gfc_warning_now changed to pass 0 or option number as first argument. From-SVN: r220313
2015-01-27re PR fortran/64771 (ICE(segfault) when passing coarrays around; ICE in ↵Rainer Orth1-3/+1
gfc_zero_size_array in arith.c:1637) 2015-01-27 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> PR fortran/64771 * interface.c: Remove <algorithm>. (check_dummy_characteristics): Use MAX instead of std::max. From-SVN: r220182
2015-01-26re PR fortran/64771 (ICE(segfault) when passing coarrays around; ICE in ↵Tobias Burnus1-3/+16
gfc_zero_size_array in arith.c:1637) 2015-01-26 Tobias Burnus <burnus@net-b.de> PR fortran/64771 gcc/fortran/ * interface.c (check_dummy_characteristics): Fix coarray * handling. testsuite/ * gfortran.dg/coarray_36.f: New. * gfortran.dg/coarray_37.f90: New. From-SVN: r220136
2015-01-11re PR fortran/63733 ([OOP] wrong resolution for OPERATOR generics)Janus Weil1-49/+44
2015-01-11 Janus Weil <janus@gcc.gnu.org> PR fortran/63733 * interface.c (gfc_extend_expr): Look for type-bound operators before non-typebound ones. 2015-01-11 Janus Weil <janus@gcc.gnu.org> PR fortran/63733 * gfortran.dg/typebound_operator_20.f90: New. From-SVN: r219440
2015-01-11re PR fortran/64508 ([F03] interface check missing for procedure pointer ↵Janus Weil1-1/+15
component as actual argument) 2015-01-11 Janus Weil <janus@gcc.gnu.org> PR fortran/64508 * interface.c (compare_parameter): Interface check for procedure-pointer component as actual argument. 2015-01-11 Janus Weil <janus@gcc.gnu.org> PR fortran/64508 * gfortran.dg/proc_ptr_comp_41.f90: New. From-SVN: r219431