1 2019-08-02 Steven G. Kargl <kargl@gcc.gnu.org>
4 * decl.c (gfc_match_data): In free-form code, DATA be followed by
7 2019-08-02 Steven G. Kargl <kargl@gcc.gnu.org>
10 * match.c (gfc_match_equivalence): Check that EQUIVALENCE is followed
13 2019-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
16 * interface.c (compare_actual_expr): When checking for aliasing, add
17 a case to handle REF_INQUIRY (e.g., foo(x%re, x%im) do not alias).
19 2019-07-29 Thomas Koenig <tkoenig@gcc.gnu.org>
22 * dump-parse-tree.c (show_global_symbol): New function.
23 (gfc_dump_global_symbols): New function.
24 * gfortran.h (gfc_traverse_gsymbol): Add prototype.
25 (gfc_dump_global_symbols): Likewise.
26 * invoke.texi: Document -fdump-fortran-global.
27 * lang.opt: Add -fdump-fortran-global.
28 * parse.c (gfc_parse_file): Handle flag_dump_fortran_global.
29 * symbol.c (gfc_traverse_gsymbol): New function.
30 * trans-decl.c (sym_identifier): New function.
31 (mangled_identifier): New function, doing most of the work
32 of gfc_sym_mangled_identifier.
33 (gfc_sym_mangled_identifier): Use mangled_identifier. Add mangled
34 identifier to global symbol table.
35 (get_proc_pointer_decl): Use backend decl from global identifier
38 2019-07-25 Thomas Koenig <tkoenig@gcc.gnu.org>
41 * dependency.h (gfc_dep_resovler): Add optional argument identical.
42 * dependency.c (gfc_check_dependency): Do not alway return 1 if
43 the symbol is the same. Pass on identical to gfc_dep_resolver.
44 (gfc_check_element_vs_element): Whitespace fix.
45 (gfc_dep_resolver): Adjust comment for function. If identical is
46 true, return 1 if any overlap has been found.
48 2019-07-23 Steven G. Kargl <kargl@gcc.gnu.org>
51 * check.c (gfc_invalid_boz): Fix comment.
52 (illegal_boz_arg): New function.
53 (gfc_check_transfer): Use to arguments.
54 (gfc_check_storage_size): Ditto.
55 (gfc_check_complex): Remove leftover comment from BOZ patch.
56 * primary.c (match_boz_constant): Remove leftover comment.
58 2019-07-23 Steven G. Kargl <kargl@gcc.gnu.org>
60 * arith.c (gfc_convert_integer, gfc_convert_real, gfc_convert_complex):
62 * primary.c (convert_integer, convert_real, convert_complex): ... here.
63 Rename and make static functions.
64 (match_integer_constant): Use convert_integer
65 (match_real_constant): Use convert_real.
66 (match_complex_constant: Use convert_complex.
67 * arith.h (gfc_convert_integer, gfc_convert_real, gfc_convert_complex):
69 * array.c (match_array_cons_element): A BOZ cannot be a data
70 statement value. Jump to a common exit point.
71 * check.c (gfc_invalid_boz): New function. Emit error or warning
72 for a BOZ in an invalid context.
73 (boz_args_check): Move to top of file to prevent need of forward
75 (is_boz_constant): New function. Check that BOZ expr is constant.
76 (gfc_boz2real): New function. In-place conversion of BOZ literal
77 constant to REAL in accordance to F2018.
78 (gfc_boz2int): New function. In-place conversion of BOZ literal
79 constant to INTEGER in accordance to F2018.
80 (gfc_check_achar, gfc_check_char, gfc_check_float): Use gfc_invalid_boz. Convert BOZ
82 (gfc_check_bge_bgt_ble_blt): Enforce F2018 requirements on BGE,
83 BGT, BLE, and BLT intrinsic functions.
84 (gfc_check_cmplx): Re-organize to check kind, if present, first.
85 Convert BOZ real and/or imaginary parts as needed in accordance to
87 (gfc_check_complex): Use gfc_invalid_boz. Convert BOZ as needed.
88 (gfc_check_dcmplx, gfc_check_dble ): Convert BOZ as needed.
89 (gfc_check_dshift): Make dshift[lr] conform to F2018 standard.
90 gfc_check_float (gfc_expr *a)
91 (gfc_check_iand_ieor_ior): Make IAND, IEOR, and IOR conform to
93 (gfc_check_int): Conform to F2018 standard.
94 (gfc_check_intconv): Deprecate SHORT and LONG aliases for INT2 and
95 INT. Simply return for a BOZ argument. See gfc_simplify_intconv.
96 (gfc_check_merge_bits): Make MERGE_BITS conform to Fortran 2018
98 (gfc_check_real): Remove incorrect comment. Check kind, if present,
99 first. Simply return for a BOZ argument. See gfc_simplify_real.
100 (gfc_check_and): Re-do error handling for BOZ arguments. Remove
101 special casing ts.type != BT_INTEGER or BT_LOGICAL.
102 * decl.c (match_old_style_init): Check for BOZ in old-style
103 initialization. Issue error or warning depending on
104 -fallow-invalid-boz option. Issue error if variable is not an
105 INTEGER or REAL and the value is BOZ.
106 * expr.c (gfc_copy_expr): Copy a BT_BOZ gfc_expr.
107 (gfc_check_assign): Re-do error handling for a BOZ in an assignment
108 statement. Do in-place conversion of RHS based on LHS type of
110 * gfortran.h (gfc_expr): Add a boz component. Remove is_boz component.
111 (gfc_boz2int, gfc_boz2real, gfc_invalid_boz): New prototypes.
112 * interface.c (gfc_extend_assign): Guard against replacing an
113 intrinsic involving a BOZ literal constant on RHS.
114 * invoke.texi: Doument -fallow-invalid-boz.
115 * lang.opt: New option. -fallow-invalid-boz.
116 * libgfortran.h (bt): Elevate BOZ to a basic type.
117 * misc.c (gfc_basic_typename, gfc_typename): Translate BT_BOZ to BOZ.
118 * primary.c (convert_integer, convert_real, convert_complex): to here.
119 Rename and make static functions.
120 * primary.c(match_boz_constant): Rewrite parsing of a BOZ. Re-do
121 error handling. Deprecate 'X' for hexidecimal and postfix notation.
122 Use -fallow-invalid-boz and gfc_invalid_boz to accept deprecated code.
123 * resolve.c (resolve_ordinary_assign): Rework a RHS that is a
124 BOZ literal constant. Use gfc_invalid_boz to allow previous
125 nonstandard behavior. Remove range checking of BOZ conversion.
126 * simplify.c (convert_boz): Remove function.
127 (simplify_cmplx): Remove conversion of BOZ constants, because
128 conversion is done in gfc_check_cmplx.
129 (gfc_simplify_float): Remove conversion of BOZ constant, because
130 conversion is done in gfc_check_float.
131 (simplify_intconv): Use gfc_boz2int to convert BOZ to INTEGER.
132 Remove range checking for BOZ conversion.
133 (gfc_simplify_real): Use k, if present, to determine kind. Convert
134 BOZ to REAL. Remove range checking for BOZ conversion.
135 target-memory.c (gfc_convert_boz): Rewrite to deal with convert of
136 a BOZ to a REAL value.
138 2019-07-21 Thomas König <tkoenig@gcc.gnu.org>
141 * gfortran.texi (GFORTRAN_FORMATTED_BUFFER_SIZE): Document
142 (GFORTRAN_UNFORMATTED_BUFFER_SIZE): Likewise.
144 2019-07-16 Harald Anlauf <anlauf@gmx.de>
147 * libgfortran.h: Add mask for -fcheck=bits option.
148 * options.c (gfc_handle_runtime_check_option): Add option "bits"
149 to run-time checks selectable via -fcheck.
150 * trans-intrinsic.c (gfc_conv_intrinsic_btest)
151 (gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits)
152 (gfc_conv_intrinsic_shift, gfc_conv_intrinsic_ishft)
153 (gfc_conv_intrinsic_ishftc): Implement run-time checks for the
154 POS, LEN, SHIFT, and SIZE arguments.
155 * gfortran.texi: Document run-time checks for bit manipulation
157 * invoke.texi: Document new -fcheck=bits option.
159 2019-07-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
162 * expr.c (check_restricted): Relax constraint C1279 which was
163 removed from F2008 and above.
165 2019-07-07 Paul Thomas <pault@gcc.gnu.org>
168 * trans-array.c (gfc_conv_scalarized_array_ref) Delete code
169 that gave symbol backend decl for subref arrays and deferred
172 2019-07-05 Andrew Stubbs <ams@codesourcery.com>
174 * openmp.c (resolve_omp_clauses): Add custom error messages for
175 parameters in map clauses.
177 2019-07-03 Martin Liska <mliska@suse.cz>
179 * check.c (gfc_check_c_funloc): Remove
181 * decl.c (variable_decl): Likewise.
182 * resolve.c (resolve_typebound_function): Likewise.
183 * simplify.c (gfc_simplify_matmul): Likewise.
184 (gfc_simplify_scan): Likewise.
185 * trans-array.c (gfc_could_be_alias): Likewise.
186 * trans-common.c (add_equivalences): Likewise.
187 * trans-expr.c (trans_class_vptr_len_assignment): Likewise.
188 (gfc_trans_array_constructor_copy): Likewise.
189 (gfc_trans_assignment_1): Likewise.
190 * trans-intrinsic.c (conv_intrinsic_atomic_op): Likewise.
191 * trans-openmp.c (gfc_omp_finish_clause): Likewise.
192 * trans-types.c (gfc_get_array_descriptor_base): Likewise.
193 * trans.c (gfc_build_final_call): Likewise.
195 2019-06-27 Steven G. Kargl <kargl@gcc.gnu.org>
198 * gfortran.dg/common_1.f: new test.
199 * gfortran.dg/common_26.f90: Ditto.
201 2019-06-26 Steven G. Kargl <kargl@gcc.gnu.org>
204 ChangeLog forgotten with revision 272667
205 * decl.c (access_attr_decl): Use temporary variable to reduce
206 unreadability of code. Normalize jumping to return.
207 (gfc_match_protected): Fix parsing error. Add comments to
208 explain code. Remove dead code.
209 (gfc_match_private): Use temporary variable to reduce unreadability
210 of code. Fix parsing error. Move code to test for blank PRIVATE.
212 (gfc_match_public): Move code to test for blank PUBLIC. Fix
213 parsing error. Remove dead code.
215 2019-06-24 Jan Hubicka <jh@suse.cz>
217 * trans-expr.c (gfc_conv_substring): Check that
218 type is array or integer prior checking string flag.
219 (gfc_conv_string_parameter): Likewise.
220 * trans-openmp.c (gfc_omp_scalar_p): Likewise.
221 * trans.c (gfc_build_array_ref): Likewise.
223 2019-06-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
226 * io.c (gfc_resolve_dt): Check that internal units are not
229 2019-06-21 Steven G. Kargl <kargl@gcc.gnu.org>
232 * resolve.c (deferred_requirements) : Check only the result variable.
233 (resolve_fl_procedure): Check deferred requirements on functions.
235 2019-06-21 Steven G. Kargl <kargl@gcc.gnu.org>
238 * decl.c (gfc_match_save): If SAVE was not seen, return MATCH_NO
239 instead issuing an error message and returning MATCH_ERROR.
241 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
244 * /decl.c (variable_decl): Mark a variable that is a target in pointer
245 initialization when in PROGRAM, MODULE, or SUBMODULE scope with an
248 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
251 * symbol.c (verify_bind_c_derived_type): Remove erroneous error
252 checking for BIND(C) and PRIVATE attributes.
254 2019-06-20 Thomas Koenig <tkoenig@gcc.gnu.org>
257 * trans-types.c (get_formal_from_actual_arglist): Get symbol from
258 current namespace so it will be freed later. If symbol is of type
259 character, get an empty character length.
261 2019-06-19 Steven G. Kargl <kargl@gcc.gnu.org>
264 * match.c (gfc_match_select_type): SELECT TYPE is an executable
265 statement, and cannot appear in MODULE or SUBMODULE scope.
267 2019-06-19 Steven G. Kargl <kargl@gcc.gnu.org>
270 * decl.c (attr_decl): Check for duplicate DIMENSION attribute for a
273 2019-06-19 Steven G. Kargl <kargl@gcc.gnu.org>
276 * resolve.c (resolve_contained_fntype): Do not dereference a NULL
279 2019-06-19 Jim MacArthur <jim.macarthur@codethink.co.uk>
280 Mark Eggleston <mark.eggleston@codethink.com>
283 * gfortran.texi: Add -fdec-blank-format-item
284 * invoke.texi: Add option to list of options.
285 * invoke.texi: Add to section on Commas in FORMAT specifications.
286 * io.c (check_format): At FMT_RPAREN goto finished if
287 -fdec-blank-format-item otherwise set error string.
288 * lang.opt: Add new option.
289 * options.c (set_dec_flags): Add SET_BITFLAG for
290 flag_dec_format_defaults.
292 2019-06-18 Julian Brown <julian@codesourcery.com>
295 * trans-decl.c (finish_oacc_declare): Reset module_oacc_clauses
296 before scanning each namespace.
298 2019-06-18 Thomas Schwinge <thomas@codesourcery.com>
301 * trans-decl.c (add_attributes_to_decl): Handle OpenACC 'declare'
304 2019-06-16 Thomas Koenig <tkoenig@gcc.gnu.org>
306 * dump_parse_tree (debug): Add verison for formal arglist.
307 Do not crash when a gfc_expr is NULL.
309 2019-06-15 Steven G. Kargl <kargl@gcc.gnu.org>
311 * decl.c (gfc_match_derived_decl): Dummy argument cannot be a derived
314 2019-06-14 Steven G. Kargl <kargl@gcc.gnu.org>
316 * arith.c (arith_power): Rework overflow of an integer to an integer
319 2019-06-14 Harald Anlauf <anlauf@gmx.de>
323 * trans-intrinsic.c (gfc_conv_intrinsic_shift): Properly
324 distinguish logical/arithmetic shifts.
325 * intrinsic.texi: Update documentation for SHIFTR/SHIFTL/SHIFTA
326 (Fortran 2008) and LSHIFT/RSHIFT (GNU extensions).
328 2019-06-14 Steven G. Kargl <kargl@gcc.gnu.org>
331 * dependency.c (gfc_check_argument_var_dependency): Suppress spurious
332 warnings by comparing variable names.
334 2019-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
337 * resolve.c (is_dt_name): New function to compare symbol name against
338 list of derived types.
339 (resolve_actual_arglist): Use it to find wrong code.
341 2019-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
344 * expr.c (gfc_check_vardef_context): Check for INTENT(IN) variable
345 in SELECT TYPE construct.
347 2019-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
350 * dependency.c (gfc_dep_resolver): Re-arrange code to make the logic
351 a bit more transparent. Fix 2 nearby formatting issues.
353 2019-06-13 Jakub Jelinek <jakub@redhat.com>
355 * io.c (check_format): Use G_(...) instead of _(...) for error values,
356 append " in format string at %L" to all strings but unexpected_element,
357 use error as gfc_error formating string instead of
358 "%s in format string at %L". Formatting fixes.
360 2019-06-12 Steven G. Kargl <kargl@gcc.gnu.org>
362 * gfortran.h (gfc_free_dt_list): Remove prototype.
364 2019-06-12 Steven G. Kargl <kargl@gcc.gnu.org>
367 * array.c (gfc_free_array_spec): When freeing an array-spec, avoid
368 an ICE for assumed-shape coarrays.
370 2019-06-08 Paul Thomas <pault@gcc.gnu.org>
373 * trans-expr.c (pointer_assignment_is_proc_pointer) Remove as
374 it is very simple and only called from one place.
375 (gfc_trans_pointer_assignment): Rename non_proc_pointer_assign
376 as non_proc_ptr_assign. Assign to it directly, rather than call
377 to above, deleted function and use gfc_expr_attr instead of
378 only checking the reference chain.
380 2019-06-08 Thomas Koenig <tkoenig@gcc.gnu.org>
381 Tomáš Trnka <trnka@scm.com>
384 * trans-types.c (get_formal_from_actual_arglist): Unset typespec
385 flags which make no sense for procedures without explicit
388 2019-06-02 Thomas Koenig <tkoenig@gcc.gnu.org>
391 * trans-expr.c (gfc_conv_subref_array_arg): If the size of the
392 expression can be determined to be one, treat it as contiguous.
393 Set likelyhood of presence of an actual argument according to
394 PRED_FORTRAN_ABSENT_DUMMY and likelyhood of being contiguous
395 according to PRED_FORTRAN_CONTIGUOUS.
397 2019-05-30 Thomas Koenig <tkoenig@gcc.gnu.org>
399 * gfc-internals.texi (Translating to GENERIC): New chapter.
401 2019-05-30 Marek Polacek <polacek@redhat.com>
403 * lang.opt (ftail-call-workaround): Fix a typo.
405 2019-05-30 Jakub Jelinek <jakub@redhat.com>
407 * lang.opt (ftail-call-workaround=): Fix a typo - lenghts to lengths.
409 2019-05-29 Thomas Koenig <tkoenig@gcc.gnu.org>
412 * gfortran.h (gfc_has_dimen_vector_ref): Add prototype.
413 * trans.h (gfc_conv_subref_array_arg): Add argument check_contiguous.
414 (gfc_conv_is_contiguous_expr): Add prototype.
415 * frontend-passes.c (has_dimen_vector_ref): Remove prototype,
417 (gfc_has_dimen_vector_ref): New function name.
418 (matmul_temp_args): Use gfc_has_dimen_vector_ref.
419 (inline_matmul_assign): Likewise.
420 * trans-array.c (gfc_conv_array_parameter): Also check for absence
421 of a vector subscript before calling gfc_conv_subref_array_arg.
422 Pass additional argument to gfc_conv_subref_array_arg.
423 * trans-expr.c (gfc_conv_subref_array_arg): Add argument
424 check_contiguous. If that is true, check if the argument
425 is contiguous and do not repack in that case.
426 * trans-intrinsic.c (gfc_conv_intrinsic_is_contiguous): Split
427 away most of the work into, and call
428 (gfc_conv_intrinsic_is_coniguous_expr): New function.
430 2019-05-29 Jakub Jelinek <jakub@redhat.com>
433 * lang.opt (fbroken-callers): Remove.
434 (ftail-call-workaround, ftail-call-workaround=): New options.
435 * gfortran.h (struct gfc_namespace): Add implicit_interface_calls.
436 * interface.c (gfc_procedure_use): Set implicit_interface_calls
437 for calls to implicit interface procedures.
438 * trans-decl.c (create_function_arglist): Use flag_tail_call_workaround
439 instead of flag_broken_callers. If it is not 2, also require
440 sym->ns->implicit_interface_calls.
441 * invoke.texi (fbroken-callers): Remove documentation.
442 (ftail-call-workaround, ftail-call-workaround=): Document.
444 2019-05-26 Thomas Koenig <tkoenig@gcc.gnu.org>
447 * trans-types.c (get_formal_from_actual_arglist): Set rank
448 and lower bound for assumed size arguments.
450 2019-05-22 Andrew Stubbs <ams@codesourcery.com>
452 * trans-stmt.c (gfc_trans_critical): Use size_type_node for
453 gfor_fndecl_caf_lock and gfor_fndecl_caf_unlock calls.
454 (gfc_trans_allocate): Use size_type_node for gfor_fndecl_caf_sync_all
457 2019-05-22 Jeff Law <law@redhat.com>
458 Mark Eggleston <mark.eggleston@codethink.com>
461 * gfortran.texi: Add Default widths for F, G and I format
462 descriptors to Extensions section.
463 * invoke.texi: Add -fdec-format-defaults
464 * io.c (check_format): Use default widths for i, f and g when
465 flag_dec_format_defaults is enabled.
466 * lang.opt: Add new option.
467 * options.c (set_dec_flags): Add SET_BITFLAG for
468 flag_dec_format_defaults.
470 2019-05-21 Janne Blomqvist <jb@gcc.gnu.org>
473 * intrinsic.texi (EXECUTE_COMMAND_LINE): Explain new
474 wait=.false. implementation.
476 2019-05-20 Mark Eggleston <markeggleston@codethink.com>
478 * gfortran.texi: Remove reference to the ASSIGN statement, capitalise
479 complex, state that padding is with spaces and modify the Hollerith
482 2019-05-19 Paul Thomas <pault@gcc.gnu.org>
485 * trans-stmt.c (trans_associate_var) Do not use the saved
486 descriptor if the expression is a COMPONENT_REF.
488 2019-05-19 Thomas Koenig <tkoenig@gcc.gnu.org>
491 * invoke.texi: Document -fbroken-callers.
492 * lang.opt: Add -fbroken-callers.
493 * trans-decl.c (create_function_arglist): Only set
494 DECL_HIDDEN_STRING_LENGTH if flag_broken_callers is set.
496 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
499 * f95-lang.c (gfc_attribute_table): Set min_len to -1 for "omp
501 * trans-decl.c (add_attributes_to_decl): Refer to OpenACC
502 'routine' clauses from "omp declare target" attribute.
504 2019-05-16 Martin Sebor <msebor@redhat.com>
506 * gfortranspec.c (append_arg): Spell out the word "argument."
508 2019-05-16 Jakub Jelinek <jakub@redhat.com>
511 * trans-decl.c (create_function_arglist): Set
512 DECL_HIDDEN_STRING_LENGTH on hidden string length PARM_DECLs if
515 2019-05-15 Janne Blomqvist <jb@gcc.gnu.org>
517 * parse.c (gfc_parse_file): Remove translation string markers.
519 2019-05-12 Janne Blomqvist <jb@gcc.gnu.org>
521 * dump-parse-tree.c (get_c_type_name): Use macros for complex type
523 * parse.c (gfc_parse_file): Define complex macros, add CPP support
524 when printing C prototypes.
526 2019-05-10 Thomas Koenig <tkoenig@gcc.gnu.org>
529 * interface.c (compare_actual_formal): Do not create a vtab if
530 the actual argument is assumed type.
532 2019-05-10 Paul Thomas <pault@gcc.gnu.org>
535 * trans-decl.c (convert_CFI_desc): Test that the dummy is
536 present before doing any of the conversions.
539 * decl.c (gfc_verify_c_interop_param): Restore the error for
540 charlen > 1 actual arguments passed to bind(C) procs.
541 Clean up trailing white space.
544 * trans-array.c (gfc_trans_create_temp_array): Set the 'span'
545 field to the element length for all types.
546 (gfc_conv_expr_descriptor): The force_no_tmp flag is used to
547 prevent temporary creation, especially for substrings.
548 * trans-decl.c (gfc_trans_deferred_vars): Rather than assert
549 that the backend decl for the string length is non-null, use it
550 as a condition before calling gfc_trans_vla_type_sizes.
551 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): 'force_no_tmp'
552 is set before calling gfc_conv_expr_descriptor.
553 * trans.c (get_array_span): Move the code for extracting 'span'
554 from gfc_build_array_ref to this function. This is specific to
555 descriptors that are component and indirect references.
556 * trans.h : Add the force_no_tmp flag bitfield to gfc_se.
558 2019-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
562 * dump-parse-tree.c: Include version.h.
563 (gfc_dump_external_c_prototypes): New function.
564 (get_c_type_name): Select "char" as a name for a simple char.
565 Adjust to handling external functions. Also handle complex.
566 (write_decl): Add argument bind_c. Adjust for dumping of external
568 (write_proc): Likewise.
569 (write_interop_decl): Add bind_c argument to call of write_proc.
570 * gfortran.h: Add prototype for gfc_dump_external_c_prototypes.
571 * lang.opt: Add -fc-prototypes-external flag.
572 * parse.c (gfc_parse_file): Move dumping of BIND(C) prototypes.
573 Call gfc_dump_external_c_prototypes if option is set.
574 * invoke.texi: Document -fc-prototypes-external.
576 2019-05-06 Steven G. Kargl <kargl@gcc.gnu.org>
579 * match.c (gfc_match_stopcode): Check F2008 condition on stop code.
581 2019-05-01 Andrew Benson <abensonca@gmail.com>
583 * module.c (write_module): Initialize module_column before writing
584 module to ensure line break occurs at correct column.
586 2019-05-01 Dominique d'Humieres <dominiq@gcc.gnu.org>
589 * match.c (gfc_match_parens): Change the location for missing ')'.
590 (gfc_match_if): Detect a missing '('. Remove the spurious named
591 constant error. Change the wording of some errors.
592 (gfc_match_else): Change the wording of an error.
593 (gfc_match_elseif): Detect a missing '('. Improve the matching
594 process to get a better syntax analysis.
596 2019-04-19 Steven G. Kargl <kargl@gcc.gnu.org>
599 * decl.c (in_module_or_interface): New function to check that the
600 current state is in a module, submodule, or interface.
601 (gfc_match_prefix): Use it.
603 2019-04-22 Paul Thomas <pault@gcc.gnu.org>
606 * resolve.c (find_array_spec): If this is a class expression
607 and the symbol and component array specs are the same, this is
609 *trans-intrinsic.c (gfc_conv_intrinsic_size): If a class symbol
610 argument, has no namespace, it has come from the interface
611 mapping and the _data component must be accessed directly.
613 2019-04-17 Thomas Schwinge <thomas@codesourcery.com>
616 * openmp.c (gfc_resolve_do_iterator): Handle sharing_clauses for
618 (gfc_resolve_oacc_blocks): Populate sharing_clauses with private
621 2019-04-14 Paul Thomas <pault@gcc.gnu.org>
624 * trans-decl.c (gfc_get_symbol_decl): Assumed shape and assumed
625 rank dummies of bind C procs require deferred initialization.
626 (convert_CFI_desc): New procedure to convert incoming CFI
627 descriptors to gfc types and back again.
628 (gfc_trans_deferred_vars): Call it.
629 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Null the CFI
630 descriptor pointer. Free the descriptor in all cases.
633 * expr.c (is_CFI_desc): New function.
634 (is_subref_array): Tidy up by referencing the symbol directly.
635 * gfortran.h : Prototype for is_CFI_desc.
636 * trans_array.c (get_CFI_desc): New function.
637 (gfc_get_array_span, gfc_conv_scalarized_array_ref,
638 gfc_conv_array_ref): Use it.
639 * trans.c (get_array_span): Extract the span from descriptors
640 that are indirect references.
643 * trans-decl.c (gfc_get_symbol_decl): Make sure that the se
644 expression is a pointer type before converting it to the symbol
646 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Eliminate
647 temporary creation for intent(in).
649 2019-04-13 Dominique d'Humieres <dominiq@gcc.gnu.org>
652 * module.c (gfc_use_module): use complete sentences.
654 2019-04-11 Thomas Koenig <tkoenig@gcc.gnu.org>
657 * frontend-passes.c (B_ERROR): Delete macro.
658 (C_ERROR): Delete macro.
659 (B_ERROR_1): New macro.
660 (C_ERROR_1): New macro.
661 (C_ERROR_2): New macro.
662 (inline_matmul_assign): Use new macros.
663 (call_external_blas): Likewise.
665 2019-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
668 * gfortran.h (gfc_component): Add finalized field.
669 * class.c (finalize_component): If the component is already
670 finalized, return early. Set component->finalized on exit.
672 2019-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
675 * resolve.c (resolve_global_procedure): If the global symbol is an
676 ENTRY, also look up its name among the entries.
678 2019-04-04 Harald Anlauf <anlauf@gmx.de>
681 * check.c (gfc_check_transfer): Reject procedures as actual
682 arguments for SOURCE and MOLD of TRANSFER intrinsic.
684 2019-04-03 Steven G. Kargl <kargl@gcc.gnu.org>
687 * expr.c (gfc_reduce_init_expr): Add extra check to avoid
688 dereferencing a null pointer.
690 2019-04-03 Dominique d'Humieres <dominiq@gcc.gnu.org>
693 * expr.c (comp_pointer): Remove redundant condition.
695 2019-03-31 Harald Anlauf <anlauf@gmx.de>
699 * trans-types.c (gfc_typenode_for_spec): Handle conversion for
701 * target-memory.c (gfc_element_size): Handle size determination
702 for procedure pointers.
704 2019-03-31 Thomas Koenig <tkoenig@gcc.gnu.org>
706 * dump-parse-tree.c (debug): Add for symbol_attribute *,
707 symbol_attribute and gfc_ref * arguments.
709 2019-03-30 Paul Thomas <pault@gcc.gnu.org>
712 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Use the formal
713 argument attributes rather than those of the actual argument.
716 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Call
717 'set_dtype_for_unallocated' for any type of arrayspec.
719 2019-03-27 Janus Weil <janus@gcc.gnu.org>
722 * expr.c (gfc_check_assign_symbol): Reject internal and dummy procedures
723 in procedure pointer initialization.
725 2019-03-27 Paul Thomas <pault@gcc.gnu.org>
728 * expr.c (is_subref_array): Permit substrings to be detected
730 * trans-array.c (get_array_ctor_var_strlen): Obtain the length
731 of deferred length strings. Handle substrings with a NULL end
733 (trans_array_constructor): Remove an unnecessary blank line.
734 (gfc_conv_scalarized_array_ref): Skip to label 'done' if 'decl'
736 (get_array_charlen): If the expression is an array, convert the
737 first element of the constructor and use its string length. Get
738 a new charlen if necessary.
739 (gfc_conv_expr_descriptor): Call 'get_array_charlen' for array
740 constructor expressions. If the ss_info string length is
741 available, use that to set the span of character arrays.
742 * trans-expr.c (gfc_get_expr_charlen): Handle substrings
743 * trans-stmt.c (trans_associate_var): Set the pointer array
744 flag for variable targets and constant array constructors. Take
745 care not to reset the string length or the span in the case of
746 expressions that are not converted as direct by reference.
748 2019-03-25 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
750 * intrinsic.texi (MINLOC): Fix typo in BACK argument documentation.
753 2019-03-24 Thomas Koenig <tkoenig@gcc.gnu.org>
756 * interface.c (compare_actual_formal): Change errors about
757 missing or extra to gfc_error_now to make sure they are issued.
758 Change "spec" to "specifier" in message.
759 * resolve.c (resolve_global_procedure): Also check for mismatching
760 interface with global symbols if the namespace has already been
763 2019-03-21 Thomas Schwinge <thomas@codesourcery.com>
766 * openmp.c (gfc_match_oacc_routine): Set the level of parallelism
768 (gfc_resolve_oacc_routines): Call gfc_add_omp_declare_target.
771 * gfortran.h (gfc_oacc_routine_name): Add loc member.
772 (gfc_resolve_oacc_routines): Declare.
773 * openmp.c (gfc_match_oacc_routine): Move some error checking
775 (gfc_resolve_oacc_routines): ... this new function.
776 * resolve.c (resolve_codes): Call it.
779 * openmp.c (gfc_match_oacc_routine): Clarify.
782 * module.c (verify_OACC_ROUTINE_LOP_NONE): New function.
783 (enum ab_attribute): Add AB_OACC_ROUTINE_LOP_GANG,
784 AB_OACC_ROUTINE_LOP_WORKER, AB_OACC_ROUTINE_LOP_VECTOR,
785 AB_OACC_ROUTINE_LOP_SEQ.
786 (attr_bits): Add these.
787 (mio_symbol_attribute): Handle these.
789 2019-03-20 Janus Weil <janus@gcc.gnu.org>
792 * symbol.c (check_conflict): ABSTRACT attribute conflicts with
795 2019-03-18 Thomas Koenig <tkoeng@gcc.gnu.org>
798 * iresolve.c: Include trans.h.
799 (gfc_resolve_fe_runtine_error): Set backend_decl on
802 2019-03-17 Thomas Koenig <tkoenig@gcc.gnu.org>
805 * gfortran.h (expr_t): Add EXPR_UNKNOWN.
806 * expr.c (gfc_copy_expr): Add EXPR_UNKNOWN to switch statement.
807 (gfc_simplify_expr): Likewise.
808 * module.c (mio_expr): Likewise.
809 * resovle.c (extract_compcall_passed_object): Issue error on
811 (check_typebound_baseobject): Issue error on wrong type.
812 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Add
813 EXPR_UNKNOWN to switch statement.
815 2019-03-16 Jakub Jelinek <jakub@redhat.com>
818 * scanner.c (load_line): Remove linenum and current_line static
819 variables, add warned_tabs automatic variable. Use current_file->line
820 instead of current_line and warned_tabs boolean to avoid diagnosing
821 tabs multiple times on the same line.
823 2019-03-16 Thomas Koenig <tkoenig@gcc.gnu.org>
826 * symbol.c (gfc_add_subroutine): If we are encountering a
827 subrtoutine within a BLOCK DATA and the name starts with an
828 underscore, do not check.
830 2019-03-15 Harald Anlauf <anlauf@gmx.de>
833 * expr.c (gfc_check_pointer_assign): Correct and improve error
834 messages for invalid pointer assignments.
836 2019-03-14 Thomas Koenig <tkoenig@gcc.gnu.org>
838 * gfortran.texi: Document Q edit descriptor under
839 "Extensions not implemented in GNU Fortran".
841 2019-03-13 Harald Anlauf <anlauf@gmx.de>
844 * trans-expr.c (gfc_trans_pointer_assignment): Move check for same
845 string length so that we do not get false errors for deferred
848 2019-03-13 Janus Weil <janus@gcc.gnu.org>
851 * decl.c (gfc_match_formal_arglist): Reject empty type parameter lists.
852 (gfc_match_derived_decl): Mark as PDT only if type parameter list was
853 matched successfully.
855 2019-03-13 Thomas Koenig <tkoenig@gcc.gnu.org>
860 * gfortran.h (gfc_symbol): Add bind_c component.
861 (gfc_get_gsymbol): Add argument bind_c.
862 * decl.c (add_global_entry): Add bind_c argument to
864 * parse.c (parse_block_data): Likewise.
865 (parse_module): Likewise.
866 (add_global_procedure): Likewise.
867 (add_global_program): Likewise.
868 * resolve.c (resolve_common_blocks): Likewise.
869 (resolve_global_procedure): Likewise.
870 (gfc_verify_binding_labels): Likewise.
871 * symbol.c (gfc_get_gsymbol): Add argument bind_c. Set bind_c
873 * trans-decl.c (gfc_get_module_backend_decl): Add bind_c argument
875 (gfc_get_extern_function_decl): If the sym has a binding label
876 and it cannot be found in the global symbol tabel, it is the wrong
879 2019-03-12 Thomas Koenig <tkoenig@gcc.gnu.org>
882 * match.c (gfc_match_type_spec): Remove call to
883 gfc_resolve_expr for character length.
885 2019-03-12 Martin Liska <mliska@suse.cz>
887 * decl.c (add_init_expr_to_sym): Replace usage of 'can't'
889 (variable_decl): Likewise.
890 (cray_pointer_decl): Likewise.
891 (match_binding_attributes): Likewise.
892 * f95-lang.c (gfc_init): Likewise.
893 * interface.c (gfc_check_typebound_override): Likewise.
894 * intrinsic.c (make_generic): Likewise.
895 * module.c (dump_module): Likewise.
896 (gfc_use_module): Likewise.
897 * primary.c (gfc_convert_to_structure_constructor): Likewise.
898 * resolve.c (resolve_entries): Likewise.
899 (check_generic_tbp_ambiguity): Likewise.
900 (get_checked_tb_operator_target): Likewise.
901 * scanner.c (load_file): Likewise.
902 * trans-expr.c (gfc_conv_intrinsic_to_class): Likewise.
904 2019-03-12 Paul Thomas <pault@gcc.gnu.org>
908 * trans-expr.c (set_dtype_for_unallocated): New function.
909 (gfc_conv_gfc_desc_to_cfi_desc): Call it for allocatable and
911 (gfc_conv_procedure_call): Likewise. Also, set the ubound of
912 the final dimension to -1 for assumed rank formal args that are
913 associated with assumed size arrays.
914 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Return -1 for
915 the final dimension of assumed rank entities that are argument
916 associated with assumed size arrays.
917 (gfc_conv_intrinsic_shape): Likewise return -1 for the final
918 dimension of the shape intrinsic.
920 2019-03-11 Jakub Jelinek <jakub@redhat.com>
923 * trans-openmp.c (gfc_omp_clause_default_ctor): Set TREE_NO_WARNING
924 on decl if adding COND_EXPR for allocatable.
925 (gfc_omp_clause_copy_ctor): Set TREE_NO_WARNING on dest.
927 2019-03-11 Martin Liska <mliska@suse.cz>
929 * decl.c (match_record_decl): Wrap an option name
930 in a string format message and fix GNU coding style.
931 (gfc_match_pointer): Likewise.
932 * expr.c (find_array_section): Likewise.
933 * intrinsic.c (gfc_is_intrinsic): Likewise.
934 * options.c (gfc_post_options): Likewise.
935 * primary.c (match_integer_constant): Likewise.
936 * trans-common.c (translate_common): Likewise.
938 2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
941 * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
942 Return false if a scalar tempoary is needed.
943 (gfc_walk_variable_expr): Fix up class refs.
945 2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
948 * symbol.c (gfc_add_procedure): Only throw an error if the
949 procedure has not been declared either PUBLIC or PRIVATE.
951 2019-03-09 Thomas Koenig <tkoenig@gcc.gnu.org>
954 * trans-types.c (gfc_typenode_for_spec) Set ts->is_c_interop of
956 (create_fn_spec): Mark argument as escaping if ts->is_c_interop is set.
958 2019-03-09 Janus Weil <janus@gcc.gnu.org>
961 * expr.c (gfc_check_assign_symbol): Deal with procedure pointers to
962 pointer-valued functions.
964 2019-03-09 Thomas König <tkoenig@gcc.gnu.org>
967 * decl.c (add_init_expr_to_sym): Add shape if init has none. Add
968 asserts that it has to be an EXPR_ARRAY in this case.
970 2019-03-08 Jakub Jelinek <jakub@redhat.com>
973 * arith.c (gfc_complex2complex): Avoid two spaces in the middle of
975 * resolve.c (resolve_allocate_expr): Likewise.
977 2019-03-06 Harald Anlauf <anlauf@gmx.de>
980 * expr.c (simplify_const_ref): Avoid null pointer dereference.
982 2019-03-03 Harald Anlauf <anlauf@gmx.de>
983 Steven G. Kargl <kargl@gcc.gnu.org>
986 * symbol.c (check_conflict): Check for valid procedure name
987 passed to error reporting routine.
989 2019-03-03 Thomas Koenig <tkoenig@gcc.gnu.org>
992 * resolve.c (resolve_allocate_expr): Add some tests for coarrays.
994 2019-03-02 Harald Anlauf <anlauf@gmx.de>
997 * check.c (gfc_calculate_transfer_sizes): Correct checks for cases
998 where storage size of elements of MOLD is 0.
1000 2019-02-28 Thomas Schwinge <thomas@codesourcery.com>
1001 Cesar Philippidis <cesar@codesourcery.com>
1005 * openmp.c (gfc_match_oacc_routine): Handle repeated use of the
1006 Fortran OpenACC 'routine' directive.
1009 * gfortran.h (enum oacc_routine_lop): Add OACC_ROUTINE_LOP_ERROR.
1010 * openmp.c (gfc_oacc_routine_lop, gfc_match_oacc_routine): Use it.
1011 * trans-decl.c (add_attributes_to_decl): Likewise.
1015 * openmp.c (gfc_match_oacc_routine): Accept intrinsic symbols.
1017 2019-02-26 Harald Anlauf <anlauf@gmx.de>
1020 * check.c (gfc_calculate_transfer_sizes): Handle cases where
1021 storage size of elements of MOLD is 0.
1023 2019-02-26 Thomas Koenig <tkoenig@gcc.gnu.org>
1026 * trans-types.c (get_formal_from_actual_arglist): If
1027 the actual arglist has no expression, the corresponding
1028 formal arglist is an alternate return.
1030 2019-02-26 Jakub Jelinek <jakub@redhat.com>
1033 * trans-array.c (gfc_conv_array_initializer): Use RANGE_EXPR instead
1034 of duplicating the initializer possibly many times.
1036 2019-02-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1039 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Add is_mold
1040 to arguments. If we are dealing with a MOLD, call
1041 gfc_expr_to_initialize().
1042 * trans-stmt.c (gfc_trans_allocate): For MOLD, pass is_mold=true
1043 to gfc_find_and_cut_at_last_class_ref.
1044 * trans.h (gfc_find_and_cut_at_last_class_ref): Add optional
1045 argument is_mold with default false.
1047 2019-02-24 Harald Anlauf <anlauf@gmx.de>
1051 * target-memory.c (gfc_element_size): Return false if element size
1052 cannot be determined; element size is returned separately.
1053 (gfc_target_expr_size): Return false if expression size cannot be
1054 determined; expression size is returned separately.
1055 * target-memory.h: Adjust prototypes.
1056 * check.c (gfc_calculate_transfer_sizes): Adjust references to
1057 gfc_target_expr_size, gfc_element_size.
1058 * arith.c (hollerith2representation): Likewise.
1059 * class.c (find_intrinsic_vtab): Likewise.
1060 * simplify.c (gfc_simplify_sizeof): Likewise.
1062 2019-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1065 * trans-io.c (transfer_expr): Do not return if there are no
1066 components to the derived type or class.
1068 2019-02-23 Paul Thomas <pault@gcc.gnu.org>
1071 * resolve.c (deferred_op_assign): Return if the lhs expression
1072 has the pointer attribute.
1073 * trans-expr.c (gfc_trans_assignment_1): Do not fix the string
1074 length if the lhs expression has the pointer attribute.
1076 2019-02-23 Paul Thomas <pault@gcc.gnu.org>
1080 * decl.c (gfc_verify_c_interop_param): Restriction on string
1081 length being one is lifted for F2018.
1082 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): For scalar
1083 characters with intent in, make a temporary and copy the result
1084 of the expression evaluation into it.
1085 (gfc_conv_procedure_call): Set a flag for character formal args
1086 having a character length that is not unity. If the procedure
1087 is bind C, call gfc_conv_gfc_desc_to_cfi_desc in this case.
1088 Also, extend bind C calls to unconditionally convert both
1089 pointers and allocatable expressions.
1091 2019-02-23 David Malcolm <dmalcolm@redhat.com>
1092 Jakub Jelinek <jakub@redhat.com>
1095 * simplify.c (norm2_do_sqrt, gfc_simplify_norm2): Use
1096 mpfr_number_p && !mpfr_zero_p instead of mpfr_regular_p.
1097 (norm2_add_squared): Likewise. Use mp_exp_t rather than mpfr_exp_t.
1099 2019-02-22 Harald Anlauf <anlauf@gmx.de>
1102 * io.c (gfc_match_open): Fix logic in checks of OPEN statement
1103 when NEWUNIT= is specified.
1105 2019-02-22 Steven G. Kargl <kargl@gcc.gnu.org>
1108 * gfortran.texi: Fix documentation to match the implementation.
1110 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1111 Cesar Philippidis <cesar@codesourcery.com>
1114 * gfortran.h (oacc_routine_lop): New enum.
1115 (symbol_attribute): Use it.
1116 * openmp.c (gfc_oacc_routine_dims): Replace with...
1117 (gfc_oacc_routine_lop): ... this new function.
1118 (gfc_match_oacc_routine): Adjust.
1119 * trans-decl.c (add_attributes_to_decl): Likewise.
1121 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1123 * openmp.c (gfc_match_oacc_declare): Revert earlier changes.
1125 2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1127 * dump-parse-tree.c (debug): Implement for gfc_expr *,
1128 gfc_typespec *, gfc_typespec and gfc_symbol *.
1130 2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1133 * class.c (gfc_get_len_component): Add argument k for kind.
1134 If the kind of the resulting expression is not equal to k,
1136 * gfortran.h (gfc_len_component): Adjust prototype.
1137 * simplify.c (gfc_simplify_len): Pass kind to
1138 gfc_get_len_component.
1140 2019-02-20 Martin Liska <mliska@suse.cz>
1142 * gfortran.texi: Change singular to plural.
1144 2019-02-20 Martin Liska <mliska@suse.cz>
1146 * gfortran.texi: Document Fortran header directive.
1148 2019-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1151 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): If the dummy
1152 argument is contiguous and the actual argument may not be,
1153 use gfc_conv_subref_array_arg.
1155 2019-02-19 Thomas Schwinge <thomas@codesourcery.com>
1158 * openmp.c (gfc_match_omp_clauses): Add representation of wait clause
1159 without argument as 'wait (GOMP_ASYNC_NOVAL)'.
1161 2019-02-18 Thomas Koenig <tkoenig@gcc.gnu.org>
1164 * trans-decl.c (gfc_get_extern_function_decl): Add argument
1165 actual_args and pass it through to gfc_get_function_type.
1166 * trans-expr.c (conv_function_val): Add argument actual_args
1167 and pass it on to gfc_get_extern_function_decl.
1168 (conv_procedure_call): Pass actual arguments to conv_function_val.
1169 * trans-types.c (get_formal_from_actual_arglist): New function.
1170 (gfc_get_function_type): Add argument actual_args. Generate
1171 formal args from actual args if necessary.
1172 * trans-types.h (gfc_get_function_type): Add optional argument.
1173 * trans.h (gfc_get_extern_function_decl): Add optional argument.
1175 2019-02-18 Martin Liska <mliska@suse.cz>
1177 * decl.c (gfc_match_gcc_builtin): Add support for filtering
1178 of builtin directive based on multilib ABI name.
1180 2019-02-17 Harald Anlauf <anlauf@gmx.de>
1183 * resolve.c (resolve_common_blocks,resolve_common_vars): Move
1184 check for obsolent COMMON feature in F2018 to better place.
1186 2019-02-17 Harald Anlauf <anlauf@gmx.de>
1189 * decl.c (gfc_set_constant_character_len): Clear original string
1190 representation after padding has been performed to target length.
1192 2019-02-16 Jakub Jelinek <jakub@redhat.com>
1195 * simplify.c (simplify_transformation_to_array): Run post_op
1196 immediately after processing corresponding row, rather than at the
1198 (norm2_scale): New variable.
1199 (add_squared): Rename to ...
1200 (norm2_add_squared): ... this. Scale down operand and/or result
1202 (do_sqrt): Rename to ...
1203 (norm2_do_sqrt): ... this. Handle the result == e case. Scale up
1204 result and clear norm2_scale.
1205 (gfc_simplify_norm2): Clear norm2_scale. Change add_squared to
1206 norm2_add_squared and &do_sqrt to norm2_do_sqrt. Scale up result
1207 and clear norm2_scale again.
1209 2019-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
1212 * trans-decl.c (generate_coarray_sym_init): For an array
1213 constructor in a DATA statement of a coarray variable, set the
1214 rank to 1 to avoid confusion later on. If the constructor
1215 contains only one value, use that for initiailizig.
1217 2019-02-14 Janne Blomqvist <jb@gcc.gnu.org>
1220 * gfortran.h (gfc_option_t): Make flag_init_integer_value a long.
1221 * options.c (gfc_handle_option): Use strtol instead of atoi.
1222 * invoke.texi: Document -finit-integer behavior in more detail.
1224 2019-02-14 Harald Anlauf <anlauf@gmx.de>
1227 * symbol.c: Move check for labeled DO statement from
1228 gfc_define_st_label to gfc_reference_st_label.
1230 2019-02-14 Cesar Philippidis <cesar@codesourcery.com>
1233 * openmp.c (resolve_oacc_nested_loops): Error on do concurrent
1236 2019-02-13 Martin Liska <mliska@suse.cz>
1239 * resolve.c (resolve_operator): Initialize 't' right
1240 after function entry. Skip switch (e->value.op.op)
1241 for -fdec operands that become function calls.
1243 2019-02-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1246 * expr.c (gfc_check_assign): Add argument is_init_expr. If we are
1247 looking at an init expression, issue error if the target is not a
1248 TARGET and we are not looking at a procedure pointer.
1249 * gfortran.h (gfc_check_assign): Add optional argument
1252 2019-02-09 Harald Anlauf <anlauf@gmx.de>
1255 * resolve.c (gfc_resolve_substring_charlen): Check substring
1256 length for constantness prior to general calculation of length.
1258 2019-02-09 Paul Thomas <pault@gcc.gnu.org>
1261 * trans-array.c (gfc_trans_create_temp_array): Set the 'span'
1262 field for derived types.
1264 2019-02-04 Harald Anlauf <anlauf@gmx.de>
1267 * decl.c (add_init_expr_to_sym): Copy length of string initializer
1270 2019-02-04 Martin Liska <mliska@suse.cz>
1273 * resolve.c (resolve_ref): Remove breakout variable as
1274 we need to prevent prev = &(*prev)->next to happen
1277 2019-02-04 Martin Liska <mliska@suse.cz>
1280 * scanner.c (load_file): Report error for -fpre-include
1281 file and do not ICE.
1283 2019-02-02 Dominique d'Humieres <dominiq@gcc.gnu.org>
1286 * invoke.texi: Document the behavior of repeated -ffpe-trap
1289 2019-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1292 * arith.c (gfc_int2int): Do not warn if src->do_not_warn is set.
1293 * gfortran.h (gfc_expr): Add flag do_not_warn.
1294 * intrinsic.c (gfc_convert_type_warn): Set expr->do_not_warn if
1295 no warning is desired.
1297 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
1300 * trans-expr.c (gfc_conv_procedure_call): For derived entities,
1301 passed in parentheses to class formals, invert the order of
1302 copying allocatable components to taking the _data of the
1305 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
1308 * trans-array.c (gfc_array_init_size): Add element_size to the
1310 (gfc_array_allocate): Remove the recalculation of the size of
1311 the element and use element_size from the call to the above.
1312 Unconditionally set the span field of the descriptor.
1314 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
1317 * expr.c (is_subref_array): Move the check for class pointer
1318 dummy arrays to after the reference check. If we haven't seen
1319 an array reference other than an element and a component is not
1320 class or derived, return false.
1322 2019-02-01 Jakub Jelinek <jakub@redhat.com>
1326 * trans-decl.c (generate_local_decl): Add referenced FL_PARAMETERs
1327 if sym->ns->construct_entities rather than if
1328 sym->ns->parent->code->op == EXEC_BLOCK.
1330 2019-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
1333 * resolve.c (resolve_component): If the reference is a BT_CLASS,
1334 copy the contiguous attribute from the reference and use the
1337 2019-01-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1340 * io.c (match_io): Add check for comma after '*' without subsequent
1343 2019-01-30 Dominique d'Humieres <dominiq@gcc.gnu.org>
1346 * invoke.texi: Document the promotion of double precision
1349 2019-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1352 * interface.c (gfc_compare_types): If a derived type and an
1353 integer both have a derived type, and they are identical,
1354 this is a C binding type and compares equal.
1356 2019-01-26 Harald Anlauf <anlauf@gmx.de>
1359 * expr.c (check_inquiry): Add list of inquiry functions allowed in
1360 constant expressions for F2008+.
1362 2019-01-25 Steven G. Kargl <kargl@gcc.gnu.org>
1365 * decl.c (gfc_match_subroutine): Check for conflict between BIND(C)
1366 and alternative return.
1368 2019-01-24 Paul Thomas <pault@gcc.gnu.org>
1371 * trans-array.c (gfc_conv_descriptor_elem_len): New function.
1372 * trans-array.h : Add prototype for above.
1373 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Take account of
1374 assumed rank arrays being flagged by rank = -1 in expressions.
1375 Intent in arrays need a pointer to a copy of the data to be
1376 assigned to the descriptor passed for conversion. This should
1377 then be freed, together with the CFI descriptor on return from
1380 2019-01-22 Harald Anlauf <anlauf@gmx.de>
1383 * trans-expr.c (gfc_conv_power_op): Handle cases of (2**e) ** integer
1384 and (- 2**e) ** integer.
1386 2019-01-19 Dominique d'Humieres <dominiq@gcc.gnu.org>
1389 * resolve.c (resolve_types): Add !flag_automatic.
1390 * symbol.c (gfc_add_save): Silence warnings.
1392 2019-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
1395 * io.c (match_io_element): input-item cannot be an external function.
1397 2018-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1398 Paul Thomas <pault@gcc.gnu.org>
1401 * trans-expr.c (gfc_conv_procedure_call): Call
1402 gfc_conv_subref_array_arg if the formal arg is contiguous
1403 and the actual arg may not be.
1405 2019-01-17 Thomas Koenig <tkoenig@gcc.gnu.org>
1408 * resolve.c (resolve_ref): Fix logic for removal of
1411 2019-01-19 Jakub Jelinek <jakub@redhat.com>
1414 * trans-decl.c (gfc_get_symbol_decl): Don't add length to function
1415 or parent function if it has been added there already.
1417 2019-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1420 * resolve.c (resolve_array_ref): Add equal_length argument; set it
1421 if the length of the substring equals that of the orignal
1423 (resolve_ref): Remove the substring if it is equal in length to
1424 the original variable, unless it is an EXPR_SUBSTRING).
1426 2019-01-15 Steven G. Kargl <kargl@gcc.gnu.org>
1429 * resolve.c (resolve_symbol): Host associated varaibles can appear
1430 in the specification statement of a RESULT array.
1432 2019-01-15 Paul Thomas <pault@gcc.gnu.org>
1434 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Deal with exprs
1435 that are indirect references; ie. dummy arguments.
1437 2019-01-13 Dominique d'Humieres <dominiq@gcc.gnu.org>
1440 * gfortran.texi: Replace @xref with @ref and adjust the sentence.
1442 2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1445 * trans-array.c (gfc_conv_array_parameter): Do not pack/unpack
1446 functions with contiguous results.
1448 2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1451 * trans-array.c (gfc_conv_array_parameter): Remove TODO. Do not
1452 pack/unpack results of functions which return an explicit-shaped
1453 or allocatable array.
1455 2019-01-12 Steven G. Kargl <kargl@gcc.gnu.org>
1458 * resolve.c (gfc_verify_binding_labels): Break if-elseif-elseif
1459 structure into independent if's with a return to simplify logic.
1460 Avoid a check for ENTRY name with bind(c).
1462 2019-01-12 Paul Thomas <pault@gcc.gnu.org>
1464 * gfortran.texi: Add description in sections on TS 29113 and
1465 further interoperability with C.
1466 * trans-array.c (gfc_conv_descriptor_attribute): New function.
1467 (gfc_get_dataptr_offset): Remove static function attribute.
1468 * trans-array.h: Add prototypes for above functions.
1469 * trans-decl.c: Add declarations for the library functions
1470 cfi_desc_to_gfc_desc and gfc_desc_to_cfi_desc.
1471 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): New function.
1472 (gfc_conv_procedure_call): Call it for scalar and array actual
1473 arguments, when the formal arguments are bind_c with assumed
1474 shape or assumed rank.
1475 * trans.h: External declarations for gfor_fndecl_cfi_to_gfc
1476 and gfor_fndecl_gfc_to_cfi.
1478 2019-01-11 Steven G. Kargl <kargl@gcc.gnu.org>
1481 * decl.c (gfc_match_entry): Check for F2018:C1546. Fix nearby
1484 2019-01-11 Jakub Jelinek <jakub@redhat.com>
1488 * trans-openmp.c: Include attribs.h.
1489 (gfc_walk_alloc_comps, gfc_omp_clause_linear_ctor): Handle
1490 VAR_DECL max bound with "omp dummy var" attribute like NULL or
1491 error_mark_node - recompute number of elts independently.
1493 2019-01-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1496 * trans-array.c (gfc_conv_parameter_array): Temporary
1497 arrays generated for expressions do not need to be repacked.
1499 2019-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
1502 * decl.c (top_var_list): Set locus of expr.
1503 (gfc_match_data): Detect pointer on non-rightmost part-refs.
1505 2019-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
1508 * resolve.c (is_illegal_recursion): Remove an assert().
1510 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
1513 * expr.c: Change "can not" to "cannot".
1515 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
1518 * class.c: Mechanically replace "can not" with "cannot".
1521 * gfc-internals.texi: Likewise.
1522 * intrinsic.texi: Likewise.
1523 * invoke.texi: Likewise.
1525 * match.c: Likewise.
1526 * parse.c: Likewise.
1527 * primary.c: Likewise.
1528 * resolve.c: Likewise.
1529 * symbol.c: Likewise.
1530 * trans-array.c: Likewise.
1531 * trans-decl.c: Likewise.
1532 * trans-intrinsic.c: Likewise.
1533 * trans-stmt.c: Likewise.
1535 2019-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
1538 * simplify.c (gfc_simplify_spread): Also simplify if the
1539 type of source is an EXPR_STRUCTURE.
1541 2019-01-08 Janus Weil <janus@gcc.gnu.org>
1544 * class.c (gfc_find_vtab): For polymorphic typespecs, the components of
1545 the class container may not be available (in case of invalid code).
1547 2019-01-08 Richard Biener <rguenther@suse.de>
1550 * trans-expr.c (gfc_conv_initializer): For ISOCBINDING_NULL_*
1551 directly build the expected GENERIC tree.
1553 2019-01-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1554 Harald Anlauf <anlauf@gmx.de>
1555 Tobias Burnus <burnus@gcc.gnu.org>
1558 * check.c (gfc_check_is_contiguous): New function.
1559 * expr.c (gfc_is_not_contiguous): New function.
1560 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IS_CONTIGUOUS.
1561 Add prototype for gfc_is_not_contiguous.
1562 * intrinsic.c (do_ts29113_check): Add GFC_ISYM_IS_CONTIGUOUS.
1563 (add_function): Add is_contiguous.
1564 * intrinsic.h: Add prototypes for gfc_check_is_contiguous,
1565 gfc_simplify_is_contiguous and gfc_resolve_is_contiguous.
1566 * intrinsic.texi: Add IS_CONTIGUOUS.
1567 * iresolve.c (gfc_resolve_is_contiguous): New function.
1568 * simplify.c (gfc_simplify_is_contiguous): New function.
1569 * trans-decl.c (gfor_fncecl_is_contiguous0): New variable.
1570 (gfc_build_intrinsic_function_decl): Add it.
1571 * trans-intrinsic.c (gfc_conv_intrinsic_is_contiguous): New
1573 (gfc_conv_intrinsic_function): Handle GFC_ISYM_IS_CONTIGUOUS.
1575 2019-01-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1578 * gfortran.h: Add macro gfc_real_4_kind
1579 * simplify.c (simplify_min_max): Special case for the types of
1580 AMAX0, AMIN0, MAX1 and MIN1, which actually change the types of
1583 2019-01-05 Janus Weil <janus@gcc.gnu.org>
1586 * class.c (gfc_find_derived_vtab): Mark the _final component as
1588 (find_intrinsic_vtab): Ditto. Also add an extra check to avoid
1589 dereferencing a null pointer and adjust indentation.
1590 * resolve.c (resolve_fl_variable): Add extra check to avoid
1591 dereferencing a null pointer. Move variable declarations to local scope.
1592 (resolve_fl_procedure): Add extra check to avoid dereferencing a null
1594 * symbol.c (check_conflict): Suppress errors for artificial symbols.
1596 2019-01-01 Steven G. Kargl <kargl@gcc.gnu.org>
1598 * parse.c (decode_statement): Suppress "Unclassifiable statement"
1599 error if previous error messages were emittes.
1601 2019-01-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1604 * primary.c (gfc_convert_to_structure_constructor): If a character
1605 in a constructor is too long, add a warning with
1606 -Wcharacter-truncation.
1608 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1610 Update copyright years.
1612 * gfortranspec.c (lang_specific_driver): Update copyright notice
1614 * gfc-internals.texi: Bump @copying's copyright year.
1615 * gfortran.texi: Ditto.
1616 * intrinsic.texi: Ditto.
1617 * invoke.texi: Ditto.
1619 Copyright (C) 2019 Free Software Foundation, Inc.
1621 Copying and distribution of this file, with or without modification,
1622 are permitted in any medium without royalty provided the copyright
1623 notice and this notice are preserved.