aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-decl.c
AgeCommit message (Collapse)AuthorFilesLines
2020-11-30Fortran: -fno-automatic and -fopenacc / recusion check cleanupTobias Burnus1-2/+1
Options: -fopenmp and -fopenacc imply concurrent calls to a procedure; now also -fopenacc implies -frecursive, disabling that larger local const-size array variables use static memory. Run-time recursion check: Always reset the check variable at the end of the procedure; this avoids a bogus error with -fopenmp when called twice nonconcurrently/nonrecursively. (Issue requires using -fno-automatic or -fmax-stack-var-size= to trigger.) gcc/fortran/ChangeLog: PR fortran/98010 PR fortran/98013 * options.c (gfc_post_options): Also imply recursive with -fopenacc. * trans-decl.c (gfc_generate_function_code): Simplify condition.
2020-11-28Generate correct fn specs for some Fortran library functions.Thomas Koenig1-2/+4
This patch works by generating the correct fn spec from the actual arguments in specific_intrinsic_symbol, and by passing this down via gfc_get_extern_function_decl to gfc_get_function_type. CSHIFT remains to be done. gcc/fortran/ChangeLog: PR fortran/97454 * trans-decl.c (gfc_get_extern_function_decl): Add argument fnspec. * trans-intrinsic.c (MAX_SPEC_ARG): Define. (intrinsic_fnspec): New function. (ADD_CHAR): Define. (specific_intrinsic_symbol): Adjust comment. Pass fn spec to gfc_get_extern_function_decl. (gfc_conv_intrinsic_funcall): Add ANY, ALL, NORM2, PRODUCT and SUM intrnisic. Add FIXME for cshift et al. * trans-types.c (gfc_get_function_type): Add fnspec argument, handle it. * trans-types.h (gfc_get_function_type): Add optinal fnspec argument. * trans.h (gfc_get_extern_function_decl): Likewise.
2020-11-10Fortran: Fix function decl's location [PR95847]Tobias Burnus1-9/+10
gcc/fortran/ChangeLog: PR fortran/95847 * trans-decl.c (gfc_get_symbol_decl): Do not (re)set the location of an external procedure. (build_entry_thunks, generate_coarray_init, create_main_function, gfc_generate_function_code): Use fndecl's location in BIND_EXPR. gcc/testsuite/ChangeLog: PR fortran/95847 * gfortran.dg/coverage.f90: New test.
2020-11-03Fortran: Add !GCC$ attributes DEPRECATEDTobias Burnus1-1/+1
gcc/fortran/ChangeLog: * decl.c (ext_attr_list): Add EXT_ATTR_DEPRECATED. * gfortran.h (ext_attr_id_t): Ditto. * gfortran.texi (GCC$ ATTRIBUTES): Document it. * resolve.c (resolve_variable, resolve_function, resolve_call, resolve_values): Show -Wdeprecated-declarations warning. * trans-decl.c (add_attributes_to_decl): Skip those with no middle_end_name. gcc/testsuite/ChangeLog: * gfortran.dg/attr_deprecated.f90: New test.
2020-10-15Fix fndecl's for fortran coarray calls.Andre Vehreschild1-38/+38
gcc/fortran/ChangeLog: * trans-decl.c (gfc_build_builtin_function_decls): Fix the coarray fndecls.
2020-10-02Perforate fnspec stringsJan Hubicka1-82/+94
gcc/ChangeLog: 2020-10-02 Jan Hubicka <hubicka@ucw.cz> * attr-fnspec.h: Update documentation. (attr_fnsec::return_desc_size): Set to 2 (attr_fnsec::arg_desc_size): Set to 2 * builtin-attrs.def (STR1): Update fnspec. * internal-fn.def (UBSAN_NULL): Update fnspec. (UBSAN_VPTR): Update fnspec. (UBSAN_PTR): Update fnspec. (ASAN_CHECK): Update fnspec. (GOACC_DIM_SIZE): Remove fnspec. (GOACC_DIM_POS): Remove fnspec. * tree-ssa-alias.c (attr_fnspec::verify): Update verification. gcc/fortran/ChangeLog: 2020-10-02 Jan Hubicka <hubicka@ucw.cz> * trans-decl.c (gfc_build_library_function_decl_with_spec): Verify fnspec. (gfc_build_intrinsic_function_decls): Update fnspecs. (gfc_build_builtin_function_decls): Update fnspecs. * trans-io.c (gfc_build_io_library_fndecls): Update fnspecs. * trans-types.c (create_fn_spec): Update fnspecs.
2020-09-30Fix some fnspec strings in trans-decl.cJan Hubicka1-13/+13
* trans-decl.c (gfc_build_intrinsic_function_decls): Add traling dots to spec strings so they match the number of parameters; do not use R and W for non-pointer parameters. Drop pointless specifier on caf_stop_numeric and caf_get_team.
2020-08-26Fortran: Add 'device_type' clause to OpenMP's declare targetTobias Burnus1-1/+21
gcc/fortran/ChangeLog: * gfortran.h (enum gfc_omp_device_type): New. (symbol_attribute, gfc_omp_clauses, gfc_common_head): Use it. * module.c (enum ab_attribute): Add AB_OMP_DEVICE_TYPE_HOST, AB_OMP_DEVICE_TYPE_NOHOST and AB_OMP_DEVICE_TYPE_ANY. (attr_bits, mio_symbol_attribute): Handle it. (load_commons, write_common_0): Handle omp_device_type flag. * openmp.c (enum omp_mask1): Add OMP_CLAUSE_DEVICE_TYPE (OMP_DECLARE_TARGET_CLAUSES): Likewise. (gfc_match_omp_clauses): Match 'device_type'. (gfc_match_omp_declare_target): Handle it. * trans-common.c (build_common_decl): Write device-type clause. * trans-decl.c (add_attributes_to_decl): Likewise. gcc/testsuite/ChangeLog: * gfortran.dg/gomp/declare-target-4.f90: New test. * gfortran.dg/gomp/declare-target-5.f90: New test.
2020-07-21PR fortran/89574 - ICE in conv_function_val, at fortran/trans-expr.c:3792Harald Anlauf1-1/+6
When checking for an external procedure from the same file, do not consider symbols from different modules. gcc/fortran/ PR fortran/89574 * trans-decl.c (gfc_get_extern_function_decl): Check whether a symbol belongs to a different module.
2020-06-29Do not generate recursion check for compiler-generated procedures.Thomas Koenig1-1/+1
This one-line fix removes a check for recursion for procedures which are compiler-generated, such as finalizers or deallocation. These need to be recursive, even if the user code should not be. gcc/fortran/ChangeLog: PR fortran/95743 * trans-decl.c (gfc_generate_function_code): Do not generate recursion check for compiler-generated procedures.
2020-05-27Fortran : ICE in gfc_trans_label_assign PR50392Mark Eggleston1-3/+8
A function may contain an assigned goto. If the the return variable is an integer a statement can be assigned to it. Prior to this fix this resulted in an ICE. 2020-05-27 Tobias Burnus <tobias@codesourcery.com> gcc/fortran/ PR fortran/50392 * trans-decl.c (gfc_get_symbol_decl): Remove unnecessary block delimiters. Add auxiliary variables if a label is assigned to a return variable. (gfc_gat_fake_result): If the symbol has an assign attribute set declaration from the symbol's backend declaration. 2020-05-27 Mark Eggleston <markeggleston@gnu.gcc.org> gcc/testsuite/ PR fortran/50392 * gfortran.dg/pr50392.f: New test.
2020-04-14Fix PR 94270 by not warning about artifical dummy arguments.Thomas König1-1/+1
2020-04-14 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/94270 * interface.c (gfc_get_formal_from_actual_arglist): Always set artificial attribute for symbols. * trans-decl.c (generate_local_decl): Do not warn if the symbol is artifical. 2020-04-14 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/94270 * gfortran.dg/warn_unused_dummy_argument_6.f90: New test.
2020-02-01fortran: Fix up TYPE_ARG_TYPES of procs with scalar VALUE optional args ↵Jakub Jelinek1-2/+4
[PR92305] The following patch fixes -FAIL: libgomp.fortran/use_device_addr-1.f90 -O0 execution test -FAIL: libgomp.fortran/use_device_addr-2.f90 -O0 execution test that has been FAILing for several months on powerpc64le-linux. The problem is in the Fortran FE, which adds the artificial arguments for scalar VALUE OPTIONAL dummy args only to DECL_ARGUMENTS where the current function can see them, but not to TYPE_ARG_TYPES; if those functions aren't varargs, this confuses calls.c to pass the remaining arguments (which aren't named (== not covered by TYPE_ARG_TYPES) and aren't varargs either) in a different spot from what the callee (which has proper DECL_ARGUMENTS for all args) expects. For the artificial length arguments for character dummy args we already put them in both DECL_ARGUMENTS and TYPE_ARG_TYPES. 2020-02-01 Jakub Jelinek <jakub@redhat.com> PR fortran/92305 * trans-types.c (gfc_get_function_type): Also push boolean_type_node types for non-character scalar VALUE optional dummy arguments. * trans-decl.c (create_function_arglist): Skip those in hidden_typelist. Formatting fix.
2020-01-30fortran: Fix up ISO_Fortran_binding_15.f90 failures [PR92123]Jakub Jelinek1-2/+12
This is something that has been discussed already a few months ago, but seems to have stalled. Here is Paul's patch from the PR except for the TREE_STATIC hunk which is wrong, and does the most conservative fn spec tweak for the problematic two builtins we are aware of (to repeat what is in the PR, both .wR and .ww are wrong for these builtins that transform one layout of an descriptor to another one; while the first pointer is properly marked that we only store to what it points to, from the second pointer we copy and reshuffle the content and store into the first one; if there wouldn't be any pointers, ".wr" would be just fine, but as there is a pointer and that pointer is copied to the area pointed by first argument, the pointer effectively leaks that way, so we e.g. can't optimize stores into what the data pointer in the descriptor points to). I haven't analyzed other fn spec attributes in the FE, but think it is better to fix at least this one we have analyzed. 2020-01-30 Paul Thomas  <pault@gcc.gnu.org> Jakub Jelinek <jakub@redhat.com> PR fortran/92123 * trans-decl.c (gfc_get_symbol_decl): Call gfc_defer_symbol_init for CFI descs. (gfc_build_builtin_function_decls): Use ".w." instead of ".ww" or ".wR" for gfor_fndecl_{cfi_to_gfc,gfc_to_cfi}. (convert_CFI_desc): Handle references to CFI descriptors. Co-authored-by: Paul Thomas <pault@gcc.gnu.org>
2020-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r279813
2019-12-30Remove KIND argument from INDEX so it does not mess up scalarization.Thomas Koenig1-1/+23
2019-12-30 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/91541 * intrinsic.c (add_sym_4ind): New function. (add_functions): Use it for INDEX. (resolve_intrinsic): Also call f1m for INDEX. * intrinsic.h (gfc_resolve_index_func): Adjust prototype to take a gfc_arglist instead of individual arguments. * iresolve.c (gfc_resolve_index_func): Adjust arguments. Remove KIND argument if present, and make sure this is not done twice. * trans-decl.c: Include "intrinsic.h". (gfc_get_extern_function_decl): Special case for resolving INDEX. 2019-12-30 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/91541 * gfortran.dg/index_3.f90: New test. From-SVN: r279763
2019-12-07Fortran] PR 92793 - fix column used for error diagnosticTobias Burnus1-2/+2
PR fortran/92793 * trans.c (gfc_get_location): Declare. * trans.c (gfc_get_location): Define; returns column-corrected location. (trans_runtime_error_vararg, gfc_trans_runtime_check, gfc_generate_module_code): Use new function. * trans-array.c (gfc_trans_auto_array_allocation): Likewise. * trans-common.c (build_field, get_init_field, create_common): Likewise. * trans-decl.c (gfc_build_label_decl, gfc_get_symbol_decl): Likewise. * trans-openmp.c (gfc_trans_omp_reduction_list, gfc_trans_omp_clauses): Likewise. * trans-stmt.c (gfc_trans_if_1): Likewise. From-SVN: r279075
2019-12-05re PR fortran/92781 (ICE in convert_nonlocal_reference_op, at ↵Jakub Jelinek1-4/+7
tree-nested.c:1065) PR fortran/92781 * trans-decl.c (gfc_get_symbol_decl): If sym->backend_decl is current_function_decl, add length to current rather than parent function and expect DECL_CONTEXT (length) to be current_function_decl. * gfortran.dg/pr92781.f90: New test. From-SVN: r278988
2019-11-11Fortran] Support absent optional args with use_device_{ptr,addr}Tobias Burnus1-2/+1
2019-11-11 Tobias Burnus <tobias@codesourcery.com> Kwok Cheung Yeung <kcy@codesourcery.com> gcc/ * langhooks-def.h (LANG_HOOKS_OMP_CHECK_OPTIONAL_ARGUMENT): Renamed from LANG_HOOKS_OMP_IS_OPTIONAL_ARGUMENT; update define. (LANG_HOOKS_DECLS): Rename also here. * langhooks.h (lang_hooks_for_decls): Rename omp_is_optional_argument to omp_check_optional_argument; take additional bool argument. * omp-general.h (omp_check_optional_argument): Likewise. * omp-general.h (omp_check_optional_argument): Likewise. * omp-low.c (lower_omp_target): Update calls; handle absent Fortran optional arguments with USE_DEVICE_ADDR/USE_DEVICE_PTR. gcc/fortran/ * trans-expr.c (gfc_conv_expr_present): Check for DECL_ARTIFICIAL for the VALUE hidden argument avoiding -fallow-underscore issues. * trans-decl.c (create_function_arglist): Also set GFC_DECL_OPTIONAL_ARGUMENT for per-value arguments. * f95-lang.c (LANG_HOOKS_OMP_CHECK_OPTIONAL_ARGUMENT): Renamed from LANG_HOOKS_OMP_IS_OPTIONAL_ARGUMENT; point to gfc_omp_check_optional_argument. * trans.h (gfc_omp_check_optional_argument): Subsitutes gfc_omp_is_optional_argument declaration. * trans-openmp.c (gfc_omp_is_optional_argument): Make static. (gfc_omp_check_optional_argument): New function. libgomp/ * testsuite/libgomp.fortran/use_device_ptr-optional-1.f90: Extend. * testsuite/libgomp.fortran/use_device_ptr-optional-2.f90: New. Co-Authored-By: Kwok Cheung Yeung <kcy@codesourcery.com> From-SVN: r278046
2019-11-10Don't print warning when moving to static with -fno-automaticJanne Blomqvist1-9/+10
As part of PR 91413, GFortran now prints a warning when a variable is moved from the stack to static storage. However, when the user explicitly specifies that all local variables should be put in static storage with the -fno-automatic option, don't print this warning. Regtested on x86_64-pc-linux-gnu, committed as obvious. gcc/fortran/ChangeLog: 2019-11-10 Janne Blomqvist <jb@gcc.gnu.org> PR fortran/91413 * trans-decl.c (gfc_finish_var_decl): Don't print warning when -fno-automatic is enabled. From-SVN: r278027
2019-11-03re PR fortran/92113 (r276673 causes segfault in gfortran.dg/pr51434.f90)Thomas Koenig1-7/+14
2019-11-03 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/92133 * trans-decl.c (gfc_get_symbol_decl): If __def_init actually contains a value, put it into the read-only section. From-SVN: r277760
2019-10-27re PR fortran/86248 (LEN_TRIM in specification expression causes link failure)Paul Thomas1-20/+13
2019-10-27 Paul Thomas <pault@gcc.gnu.org> PR fortran/86248 * resolve.c (flag_fn_result_spec): Correct a typo before the function declaration. * trans-decl.c (gfc_sym_identifier): Boost the length of 'name' to allow for all variants. Simplify the code by using a pointer to the symbol's proc_name and taking the return out of each of the conditional branches. Allow symbols with fn_result_spec set that do not come from a procedure namespace and have a module name to go through the non-fn_result_spec branch. 2019-10-27 Paul Thomas <pault@gcc.gnu.org> PR fortran/86248 * gfortran.dg/char_result_19.f90 : New test. * gfortran.dg/char_result_mod_19.f90 : Module for the new test. From-SVN: r277487
2019-10-18re PR fortran/69455 ([F08] Assembler error(s) when using intrinsic modules ↵Steven G. Kargl1-1/+8
in two BLOCK) 2019-10-18 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/69455 * trans-decl.c (generate_local_decl): Avoid misconstructed intrinsic modules in a BLOCK construct. 2019-10-18 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/69455 * gfortran.dg/pr69455_1.f90: New test. * gfortran.dg/pr69455_2.f90: Ditto. From-SVN: r277158
2019-10-11[OpenMP,Fortran] Fix several OpenMP use_device_addr/map/update errorsTobias Burnus1-1/+2
gcc/fortran/ * f95-lang.c (LANG_HOOKS_OMP_IS_ALLOCATABLE_OR_PTR): Re-define to gfc_omp_is_allocatable_or_ptr. * trans-decl.c (create_function_arglist): Set GFC_DECL_OPTIONAL_ARGUMENT only if not passed by value. * trans-openmp.c (gfc_omp_is_allocatable_or_ptr): New. (gfc_trans_omp_clauses): For MAP, handle (present) optional arguments; for target update, handle allocatable/pointer scalars. * trans.h (gfc_omp_is_allocatable_or_ptr): Declare. gcc/ * langhooks-def.h (LANG_HOOKS_OMP_IS_ALLOCATABLE_OR_PTR): Define. (LANG_HOOKS_DECLS): Add it. * langhooks.h (lang_hooks_for_decls): Add omp_is_allocatable_or_ptr; update comment for omp_is_optional_argument. * omp-general.c (omp_is_allocatable_or_ptr): New. * omp-general.h (omp_is_allocatable_or_ptr): Declare. * omp-low.c (scan_sharing_clauses, lower_omp_target): Handle Fortran's optional arguments and allocatable/pointer scalars with use_device_addr. libgomp/ * testsuite/libgomp.fortran/use_device_addr-1.f90: New. * testsuite/libgomp.fortran/use_device_addr-2.f90: New. From-SVN: r276875
2019-10-03re PR fortran/84487 (Large rodate section increase in 465.tonto with r254427)Thomas Koenig1-1/+5
2019-10-03 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/84487 * trans-decl.c (gfc_get_symbol_decl): For __def_init, set DECL_ARTIFICAL and do not set TREE_READONLY. 2019-10-03 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/84487 * gfortran.dg/typebound_call_22.f03: xfail. From-SVN: r276506
2019-10-02f95-lang.c (LANG_HOOKS_OMP_IS_OPTIONAL_ARGUMENT): Define to ↵Kwok Cheung Yeung1-0/+5
gfc_omp_is_optional_argument. 2019-10-02 Kwok Cheung Yeung <kcy@codesourcery.com> gcc/fortran/ * f95-lang.c (LANG_HOOKS_OMP_IS_OPTIONAL_ARGUMENT): Define to gfc_omp_is_optional_argument. * trans-decl.c (create_function_arglist): Set GFC_DECL_OPTIONAL_ARGUMENT in the generated decl if the parameter is optional. * trans-openmp.c (gfc_omp_is_optional_argument): New. (gfc_omp_privatize_by_reference): Return true if the decl is an optional pass-by-reference argument. * trans.h (gfc_omp_is_optional_argument): New declaration. (lang_decl): Add new optional_arg field. (GFC_DECL_OPTIONAL_ARGUMENT): New macro. gcc/ * langhooks-def.h (LANG_HOOKS_OMP_IS_OPTIONAL_ARGUMENT): Default to false. (LANG_HOOKS_DECLS): Add LANG_HOOKS_OMP_IS_OPTIONAL_ARGUMENT. * langhooks.h (omp_is_optional_argument): New hook. * omp-general.c (omp_is_optional_argument): New. * omp-general.h (omp_is_optional_argument): New declaration. * omp-low.c (lower_omp_target): Create temporary for received value and take the address for new_var if the original variable was a DECL_BY_REFERENCE. Use size of referenced object when a pass-by-reference optional argument used as argument to firstprivate. From-SVN: r276444
2019-09-14re PR fortran/91557 (Bogus warning about unused dummy argument _formal_*)Thomas Koenig1-3/+5
2019-09-14 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/91557 PR fortran/91556 * frontend-passes.c (check_externals_procedure): Reformat argument list. Use gfc_compare_actual_formal instead of gfc_procedure_use. * gfortran.h (gfc_symbol): Add flag error. * interface.c (gfc_compare_interfaces): Reformat. (argument_rank_mismatch): Add where_formal argument. If it is present, note that the error is between different calls. (compare_parameter): Change warnings that previously dependended on -Wargument-mismatch to unconditional. Issue an error / warning on type mismatch only once. Pass where_formal to argument_rank_mismatch for artificial variables. (compare_actual_formal): Change warnings that previously dependeded on -Wargument-mismatch to unconditional. (gfc_check_typebound_override): Likewise. (gfc_get_formal_from_actual_arglist): Set declared_at for artificial symbol. * invoke.texi: Extend description of -fallow-argument-mismatch. Delete -Wargument-mismatch. * lang.opt: Change -Wargument-mismatch to do-nothing option. * resolve.c (resolve_structure_cons): Change warnings that previously depended on -Wargument-mismatch to unconditional. * trans-decl.c (generate_local_decl): Do not warn if the symbol is artificial. 2019-09-14 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/91557 PR fortran/91556 * gfortran.dg/argument_checking_20.f90: New test. * gfortran.dg/argument_checking_21.f90: New test. * gfortran.dg/argument_checking_22.f90: New test. * gfortran.dg/argument_checking_23.f90: New test. * gfortran.dg/warn_unused_dummy_argument_5.f90: New test. * gfortran.dg/bessel_3.f90: Add pattern for type mismatch. * gfortran.dg/g77/20010519-1.f: Adjust dg-warning messages to new handling. * gfortran.dg/pr24823.f: Likewise. * gfortran.dg/pr39937.f: Likewise. From-SVN: r275719
2019-08-17PR fortran/68401 Improve allocation error messageJanne Blomqvist1-6/+6
Improve the error message that is printed when a memory allocation fails, by including the location, and the size of the allocation that failed. Regtested on x86_64-pc-linux-gnu. gcc/fortran/ChangeLog: 2019-08-17 Janne Blomqvist <jb@gcc.gnu.org> PR fortran/68401 * trans-decl.c (gfc_build_builtin_function_decls): Replace os_error with os_error_at decl. * trans.c (trans_runtime_error_vararg): Modify so the error function decl is passed directly. (gfc_trans_runtime_error): Pass correct error function decl. (gfc_trans_runtime_check): Likewise. (trans_os_error_at): New function. (gfc_call_malloc): Use trans_os_error_at. (gfc_allocate_using_malloc): Likewise. (gfc_call_realloc): Likewise. * trans.h (gfor_fndecl_os_error): Replace with gfor_fndecl_os_error_at. libgfortran/ChangeLog: 2019-08-17 Janne Blomqvist <jb@gcc.gnu.org> PR fortran/68401 * gfortran.map: Add GFORTRAN_10 node, add _gfortran_os_error_at symbol. * libgfortran.h (os_error_at): New prototype. * runtime/error.c (os_error_at): New function. From-SVN: r274599
2019-08-11PR fortran/91413 Generate warning when making array staticJanne Blomqvist1-0/+10
When moving a local variable from the stack to static storage, the procedure is no longer safe to be called recursively or concurrently from multiple threads. Thus generate a warning when this is done. Also double the default limit for switching from stack to static. Regtested on x86_64-pc-linux-gnu. gcc/fortran/ChangeLog: 2019-08-11 Janne Blomqvist <jb@gcc.gnu.org> PR fortran/91413 * invoke.texi (-fmax-stack-var-size): Document increased default. * options.c (gfc_post_options): Increase default stack var size to 65536 bytes. * trans-decl.c (gfc_finish_var_decl): Generate warning when local array moved to static storage. From-SVN: r274264
2019-08-06re PR fortran/91359 (logical function X returns .TRUE. - Warning: spaghetti ↵Steven G. Kargl1-0/+14
code) 2019-08-06 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/91359 * trans-decl.c (gfc_generate_return): Ensure something is returned from a function. 2019-08-06 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/91359 * gfortran.dg/pr91359_1.f: New test. * gfortran.dg/pr91359_2.f: Ditto. From-SVN: r274149
2019-07-29re PR fortran/90813 (gfortran.dg/proc_ptr_51.f90 fails (SIGSEGV) after 272084)Thomas Koenig1-15/+60
2019-07-29 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/90813 * dump-parse-tree.c (show_global_symbol): New function. (gfc_dump_global_symbols): New function. * gfortran.h (gfc_traverse_gsymbol): Add prototype. (gfc_dump_global_symbols): Likewise. * invoke.texi: Document -fdump-fortran-global. * lang.opt: Add -fdump-fortran-global. * parse.c (gfc_parse_file): Handle flag_dump_fortran_global. * symbol.c (gfc_traverse_gsymbol): New function. * trans-decl.c (sym_identifier): New function. (mangled_identifier): New function, doing most of the work of gfc_sym_mangled_identifier. (gfc_sym_mangled_identifier): Use mangled_identifier. Add mangled identifier to global symbol table. (get_proc_pointer_decl): Use backend decl from global identifier if present. From-SVN: r273880
2019-06-19[PR90921] Fortran OpenACC 'declare' directive's module handling causes ↵Julian Brown1-1/+1
duplicate data clauses gcc/fortran/ PR fortran/90921 * trans-decl.c (finish_oacc_declare): Reset module_oacc_clauses before scanning each namespace. gcc/testsuite/ PR fortran/90921 * gfortran.dg/goacc/declare-3.f95: Update. From-SVN: r272454
2019-06-19[PR85221] Set 'omp declare target', 'omp declare target link' attributes for ↵Thomas Schwinge1-2/+7
Fortran OpenACC 'declare'd variables gcc/fortran/ PR fortran/85221 * trans-decl.c (add_attributes_to_decl): Handle OpenACC 'declare' directive. gcc/testsuite/ PR fortran/85221 * gfortran.dg/goacc/declare-3.f95: New file. From-SVN: r272453
2019-05-29re PR fortran/90329 (Incompatibility between gfortran and C lapack calls)Jakub Jelinek1-2/+5
PR fortran/90329 * lang.opt (fbroken-callers): Remove. (ftail-call-workaround, ftail-call-workaround=): New options. * gfortran.h (struct gfc_namespace): Add implicit_interface_calls. * interface.c (gfc_procedure_use): Set implicit_interface_calls for calls to implicit interface procedures. * trans-decl.c (create_function_arglist): Use flag_tail_call_workaround instead of flag_broken_callers. If it is not 2, also require sym->ns->implicit_interface_calls. * invoke.texi (fbroken-callers): Remove documentation. (ftail-call-workaround, ftail-call-workaround=): Document. From-SVN: r271738
2019-05-19re PR fortran/90329 (Incompatibility between gfortran and C lapack calls)Thomas Koenig1-1/+5
2019-05-19 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/90329 * invoke.texi: Document -fbroken-callers. * lang.opt: Add -fbroken-callers. * trans-decl.c (create_function_arglist): Only set DECL_HIDDEN_STRING_LENGTH if flag_broken_callers is set. From-SVN: r271376
2019-05-17[PR89433] Refer to OpenACC 'routine' clauses from "omp declare target" attributeThomas Schwinge1-7/+11
gcc/c-family/ PR c/89433 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for "omp declare target". gcc/c/ PR c/89433 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine' clauses from "omp declare target" attribute. gcc/cp/ PR c++/89433 * parser.c (cp_finalize_oacc_routine): Refer to OpenACC 'routine' clauses from "omp declare target" attribute. gcc/fortran/ PR fortran/89433 * f95-lang.c (gfc_attribute_table): Set min_len to -1 for "omp declare target". * trans-decl.c (add_attributes_to_decl): Refer to OpenACC 'routine' clauses from "omp declare target" attribute. gcc/testsuite/ PR testsuite/89433 * c-c++-common/goacc/classify-routine.c: Update. * gfortran.dg/goacc/classify-routine.f95: Likewise. From-SVN: r271343
2019-05-16re PR fortran/90329 (Incompatibility between gfortran and C lapack calls)Jakub Jelinek1-0/+4
PR fortran/90329 * tree-core.h (struct tree_decl_common): Document decl_nonshareable_flag for PARM_DECLs. * tree.h (DECL_HIDDEN_STRING_LENGTH): Define. * calls.c (expand_call): Don't try tail call if caller has any DECL_HIDDEN_STRING_LENGTH PARM_DECLs that are or might be passed on the stack and callee needs to pass any arguments on the stack. * tree-streamer-in.c (unpack_ts_decl_common_value_fields): Use else if instead of series of mutually exclusive ifs. Handle DECL_HIDDEN_STRING_LENGTH for PARM_DECLs. * tree-streamer-out.c (pack_ts_decl_common_value_fields): Likewise. * trans-decl.c (create_function_arglist): Set DECL_HIDDEN_STRING_LENGTH on hidden string length PARM_DECLs if len is constant. From-SVN: r271285
2019-05-10re PR fortran/90093 (Extended C interop: optional argument incorrectly ↵Paul Thomas1-6/+41
identified as PRESENT) 2019-05-10 Paul Thomas <pault@gcc.gnu.org> PR fortran/90093 * trans-decl.c (convert_CFI_desc): Test that the dummy is present before doing any of the conversions. PR fortran/90352 * decl.c (gfc_verify_c_interop_param): Restore the error for charlen > 1 actual arguments passed to bind(C) procs. Clean up trailing white space. PR fortran/90355 * trans-array.c (gfc_trans_create_temp_array): Set the 'span' field to the element length for all types. (gfc_conv_expr_descriptor): The force_no_tmp flag is used to prevent temporary creation, especially for substrings. * trans-decl.c (gfc_trans_deferred_vars): Rather than assert that the backend decl for the string length is non-null, use it as a condition before calling gfc_trans_vla_type_sizes. * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): 'force_no_tmp' is set before calling gfc_conv_expr_descriptor. * trans.c (get_array_span): Move the code for extracting 'span' from gfc_build_array_ref to this function. This is specific to descriptors that are component and indirect references. * trans.h : Add the force_no_tmp flag bitfield to gfc_se. 2019-05-10 Paul Thomas <pault@gcc.gnu.org> PR fortran/90093 * gfortran.dg/ISO_Fortran_binding_12.f90: New test. * gfortran.dg/ISO_Fortran_binding_12.c: Supplementary code. PR fortran/90352 * gfortran.dg/iso_c_binding_char_1.f90: New test. PR fortran/90355 * gfortran.dg/ISO_Fortran_binding_4.f90: Add 'substr' to test the direct passing of substrings as descriptors to bind(C). * gfortran.dg/assign_10.f90: Increase the tree_dump count of 'atmp' to account for the setting of the 'span' field. * gfortran.dg/transpose_optimization_2.f90: Ditto. From-SVN: r271057
2019-04-14re PR fortran/89843 (CFI_section delivers incorrect result descriptor)Paul Thomas1-0/+73
2019-04-14 Paul Thomas <pault@gcc.gnu.org> PR fortran/89843 * trans-decl.c (gfc_get_symbol_decl): Assumed shape and assumed rank dummies of bind C procs require deferred initialization. (convert_CFI_desc): New procedure to convert incoming CFI descriptors to gfc types and back again. (gfc_trans_deferred_vars): Call it. * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Null the CFI descriptor pointer. Free the descriptor in all cases. PR fortran/89846 * expr.c (is_CFI_desc): New function. (is_subref_array): Tidy up by referencing the symbol directly. * gfortran.h : Prototype for is_CFI_desc. * trans_array.c (get_CFI_desc): New function. (gfc_get_array_span, gfc_conv_scalarized_array_ref, gfc_conv_array_ref): Use it. * trans.c (get_array_span): Extract the span from descriptors that are indirect references. PR fortran/90022 * trans-decl.c (gfc_get_symbol_decl): Make sure that the se expression is a pointer type before converting it to the symbol backend_decl type. * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Eliminate temporary creation for intent(in). 2019-04-14 Paul Thomas <pault@gcc.gnu.org> PR fortran/89843 * gfortran.dg/ISO_Fortran_binding_4.f90: Modify the value of x in ctg. Test the conversion of the descriptor types in the main program. * gfortran.dg/ISO_Fortran_binding_10.f90: New test. * gfortran.dg/ISO_Fortran_binding_10.c: Called by it. PR fortran/89846 * gfortran.dg/ISO_Fortran_binding_11.f90: New test. * gfortran.dg/ISO_Fortran_binding_11.c: Called by it. PR fortran/90022 * gfortran.dg/ISO_Fortran_binding_1.c: Correct the indexing for the computation of 'ans'. Also, change the expected results for CFI_is_contiguous to comply with standard. * gfortran.dg/ISO_Fortran_binding_1.f90: Correct the expected results for CFI_is_contiguous to comply with standard. * gfortran.dg/ISO_Fortran_binding_9.f90: New test. * gfortran.dg/ISO_Fortran_binding_9.c: Called by it. 2019-04-14 Paul Thomas <pault@gcc.gnu.org> PR fortran/89843 * runtime/ISO_Fortran_binding.c (cfi_desc_to_gfc_desc): Only return immediately if the source pointer is null. Bring forward the extraction of the gfc type. Extract the kind so that the element size can be correctly computed for sections and components of derived type arrays. Remove the free of the CFI descriptor since this is now done in trans-expr.c. (gfc_desc_to_cfi_desc): Only allocate the CFI descriptor if it is not null. (CFI_section): Normalise the difference between the upper and lower bounds by the stride to correctly calculate the extents of the section. PR fortran/89846 * runtime/ISO_Fortran_binding.c (cfi_desc_to_gfc_desc): Use the stride measure for the gfc span if it is not a multiple of the element length. Otherwise use the element length. PR fortran/90022 * runtime/ISO_Fortran_binding.c (CFI_is_contiguous) : Return 1 for true and 0 otherwise to comply with the standard. Correct the contiguity check for rank 3 and greater by using the stride measure of the lower dimension rather than the element length. From-SVN: r270353
2019-03-13[multiple changes]Thomas Koenig1-4/+17
2019-03-13 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/66695 PR fortran/77746 PR fortran/79485 * gfortran.h (gfc_symbol): Add bind_c component. (gfc_get_gsymbol): Add argument bind_c. * decl.c (add_global_entry): Add bind_c argument to gfc_get_symbol. * parse.c (parse_block_data): Likewise. (parse_module): Likewise. (add_global_procedure): Likewise. (add_global_program): Likewise. * resolve.c (resolve_common_blocks): Likewise. (resolve_global_procedure): Likewise. (gfc_verify_binding_labels): Likewise. * symbol.c (gfc_get_gsymbol): Add argument bind_c. Set bind_c in gsym. * trans-decl.c (gfc_get_module_backend_decl): Add bind_c argument to gfc_get_symbol. (gfc_get_extern_function_decl): If the sym has a binding label and it cannot be found in the global symbol tabel, it is the wrong one and vice versa. 2019-03-13 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/66695 PR fortran/77746 PR fortran/79485 * gfortran.dg/binding_label_tests_30.f90: New test. * gfortran.dg/binding_label_tests_31.f90: New test. * gfortran.dg/binding_label_tests_32.f90: New test. * gfortran.dg/binding_label_tests_33.f90: New test. From-SVN: r269635
2019-02-28[PR72741] For all Fortran OpenACC 'routine' directive variants check for ↵Thomas Schwinge1-0/+1
multiple clauses specifying the level of parallelism gcc/fortran/ PR fortran/72741 * gfortran.h (enum oacc_routine_lop): Add OACC_ROUTINE_LOP_ERROR. * openmp.c (gfc_oacc_routine_lop, gfc_match_oacc_routine): Use it. * trans-decl.c (add_attributes_to_decl): Likewise. gcc/testsuite/ PR fortran/72741 * gfortran.dg/goacc/routine-multiple-lop-clauses-1.f90: New file. Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com> From-SVN: r269286
2019-02-22[PR72741] Use 'oacc_build_routine_dims' for Fortran OpenACC 'routine' ↵Thomas Schwinge1-10/+24
directives, too ... instead of having an incomplete local implementation. With these changes in place, we can then also revert the work-around r267213 "[nvptx] Unify C/Fortran routine handling in nvptx_goacc_validate_dims". gcc/fortran/ PR fortran/72741 * gfortran.h (oacc_routine_lop): New enum. (symbol_attribute): Use it. * openmp.c (gfc_oacc_routine_dims): Replace with... (gfc_oacc_routine_lop): ... this new function. (gfc_match_oacc_routine): Adjust. * trans-decl.c (add_attributes_to_decl): Likewise. gcc/ PR fortran/72741 * omp-general.c (oacc_replace_fn_attrib): Mostly split out into... (oacc_replace_fn_attrib_attr): ... this new function. * omp-general.h (oacc_replace_fn_attrib_attr): New prototype. * config/nvptx/nvptx.c (nvptx_goacc_validate_dims_1): Revert workaround. gcc/testsuite/ PR fortran/72741 * gfortran.dg/goacc/classify-routine.f95: Adjust. Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com> From-SVN: r269105
2019-02-18re PR fortran/87689 (PowerPC64 ELFv2 function parameter passing violation)Thomas Koenig1-2/+2
2019-02-18 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/87689 * trans-decl.c (gfc_get_extern_function_decl): Add argument actual_args and pass it through to gfc_get_function_type. * trans-expr.c (conv_function_val): Add argument actual_args and pass it on to gfc_get_extern_function_decl. (conv_procedure_call): Pass actual arguments to conv_function_val. * trans-types.c (get_formal_from_actual_arglist): New function. (gfc_get_function_type): Add argument actual_args. Generate formal args from actual args if necessary. * trans-types.h (gfc_get_function_type): Add optional argument. * trans.h (gfc_get_extern_function_decl): Add optional argument. 2019-02-18 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/87689 * gfortran.dg/lto/20091028-1_0.f90: Add -Wno-lto-type-mismatch to options. * gfortran.dg/lto/20091028-2_0.f90: Likewise. * gfortran.dg/lto/pr87689_0.f: New file. * gfortran.dg/lto/pr87689_1.f: New file. From-SVN: r268992
2019-02-16re PR fortran/71066 (ICE in set_loop_bounds, at fortran/trans-array.c:4680)Thomas Koenig1-0/+27
2019-02-17 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/71066 * trans-decl.c (generate_coarray_sym_init): For an array constructor in a DATA statement of a coarray variable, set the rank to 1 to avoid confusion later on. If the constructor contains only one value, use that for initiailizig. 2019-02-17 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/71066 * gfortran.dg/coarray_data_1.f90: New test. From-SVN: r268960
2019-02-01re PR fortran/83246 (internal compiler error or loader problem might be ↵Jakub Jelinek1-4/+1
related to a PARAMETER statement being in a BLOCK) PR fortran/83246 PR fortran/89084 * trans-decl.c (generate_local_decl): Add referenced FL_PARAMETERs if sym->ns->construct_entities rather than if sym->ns->parent->code->op == EXEC_BLOCK. * gfortran.dg/pr89084.f90: New test. * gfortran.dg/lto/pr89084_0.f90: New test. * gfortran.dg/pr83246.f90: New test. From-SVN: r268462
2019-01-19re PR fortran/88902 (ICE: Segmentation fault (in DFS::DFS_write_tree_body))Jakub Jelinek1-6/+10
PR fortran/88902 * trans-decl.c (gfc_get_symbol_decl): Don't add length to function or parent function if it has been added there already. * gfortran.dg/pr88902.f90: New test. From-SVN: r268091
2019-01-12gfortran.texi: Add description in sections on TS 29113 and further ↵Paul Thomas1-0/+10
interoperability with C. 2019-01-12 Paul Thomas <pault@gcc.gnu.org> * gfortran.texi : Add description in sections on TS 29113 and further interoperability with C. * trans-array.c (gfc_conv_descriptor_attribute): New function. (gfc_get_dataptr_offset): Remove static function attribute. * trans-array.h : Add prototypes for above functions. * trans-decl.c : Add declarations for the library functions cfi_desc_to_gfc_desc and gfc_desc_to_cfi_desc. * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): New function. (gfc_conv_procedure_call): Call it for scalar and array actual arguments, when the formal arguments are bind_c with assumed shape or assumed rank. * trans.h : External declarations for gfor_fndecl_cfi_to_gfc and gfor_fndecl_gfc_to_cfi. 2019-01-12 Paul Thomas <pault@gcc.gnu.org> * gfortran.dg/ISO_Fortran_binding_1.f90 : New test. * gfortran.dg/ISO_Fortran_binding_1.c : Auxilliary file for test. * gfortran.dg/ISO_Fortran_binding_2.f90 : New test. * gfortran.dg/ISO_Fortran_binding_2.c : Auxilliary file for test. * gfortran.dg/bind_c_array_params_2.f90 : Change search string for dump tree scan. 2019-01-12 Paul Thomas <pault@gcc.gnu.org> * ISO_Fortran_binding.h : New file. * Makefile.am : Include ISO_Fortran_binding.c in the list of files to compile. * Makefile.in : Regenerated. * gfortran.map : Add _gfortran_cfi_desc_to_gfc_desc, _gfortran_gfc_desc_to_cfi_desc and the CFI API functions. * runtime/ISO_Fortran_binding.c : New file containing the new functions added to the map. From-SVN: r267881
2019-01-09PR other/16615 [1/5]Sandra Loosemore1-1/+1
2019-01-09 Sandra Loosemore <sandra@codesourcery.com> PR other/16615 [1/5] contrib/ * mklog: Mechanically replace "can not" with "cannot". gcc/ * Makefile.in: Mechanically replace "can not" with "cannot". * alias.c: Likewise. * builtins.c: Likewise. * calls.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * common/config/i386/i386-common.c: Likewise. * config/aarch64/aarch64.c: Likewise. * config/alpha/sync.md: Likewise. * config/arc/arc.c: Likewise. * config/arc/predicates.md: Likewise. * config/arm/arm-c.c: Likewise. * config/arm/arm.c: Likewise. * config/arm/arm.h: Likewise. * config/arm/arm.md: Likewise. * config/arm/cortex-r4f.md: Likewise. * config/csky/csky.c: Likewise. * config/csky/csky.h: Likewise. * config/darwin-f.c: Likewise. * config/epiphany/epiphany.md: Likewise. * config/i386/i386.c: Likewise. * config/i386/sol2.h: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.h: Likewise. * config/microblaze/microblaze.md: Likewise. * config/mips/20kc.md: Likewise. * config/mips/sb1.md: Likewise. * config/nds32/nds32.c: Likewise. * config/nds32/predicates.md: Likewise. * config/pa/pa.c: Likewise. * config/rs6000/e300c2c3.md: Likewise. * config/rs6000/rs6000.c: Likewise. * config/s390/s390.h: Likewise. * config/sh/sh.c: Likewise. * config/sh/sh.md: Likewise. * config/spu/vmx2spu.h: Likewise. * cprop.c: Likewise. * dbxout.c: Likewise. * df-scan.c: Likewise. * doc/cfg.texi: Likewise. * doc/extend.texi: Likewise. * doc/fragments.texi: Likewise. * doc/gty.texi: Likewise. * doc/invoke.texi: Likewise. * doc/lto.texi: Likewise. * doc/md.texi: Likewise. * doc/objc.texi: Likewise. * doc/rtl.texi: Likewise. * doc/tm.texi: Likewise. * dse.c: Likewise. * emit-rtl.c: Likewise. * emit-rtl.h: Likewise. * except.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * fold-const.c: Likewise. * genautomata.c: Likewise. * gimple-fold.c: Likewise. * hard-reg-set.h: Likewise. * ifcvt.c: Likewise. * ipa-comdats.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-fnsummary.c: Likewise. * ipa-icf.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-polymorphic-call.c: Likewise. * ipa-profile.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-visibility.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * ira.h: Likewise. * loop-invariant.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lra-assigns.c: Likewise. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-remat.c: Likewise. * lra-spills.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-streamer-out.c: Likewise. * postreload-gcse.c: Likewise. * predict.c: Likewise. * profile-count.h: Likewise. * profile.c: Likewise. * recog.c: Likewise. * ree.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched.c: Likewise. * shrink-wrap.c: Likewise. * simplify-rtx.c: Likewise. * symtab.c: Likewise. * target.def: Likewise. * toplev.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-complex.c: Likewise. * tree-core.h: Likewise. * tree-eh.c: Likewise. * tree-inline.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nrv.c: Likewise. * tree-profile.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-phionlycprop.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssanames.c: Likewise. * tree-streamer-out.c: Likewise. * tree.c: Likewise. * tree.h: Likewise. * vr-values.c: Likewise. gcc/ada/ * exp_ch9.adb: Mechanically replace "can not" with "cannot". * libgnat/s-regpat.ads: Likewise. * par-ch4.adb: Likewise. * set_targ.adb: Likewise. * types.ads: Likewise. gcc/cp/ * cp-tree.h: Mechanically replace "can not" with "cannot". * parser.c: Likewise. * pt.c: Likewise. gcc/fortran/ * class.c: Mechanically replace "can not" with "cannot". * decl.c: Likewise. * expr.c: Likewise. * gfc-internals.texi: Likewise. * intrinsic.texi: Likewise. * invoke.texi: Likewise. * io.c: Likewise. * match.c: Likewise. * parse.c: Likewise. * primary.c: Likewise. * resolve.c: Likewise. * symbol.c: Likewise. * trans-array.c: Likewise. * trans-decl.c: Likewise. * trans-intrinsic.c: Likewise. * trans-stmt.c: Likewise. gcc/go/ * go-backend.c: Mechanically replace "can not" with "cannot". * go-gcc.cc: Likewise. gcc/lto/ * lto-partition.c: Mechanically replace "can not" with "cannot". * lto-symtab.c: Likewise. * lto.c: Likewise. gcc/objc/ * objc-act.c: Mechanically replace "can not" with "cannot". libbacktrace/ * backtrace.h: Mechanically replace "can not" with "cannot". libgcc/ * config/c6x/libunwind.S: Mechanically replace "can not" with "cannot". * config/tilepro/atomic.h: Likewise. * config/vxlib-tls.c: Likewise. * generic-morestack-thread.c: Likewise. * generic-morestack.c: Likewise. * mkmap-symver.awk: Likewise. libgfortran/ * caf/single.c: Mechanically replace "can not" with "cannot". * io/unit.c: Likewise. libobjc/ * class.c: Mechanically replace "can not" with "cannot". * objc/runtime.h: Likewise. * sendmsg.c: Likewise. liboffloadmic/ * include/coi/common/COIResult_common.h: Mechanically replace "can not" with "cannot". * include/coi/source/COIBuffer_source.h: Likewise. libstdc++-v3/ * include/ext/bitmap_allocator.h: Mechanically replace "can not" with "cannot". From-SVN: r267783
2019-01-07re PR fortran/45424 ([F08] Add IS_CONTIGUOUS intrinsic)Thomas Koenig1-0/+7
2019-01-07 Thomas Koenig <tkoenig@gcc.gnu.org> Harald Anlauf <anlauf@gmx.de> Tobias Burnus <burnus@gcc.gnu.org> PR fortran/45424 * check.c (gfc_check_is_contiguous): New function. * expr.c (gfc_is_not_contiguous): New function. * gfortran.h (gfc_isym_id): Add GFC_ISYM_IS_CONTIGUOUS. Add prototype for gfc_is_not_contiguous. * intrinsic.c (do_ts29113_check): Add GFC_ISYM_IS_CONTIGUOUS. (add_function): Add is_contiguous. * intrinsic.h: Add prototypes for gfc_check_is_contiguous, gfc_simplify_is_contiguous and gfc_resolve_is_contiguous. * intrinsic.texi: Add IS_CONTIGUOUS. * iresolve.c (gfc_resolve_is_contiguous): New function. * simplify.c (gfc_simplify_is_contiguous): New function. * trans-decl.c (gfor_fncecl_is_contiguous0): New variable. (gfc_build_intrinsic_function_decl): Add it. * trans-intrinsic.c (gfc_conv_intrinsic_is_contiguous): New function. (gfc_conv_intrinsic_function): Handle GFC_ISYM_IS_CONTIGUOUS. 2019-01-07 Thomas Koenig <tkoenig@gcc.gnu.org> Harald Anlauf <anlauf@gmx.de> Tobias Burnus <burnus@gcc.gnu.org> PR fortran/45424 * Makefile.am: Add intrinsics/is_contiguous.c. * Makefile.in: Regenerated. * gfortran.map: Add _gfortran_is_contiguous0. * intrinsics/is_contiguous.c: New file. * libgfortran.h: Add prototype for is_contiguous0. 2019-01-07 Thomas Koenig <tkoenig@gcc.gnu.org> Harald Anlauf <anlauf@gmx.de> Tobias Burnus <burnus@gcc.gnu.org> * gfortran.dg/is_contiguous_1.f90: New test. * gfortran.dg/is_contiguous_2.f90: New test. * gfortran.dg/is_contiguous_3.f90: New test. Co-Authored-By: Harald Anlauf <anlauf@gmx.de> Co-Authored-By: Tobias Burnus <burnus@gcc.gnu.org> From-SVN: r267657
2019-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r267494