1 2019-08-06 Steven G. Kargl <kargl@gcc.gnu.org>
4 * trans-decl.c (gfc_generate_return): Ensure something is returned
7 2019-08-06 Steven G. Kargl <kargl@gcc.gnu.org>
10 * check.c(gfc_check_allocated): Add comment pointing to ...
11 * intrinsic.c(sort_actual): ... the checking done here.
13 2019-08-05 Steven g. Kargl <kargl@gcc.gnu.org>
16 * decl.c (gfc_match_data): Allow an implied do-loop to nestle against
19 2019-08-04 Steven G. Kargl <kargl@gcc.gnu.org>
22 * check.c (oct2bin): New function. Convert octal string to binary.
23 (hex2bin): New function. Convert hexidecimal string to binary.
24 (bin2real): New function. Convert binary string to REAL. Use
26 (gfc_boz2real): Use fallback conversion bin2real.
28 2019-08-02 Steven G. Kargl <kargl@gcc.gnu.org>
31 * decl.c (gfc_match_data): In free-form code, DATA be followed by
34 2019-08-02 Steven G. Kargl <kargl@gcc.gnu.org>
37 * match.c (gfc_match_equivalence): Check that EQUIVALENCE is followed
40 2019-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
43 * interface.c (compare_actual_expr): When checking for aliasing, add
44 a case to handle REF_INQUIRY (e.g., foo(x%re, x%im) do not alias).
46 2019-07-29 Thomas Koenig <tkoenig@gcc.gnu.org>
49 * dump-parse-tree.c (show_global_symbol): New function.
50 (gfc_dump_global_symbols): New function.
51 * gfortran.h (gfc_traverse_gsymbol): Add prototype.
52 (gfc_dump_global_symbols): Likewise.
53 * invoke.texi: Document -fdump-fortran-global.
54 * lang.opt: Add -fdump-fortran-global.
55 * parse.c (gfc_parse_file): Handle flag_dump_fortran_global.
56 * symbol.c (gfc_traverse_gsymbol): New function.
57 * trans-decl.c (sym_identifier): New function.
58 (mangled_identifier): New function, doing most of the work
59 of gfc_sym_mangled_identifier.
60 (gfc_sym_mangled_identifier): Use mangled_identifier. Add mangled
61 identifier to global symbol table.
62 (get_proc_pointer_decl): Use backend decl from global identifier
65 2019-07-25 Thomas Koenig <tkoenig@gcc.gnu.org>
68 * dependency.h (gfc_dep_resovler): Add optional argument identical.
69 * dependency.c (gfc_check_dependency): Do not alway return 1 if
70 the symbol is the same. Pass on identical to gfc_dep_resolver.
71 (gfc_check_element_vs_element): Whitespace fix.
72 (gfc_dep_resolver): Adjust comment for function. If identical is
73 true, return 1 if any overlap has been found.
75 2019-07-23 Steven G. Kargl <kargl@gcc.gnu.org>
78 * check.c (gfc_invalid_boz): Fix comment.
79 (illegal_boz_arg): New function.
80 (gfc_check_transfer): Use to arguments.
81 (gfc_check_storage_size): Ditto.
82 (gfc_check_complex): Remove leftover comment from BOZ patch.
83 * primary.c (match_boz_constant): Remove leftover comment.
85 2019-07-23 Steven G. Kargl <kargl@gcc.gnu.org>
87 * arith.c (gfc_convert_integer, gfc_convert_real, gfc_convert_complex):
89 * primary.c (convert_integer, convert_real, convert_complex): ... here.
90 Rename and make static functions.
91 (match_integer_constant): Use convert_integer
92 (match_real_constant): Use convert_real.
93 (match_complex_constant: Use convert_complex.
94 * arith.h (gfc_convert_integer, gfc_convert_real, gfc_convert_complex):
96 * array.c (match_array_cons_element): A BOZ cannot be a data
97 statement value. Jump to a common exit point.
98 * check.c (gfc_invalid_boz): New function. Emit error or warning
99 for a BOZ in an invalid context.
100 (boz_args_check): Move to top of file to prevent need of forward
102 (is_boz_constant): New function. Check that BOZ expr is constant.
103 (gfc_boz2real): New function. In-place conversion of BOZ literal
104 constant to REAL in accordance to F2018.
105 (gfc_boz2int): New function. In-place conversion of BOZ literal
106 constant to INTEGER in accordance to F2018.
107 (gfc_check_achar, gfc_check_char, gfc_check_float): Use gfc_invalid_boz. Convert BOZ
109 (gfc_check_bge_bgt_ble_blt): Enforce F2018 requirements on BGE,
110 BGT, BLE, and BLT intrinsic functions.
111 (gfc_check_cmplx): Re-organize to check kind, if present, first.
112 Convert BOZ real and/or imaginary parts as needed in accordance to
114 (gfc_check_complex): Use gfc_invalid_boz. Convert BOZ as needed.
115 (gfc_check_dcmplx, gfc_check_dble ): Convert BOZ as needed.
116 (gfc_check_dshift): Make dshift[lr] conform to F2018 standard.
117 gfc_check_float (gfc_expr *a)
118 (gfc_check_iand_ieor_ior): Make IAND, IEOR, and IOR conform to
120 (gfc_check_int): Conform to F2018 standard.
121 (gfc_check_intconv): Deprecate SHORT and LONG aliases for INT2 and
122 INT. Simply return for a BOZ argument. See gfc_simplify_intconv.
123 (gfc_check_merge_bits): Make MERGE_BITS conform to Fortran 2018
125 (gfc_check_real): Remove incorrect comment. Check kind, if present,
126 first. Simply return for a BOZ argument. See gfc_simplify_real.
127 (gfc_check_and): Re-do error handling for BOZ arguments. Remove
128 special casing ts.type != BT_INTEGER or BT_LOGICAL.
129 * decl.c (match_old_style_init): Check for BOZ in old-style
130 initialization. Issue error or warning depending on
131 -fallow-invalid-boz option. Issue error if variable is not an
132 INTEGER or REAL and the value is BOZ.
133 * expr.c (gfc_copy_expr): Copy a BT_BOZ gfc_expr.
134 (gfc_check_assign): Re-do error handling for a BOZ in an assignment
135 statement. Do in-place conversion of RHS based on LHS type of
137 * gfortran.h (gfc_expr): Add a boz component. Remove is_boz component.
138 (gfc_boz2int, gfc_boz2real, gfc_invalid_boz): New prototypes.
139 * interface.c (gfc_extend_assign): Guard against replacing an
140 intrinsic involving a BOZ literal constant on RHS.
141 * invoke.texi: Doument -fallow-invalid-boz.
142 * lang.opt: New option. -fallow-invalid-boz.
143 * libgfortran.h (bt): Elevate BOZ to a basic type.
144 * misc.c (gfc_basic_typename, gfc_typename): Translate BT_BOZ to BOZ.
145 * primary.c (convert_integer, convert_real, convert_complex): to here.
146 Rename and make static functions.
147 * primary.c(match_boz_constant): Rewrite parsing of a BOZ. Re-do
148 error handling. Deprecate 'X' for hexidecimal and postfix notation.
149 Use -fallow-invalid-boz and gfc_invalid_boz to accept deprecated code.
150 * resolve.c (resolve_ordinary_assign): Rework a RHS that is a
151 BOZ literal constant. Use gfc_invalid_boz to allow previous
152 nonstandard behavior. Remove range checking of BOZ conversion.
153 * simplify.c (convert_boz): Remove function.
154 (simplify_cmplx): Remove conversion of BOZ constants, because
155 conversion is done in gfc_check_cmplx.
156 (gfc_simplify_float): Remove conversion of BOZ constant, because
157 conversion is done in gfc_check_float.
158 (simplify_intconv): Use gfc_boz2int to convert BOZ to INTEGER.
159 Remove range checking for BOZ conversion.
160 (gfc_simplify_real): Use k, if present, to determine kind. Convert
161 BOZ to REAL. Remove range checking for BOZ conversion.
162 target-memory.c (gfc_convert_boz): Rewrite to deal with convert of
163 a BOZ to a REAL value.
165 2019-07-21 Thomas König <tkoenig@gcc.gnu.org>
168 * gfortran.texi (GFORTRAN_FORMATTED_BUFFER_SIZE): Document
169 (GFORTRAN_UNFORMATTED_BUFFER_SIZE): Likewise.
171 2019-07-16 Harald Anlauf <anlauf@gmx.de>
174 * libgfortran.h: Add mask for -fcheck=bits option.
175 * options.c (gfc_handle_runtime_check_option): Add option "bits"
176 to run-time checks selectable via -fcheck.
177 * trans-intrinsic.c (gfc_conv_intrinsic_btest)
178 (gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits)
179 (gfc_conv_intrinsic_shift, gfc_conv_intrinsic_ishft)
180 (gfc_conv_intrinsic_ishftc): Implement run-time checks for the
181 POS, LEN, SHIFT, and SIZE arguments.
182 * gfortran.texi: Document run-time checks for bit manipulation
184 * invoke.texi: Document new -fcheck=bits option.
186 2019-07-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
189 * expr.c (check_restricted): Relax constraint C1279 which was
190 removed from F2008 and above.
192 2019-07-07 Paul Thomas <pault@gcc.gnu.org>
195 * trans-array.c (gfc_conv_scalarized_array_ref) Delete code
196 that gave symbol backend decl for subref arrays and deferred
199 2019-07-05 Andrew Stubbs <ams@codesourcery.com>
201 * openmp.c (resolve_omp_clauses): Add custom error messages for
202 parameters in map clauses.
204 2019-07-03 Martin Liska <mliska@suse.cz>
206 * check.c (gfc_check_c_funloc): Remove
208 * decl.c (variable_decl): Likewise.
209 * resolve.c (resolve_typebound_function): Likewise.
210 * simplify.c (gfc_simplify_matmul): Likewise.
211 (gfc_simplify_scan): Likewise.
212 * trans-array.c (gfc_could_be_alias): Likewise.
213 * trans-common.c (add_equivalences): Likewise.
214 * trans-expr.c (trans_class_vptr_len_assignment): Likewise.
215 (gfc_trans_array_constructor_copy): Likewise.
216 (gfc_trans_assignment_1): Likewise.
217 * trans-intrinsic.c (conv_intrinsic_atomic_op): Likewise.
218 * trans-openmp.c (gfc_omp_finish_clause): Likewise.
219 * trans-types.c (gfc_get_array_descriptor_base): Likewise.
220 * trans.c (gfc_build_final_call): Likewise.
222 2019-06-27 Steven G. Kargl <kargl@gcc.gnu.org>
225 * gfortran.dg/common_1.f: new test.
226 * gfortran.dg/common_26.f90: Ditto.
228 2019-06-26 Steven G. Kargl <kargl@gcc.gnu.org>
231 ChangeLog forgotten with revision 272667
232 * decl.c (access_attr_decl): Use temporary variable to reduce
233 unreadability of code. Normalize jumping to return.
234 (gfc_match_protected): Fix parsing error. Add comments to
235 explain code. Remove dead code.
236 (gfc_match_private): Use temporary variable to reduce unreadability
237 of code. Fix parsing error. Move code to test for blank PRIVATE.
239 (gfc_match_public): Move code to test for blank PUBLIC. Fix
240 parsing error. Remove dead code.
242 2019-06-24 Jan Hubicka <jh@suse.cz>
244 * trans-expr.c (gfc_conv_substring): Check that
245 type is array or integer prior checking string flag.
246 (gfc_conv_string_parameter): Likewise.
247 * trans-openmp.c (gfc_omp_scalar_p): Likewise.
248 * trans.c (gfc_build_array_ref): Likewise.
250 2019-06-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
253 * io.c (gfc_resolve_dt): Check that internal units are not
256 2019-06-21 Steven G. Kargl <kargl@gcc.gnu.org>
259 * resolve.c (deferred_requirements) : Check only the result variable.
260 (resolve_fl_procedure): Check deferred requirements on functions.
262 2019-06-21 Steven G. Kargl <kargl@gcc.gnu.org>
265 * decl.c (gfc_match_save): If SAVE was not seen, return MATCH_NO
266 instead issuing an error message and returning MATCH_ERROR.
268 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
271 * /decl.c (variable_decl): Mark a variable that is a target in pointer
272 initialization when in PROGRAM, MODULE, or SUBMODULE scope with an
275 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
278 * symbol.c (verify_bind_c_derived_type): Remove erroneous error
279 checking for BIND(C) and PRIVATE attributes.
281 2019-06-20 Thomas Koenig <tkoenig@gcc.gnu.org>
284 * trans-types.c (get_formal_from_actual_arglist): Get symbol from
285 current namespace so it will be freed later. If symbol is of type
286 character, get an empty character length.
288 2019-06-19 Steven G. Kargl <kargl@gcc.gnu.org>
291 * match.c (gfc_match_select_type): SELECT TYPE is an executable
292 statement, and cannot appear in MODULE or SUBMODULE scope.
294 2019-06-19 Steven G. Kargl <kargl@gcc.gnu.org>
297 * decl.c (attr_decl): Check for duplicate DIMENSION attribute for a
300 2019-06-19 Steven G. Kargl <kargl@gcc.gnu.org>
303 * resolve.c (resolve_contained_fntype): Do not dereference a NULL
306 2019-06-19 Jim MacArthur <jim.macarthur@codethink.co.uk>
307 Mark Eggleston <mark.eggleston@codethink.com>
310 * gfortran.texi: Add -fdec-blank-format-item
311 * invoke.texi: Add option to list of options.
312 * invoke.texi: Add to section on Commas in FORMAT specifications.
313 * io.c (check_format): At FMT_RPAREN goto finished if
314 -fdec-blank-format-item otherwise set error string.
315 * lang.opt: Add new option.
316 * options.c (set_dec_flags): Add SET_BITFLAG for
317 flag_dec_format_defaults.
319 2019-06-18 Julian Brown <julian@codesourcery.com>
322 * trans-decl.c (finish_oacc_declare): Reset module_oacc_clauses
323 before scanning each namespace.
325 2019-06-18 Thomas Schwinge <thomas@codesourcery.com>
328 * trans-decl.c (add_attributes_to_decl): Handle OpenACC 'declare'
331 2019-06-16 Thomas Koenig <tkoenig@gcc.gnu.org>
333 * dump_parse_tree (debug): Add verison for formal arglist.
334 Do not crash when a gfc_expr is NULL.
336 2019-06-15 Steven G. Kargl <kargl@gcc.gnu.org>
338 * decl.c (gfc_match_derived_decl): Dummy argument cannot be a derived
341 2019-06-14 Steven G. Kargl <kargl@gcc.gnu.org>
343 * arith.c (arith_power): Rework overflow of an integer to an integer
346 2019-06-14 Harald Anlauf <anlauf@gmx.de>
350 * trans-intrinsic.c (gfc_conv_intrinsic_shift): Properly
351 distinguish logical/arithmetic shifts.
352 * intrinsic.texi: Update documentation for SHIFTR/SHIFTL/SHIFTA
353 (Fortran 2008) and LSHIFT/RSHIFT (GNU extensions).
355 2019-06-14 Steven G. Kargl <kargl@gcc.gnu.org>
358 * dependency.c (gfc_check_argument_var_dependency): Suppress spurious
359 warnings by comparing variable names.
361 2019-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
364 * resolve.c (is_dt_name): New function to compare symbol name against
365 list of derived types.
366 (resolve_actual_arglist): Use it to find wrong code.
368 2019-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
371 * expr.c (gfc_check_vardef_context): Check for INTENT(IN) variable
372 in SELECT TYPE construct.
374 2019-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
377 * dependency.c (gfc_dep_resolver): Re-arrange code to make the logic
378 a bit more transparent. Fix 2 nearby formatting issues.
380 2019-06-13 Jakub Jelinek <jakub@redhat.com>
382 * io.c (check_format): Use G_(...) instead of _(...) for error values,
383 append " in format string at %L" to all strings but unexpected_element,
384 use error as gfc_error formating string instead of
385 "%s in format string at %L". Formatting fixes.
387 2019-06-12 Steven G. Kargl <kargl@gcc.gnu.org>
389 * gfortran.h (gfc_free_dt_list): Remove prototype.
391 2019-06-12 Steven G. Kargl <kargl@gcc.gnu.org>
394 * array.c (gfc_free_array_spec): When freeing an array-spec, avoid
395 an ICE for assumed-shape coarrays.
397 2019-06-08 Paul Thomas <pault@gcc.gnu.org>
400 * trans-expr.c (pointer_assignment_is_proc_pointer) Remove as
401 it is very simple and only called from one place.
402 (gfc_trans_pointer_assignment): Rename non_proc_pointer_assign
403 as non_proc_ptr_assign. Assign to it directly, rather than call
404 to above, deleted function and use gfc_expr_attr instead of
405 only checking the reference chain.
407 2019-06-08 Thomas Koenig <tkoenig@gcc.gnu.org>
408 Tomáš Trnka <trnka@scm.com>
411 * trans-types.c (get_formal_from_actual_arglist): Unset typespec
412 flags which make no sense for procedures without explicit
415 2019-06-02 Thomas Koenig <tkoenig@gcc.gnu.org>
418 * trans-expr.c (gfc_conv_subref_array_arg): If the size of the
419 expression can be determined to be one, treat it as contiguous.
420 Set likelyhood of presence of an actual argument according to
421 PRED_FORTRAN_ABSENT_DUMMY and likelyhood of being contiguous
422 according to PRED_FORTRAN_CONTIGUOUS.
424 2019-05-30 Thomas Koenig <tkoenig@gcc.gnu.org>
426 * gfc-internals.texi (Translating to GENERIC): New chapter.
428 2019-05-30 Marek Polacek <polacek@redhat.com>
430 * lang.opt (ftail-call-workaround): Fix a typo.
432 2019-05-30 Jakub Jelinek <jakub@redhat.com>
434 * lang.opt (ftail-call-workaround=): Fix a typo - lenghts to lengths.
436 2019-05-29 Thomas Koenig <tkoenig@gcc.gnu.org>
439 * gfortran.h (gfc_has_dimen_vector_ref): Add prototype.
440 * trans.h (gfc_conv_subref_array_arg): Add argument check_contiguous.
441 (gfc_conv_is_contiguous_expr): Add prototype.
442 * frontend-passes.c (has_dimen_vector_ref): Remove prototype,
444 (gfc_has_dimen_vector_ref): New function name.
445 (matmul_temp_args): Use gfc_has_dimen_vector_ref.
446 (inline_matmul_assign): Likewise.
447 * trans-array.c (gfc_conv_array_parameter): Also check for absence
448 of a vector subscript before calling gfc_conv_subref_array_arg.
449 Pass additional argument to gfc_conv_subref_array_arg.
450 * trans-expr.c (gfc_conv_subref_array_arg): Add argument
451 check_contiguous. If that is true, check if the argument
452 is contiguous and do not repack in that case.
453 * trans-intrinsic.c (gfc_conv_intrinsic_is_contiguous): Split
454 away most of the work into, and call
455 (gfc_conv_intrinsic_is_coniguous_expr): New function.
457 2019-05-29 Jakub Jelinek <jakub@redhat.com>
460 * lang.opt (fbroken-callers): Remove.
461 (ftail-call-workaround, ftail-call-workaround=): New options.
462 * gfortran.h (struct gfc_namespace): Add implicit_interface_calls.
463 * interface.c (gfc_procedure_use): Set implicit_interface_calls
464 for calls to implicit interface procedures.
465 * trans-decl.c (create_function_arglist): Use flag_tail_call_workaround
466 instead of flag_broken_callers. If it is not 2, also require
467 sym->ns->implicit_interface_calls.
468 * invoke.texi (fbroken-callers): Remove documentation.
469 (ftail-call-workaround, ftail-call-workaround=): Document.
471 2019-05-26 Thomas Koenig <tkoenig@gcc.gnu.org>
474 * trans-types.c (get_formal_from_actual_arglist): Set rank
475 and lower bound for assumed size arguments.
477 2019-05-22 Andrew Stubbs <ams@codesourcery.com>
479 * trans-stmt.c (gfc_trans_critical): Use size_type_node for
480 gfor_fndecl_caf_lock and gfor_fndecl_caf_unlock calls.
481 (gfc_trans_allocate): Use size_type_node for gfor_fndecl_caf_sync_all
484 2019-05-22 Jeff Law <law@redhat.com>
485 Mark Eggleston <mark.eggleston@codethink.com>
488 * gfortran.texi: Add Default widths for F, G and I format
489 descriptors to Extensions section.
490 * invoke.texi: Add -fdec-format-defaults
491 * io.c (check_format): Use default widths for i, f and g when
492 flag_dec_format_defaults is enabled.
493 * lang.opt: Add new option.
494 * options.c (set_dec_flags): Add SET_BITFLAG for
495 flag_dec_format_defaults.
497 2019-05-21 Janne Blomqvist <jb@gcc.gnu.org>
500 * intrinsic.texi (EXECUTE_COMMAND_LINE): Explain new
501 wait=.false. implementation.
503 2019-05-20 Mark Eggleston <markeggleston@codethink.com>
505 * gfortran.texi: Remove reference to the ASSIGN statement, capitalise
506 complex, state that padding is with spaces and modify the Hollerith
509 2019-05-19 Paul Thomas <pault@gcc.gnu.org>
512 * trans-stmt.c (trans_associate_var) Do not use the saved
513 descriptor if the expression is a COMPONENT_REF.
515 2019-05-19 Thomas Koenig <tkoenig@gcc.gnu.org>
518 * invoke.texi: Document -fbroken-callers.
519 * lang.opt: Add -fbroken-callers.
520 * trans-decl.c (create_function_arglist): Only set
521 DECL_HIDDEN_STRING_LENGTH if flag_broken_callers is set.
523 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
526 * f95-lang.c (gfc_attribute_table): Set min_len to -1 for "omp
528 * trans-decl.c (add_attributes_to_decl): Refer to OpenACC
529 'routine' clauses from "omp declare target" attribute.
531 2019-05-16 Martin Sebor <msebor@redhat.com>
533 * gfortranspec.c (append_arg): Spell out the word "argument."
535 2019-05-16 Jakub Jelinek <jakub@redhat.com>
538 * trans-decl.c (create_function_arglist): Set
539 DECL_HIDDEN_STRING_LENGTH on hidden string length PARM_DECLs if
542 2019-05-15 Janne Blomqvist <jb@gcc.gnu.org>
544 * parse.c (gfc_parse_file): Remove translation string markers.
546 2019-05-12 Janne Blomqvist <jb@gcc.gnu.org>
548 * dump-parse-tree.c (get_c_type_name): Use macros for complex type
550 * parse.c (gfc_parse_file): Define complex macros, add CPP support
551 when printing C prototypes.
553 2019-05-10 Thomas Koenig <tkoenig@gcc.gnu.org>
556 * interface.c (compare_actual_formal): Do not create a vtab if
557 the actual argument is assumed type.
559 2019-05-10 Paul Thomas <pault@gcc.gnu.org>
562 * trans-decl.c (convert_CFI_desc): Test that the dummy is
563 present before doing any of the conversions.
566 * decl.c (gfc_verify_c_interop_param): Restore the error for
567 charlen > 1 actual arguments passed to bind(C) procs.
568 Clean up trailing white space.
571 * trans-array.c (gfc_trans_create_temp_array): Set the 'span'
572 field to the element length for all types.
573 (gfc_conv_expr_descriptor): The force_no_tmp flag is used to
574 prevent temporary creation, especially for substrings.
575 * trans-decl.c (gfc_trans_deferred_vars): Rather than assert
576 that the backend decl for the string length is non-null, use it
577 as a condition before calling gfc_trans_vla_type_sizes.
578 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): 'force_no_tmp'
579 is set before calling gfc_conv_expr_descriptor.
580 * trans.c (get_array_span): Move the code for extracting 'span'
581 from gfc_build_array_ref to this function. This is specific to
582 descriptors that are component and indirect references.
583 * trans.h : Add the force_no_tmp flag bitfield to gfc_se.
585 2019-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
589 * dump-parse-tree.c: Include version.h.
590 (gfc_dump_external_c_prototypes): New function.
591 (get_c_type_name): Select "char" as a name for a simple char.
592 Adjust to handling external functions. Also handle complex.
593 (write_decl): Add argument bind_c. Adjust for dumping of external
595 (write_proc): Likewise.
596 (write_interop_decl): Add bind_c argument to call of write_proc.
597 * gfortran.h: Add prototype for gfc_dump_external_c_prototypes.
598 * lang.opt: Add -fc-prototypes-external flag.
599 * parse.c (gfc_parse_file): Move dumping of BIND(C) prototypes.
600 Call gfc_dump_external_c_prototypes if option is set.
601 * invoke.texi: Document -fc-prototypes-external.
603 2019-05-06 Steven G. Kargl <kargl@gcc.gnu.org>
606 * match.c (gfc_match_stopcode): Check F2008 condition on stop code.
608 2019-05-01 Andrew Benson <abensonca@gmail.com>
610 * module.c (write_module): Initialize module_column before writing
611 module to ensure line break occurs at correct column.
613 2019-05-01 Dominique d'Humieres <dominiq@gcc.gnu.org>
616 * match.c (gfc_match_parens): Change the location for missing ')'.
617 (gfc_match_if): Detect a missing '('. Remove the spurious named
618 constant error. Change the wording of some errors.
619 (gfc_match_else): Change the wording of an error.
620 (gfc_match_elseif): Detect a missing '('. Improve the matching
621 process to get a better syntax analysis.
623 2019-04-19 Steven G. Kargl <kargl@gcc.gnu.org>
626 * decl.c (in_module_or_interface): New function to check that the
627 current state is in a module, submodule, or interface.
628 (gfc_match_prefix): Use it.
630 2019-04-22 Paul Thomas <pault@gcc.gnu.org>
633 * resolve.c (find_array_spec): If this is a class expression
634 and the symbol and component array specs are the same, this is
636 *trans-intrinsic.c (gfc_conv_intrinsic_size): If a class symbol
637 argument, has no namespace, it has come from the interface
638 mapping and the _data component must be accessed directly.
640 2019-04-17 Thomas Schwinge <thomas@codesourcery.com>
643 * openmp.c (gfc_resolve_do_iterator): Handle sharing_clauses for
645 (gfc_resolve_oacc_blocks): Populate sharing_clauses with private
648 2019-04-14 Paul Thomas <pault@gcc.gnu.org>
651 * trans-decl.c (gfc_get_symbol_decl): Assumed shape and assumed
652 rank dummies of bind C procs require deferred initialization.
653 (convert_CFI_desc): New procedure to convert incoming CFI
654 descriptors to gfc types and back again.
655 (gfc_trans_deferred_vars): Call it.
656 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Null the CFI
657 descriptor pointer. Free the descriptor in all cases.
660 * expr.c (is_CFI_desc): New function.
661 (is_subref_array): Tidy up by referencing the symbol directly.
662 * gfortran.h : Prototype for is_CFI_desc.
663 * trans_array.c (get_CFI_desc): New function.
664 (gfc_get_array_span, gfc_conv_scalarized_array_ref,
665 gfc_conv_array_ref): Use it.
666 * trans.c (get_array_span): Extract the span from descriptors
667 that are indirect references.
670 * trans-decl.c (gfc_get_symbol_decl): Make sure that the se
671 expression is a pointer type before converting it to the symbol
673 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Eliminate
674 temporary creation for intent(in).
676 2019-04-13 Dominique d'Humieres <dominiq@gcc.gnu.org>
679 * module.c (gfc_use_module): use complete sentences.
681 2019-04-11 Thomas Koenig <tkoenig@gcc.gnu.org>
684 * frontend-passes.c (B_ERROR): Delete macro.
685 (C_ERROR): Delete macro.
686 (B_ERROR_1): New macro.
687 (C_ERROR_1): New macro.
688 (C_ERROR_2): New macro.
689 (inline_matmul_assign): Use new macros.
690 (call_external_blas): Likewise.
692 2019-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
695 * gfortran.h (gfc_component): Add finalized field.
696 * class.c (finalize_component): If the component is already
697 finalized, return early. Set component->finalized on exit.
699 2019-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
702 * resolve.c (resolve_global_procedure): If the global symbol is an
703 ENTRY, also look up its name among the entries.
705 2019-04-04 Harald Anlauf <anlauf@gmx.de>
708 * check.c (gfc_check_transfer): Reject procedures as actual
709 arguments for SOURCE and MOLD of TRANSFER intrinsic.
711 2019-04-03 Steven G. Kargl <kargl@gcc.gnu.org>
714 * expr.c (gfc_reduce_init_expr): Add extra check to avoid
715 dereferencing a null pointer.
717 2019-04-03 Dominique d'Humieres <dominiq@gcc.gnu.org>
720 * expr.c (comp_pointer): Remove redundant condition.
722 2019-03-31 Harald Anlauf <anlauf@gmx.de>
726 * trans-types.c (gfc_typenode_for_spec): Handle conversion for
728 * target-memory.c (gfc_element_size): Handle size determination
729 for procedure pointers.
731 2019-03-31 Thomas Koenig <tkoenig@gcc.gnu.org>
733 * dump-parse-tree.c (debug): Add for symbol_attribute *,
734 symbol_attribute and gfc_ref * arguments.
736 2019-03-30 Paul Thomas <pault@gcc.gnu.org>
739 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Use the formal
740 argument attributes rather than those of the actual argument.
743 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Call
744 'set_dtype_for_unallocated' for any type of arrayspec.
746 2019-03-27 Janus Weil <janus@gcc.gnu.org>
749 * expr.c (gfc_check_assign_symbol): Reject internal and dummy procedures
750 in procedure pointer initialization.
752 2019-03-27 Paul Thomas <pault@gcc.gnu.org>
755 * expr.c (is_subref_array): Permit substrings to be detected
757 * trans-array.c (get_array_ctor_var_strlen): Obtain the length
758 of deferred length strings. Handle substrings with a NULL end
760 (trans_array_constructor): Remove an unnecessary blank line.
761 (gfc_conv_scalarized_array_ref): Skip to label 'done' if 'decl'
763 (get_array_charlen): If the expression is an array, convert the
764 first element of the constructor and use its string length. Get
765 a new charlen if necessary.
766 (gfc_conv_expr_descriptor): Call 'get_array_charlen' for array
767 constructor expressions. If the ss_info string length is
768 available, use that to set the span of character arrays.
769 * trans-expr.c (gfc_get_expr_charlen): Handle substrings
770 * trans-stmt.c (trans_associate_var): Set the pointer array
771 flag for variable targets and constant array constructors. Take
772 care not to reset the string length or the span in the case of
773 expressions that are not converted as direct by reference.
775 2019-03-25 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
777 * intrinsic.texi (MINLOC): Fix typo in BACK argument documentation.
780 2019-03-24 Thomas Koenig <tkoenig@gcc.gnu.org>
783 * interface.c (compare_actual_formal): Change errors about
784 missing or extra to gfc_error_now to make sure they are issued.
785 Change "spec" to "specifier" in message.
786 * resolve.c (resolve_global_procedure): Also check for mismatching
787 interface with global symbols if the namespace has already been
790 2019-03-21 Thomas Schwinge <thomas@codesourcery.com>
793 * openmp.c (gfc_match_oacc_routine): Set the level of parallelism
795 (gfc_resolve_oacc_routines): Call gfc_add_omp_declare_target.
798 * gfortran.h (gfc_oacc_routine_name): Add loc member.
799 (gfc_resolve_oacc_routines): Declare.
800 * openmp.c (gfc_match_oacc_routine): Move some error checking
802 (gfc_resolve_oacc_routines): ... this new function.
803 * resolve.c (resolve_codes): Call it.
806 * openmp.c (gfc_match_oacc_routine): Clarify.
809 * module.c (verify_OACC_ROUTINE_LOP_NONE): New function.
810 (enum ab_attribute): Add AB_OACC_ROUTINE_LOP_GANG,
811 AB_OACC_ROUTINE_LOP_WORKER, AB_OACC_ROUTINE_LOP_VECTOR,
812 AB_OACC_ROUTINE_LOP_SEQ.
813 (attr_bits): Add these.
814 (mio_symbol_attribute): Handle these.
816 2019-03-20 Janus Weil <janus@gcc.gnu.org>
819 * symbol.c (check_conflict): ABSTRACT attribute conflicts with
822 2019-03-18 Thomas Koenig <tkoeng@gcc.gnu.org>
825 * iresolve.c: Include trans.h.
826 (gfc_resolve_fe_runtine_error): Set backend_decl on
829 2019-03-17 Thomas Koenig <tkoenig@gcc.gnu.org>
832 * gfortran.h (expr_t): Add EXPR_UNKNOWN.
833 * expr.c (gfc_copy_expr): Add EXPR_UNKNOWN to switch statement.
834 (gfc_simplify_expr): Likewise.
835 * module.c (mio_expr): Likewise.
836 * resovle.c (extract_compcall_passed_object): Issue error on
838 (check_typebound_baseobject): Issue error on wrong type.
839 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Add
840 EXPR_UNKNOWN to switch statement.
842 2019-03-16 Jakub Jelinek <jakub@redhat.com>
845 * scanner.c (load_line): Remove linenum and current_line static
846 variables, add warned_tabs automatic variable. Use current_file->line
847 instead of current_line and warned_tabs boolean to avoid diagnosing
848 tabs multiple times on the same line.
850 2019-03-16 Thomas Koenig <tkoenig@gcc.gnu.org>
853 * symbol.c (gfc_add_subroutine): If we are encountering a
854 subrtoutine within a BLOCK DATA and the name starts with an
855 underscore, do not check.
857 2019-03-15 Harald Anlauf <anlauf@gmx.de>
860 * expr.c (gfc_check_pointer_assign): Correct and improve error
861 messages for invalid pointer assignments.
863 2019-03-14 Thomas Koenig <tkoenig@gcc.gnu.org>
865 * gfortran.texi: Document Q edit descriptor under
866 "Extensions not implemented in GNU Fortran".
868 2019-03-13 Harald Anlauf <anlauf@gmx.de>
871 * trans-expr.c (gfc_trans_pointer_assignment): Move check for same
872 string length so that we do not get false errors for deferred
875 2019-03-13 Janus Weil <janus@gcc.gnu.org>
878 * decl.c (gfc_match_formal_arglist): Reject empty type parameter lists.
879 (gfc_match_derived_decl): Mark as PDT only if type parameter list was
880 matched successfully.
882 2019-03-13 Thomas Koenig <tkoenig@gcc.gnu.org>
887 * gfortran.h (gfc_symbol): Add bind_c component.
888 (gfc_get_gsymbol): Add argument bind_c.
889 * decl.c (add_global_entry): Add bind_c argument to
891 * parse.c (parse_block_data): Likewise.
892 (parse_module): Likewise.
893 (add_global_procedure): Likewise.
894 (add_global_program): Likewise.
895 * resolve.c (resolve_common_blocks): Likewise.
896 (resolve_global_procedure): Likewise.
897 (gfc_verify_binding_labels): Likewise.
898 * symbol.c (gfc_get_gsymbol): Add argument bind_c. Set bind_c
900 * trans-decl.c (gfc_get_module_backend_decl): Add bind_c argument
902 (gfc_get_extern_function_decl): If the sym has a binding label
903 and it cannot be found in the global symbol tabel, it is the wrong
906 2019-03-12 Thomas Koenig <tkoenig@gcc.gnu.org>
909 * match.c (gfc_match_type_spec): Remove call to
910 gfc_resolve_expr for character length.
912 2019-03-12 Martin Liska <mliska@suse.cz>
914 * decl.c (add_init_expr_to_sym): Replace usage of 'can't'
916 (variable_decl): Likewise.
917 (cray_pointer_decl): Likewise.
918 (match_binding_attributes): Likewise.
919 * f95-lang.c (gfc_init): Likewise.
920 * interface.c (gfc_check_typebound_override): Likewise.
921 * intrinsic.c (make_generic): Likewise.
922 * module.c (dump_module): Likewise.
923 (gfc_use_module): Likewise.
924 * primary.c (gfc_convert_to_structure_constructor): Likewise.
925 * resolve.c (resolve_entries): Likewise.
926 (check_generic_tbp_ambiguity): Likewise.
927 (get_checked_tb_operator_target): Likewise.
928 * scanner.c (load_file): Likewise.
929 * trans-expr.c (gfc_conv_intrinsic_to_class): Likewise.
931 2019-03-12 Paul Thomas <pault@gcc.gnu.org>
935 * trans-expr.c (set_dtype_for_unallocated): New function.
936 (gfc_conv_gfc_desc_to_cfi_desc): Call it for allocatable and
938 (gfc_conv_procedure_call): Likewise. Also, set the ubound of
939 the final dimension to -1 for assumed rank formal args that are
940 associated with assumed size arrays.
941 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Return -1 for
942 the final dimension of assumed rank entities that are argument
943 associated with assumed size arrays.
944 (gfc_conv_intrinsic_shape): Likewise return -1 for the final
945 dimension of the shape intrinsic.
947 2019-03-11 Jakub Jelinek <jakub@redhat.com>
950 * trans-openmp.c (gfc_omp_clause_default_ctor): Set TREE_NO_WARNING
951 on decl if adding COND_EXPR for allocatable.
952 (gfc_omp_clause_copy_ctor): Set TREE_NO_WARNING on dest.
954 2019-03-11 Martin Liska <mliska@suse.cz>
956 * decl.c (match_record_decl): Wrap an option name
957 in a string format message and fix GNU coding style.
958 (gfc_match_pointer): Likewise.
959 * expr.c (find_array_section): Likewise.
960 * intrinsic.c (gfc_is_intrinsic): Likewise.
961 * options.c (gfc_post_options): Likewise.
962 * primary.c (match_integer_constant): Likewise.
963 * trans-common.c (translate_common): Likewise.
965 2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
968 * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
969 Return false if a scalar tempoary is needed.
970 (gfc_walk_variable_expr): Fix up class refs.
972 2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
975 * symbol.c (gfc_add_procedure): Only throw an error if the
976 procedure has not been declared either PUBLIC or PRIVATE.
978 2019-03-09 Thomas Koenig <tkoenig@gcc.gnu.org>
981 * trans-types.c (gfc_typenode_for_spec) Set ts->is_c_interop of
983 (create_fn_spec): Mark argument as escaping if ts->is_c_interop is set.
985 2019-03-09 Janus Weil <janus@gcc.gnu.org>
988 * expr.c (gfc_check_assign_symbol): Deal with procedure pointers to
989 pointer-valued functions.
991 2019-03-09 Thomas König <tkoenig@gcc.gnu.org>
994 * decl.c (add_init_expr_to_sym): Add shape if init has none. Add
995 asserts that it has to be an EXPR_ARRAY in this case.
997 2019-03-08 Jakub Jelinek <jakub@redhat.com>
1000 * arith.c (gfc_complex2complex): Avoid two spaces in the middle of
1002 * resolve.c (resolve_allocate_expr): Likewise.
1004 2019-03-06 Harald Anlauf <anlauf@gmx.de>
1007 * expr.c (simplify_const_ref): Avoid null pointer dereference.
1009 2019-03-03 Harald Anlauf <anlauf@gmx.de>
1010 Steven G. Kargl <kargl@gcc.gnu.org>
1013 * symbol.c (check_conflict): Check for valid procedure name
1014 passed to error reporting routine.
1016 2019-03-03 Thomas Koenig <tkoenig@gcc.gnu.org>
1019 * resolve.c (resolve_allocate_expr): Add some tests for coarrays.
1021 2019-03-02 Harald Anlauf <anlauf@gmx.de>
1024 * check.c (gfc_calculate_transfer_sizes): Correct checks for cases
1025 where storage size of elements of MOLD is 0.
1027 2019-02-28 Thomas Schwinge <thomas@codesourcery.com>
1028 Cesar Philippidis <cesar@codesourcery.com>
1032 * openmp.c (gfc_match_oacc_routine): Handle repeated use of the
1033 Fortran OpenACC 'routine' directive.
1036 * gfortran.h (enum oacc_routine_lop): Add OACC_ROUTINE_LOP_ERROR.
1037 * openmp.c (gfc_oacc_routine_lop, gfc_match_oacc_routine): Use it.
1038 * trans-decl.c (add_attributes_to_decl): Likewise.
1042 * openmp.c (gfc_match_oacc_routine): Accept intrinsic symbols.
1044 2019-02-26 Harald Anlauf <anlauf@gmx.de>
1047 * check.c (gfc_calculate_transfer_sizes): Handle cases where
1048 storage size of elements of MOLD is 0.
1050 2019-02-26 Thomas Koenig <tkoenig@gcc.gnu.org>
1053 * trans-types.c (get_formal_from_actual_arglist): If
1054 the actual arglist has no expression, the corresponding
1055 formal arglist is an alternate return.
1057 2019-02-26 Uroš Bizjak <ubizjak@gmail.com>
1059 * invoke.texi (-ffpe-trap): Use @var for every item in the list.
1061 2019-02-26 Jakub Jelinek <jakub@redhat.com>
1064 * trans-array.c (gfc_conv_array_initializer): Use RANGE_EXPR instead
1065 of duplicating the initializer possibly many times.
1067 2019-02-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1070 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Add is_mold
1071 to arguments. If we are dealing with a MOLD, call
1072 gfc_expr_to_initialize().
1073 * trans-stmt.c (gfc_trans_allocate): For MOLD, pass is_mold=true
1074 to gfc_find_and_cut_at_last_class_ref.
1075 * trans.h (gfc_find_and_cut_at_last_class_ref): Add optional
1076 argument is_mold with default false.
1078 2019-02-24 Harald Anlauf <anlauf@gmx.de>
1082 * target-memory.c (gfc_element_size): Return false if element size
1083 cannot be determined; element size is returned separately.
1084 (gfc_target_expr_size): Return false if expression size cannot be
1085 determined; expression size is returned separately.
1086 * target-memory.h: Adjust prototypes.
1087 * check.c (gfc_calculate_transfer_sizes): Adjust references to
1088 gfc_target_expr_size, gfc_element_size.
1089 * arith.c (hollerith2representation): Likewise.
1090 * class.c (find_intrinsic_vtab): Likewise.
1091 * simplify.c (gfc_simplify_sizeof): Likewise.
1093 2019-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1096 * trans-io.c (transfer_expr): Do not return if there are no
1097 components to the derived type or class.
1099 2019-02-23 Paul Thomas <pault@gcc.gnu.org>
1102 * resolve.c (deferred_op_assign): Return if the lhs expression
1103 has the pointer attribute.
1104 * trans-expr.c (gfc_trans_assignment_1): Do not fix the string
1105 length if the lhs expression has the pointer attribute.
1107 2019-02-23 Paul Thomas <pault@gcc.gnu.org>
1111 * decl.c (gfc_verify_c_interop_param): Restriction on string
1112 length being one is lifted for F2018.
1113 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): For scalar
1114 characters with intent in, make a temporary and copy the result
1115 of the expression evaluation into it.
1116 (gfc_conv_procedure_call): Set a flag for character formal args
1117 having a character length that is not unity. If the procedure
1118 is bind C, call gfc_conv_gfc_desc_to_cfi_desc in this case.
1119 Also, extend bind C calls to unconditionally convert both
1120 pointers and allocatable expressions.
1122 2019-02-23 David Malcolm <dmalcolm@redhat.com>
1123 Jakub Jelinek <jakub@redhat.com>
1126 * simplify.c (norm2_do_sqrt, gfc_simplify_norm2): Use
1127 mpfr_number_p && !mpfr_zero_p instead of mpfr_regular_p.
1128 (norm2_add_squared): Likewise. Use mp_exp_t rather than mpfr_exp_t.
1130 2019-02-22 Harald Anlauf <anlauf@gmx.de>
1133 * io.c (gfc_match_open): Fix logic in checks of OPEN statement
1134 when NEWUNIT= is specified.
1136 2019-02-22 Steven G. Kargl <kargl@gcc.gnu.org>
1139 * gfortran.texi: Fix documentation to match the implementation.
1141 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1142 Cesar Philippidis <cesar@codesourcery.com>
1145 * gfortran.h (oacc_routine_lop): New enum.
1146 (symbol_attribute): Use it.
1147 * openmp.c (gfc_oacc_routine_dims): Replace with...
1148 (gfc_oacc_routine_lop): ... this new function.
1149 (gfc_match_oacc_routine): Adjust.
1150 * trans-decl.c (add_attributes_to_decl): Likewise.
1152 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1154 * openmp.c (gfc_match_oacc_declare): Revert earlier changes.
1156 2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1158 * dump-parse-tree.c (debug): Implement for gfc_expr *,
1159 gfc_typespec *, gfc_typespec and gfc_symbol *.
1161 2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1164 * class.c (gfc_get_len_component): Add argument k for kind.
1165 If the kind of the resulting expression is not equal to k,
1167 * gfortran.h (gfc_len_component): Adjust prototype.
1168 * simplify.c (gfc_simplify_len): Pass kind to
1169 gfc_get_len_component.
1171 2019-02-20 Martin Liska <mliska@suse.cz>
1173 * gfortran.texi: Change singular to plural.
1175 2019-02-20 Martin Liska <mliska@suse.cz>
1177 * gfortran.texi: Document Fortran header directive.
1179 2019-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1182 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): If the dummy
1183 argument is contiguous and the actual argument may not be,
1184 use gfc_conv_subref_array_arg.
1186 2019-02-19 Thomas Schwinge <thomas@codesourcery.com>
1189 * openmp.c (gfc_match_omp_clauses): Add representation of wait clause
1190 without argument as 'wait (GOMP_ASYNC_NOVAL)'.
1192 2019-02-18 Thomas Koenig <tkoenig@gcc.gnu.org>
1195 * trans-decl.c (gfc_get_extern_function_decl): Add argument
1196 actual_args and pass it through to gfc_get_function_type.
1197 * trans-expr.c (conv_function_val): Add argument actual_args
1198 and pass it on to gfc_get_extern_function_decl.
1199 (conv_procedure_call): Pass actual arguments to conv_function_val.
1200 * trans-types.c (get_formal_from_actual_arglist): New function.
1201 (gfc_get_function_type): Add argument actual_args. Generate
1202 formal args from actual args if necessary.
1203 * trans-types.h (gfc_get_function_type): Add optional argument.
1204 * trans.h (gfc_get_extern_function_decl): Add optional argument.
1206 2019-02-18 Martin Liska <mliska@suse.cz>
1208 * decl.c (gfc_match_gcc_builtin): Add support for filtering
1209 of builtin directive based on multilib ABI name.
1211 2019-02-17 Harald Anlauf <anlauf@gmx.de>
1214 * resolve.c (resolve_common_blocks,resolve_common_vars): Move
1215 check for obsolent COMMON feature in F2018 to better place.
1217 2019-02-17 Harald Anlauf <anlauf@gmx.de>
1220 * decl.c (gfc_set_constant_character_len): Clear original string
1221 representation after padding has been performed to target length.
1223 2019-02-16 Jakub Jelinek <jakub@redhat.com>
1226 * simplify.c (simplify_transformation_to_array): Run post_op
1227 immediately after processing corresponding row, rather than at the
1229 (norm2_scale): New variable.
1230 (add_squared): Rename to ...
1231 (norm2_add_squared): ... this. Scale down operand and/or result
1233 (do_sqrt): Rename to ...
1234 (norm2_do_sqrt): ... this. Handle the result == e case. Scale up
1235 result and clear norm2_scale.
1236 (gfc_simplify_norm2): Clear norm2_scale. Change add_squared to
1237 norm2_add_squared and &do_sqrt to norm2_do_sqrt. Scale up result
1238 and clear norm2_scale again.
1240 2019-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
1243 * trans-decl.c (generate_coarray_sym_init): For an array
1244 constructor in a DATA statement of a coarray variable, set the
1245 rank to 1 to avoid confusion later on. If the constructor
1246 contains only one value, use that for initiailizig.
1248 2019-02-14 Janne Blomqvist <jb@gcc.gnu.org>
1251 * gfortran.h (gfc_option_t): Make flag_init_integer_value a long.
1252 * options.c (gfc_handle_option): Use strtol instead of atoi.
1253 * invoke.texi: Document -finit-integer behavior in more detail.
1255 2019-02-14 Harald Anlauf <anlauf@gmx.de>
1258 * symbol.c: Move check for labeled DO statement from
1259 gfc_define_st_label to gfc_reference_st_label.
1261 2019-02-14 Cesar Philippidis <cesar@codesourcery.com>
1264 * openmp.c (resolve_oacc_nested_loops): Error on do concurrent
1267 2019-02-13 Martin Liska <mliska@suse.cz>
1270 * resolve.c (resolve_operator): Initialize 't' right
1271 after function entry. Skip switch (e->value.op.op)
1272 for -fdec operands that become function calls.
1274 2019-02-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1277 * expr.c (gfc_check_assign): Add argument is_init_expr. If we are
1278 looking at an init expression, issue error if the target is not a
1279 TARGET and we are not looking at a procedure pointer.
1280 * gfortran.h (gfc_check_assign): Add optional argument
1283 2019-02-09 Harald Anlauf <anlauf@gmx.de>
1286 * resolve.c (gfc_resolve_substring_charlen): Check substring
1287 length for constantness prior to general calculation of length.
1289 2019-02-09 Paul Thomas <pault@gcc.gnu.org>
1292 * trans-array.c (gfc_trans_create_temp_array): Set the 'span'
1293 field for derived types.
1295 2019-02-04 Harald Anlauf <anlauf@gmx.de>
1298 * decl.c (add_init_expr_to_sym): Copy length of string initializer
1301 2019-02-04 Martin Liska <mliska@suse.cz>
1304 * resolve.c (resolve_ref): Remove breakout variable as
1305 we need to prevent prev = &(*prev)->next to happen
1308 2019-02-04 Martin Liska <mliska@suse.cz>
1311 * scanner.c (load_file): Report error for -fpre-include
1312 file and do not ICE.
1314 2019-02-02 Dominique d'Humieres <dominiq@gcc.gnu.org>
1317 * invoke.texi: Document the behavior of repeated -ffpe-trap
1320 2019-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1323 * arith.c (gfc_int2int): Do not warn if src->do_not_warn is set.
1324 * gfortran.h (gfc_expr): Add flag do_not_warn.
1325 * intrinsic.c (gfc_convert_type_warn): Set expr->do_not_warn if
1326 no warning is desired.
1328 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
1331 * trans-expr.c (gfc_conv_procedure_call): For derived entities,
1332 passed in parentheses to class formals, invert the order of
1333 copying allocatable components to taking the _data of the
1336 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
1339 * trans-array.c (gfc_array_init_size): Add element_size to the
1341 (gfc_array_allocate): Remove the recalculation of the size of
1342 the element and use element_size from the call to the above.
1343 Unconditionally set the span field of the descriptor.
1345 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
1348 * expr.c (is_subref_array): Move the check for class pointer
1349 dummy arrays to after the reference check. If we haven't seen
1350 an array reference other than an element and a component is not
1351 class or derived, return false.
1353 2019-02-01 Jakub Jelinek <jakub@redhat.com>
1357 * trans-decl.c (generate_local_decl): Add referenced FL_PARAMETERs
1358 if sym->ns->construct_entities rather than if
1359 sym->ns->parent->code->op == EXEC_BLOCK.
1361 2019-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
1364 * resolve.c (resolve_component): If the reference is a BT_CLASS,
1365 copy the contiguous attribute from the reference and use the
1368 2019-01-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1371 * io.c (match_io): Add check for comma after '*' without subsequent
1374 2019-01-30 Dominique d'Humieres <dominiq@gcc.gnu.org>
1377 * invoke.texi: Document the promotion of double precision
1380 2019-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1383 * interface.c (gfc_compare_types): If a derived type and an
1384 integer both have a derived type, and they are identical,
1385 this is a C binding type and compares equal.
1387 2019-01-26 Harald Anlauf <anlauf@gmx.de>
1390 * expr.c (check_inquiry): Add list of inquiry functions allowed in
1391 constant expressions for F2008+.
1393 2019-01-25 Steven G. Kargl <kargl@gcc.gnu.org>
1396 * decl.c (gfc_match_subroutine): Check for conflict between BIND(C)
1397 and alternative return.
1399 2019-01-24 Paul Thomas <pault@gcc.gnu.org>
1402 * trans-array.c (gfc_conv_descriptor_elem_len): New function.
1403 * trans-array.h : Add prototype for above.
1404 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Take account of
1405 assumed rank arrays being flagged by rank = -1 in expressions.
1406 Intent in arrays need a pointer to a copy of the data to be
1407 assigned to the descriptor passed for conversion. This should
1408 then be freed, together with the CFI descriptor on return from
1411 2019-01-22 Harald Anlauf <anlauf@gmx.de>
1414 * trans-expr.c (gfc_conv_power_op): Handle cases of (2**e) ** integer
1415 and (- 2**e) ** integer.
1417 2019-01-19 Dominique d'Humieres <dominiq@gcc.gnu.org>
1420 * resolve.c (resolve_types): Add !flag_automatic.
1421 * symbol.c (gfc_add_save): Silence warnings.
1423 2019-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
1426 * io.c (match_io_element): input-item cannot be an external function.
1428 2018-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1429 Paul Thomas <pault@gcc.gnu.org>
1432 * trans-expr.c (gfc_conv_procedure_call): Call
1433 gfc_conv_subref_array_arg if the formal arg is contiguous
1434 and the actual arg may not be.
1436 2019-01-17 Thomas Koenig <tkoenig@gcc.gnu.org>
1439 * resolve.c (resolve_ref): Fix logic for removal of
1442 2019-01-19 Jakub Jelinek <jakub@redhat.com>
1445 * trans-decl.c (gfc_get_symbol_decl): Don't add length to function
1446 or parent function if it has been added there already.
1448 2019-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1451 * resolve.c (resolve_array_ref): Add equal_length argument; set it
1452 if the length of the substring equals that of the orignal
1454 (resolve_ref): Remove the substring if it is equal in length to
1455 the original variable, unless it is an EXPR_SUBSTRING).
1457 2019-01-15 Steven G. Kargl <kargl@gcc.gnu.org>
1460 * resolve.c (resolve_symbol): Host associated varaibles can appear
1461 in the specification statement of a RESULT array.
1463 2019-01-15 Paul Thomas <pault@gcc.gnu.org>
1465 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Deal with exprs
1466 that are indirect references; ie. dummy arguments.
1468 2019-01-13 Dominique d'Humieres <dominiq@gcc.gnu.org>
1471 * gfortran.texi: Replace @xref with @ref and adjust the sentence.
1473 2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1476 * trans-array.c (gfc_conv_array_parameter): Do not pack/unpack
1477 functions with contiguous results.
1479 2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1482 * trans-array.c (gfc_conv_array_parameter): Remove TODO. Do not
1483 pack/unpack results of functions which return an explicit-shaped
1484 or allocatable array.
1486 2019-01-12 Steven G. Kargl <kargl@gcc.gnu.org>
1489 * resolve.c (gfc_verify_binding_labels): Break if-elseif-elseif
1490 structure into independent if's with a return to simplify logic.
1491 Avoid a check for ENTRY name with bind(c).
1493 2019-01-12 Paul Thomas <pault@gcc.gnu.org>
1495 * gfortran.texi: Add description in sections on TS 29113 and
1496 further interoperability with C.
1497 * trans-array.c (gfc_conv_descriptor_attribute): New function.
1498 (gfc_get_dataptr_offset): Remove static function attribute.
1499 * trans-array.h: Add prototypes for above functions.
1500 * trans-decl.c: Add declarations for the library functions
1501 cfi_desc_to_gfc_desc and gfc_desc_to_cfi_desc.
1502 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): New function.
1503 (gfc_conv_procedure_call): Call it for scalar and array actual
1504 arguments, when the formal arguments are bind_c with assumed
1505 shape or assumed rank.
1506 * trans.h: External declarations for gfor_fndecl_cfi_to_gfc
1507 and gfor_fndecl_gfc_to_cfi.
1509 2019-01-11 Steven G. Kargl <kargl@gcc.gnu.org>
1512 * decl.c (gfc_match_entry): Check for F2018:C1546. Fix nearby
1515 2019-01-11 Jakub Jelinek <jakub@redhat.com>
1519 * trans-openmp.c: Include attribs.h.
1520 (gfc_walk_alloc_comps, gfc_omp_clause_linear_ctor): Handle
1521 VAR_DECL max bound with "omp dummy var" attribute like NULL or
1522 error_mark_node - recompute number of elts independently.
1524 2019-01-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1527 * trans-array.c (gfc_conv_parameter_array): Temporary
1528 arrays generated for expressions do not need to be repacked.
1530 2019-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
1533 * decl.c (top_var_list): Set locus of expr.
1534 (gfc_match_data): Detect pointer on non-rightmost part-refs.
1536 2019-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
1539 * resolve.c (is_illegal_recursion): Remove an assert().
1541 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
1544 * expr.c: Change "can not" to "cannot".
1546 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
1549 * class.c: Mechanically replace "can not" with "cannot".
1552 * gfc-internals.texi: Likewise.
1553 * intrinsic.texi: Likewise.
1554 * invoke.texi: Likewise.
1556 * match.c: Likewise.
1557 * parse.c: Likewise.
1558 * primary.c: Likewise.
1559 * resolve.c: Likewise.
1560 * symbol.c: Likewise.
1561 * trans-array.c: Likewise.
1562 * trans-decl.c: Likewise.
1563 * trans-intrinsic.c: Likewise.
1564 * trans-stmt.c: Likewise.
1566 2019-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
1569 * simplify.c (gfc_simplify_spread): Also simplify if the
1570 type of source is an EXPR_STRUCTURE.
1572 2019-01-08 Janus Weil <janus@gcc.gnu.org>
1575 * class.c (gfc_find_vtab): For polymorphic typespecs, the components of
1576 the class container may not be available (in case of invalid code).
1578 2019-01-08 Richard Biener <rguenther@suse.de>
1581 * trans-expr.c (gfc_conv_initializer): For ISOCBINDING_NULL_*
1582 directly build the expected GENERIC tree.
1584 2019-01-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1585 Harald Anlauf <anlauf@gmx.de>
1586 Tobias Burnus <burnus@gcc.gnu.org>
1589 * check.c (gfc_check_is_contiguous): New function.
1590 * expr.c (gfc_is_not_contiguous): New function.
1591 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IS_CONTIGUOUS.
1592 Add prototype for gfc_is_not_contiguous.
1593 * intrinsic.c (do_ts29113_check): Add GFC_ISYM_IS_CONTIGUOUS.
1594 (add_function): Add is_contiguous.
1595 * intrinsic.h: Add prototypes for gfc_check_is_contiguous,
1596 gfc_simplify_is_contiguous and gfc_resolve_is_contiguous.
1597 * intrinsic.texi: Add IS_CONTIGUOUS.
1598 * iresolve.c (gfc_resolve_is_contiguous): New function.
1599 * simplify.c (gfc_simplify_is_contiguous): New function.
1600 * trans-decl.c (gfor_fncecl_is_contiguous0): New variable.
1601 (gfc_build_intrinsic_function_decl): Add it.
1602 * trans-intrinsic.c (gfc_conv_intrinsic_is_contiguous): New
1604 (gfc_conv_intrinsic_function): Handle GFC_ISYM_IS_CONTIGUOUS.
1606 2019-01-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1609 * gfortran.h: Add macro gfc_real_4_kind
1610 * simplify.c (simplify_min_max): Special case for the types of
1611 AMAX0, AMIN0, MAX1 and MIN1, which actually change the types of
1614 2019-01-05 Janus Weil <janus@gcc.gnu.org>
1617 * class.c (gfc_find_derived_vtab): Mark the _final component as
1619 (find_intrinsic_vtab): Ditto. Also add an extra check to avoid
1620 dereferencing a null pointer and adjust indentation.
1621 * resolve.c (resolve_fl_variable): Add extra check to avoid
1622 dereferencing a null pointer. Move variable declarations to local scope.
1623 (resolve_fl_procedure): Add extra check to avoid dereferencing a null
1625 * symbol.c (check_conflict): Suppress errors for artificial symbols.
1627 2019-01-01 Steven G. Kargl <kargl@gcc.gnu.org>
1629 * parse.c (decode_statement): Suppress "Unclassifiable statement"
1630 error if previous error messages were emittes.
1632 2019-01-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1635 * primary.c (gfc_convert_to_structure_constructor): If a character
1636 in a constructor is too long, add a warning with
1637 -Wcharacter-truncation.
1639 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1641 Update copyright years.
1643 * gfortranspec.c (lang_specific_driver): Update copyright notice
1645 * gfc-internals.texi: Bump @copying's copyright year.
1646 * gfortran.texi: Ditto.
1647 * intrinsic.texi: Ditto.
1648 * invoke.texi: Ditto.
1650 Copyright (C) 2019 Free Software Foundation, Inc.
1652 Copying and distribution of this file, with or without modification,
1653 are permitted in any medium without royalty provided the copyright
1654 notice and this notice are preserved.