1 2019-08-20 Mark Eggleston <mark.eggleston@codethink.com>
4 * intrinsic.texi: Add GNU extension notes to DIM, MOD, MODULO.
6 2019-08-19 Mark Eggleston <mark.eggleston@codethink.com>
8 * gfortran.texi: Delete paragraph about integer overload errors
9 when initialising integer variables with BOZ constants as these
12 2019-08-18 Steven G. Kargl <kargl@gcc.gnu.org>
15 module.c (gfc_match_use): User defined operator cannot conflict with
18 2019-08-17 Steven G. Kargl <kargl@gcc.gnu.org>
21 * module.c (gfc_match_use): When renaming a module entity, search
22 current namespace for conflicting symbol.
24 2019-08-17 Steven G. Kargl <kargl@gcc.gnu.org>
27 * match.c (gfc_match_st_function): When matching a statement function,
28 need to check if the statement function name shadows the function
31 2019-08-17 Steven G. Kargl <kargl@gcc.gnu.org>
34 * decl.c (get_proc_name): Check for a CLASS entity when trying to
35 add attributes to an entity that already has an explicit interface.
37 2019-08-17 Steven G. Kargl <kargl@gcc.gnu.org>
40 * primary.c (gfc_variable_attr): Remove a gfc_internal_error(),
41 which cannot be reached by conforming Fortran code, but seems to
42 be reachable from nonconforming Fortran code. Treat the AR_UNKNOWN
45 2019-08-17 Janne Blomqvist <jb@gcc.gnu.org>
48 * trans-decl.c (gfc_build_builtin_function_decls): Replace
49 os_error with os_error_at decl.
50 * trans.c (trans_runtime_error_vararg): Modify so the error
51 function decl is passed directly.
52 (gfc_trans_runtime_error): Pass correct error function decl.
53 (gfc_trans_runtime_check): Likewise.
54 (trans_os_error_at): New function.
55 (gfc_call_malloc): Use trans_os_error_at.
56 (gfc_allocate_using_malloc): Likewise.
57 (gfc_call_realloc): Likewise.
58 * trans.h (gfor_fndecl_os_error): Replace with gfor_fndecl_os_error_at.
60 2019-08-16 Jeff Law <law@redhat.com>
61 Mark Eggleston <mark.eggleston@codethink.com>
63 * gfortran.h: Add gfc_check_conflict declaration.
64 * symbol.c (check_conflict): Rename cfg_check_conflict and remove
66 * symbol.c (cfg_check_conflict): Remove automatic in equivalence
68 * symbol.c (save_symbol): Add check for in equivalence to stop the
69 the save attribute being added.
70 * trans-common.c (build_equiv_decl): Add is_auto parameter and
71 add !is_auto to condition where TREE_STATIC (decl) is set.
72 * trans-common.c (build_equiv_decl): Add local variable is_auto,
73 set it true if an atomatic attribute is encountered in the variable
74 list. Call build_equiv_decl with is_auto as an additional parameter.
75 flag_dec_format_defaults is enabled.
76 * trans-common.c (accumulate_equivalence_attributes) : New subroutine.
77 * trans-common.c (find_equivalence) : New local variable dummy_symbol,
78 accumulated equivalence attributes from each symbol then check for
81 2019-08-16 Richard Biener <rguenther@suse.de>
83 * trans-intrinsic.c (gfc_conv_intrinsic_findloc): Initialize
84 forward_branch to avoid bogus uninitialized warning.
86 2019-08-15 Thomas Koenig <tkoenig@gcc.gnu.org>
89 * frontend-passes.c (check_externals_expr): New function.
90 (check_externals_code): New function.
91 (gfc_check_externals): New function.
92 * gfortran.h (debug): Add prototypes for gfc_symbol * and
94 (gfc_check_externals): Add prototype.
95 * interface.c (compare_actual_formal): Do not complain about
96 alternate returns if the formal argument is optional.
97 (gfc_procedure_use): Handle cases when an error has been issued
98 previously. Break long line.
99 * parse.c (gfc_parse_file): Call gfc_check_externals for all
101 * resolve.c (resolve_global_procedure): Remove checking of
104 2019-08-13 Steven G. Kargl <kargl@gcc.gnu.org>
107 * resolve.c (check_data_variable): data-stmt-object with pointer
108 attribute requires a data-stmt-value with the target attribute.
110 2019-08-13 Steven G. Kargl <kargl@gcc.gnu.org>
113 * misc.c (gfc_typename): Do not point to something that ought not to
116 2013-08-13 Thomas Koenig <tkoenig@gcc.gnu.org>
119 * frontend-passes.c (insert_index): Suppress errors while
120 simplifying the resulting expression.
122 2019-08-13 Steven G. Kargl <kargl@gcc.gnu.org>
125 resolve.c (resolve_typebound_procedure): Allow host associated
126 procedure to be a binding target. While here, wrap long line.
128 2019-08-13 Steven G. Kargl <kargl@gcc.gnu.org>
131 * expr.c (gfc_simplify_expr): Simplifcation of an array with a kind
132 type inquiry suffix yields a constant expression.
134 2019-08-13 Janne Blomqvist <jb@gcc.gnu.org>
137 * check.c (gfc_check_random_seed): Reduce seed_size.
138 * intrinsic.texi (RANDOM_NUMBER): Update to match new PRNG.
140 2019-08-12 Thomas Koenig <tkoenig@gcc.gnu.org>
143 * frontend-passes.c (do_subscript): Do not warn for an
144 expression a second time. Do not warn about a zero-trip loop.
145 (doloop_warn): Also look at contained namespaces.
147 2019-08-11 Janne Blomqvist <jb@gcc.gnu.org>
150 * invoke.texi (-fmax-stack-var-size): Document increased default.
151 * options.c (gfc_post_options): Increase default stack var size to
153 * trans-decl.c (gfc_finish_var_decl): Generate warning when local
154 array moved to static storage.
156 2019-08-10 Steven G. Kargl <kargl@gcc.gnu.org>
158 * decl.c (match_old_style_init): Use a clearer error message.
159 * expr.c (gfc_check_assign): Update BOZ checking to provide a stricter
160 adherence to the Fortran standard. Use gfc_invalid_boz () to
161 relax errors into warnings.
162 * gfortran.h (gfc_isym_id): Add new ids GFC_ISYM_DFLOAT,
163 GFC_ISYM_FLOAT, GFC_ISYM_REALPART, and GFC_ISYM_SNGL
164 * intrinsic.c (add_functions): Use new ids to split REAL generic into
165 REAL, FLOAT, DFLOAT, SNGL, and REALPART generics.
166 (gfc_intrinsic_func_interface): Allow new intrinsics in an
167 initialization expression
168 * resolve.c (resolve_operator): Deal with BOZ as operands.
169 Use gfc_invalid_boz to allow for errors or warnings via the
170 -fallow-invalid-boz option. A BOZ cannot be an operand to an
171 unary operator. Both operands of a binary operator cannot be BOZ.
172 For binary operators, convert a BOZ operand into the type and
173 kind of the other operand for REAL or INTEGER operand.
174 * trans-intrinsic.c: Use new ids to cause conversions to happen.
176 2019-08-06 Steven G. Kargl <kargl@gcc.gnu.org>
179 * trans-decl.c (gfc_generate_return): Ensure something is returned
182 2019-08-06 Steven G. Kargl <kargl@gcc.gnu.org>
185 * check.c(gfc_check_allocated): Add comment pointing to ...
186 * intrinsic.c(sort_actual): ... the checking done here.
188 2019-08-05 Steven g. Kargl <kargl@gcc.gnu.org>
191 * decl.c (gfc_match_data): Allow an implied do-loop to nestle against
194 2019-08-04 Steven G. Kargl <kargl@gcc.gnu.org>
197 * check.c (oct2bin): New function. Convert octal string to binary.
198 (hex2bin): New function. Convert hexidecimal string to binary.
199 (bin2real): New function. Convert binary string to REAL. Use
201 (gfc_boz2real): Use fallback conversion bin2real.
203 2019-08-02 Steven G. Kargl <kargl@gcc.gnu.org>
206 * decl.c (gfc_match_data): In free-form code, DATA be followed by
209 2019-08-02 Steven G. Kargl <kargl@gcc.gnu.org>
212 * match.c (gfc_match_equivalence): Check that EQUIVALENCE is followed
215 2019-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
218 * interface.c (compare_actual_expr): When checking for aliasing, add
219 a case to handle REF_INQUIRY (e.g., foo(x%re, x%im) do not alias).
221 2019-07-29 Thomas Koenig <tkoenig@gcc.gnu.org>
224 * dump-parse-tree.c (show_global_symbol): New function.
225 (gfc_dump_global_symbols): New function.
226 * gfortran.h (gfc_traverse_gsymbol): Add prototype.
227 (gfc_dump_global_symbols): Likewise.
228 * invoke.texi: Document -fdump-fortran-global.
229 * lang.opt: Add -fdump-fortran-global.
230 * parse.c (gfc_parse_file): Handle flag_dump_fortran_global.
231 * symbol.c (gfc_traverse_gsymbol): New function.
232 * trans-decl.c (sym_identifier): New function.
233 (mangled_identifier): New function, doing most of the work
234 of gfc_sym_mangled_identifier.
235 (gfc_sym_mangled_identifier): Use mangled_identifier. Add mangled
236 identifier to global symbol table.
237 (get_proc_pointer_decl): Use backend decl from global identifier
240 2019-07-25 Thomas Koenig <tkoenig@gcc.gnu.org>
243 * dependency.h (gfc_dep_resovler): Add optional argument identical.
244 * dependency.c (gfc_check_dependency): Do not alway return 1 if
245 the symbol is the same. Pass on identical to gfc_dep_resolver.
246 (gfc_check_element_vs_element): Whitespace fix.
247 (gfc_dep_resolver): Adjust comment for function. If identical is
248 true, return 1 if any overlap has been found.
250 2019-07-23 Steven G. Kargl <kargl@gcc.gnu.org>
253 * check.c (gfc_invalid_boz): Fix comment.
254 (illegal_boz_arg): New function.
255 (gfc_check_transfer): Use to arguments.
256 (gfc_check_storage_size): Ditto.
257 (gfc_check_complex): Remove leftover comment from BOZ patch.
258 * primary.c (match_boz_constant): Remove leftover comment.
260 2019-07-23 Steven G. Kargl <kargl@gcc.gnu.org>
262 * arith.c (gfc_convert_integer, gfc_convert_real, gfc_convert_complex):
264 * primary.c (convert_integer, convert_real, convert_complex): ... here.
265 Rename and make static functions.
266 (match_integer_constant): Use convert_integer
267 (match_real_constant): Use convert_real.
268 (match_complex_constant: Use convert_complex.
269 * arith.h (gfc_convert_integer, gfc_convert_real, gfc_convert_complex):
271 * array.c (match_array_cons_element): A BOZ cannot be a data
272 statement value. Jump to a common exit point.
273 * check.c (gfc_invalid_boz): New function. Emit error or warning
274 for a BOZ in an invalid context.
275 (boz_args_check): Move to top of file to prevent need of forward
277 (is_boz_constant): New function. Check that BOZ expr is constant.
278 (gfc_boz2real): New function. In-place conversion of BOZ literal
279 constant to REAL in accordance to F2018.
280 (gfc_boz2int): New function. In-place conversion of BOZ literal
281 constant to INTEGER in accordance to F2018.
282 (gfc_check_achar, gfc_check_char, gfc_check_float): Use gfc_invalid_boz. Convert BOZ
284 (gfc_check_bge_bgt_ble_blt): Enforce F2018 requirements on BGE,
285 BGT, BLE, and BLT intrinsic functions.
286 (gfc_check_cmplx): Re-organize to check kind, if present, first.
287 Convert BOZ real and/or imaginary parts as needed in accordance to
289 (gfc_check_complex): Use gfc_invalid_boz. Convert BOZ as needed.
290 (gfc_check_dcmplx, gfc_check_dble ): Convert BOZ as needed.
291 (gfc_check_dshift): Make dshift[lr] conform to F2018 standard.
292 gfc_check_float (gfc_expr *a)
293 (gfc_check_iand_ieor_ior): Make IAND, IEOR, and IOR conform to
295 (gfc_check_int): Conform to F2018 standard.
296 (gfc_check_intconv): Deprecate SHORT and LONG aliases for INT2 and
297 INT. Simply return for a BOZ argument. See gfc_simplify_intconv.
298 (gfc_check_merge_bits): Make MERGE_BITS conform to Fortran 2018
300 (gfc_check_real): Remove incorrect comment. Check kind, if present,
301 first. Simply return for a BOZ argument. See gfc_simplify_real.
302 (gfc_check_and): Re-do error handling for BOZ arguments. Remove
303 special casing ts.type != BT_INTEGER or BT_LOGICAL.
304 * decl.c (match_old_style_init): Check for BOZ in old-style
305 initialization. Issue error or warning depending on
306 -fallow-invalid-boz option. Issue error if variable is not an
307 INTEGER or REAL and the value is BOZ.
308 * expr.c (gfc_copy_expr): Copy a BT_BOZ gfc_expr.
309 (gfc_check_assign): Re-do error handling for a BOZ in an assignment
310 statement. Do in-place conversion of RHS based on LHS type of
312 * gfortran.h (gfc_expr): Add a boz component. Remove is_boz component.
313 (gfc_boz2int, gfc_boz2real, gfc_invalid_boz): New prototypes.
314 * interface.c (gfc_extend_assign): Guard against replacing an
315 intrinsic involving a BOZ literal constant on RHS.
316 * invoke.texi: Doument -fallow-invalid-boz.
317 * lang.opt: New option. -fallow-invalid-boz.
318 * libgfortran.h (bt): Elevate BOZ to a basic type.
319 * misc.c (gfc_basic_typename, gfc_typename): Translate BT_BOZ to BOZ.
320 * primary.c (convert_integer, convert_real, convert_complex): to here.
321 Rename and make static functions.
322 * primary.c(match_boz_constant): Rewrite parsing of a BOZ. Re-do
323 error handling. Deprecate 'X' for hexidecimal and postfix notation.
324 Use -fallow-invalid-boz and gfc_invalid_boz to accept deprecated code.
325 * resolve.c (resolve_ordinary_assign): Rework a RHS that is a
326 BOZ literal constant. Use gfc_invalid_boz to allow previous
327 nonstandard behavior. Remove range checking of BOZ conversion.
328 * simplify.c (convert_boz): Remove function.
329 (simplify_cmplx): Remove conversion of BOZ constants, because
330 conversion is done in gfc_check_cmplx.
331 (gfc_simplify_float): Remove conversion of BOZ constant, because
332 conversion is done in gfc_check_float.
333 (simplify_intconv): Use gfc_boz2int to convert BOZ to INTEGER.
334 Remove range checking for BOZ conversion.
335 (gfc_simplify_real): Use k, if present, to determine kind. Convert
336 BOZ to REAL. Remove range checking for BOZ conversion.
337 target-memory.c (gfc_convert_boz): Rewrite to deal with convert of
338 a BOZ to a REAL value.
340 2019-07-21 Thomas König <tkoenig@gcc.gnu.org>
343 * gfortran.texi (GFORTRAN_FORMATTED_BUFFER_SIZE): Document
344 (GFORTRAN_UNFORMATTED_BUFFER_SIZE): Likewise.
346 2019-07-16 Harald Anlauf <anlauf@gmx.de>
349 * libgfortran.h: Add mask for -fcheck=bits option.
350 * options.c (gfc_handle_runtime_check_option): Add option "bits"
351 to run-time checks selectable via -fcheck.
352 * trans-intrinsic.c (gfc_conv_intrinsic_btest)
353 (gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits)
354 (gfc_conv_intrinsic_shift, gfc_conv_intrinsic_ishft)
355 (gfc_conv_intrinsic_ishftc): Implement run-time checks for the
356 POS, LEN, SHIFT, and SIZE arguments.
357 * gfortran.texi: Document run-time checks for bit manipulation
359 * invoke.texi: Document new -fcheck=bits option.
361 2019-07-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
364 * expr.c (check_restricted): Relax constraint C1279 which was
365 removed from F2008 and above.
367 2019-07-07 Paul Thomas <pault@gcc.gnu.org>
370 * trans-array.c (gfc_conv_scalarized_array_ref) Delete code
371 that gave symbol backend decl for subref arrays and deferred
374 2019-07-05 Andrew Stubbs <ams@codesourcery.com>
376 * openmp.c (resolve_omp_clauses): Add custom error messages for
377 parameters in map clauses.
379 2019-07-03 Martin Liska <mliska@suse.cz>
381 * check.c (gfc_check_c_funloc): Remove
383 * decl.c (variable_decl): Likewise.
384 * resolve.c (resolve_typebound_function): Likewise.
385 * simplify.c (gfc_simplify_matmul): Likewise.
386 (gfc_simplify_scan): Likewise.
387 * trans-array.c (gfc_could_be_alias): Likewise.
388 * trans-common.c (add_equivalences): Likewise.
389 * trans-expr.c (trans_class_vptr_len_assignment): Likewise.
390 (gfc_trans_array_constructor_copy): Likewise.
391 (gfc_trans_assignment_1): Likewise.
392 * trans-intrinsic.c (conv_intrinsic_atomic_op): Likewise.
393 * trans-openmp.c (gfc_omp_finish_clause): Likewise.
394 * trans-types.c (gfc_get_array_descriptor_base): Likewise.
395 * trans.c (gfc_build_final_call): Likewise.
397 2019-06-27 Steven G. Kargl <kargl@gcc.gnu.org>
400 * gfortran.dg/common_1.f: new test.
401 * gfortran.dg/common_26.f90: Ditto.
403 2019-06-26 Steven G. Kargl <kargl@gcc.gnu.org>
406 ChangeLog forgotten with revision 272667
407 * decl.c (access_attr_decl): Use temporary variable to reduce
408 unreadability of code. Normalize jumping to return.
409 (gfc_match_protected): Fix parsing error. Add comments to
410 explain code. Remove dead code.
411 (gfc_match_private): Use temporary variable to reduce unreadability
412 of code. Fix parsing error. Move code to test for blank PRIVATE.
414 (gfc_match_public): Move code to test for blank PUBLIC. Fix
415 parsing error. Remove dead code.
417 2019-06-24 Jan Hubicka <jh@suse.cz>
419 * trans-expr.c (gfc_conv_substring): Check that
420 type is array or integer prior checking string flag.
421 (gfc_conv_string_parameter): Likewise.
422 * trans-openmp.c (gfc_omp_scalar_p): Likewise.
423 * trans.c (gfc_build_array_ref): Likewise.
425 2019-06-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
428 * io.c (gfc_resolve_dt): Check that internal units are not
431 2019-06-21 Steven G. Kargl <kargl@gcc.gnu.org>
434 * resolve.c (deferred_requirements) : Check only the result variable.
435 (resolve_fl_procedure): Check deferred requirements on functions.
437 2019-06-21 Steven G. Kargl <kargl@gcc.gnu.org>
440 * decl.c (gfc_match_save): If SAVE was not seen, return MATCH_NO
441 instead issuing an error message and returning MATCH_ERROR.
443 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
446 * /decl.c (variable_decl): Mark a variable that is a target in pointer
447 initialization when in PROGRAM, MODULE, or SUBMODULE scope with an
450 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
453 * symbol.c (verify_bind_c_derived_type): Remove erroneous error
454 checking for BIND(C) and PRIVATE attributes.
456 2019-06-20 Thomas Koenig <tkoenig@gcc.gnu.org>
459 * trans-types.c (get_formal_from_actual_arglist): Get symbol from
460 current namespace so it will be freed later. If symbol is of type
461 character, get an empty character length.
463 2019-06-19 Steven G. Kargl <kargl@gcc.gnu.org>
466 * match.c (gfc_match_select_type): SELECT TYPE is an executable
467 statement, and cannot appear in MODULE or SUBMODULE scope.
469 2019-06-19 Steven G. Kargl <kargl@gcc.gnu.org>
472 * decl.c (attr_decl): Check for duplicate DIMENSION attribute for a
475 2019-06-19 Steven G. Kargl <kargl@gcc.gnu.org>
478 * resolve.c (resolve_contained_fntype): Do not dereference a NULL
481 2019-06-19 Jim MacArthur <jim.macarthur@codethink.co.uk>
482 Mark Eggleston <mark.eggleston@codethink.com>
485 * gfortran.texi: Add -fdec-blank-format-item
486 * invoke.texi: Add option to list of options.
487 * invoke.texi: Add to section on Commas in FORMAT specifications.
488 * io.c (check_format): At FMT_RPAREN goto finished if
489 -fdec-blank-format-item otherwise set error string.
490 * lang.opt: Add new option.
491 * options.c (set_dec_flags): Add SET_BITFLAG for
492 flag_dec_format_defaults.
494 2019-06-18 Julian Brown <julian@codesourcery.com>
497 * trans-decl.c (finish_oacc_declare): Reset module_oacc_clauses
498 before scanning each namespace.
500 2019-06-18 Thomas Schwinge <thomas@codesourcery.com>
503 * trans-decl.c (add_attributes_to_decl): Handle OpenACC 'declare'
506 2019-06-16 Thomas Koenig <tkoenig@gcc.gnu.org>
508 * dump_parse_tree (debug): Add verison for formal arglist.
509 Do not crash when a gfc_expr is NULL.
511 2019-06-15 Steven G. Kargl <kargl@gcc.gnu.org>
513 * decl.c (gfc_match_derived_decl): Dummy argument cannot be a derived
516 2019-06-14 Steven G. Kargl <kargl@gcc.gnu.org>
518 * arith.c (arith_power): Rework overflow of an integer to an integer
521 2019-06-14 Harald Anlauf <anlauf@gmx.de>
525 * trans-intrinsic.c (gfc_conv_intrinsic_shift): Properly
526 distinguish logical/arithmetic shifts.
527 * intrinsic.texi: Update documentation for SHIFTR/SHIFTL/SHIFTA
528 (Fortran 2008) and LSHIFT/RSHIFT (GNU extensions).
530 2019-06-14 Steven G. Kargl <kargl@gcc.gnu.org>
533 * dependency.c (gfc_check_argument_var_dependency): Suppress spurious
534 warnings by comparing variable names.
536 2019-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
539 * resolve.c (is_dt_name): New function to compare symbol name against
540 list of derived types.
541 (resolve_actual_arglist): Use it to find wrong code.
543 2019-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
546 * expr.c (gfc_check_vardef_context): Check for INTENT(IN) variable
547 in SELECT TYPE construct.
549 2019-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
552 * dependency.c (gfc_dep_resolver): Re-arrange code to make the logic
553 a bit more transparent. Fix 2 nearby formatting issues.
555 2019-06-13 Jakub Jelinek <jakub@redhat.com>
557 * io.c (check_format): Use G_(...) instead of _(...) for error values,
558 append " in format string at %L" to all strings but unexpected_element,
559 use error as gfc_error formating string instead of
560 "%s in format string at %L". Formatting fixes.
562 2019-06-12 Steven G. Kargl <kargl@gcc.gnu.org>
564 * gfortran.h (gfc_free_dt_list): Remove prototype.
566 2019-06-12 Steven G. Kargl <kargl@gcc.gnu.org>
569 * array.c (gfc_free_array_spec): When freeing an array-spec, avoid
570 an ICE for assumed-shape coarrays.
572 2019-06-08 Paul Thomas <pault@gcc.gnu.org>
575 * trans-expr.c (pointer_assignment_is_proc_pointer) Remove as
576 it is very simple and only called from one place.
577 (gfc_trans_pointer_assignment): Rename non_proc_pointer_assign
578 as non_proc_ptr_assign. Assign to it directly, rather than call
579 to above, deleted function and use gfc_expr_attr instead of
580 only checking the reference chain.
582 2019-06-08 Thomas Koenig <tkoenig@gcc.gnu.org>
583 Tomáš Trnka <trnka@scm.com>
586 * trans-types.c (get_formal_from_actual_arglist): Unset typespec
587 flags which make no sense for procedures without explicit
590 2019-06-02 Thomas Koenig <tkoenig@gcc.gnu.org>
593 * trans-expr.c (gfc_conv_subref_array_arg): If the size of the
594 expression can be determined to be one, treat it as contiguous.
595 Set likelyhood of presence of an actual argument according to
596 PRED_FORTRAN_ABSENT_DUMMY and likelyhood of being contiguous
597 according to PRED_FORTRAN_CONTIGUOUS.
599 2019-05-30 Thomas Koenig <tkoenig@gcc.gnu.org>
601 * gfc-internals.texi (Translating to GENERIC): New chapter.
603 2019-05-30 Marek Polacek <polacek@redhat.com>
605 * lang.opt (ftail-call-workaround): Fix a typo.
607 2019-05-30 Jakub Jelinek <jakub@redhat.com>
609 * lang.opt (ftail-call-workaround=): Fix a typo - lenghts to lengths.
611 2019-05-29 Thomas Koenig <tkoenig@gcc.gnu.org>
614 * gfortran.h (gfc_has_dimen_vector_ref): Add prototype.
615 * trans.h (gfc_conv_subref_array_arg): Add argument check_contiguous.
616 (gfc_conv_is_contiguous_expr): Add prototype.
617 * frontend-passes.c (has_dimen_vector_ref): Remove prototype,
619 (gfc_has_dimen_vector_ref): New function name.
620 (matmul_temp_args): Use gfc_has_dimen_vector_ref.
621 (inline_matmul_assign): Likewise.
622 * trans-array.c (gfc_conv_array_parameter): Also check for absence
623 of a vector subscript before calling gfc_conv_subref_array_arg.
624 Pass additional argument to gfc_conv_subref_array_arg.
625 * trans-expr.c (gfc_conv_subref_array_arg): Add argument
626 check_contiguous. If that is true, check if the argument
627 is contiguous and do not repack in that case.
628 * trans-intrinsic.c (gfc_conv_intrinsic_is_contiguous): Split
629 away most of the work into, and call
630 (gfc_conv_intrinsic_is_coniguous_expr): New function.
632 2019-05-29 Jakub Jelinek <jakub@redhat.com>
635 * lang.opt (fbroken-callers): Remove.
636 (ftail-call-workaround, ftail-call-workaround=): New options.
637 * gfortran.h (struct gfc_namespace): Add implicit_interface_calls.
638 * interface.c (gfc_procedure_use): Set implicit_interface_calls
639 for calls to implicit interface procedures.
640 * trans-decl.c (create_function_arglist): Use flag_tail_call_workaround
641 instead of flag_broken_callers. If it is not 2, also require
642 sym->ns->implicit_interface_calls.
643 * invoke.texi (fbroken-callers): Remove documentation.
644 (ftail-call-workaround, ftail-call-workaround=): Document.
646 2019-05-26 Thomas Koenig <tkoenig@gcc.gnu.org>
649 * trans-types.c (get_formal_from_actual_arglist): Set rank
650 and lower bound for assumed size arguments.
652 2019-05-22 Andrew Stubbs <ams@codesourcery.com>
654 * trans-stmt.c (gfc_trans_critical): Use size_type_node for
655 gfor_fndecl_caf_lock and gfor_fndecl_caf_unlock calls.
656 (gfc_trans_allocate): Use size_type_node for gfor_fndecl_caf_sync_all
659 2019-05-22 Jeff Law <law@redhat.com>
660 Mark Eggleston <mark.eggleston@codethink.com>
663 * gfortran.texi: Add Default widths for F, G and I format
664 descriptors to Extensions section.
665 * invoke.texi: Add -fdec-format-defaults
666 * io.c (check_format): Use default widths for i, f and g when
667 flag_dec_format_defaults is enabled.
668 * lang.opt: Add new option.
669 * options.c (set_dec_flags): Add SET_BITFLAG for
670 flag_dec_format_defaults.
672 2019-05-21 Janne Blomqvist <jb@gcc.gnu.org>
675 * intrinsic.texi (EXECUTE_COMMAND_LINE): Explain new
676 wait=.false. implementation.
678 2019-05-20 Mark Eggleston <markeggleston@codethink.com>
680 * gfortran.texi: Remove reference to the ASSIGN statement, capitalise
681 complex, state that padding is with spaces and modify the Hollerith
684 2019-05-19 Paul Thomas <pault@gcc.gnu.org>
687 * trans-stmt.c (trans_associate_var) Do not use the saved
688 descriptor if the expression is a COMPONENT_REF.
690 2019-05-19 Thomas Koenig <tkoenig@gcc.gnu.org>
693 * invoke.texi: Document -fbroken-callers.
694 * lang.opt: Add -fbroken-callers.
695 * trans-decl.c (create_function_arglist): Only set
696 DECL_HIDDEN_STRING_LENGTH if flag_broken_callers is set.
698 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
701 * f95-lang.c (gfc_attribute_table): Set min_len to -1 for "omp
703 * trans-decl.c (add_attributes_to_decl): Refer to OpenACC
704 'routine' clauses from "omp declare target" attribute.
706 2019-05-16 Martin Sebor <msebor@redhat.com>
708 * gfortranspec.c (append_arg): Spell out the word "argument."
710 2019-05-16 Jakub Jelinek <jakub@redhat.com>
713 * trans-decl.c (create_function_arglist): Set
714 DECL_HIDDEN_STRING_LENGTH on hidden string length PARM_DECLs if
717 2019-05-15 Janne Blomqvist <jb@gcc.gnu.org>
719 * parse.c (gfc_parse_file): Remove translation string markers.
721 2019-05-12 Janne Blomqvist <jb@gcc.gnu.org>
723 * dump-parse-tree.c (get_c_type_name): Use macros for complex type
725 * parse.c (gfc_parse_file): Define complex macros, add CPP support
726 when printing C prototypes.
728 2019-05-10 Thomas Koenig <tkoenig@gcc.gnu.org>
731 * interface.c (compare_actual_formal): Do not create a vtab if
732 the actual argument is assumed type.
734 2019-05-10 Paul Thomas <pault@gcc.gnu.org>
737 * trans-decl.c (convert_CFI_desc): Test that the dummy is
738 present before doing any of the conversions.
741 * decl.c (gfc_verify_c_interop_param): Restore the error for
742 charlen > 1 actual arguments passed to bind(C) procs.
743 Clean up trailing white space.
746 * trans-array.c (gfc_trans_create_temp_array): Set the 'span'
747 field to the element length for all types.
748 (gfc_conv_expr_descriptor): The force_no_tmp flag is used to
749 prevent temporary creation, especially for substrings.
750 * trans-decl.c (gfc_trans_deferred_vars): Rather than assert
751 that the backend decl for the string length is non-null, use it
752 as a condition before calling gfc_trans_vla_type_sizes.
753 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): 'force_no_tmp'
754 is set before calling gfc_conv_expr_descriptor.
755 * trans.c (get_array_span): Move the code for extracting 'span'
756 from gfc_build_array_ref to this function. This is specific to
757 descriptors that are component and indirect references.
758 * trans.h : Add the force_no_tmp flag bitfield to gfc_se.
760 2019-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
764 * dump-parse-tree.c: Include version.h.
765 (gfc_dump_external_c_prototypes): New function.
766 (get_c_type_name): Select "char" as a name for a simple char.
767 Adjust to handling external functions. Also handle complex.
768 (write_decl): Add argument bind_c. Adjust for dumping of external
770 (write_proc): Likewise.
771 (write_interop_decl): Add bind_c argument to call of write_proc.
772 * gfortran.h: Add prototype for gfc_dump_external_c_prototypes.
773 * lang.opt: Add -fc-prototypes-external flag.
774 * parse.c (gfc_parse_file): Move dumping of BIND(C) prototypes.
775 Call gfc_dump_external_c_prototypes if option is set.
776 * invoke.texi: Document -fc-prototypes-external.
778 2019-05-06 Steven G. Kargl <kargl@gcc.gnu.org>
781 * match.c (gfc_match_stopcode): Check F2008 condition on stop code.
783 2019-05-01 Andrew Benson <abensonca@gmail.com>
785 * module.c (write_module): Initialize module_column before writing
786 module to ensure line break occurs at correct column.
788 2019-05-01 Dominique d'Humieres <dominiq@gcc.gnu.org>
791 * match.c (gfc_match_parens): Change the location for missing ')'.
792 (gfc_match_if): Detect a missing '('. Remove the spurious named
793 constant error. Change the wording of some errors.
794 (gfc_match_else): Change the wording of an error.
795 (gfc_match_elseif): Detect a missing '('. Improve the matching
796 process to get a better syntax analysis.
798 2019-04-19 Steven G. Kargl <kargl@gcc.gnu.org>
801 * decl.c (in_module_or_interface): New function to check that the
802 current state is in a module, submodule, or interface.
803 (gfc_match_prefix): Use it.
805 2019-04-22 Paul Thomas <pault@gcc.gnu.org>
808 * resolve.c (find_array_spec): If this is a class expression
809 and the symbol and component array specs are the same, this is
811 *trans-intrinsic.c (gfc_conv_intrinsic_size): If a class symbol
812 argument, has no namespace, it has come from the interface
813 mapping and the _data component must be accessed directly.
815 2019-04-17 Thomas Schwinge <thomas@codesourcery.com>
818 * openmp.c (gfc_resolve_do_iterator): Handle sharing_clauses for
820 (gfc_resolve_oacc_blocks): Populate sharing_clauses with private
823 2019-04-14 Paul Thomas <pault@gcc.gnu.org>
826 * trans-decl.c (gfc_get_symbol_decl): Assumed shape and assumed
827 rank dummies of bind C procs require deferred initialization.
828 (convert_CFI_desc): New procedure to convert incoming CFI
829 descriptors to gfc types and back again.
830 (gfc_trans_deferred_vars): Call it.
831 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Null the CFI
832 descriptor pointer. Free the descriptor in all cases.
835 * expr.c (is_CFI_desc): New function.
836 (is_subref_array): Tidy up by referencing the symbol directly.
837 * gfortran.h : Prototype for is_CFI_desc.
838 * trans_array.c (get_CFI_desc): New function.
839 (gfc_get_array_span, gfc_conv_scalarized_array_ref,
840 gfc_conv_array_ref): Use it.
841 * trans.c (get_array_span): Extract the span from descriptors
842 that are indirect references.
845 * trans-decl.c (gfc_get_symbol_decl): Make sure that the se
846 expression is a pointer type before converting it to the symbol
848 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Eliminate
849 temporary creation for intent(in).
851 2019-04-13 Dominique d'Humieres <dominiq@gcc.gnu.org>
854 * module.c (gfc_use_module): use complete sentences.
856 2019-04-11 Thomas Koenig <tkoenig@gcc.gnu.org>
859 * frontend-passes.c (B_ERROR): Delete macro.
860 (C_ERROR): Delete macro.
861 (B_ERROR_1): New macro.
862 (C_ERROR_1): New macro.
863 (C_ERROR_2): New macro.
864 (inline_matmul_assign): Use new macros.
865 (call_external_blas): Likewise.
867 2019-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
870 * gfortran.h (gfc_component): Add finalized field.
871 * class.c (finalize_component): If the component is already
872 finalized, return early. Set component->finalized on exit.
874 2019-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
877 * resolve.c (resolve_global_procedure): If the global symbol is an
878 ENTRY, also look up its name among the entries.
880 2019-04-04 Harald Anlauf <anlauf@gmx.de>
883 * check.c (gfc_check_transfer): Reject procedures as actual
884 arguments for SOURCE and MOLD of TRANSFER intrinsic.
886 2019-04-03 Steven G. Kargl <kargl@gcc.gnu.org>
889 * expr.c (gfc_reduce_init_expr): Add extra check to avoid
890 dereferencing a null pointer.
892 2019-04-03 Dominique d'Humieres <dominiq@gcc.gnu.org>
895 * expr.c (comp_pointer): Remove redundant condition.
897 2019-03-31 Harald Anlauf <anlauf@gmx.de>
901 * trans-types.c (gfc_typenode_for_spec): Handle conversion for
903 * target-memory.c (gfc_element_size): Handle size determination
904 for procedure pointers.
906 2019-03-31 Thomas Koenig <tkoenig@gcc.gnu.org>
908 * dump-parse-tree.c (debug): Add for symbol_attribute *,
909 symbol_attribute and gfc_ref * arguments.
911 2019-03-30 Paul Thomas <pault@gcc.gnu.org>
914 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Use the formal
915 argument attributes rather than those of the actual argument.
918 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Call
919 'set_dtype_for_unallocated' for any type of arrayspec.
921 2019-03-27 Janus Weil <janus@gcc.gnu.org>
924 * expr.c (gfc_check_assign_symbol): Reject internal and dummy procedures
925 in procedure pointer initialization.
927 2019-03-27 Paul Thomas <pault@gcc.gnu.org>
930 * expr.c (is_subref_array): Permit substrings to be detected
932 * trans-array.c (get_array_ctor_var_strlen): Obtain the length
933 of deferred length strings. Handle substrings with a NULL end
935 (trans_array_constructor): Remove an unnecessary blank line.
936 (gfc_conv_scalarized_array_ref): Skip to label 'done' if 'decl'
938 (get_array_charlen): If the expression is an array, convert the
939 first element of the constructor and use its string length. Get
940 a new charlen if necessary.
941 (gfc_conv_expr_descriptor): Call 'get_array_charlen' for array
942 constructor expressions. If the ss_info string length is
943 available, use that to set the span of character arrays.
944 * trans-expr.c (gfc_get_expr_charlen): Handle substrings
945 * trans-stmt.c (trans_associate_var): Set the pointer array
946 flag for variable targets and constant array constructors. Take
947 care not to reset the string length or the span in the case of
948 expressions that are not converted as direct by reference.
950 2019-03-25 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
952 * intrinsic.texi (MINLOC): Fix typo in BACK argument documentation.
955 2019-03-24 Thomas Koenig <tkoenig@gcc.gnu.org>
958 * interface.c (compare_actual_formal): Change errors about
959 missing or extra to gfc_error_now to make sure they are issued.
960 Change "spec" to "specifier" in message.
961 * resolve.c (resolve_global_procedure): Also check for mismatching
962 interface with global symbols if the namespace has already been
965 2019-03-21 Thomas Schwinge <thomas@codesourcery.com>
968 * openmp.c (gfc_match_oacc_routine): Set the level of parallelism
970 (gfc_resolve_oacc_routines): Call gfc_add_omp_declare_target.
973 * gfortran.h (gfc_oacc_routine_name): Add loc member.
974 (gfc_resolve_oacc_routines): Declare.
975 * openmp.c (gfc_match_oacc_routine): Move some error checking
977 (gfc_resolve_oacc_routines): ... this new function.
978 * resolve.c (resolve_codes): Call it.
981 * openmp.c (gfc_match_oacc_routine): Clarify.
984 * module.c (verify_OACC_ROUTINE_LOP_NONE): New function.
985 (enum ab_attribute): Add AB_OACC_ROUTINE_LOP_GANG,
986 AB_OACC_ROUTINE_LOP_WORKER, AB_OACC_ROUTINE_LOP_VECTOR,
987 AB_OACC_ROUTINE_LOP_SEQ.
988 (attr_bits): Add these.
989 (mio_symbol_attribute): Handle these.
991 2019-03-20 Janus Weil <janus@gcc.gnu.org>
994 * symbol.c (check_conflict): ABSTRACT attribute conflicts with
997 2019-03-18 Thomas Koenig <tkoeng@gcc.gnu.org>
1000 * iresolve.c: Include trans.h.
1001 (gfc_resolve_fe_runtine_error): Set backend_decl on
1004 2019-03-17 Thomas Koenig <tkoenig@gcc.gnu.org>
1007 * gfortran.h (expr_t): Add EXPR_UNKNOWN.
1008 * expr.c (gfc_copy_expr): Add EXPR_UNKNOWN to switch statement.
1009 (gfc_simplify_expr): Likewise.
1010 * module.c (mio_expr): Likewise.
1011 * resovle.c (extract_compcall_passed_object): Issue error on
1013 (check_typebound_baseobject): Issue error on wrong type.
1014 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Add
1015 EXPR_UNKNOWN to switch statement.
1017 2019-03-16 Jakub Jelinek <jakub@redhat.com>
1020 * scanner.c (load_line): Remove linenum and current_line static
1021 variables, add warned_tabs automatic variable. Use current_file->line
1022 instead of current_line and warned_tabs boolean to avoid diagnosing
1023 tabs multiple times on the same line.
1025 2019-03-16 Thomas Koenig <tkoenig@gcc.gnu.org>
1028 * symbol.c (gfc_add_subroutine): If we are encountering a
1029 subrtoutine within a BLOCK DATA and the name starts with an
1030 underscore, do not check.
1032 2019-03-15 Harald Anlauf <anlauf@gmx.de>
1035 * expr.c (gfc_check_pointer_assign): Correct and improve error
1036 messages for invalid pointer assignments.
1038 2019-03-14 Thomas Koenig <tkoenig@gcc.gnu.org>
1040 * gfortran.texi: Document Q edit descriptor under
1041 "Extensions not implemented in GNU Fortran".
1043 2019-03-13 Harald Anlauf <anlauf@gmx.de>
1046 * trans-expr.c (gfc_trans_pointer_assignment): Move check for same
1047 string length so that we do not get false errors for deferred
1050 2019-03-13 Janus Weil <janus@gcc.gnu.org>
1053 * decl.c (gfc_match_formal_arglist): Reject empty type parameter lists.
1054 (gfc_match_derived_decl): Mark as PDT only if type parameter list was
1055 matched successfully.
1057 2019-03-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1062 * gfortran.h (gfc_symbol): Add bind_c component.
1063 (gfc_get_gsymbol): Add argument bind_c.
1064 * decl.c (add_global_entry): Add bind_c argument to
1066 * parse.c (parse_block_data): Likewise.
1067 (parse_module): Likewise.
1068 (add_global_procedure): Likewise.
1069 (add_global_program): Likewise.
1070 * resolve.c (resolve_common_blocks): Likewise.
1071 (resolve_global_procedure): Likewise.
1072 (gfc_verify_binding_labels): Likewise.
1073 * symbol.c (gfc_get_gsymbol): Add argument bind_c. Set bind_c
1075 * trans-decl.c (gfc_get_module_backend_decl): Add bind_c argument
1077 (gfc_get_extern_function_decl): If the sym has a binding label
1078 and it cannot be found in the global symbol tabel, it is the wrong
1081 2019-03-12 Thomas Koenig <tkoenig@gcc.gnu.org>
1084 * match.c (gfc_match_type_spec): Remove call to
1085 gfc_resolve_expr for character length.
1087 2019-03-12 Martin Liska <mliska@suse.cz>
1089 * decl.c (add_init_expr_to_sym): Replace usage of 'can't'
1091 (variable_decl): Likewise.
1092 (cray_pointer_decl): Likewise.
1093 (match_binding_attributes): Likewise.
1094 * f95-lang.c (gfc_init): Likewise.
1095 * interface.c (gfc_check_typebound_override): Likewise.
1096 * intrinsic.c (make_generic): Likewise.
1097 * module.c (dump_module): Likewise.
1098 (gfc_use_module): Likewise.
1099 * primary.c (gfc_convert_to_structure_constructor): Likewise.
1100 * resolve.c (resolve_entries): Likewise.
1101 (check_generic_tbp_ambiguity): Likewise.
1102 (get_checked_tb_operator_target): Likewise.
1103 * scanner.c (load_file): Likewise.
1104 * trans-expr.c (gfc_conv_intrinsic_to_class): Likewise.
1106 2019-03-12 Paul Thomas <pault@gcc.gnu.org>
1110 * trans-expr.c (set_dtype_for_unallocated): New function.
1111 (gfc_conv_gfc_desc_to_cfi_desc): Call it for allocatable and
1113 (gfc_conv_procedure_call): Likewise. Also, set the ubound of
1114 the final dimension to -1 for assumed rank formal args that are
1115 associated with assumed size arrays.
1116 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Return -1 for
1117 the final dimension of assumed rank entities that are argument
1118 associated with assumed size arrays.
1119 (gfc_conv_intrinsic_shape): Likewise return -1 for the final
1120 dimension of the shape intrinsic.
1122 2019-03-11 Jakub Jelinek <jakub@redhat.com>
1125 * trans-openmp.c (gfc_omp_clause_default_ctor): Set TREE_NO_WARNING
1126 on decl if adding COND_EXPR for allocatable.
1127 (gfc_omp_clause_copy_ctor): Set TREE_NO_WARNING on dest.
1129 2019-03-11 Martin Liska <mliska@suse.cz>
1131 * decl.c (match_record_decl): Wrap an option name
1132 in a string format message and fix GNU coding style.
1133 (gfc_match_pointer): Likewise.
1134 * expr.c (find_array_section): Likewise.
1135 * intrinsic.c (gfc_is_intrinsic): Likewise.
1136 * options.c (gfc_post_options): Likewise.
1137 * primary.c (match_integer_constant): Likewise.
1138 * trans-common.c (translate_common): Likewise.
1140 2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1143 * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
1144 Return false if a scalar tempoary is needed.
1145 (gfc_walk_variable_expr): Fix up class refs.
1147 2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1150 * symbol.c (gfc_add_procedure): Only throw an error if the
1151 procedure has not been declared either PUBLIC or PRIVATE.
1153 2019-03-09 Thomas Koenig <tkoenig@gcc.gnu.org>
1156 * trans-types.c (gfc_typenode_for_spec) Set ts->is_c_interop of
1158 (create_fn_spec): Mark argument as escaping if ts->is_c_interop is set.
1160 2019-03-09 Janus Weil <janus@gcc.gnu.org>
1163 * expr.c (gfc_check_assign_symbol): Deal with procedure pointers to
1164 pointer-valued functions.
1166 2019-03-09 Thomas König <tkoenig@gcc.gnu.org>
1169 * decl.c (add_init_expr_to_sym): Add shape if init has none. Add
1170 asserts that it has to be an EXPR_ARRAY in this case.
1172 2019-03-08 Jakub Jelinek <jakub@redhat.com>
1175 * arith.c (gfc_complex2complex): Avoid two spaces in the middle of
1177 * resolve.c (resolve_allocate_expr): Likewise.
1179 2019-03-06 Harald Anlauf <anlauf@gmx.de>
1182 * expr.c (simplify_const_ref): Avoid null pointer dereference.
1184 2019-03-03 Harald Anlauf <anlauf@gmx.de>
1185 Steven G. Kargl <kargl@gcc.gnu.org>
1188 * symbol.c (check_conflict): Check for valid procedure name
1189 passed to error reporting routine.
1191 2019-03-03 Thomas Koenig <tkoenig@gcc.gnu.org>
1194 * resolve.c (resolve_allocate_expr): Add some tests for coarrays.
1196 2019-03-02 Harald Anlauf <anlauf@gmx.de>
1199 * check.c (gfc_calculate_transfer_sizes): Correct checks for cases
1200 where storage size of elements of MOLD is 0.
1202 2019-02-28 Thomas Schwinge <thomas@codesourcery.com>
1203 Cesar Philippidis <cesar@codesourcery.com>
1207 * openmp.c (gfc_match_oacc_routine): Handle repeated use of the
1208 Fortran OpenACC 'routine' directive.
1211 * gfortran.h (enum oacc_routine_lop): Add OACC_ROUTINE_LOP_ERROR.
1212 * openmp.c (gfc_oacc_routine_lop, gfc_match_oacc_routine): Use it.
1213 * trans-decl.c (add_attributes_to_decl): Likewise.
1217 * openmp.c (gfc_match_oacc_routine): Accept intrinsic symbols.
1219 2019-02-26 Harald Anlauf <anlauf@gmx.de>
1222 * check.c (gfc_calculate_transfer_sizes): Handle cases where
1223 storage size of elements of MOLD is 0.
1225 2019-02-26 Thomas Koenig <tkoenig@gcc.gnu.org>
1228 * trans-types.c (get_formal_from_actual_arglist): If
1229 the actual arglist has no expression, the corresponding
1230 formal arglist is an alternate return.
1232 2019-02-26 Uroš Bizjak <ubizjak@gmail.com>
1234 * invoke.texi (-ffpe-trap): Use @var for every item in the list.
1236 2019-02-26 Jakub Jelinek <jakub@redhat.com>
1239 * trans-array.c (gfc_conv_array_initializer): Use RANGE_EXPR instead
1240 of duplicating the initializer possibly many times.
1242 2019-02-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1245 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Add is_mold
1246 to arguments. If we are dealing with a MOLD, call
1247 gfc_expr_to_initialize().
1248 * trans-stmt.c (gfc_trans_allocate): For MOLD, pass is_mold=true
1249 to gfc_find_and_cut_at_last_class_ref.
1250 * trans.h (gfc_find_and_cut_at_last_class_ref): Add optional
1251 argument is_mold with default false.
1253 2019-02-24 Harald Anlauf <anlauf@gmx.de>
1257 * target-memory.c (gfc_element_size): Return false if element size
1258 cannot be determined; element size is returned separately.
1259 (gfc_target_expr_size): Return false if expression size cannot be
1260 determined; expression size is returned separately.
1261 * target-memory.h: Adjust prototypes.
1262 * check.c (gfc_calculate_transfer_sizes): Adjust references to
1263 gfc_target_expr_size, gfc_element_size.
1264 * arith.c (hollerith2representation): Likewise.
1265 * class.c (find_intrinsic_vtab): Likewise.
1266 * simplify.c (gfc_simplify_sizeof): Likewise.
1268 2019-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1271 * trans-io.c (transfer_expr): Do not return if there are no
1272 components to the derived type or class.
1274 2019-02-23 Paul Thomas <pault@gcc.gnu.org>
1277 * resolve.c (deferred_op_assign): Return if the lhs expression
1278 has the pointer attribute.
1279 * trans-expr.c (gfc_trans_assignment_1): Do not fix the string
1280 length if the lhs expression has the pointer attribute.
1282 2019-02-23 Paul Thomas <pault@gcc.gnu.org>
1286 * decl.c (gfc_verify_c_interop_param): Restriction on string
1287 length being one is lifted for F2018.
1288 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): For scalar
1289 characters with intent in, make a temporary and copy the result
1290 of the expression evaluation into it.
1291 (gfc_conv_procedure_call): Set a flag for character formal args
1292 having a character length that is not unity. If the procedure
1293 is bind C, call gfc_conv_gfc_desc_to_cfi_desc in this case.
1294 Also, extend bind C calls to unconditionally convert both
1295 pointers and allocatable expressions.
1297 2019-02-23 David Malcolm <dmalcolm@redhat.com>
1298 Jakub Jelinek <jakub@redhat.com>
1301 * simplify.c (norm2_do_sqrt, gfc_simplify_norm2): Use
1302 mpfr_number_p && !mpfr_zero_p instead of mpfr_regular_p.
1303 (norm2_add_squared): Likewise. Use mp_exp_t rather than mpfr_exp_t.
1305 2019-02-22 Harald Anlauf <anlauf@gmx.de>
1308 * io.c (gfc_match_open): Fix logic in checks of OPEN statement
1309 when NEWUNIT= is specified.
1311 2019-02-22 Steven G. Kargl <kargl@gcc.gnu.org>
1314 * gfortran.texi: Fix documentation to match the implementation.
1316 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1317 Cesar Philippidis <cesar@codesourcery.com>
1320 * gfortran.h (oacc_routine_lop): New enum.
1321 (symbol_attribute): Use it.
1322 * openmp.c (gfc_oacc_routine_dims): Replace with...
1323 (gfc_oacc_routine_lop): ... this new function.
1324 (gfc_match_oacc_routine): Adjust.
1325 * trans-decl.c (add_attributes_to_decl): Likewise.
1327 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1329 * openmp.c (gfc_match_oacc_declare): Revert earlier changes.
1331 2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1333 * dump-parse-tree.c (debug): Implement for gfc_expr *,
1334 gfc_typespec *, gfc_typespec and gfc_symbol *.
1336 2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1339 * class.c (gfc_get_len_component): Add argument k for kind.
1340 If the kind of the resulting expression is not equal to k,
1342 * gfortran.h (gfc_len_component): Adjust prototype.
1343 * simplify.c (gfc_simplify_len): Pass kind to
1344 gfc_get_len_component.
1346 2019-02-20 Martin Liska <mliska@suse.cz>
1348 * gfortran.texi: Change singular to plural.
1350 2019-02-20 Martin Liska <mliska@suse.cz>
1352 * gfortran.texi: Document Fortran header directive.
1354 2019-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1357 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): If the dummy
1358 argument is contiguous and the actual argument may not be,
1359 use gfc_conv_subref_array_arg.
1361 2019-02-19 Thomas Schwinge <thomas@codesourcery.com>
1364 * openmp.c (gfc_match_omp_clauses): Add representation of wait clause
1365 without argument as 'wait (GOMP_ASYNC_NOVAL)'.
1367 2019-02-18 Thomas Koenig <tkoenig@gcc.gnu.org>
1370 * trans-decl.c (gfc_get_extern_function_decl): Add argument
1371 actual_args and pass it through to gfc_get_function_type.
1372 * trans-expr.c (conv_function_val): Add argument actual_args
1373 and pass it on to gfc_get_extern_function_decl.
1374 (conv_procedure_call): Pass actual arguments to conv_function_val.
1375 * trans-types.c (get_formal_from_actual_arglist): New function.
1376 (gfc_get_function_type): Add argument actual_args. Generate
1377 formal args from actual args if necessary.
1378 * trans-types.h (gfc_get_function_type): Add optional argument.
1379 * trans.h (gfc_get_extern_function_decl): Add optional argument.
1381 2019-02-18 Martin Liska <mliska@suse.cz>
1383 * decl.c (gfc_match_gcc_builtin): Add support for filtering
1384 of builtin directive based on multilib ABI name.
1386 2019-02-17 Harald Anlauf <anlauf@gmx.de>
1389 * resolve.c (resolve_common_blocks,resolve_common_vars): Move
1390 check for obsolent COMMON feature in F2018 to better place.
1392 2019-02-17 Harald Anlauf <anlauf@gmx.de>
1395 * decl.c (gfc_set_constant_character_len): Clear original string
1396 representation after padding has been performed to target length.
1398 2019-02-16 Jakub Jelinek <jakub@redhat.com>
1401 * simplify.c (simplify_transformation_to_array): Run post_op
1402 immediately after processing corresponding row, rather than at the
1404 (norm2_scale): New variable.
1405 (add_squared): Rename to ...
1406 (norm2_add_squared): ... this. Scale down operand and/or result
1408 (do_sqrt): Rename to ...
1409 (norm2_do_sqrt): ... this. Handle the result == e case. Scale up
1410 result and clear norm2_scale.
1411 (gfc_simplify_norm2): Clear norm2_scale. Change add_squared to
1412 norm2_add_squared and &do_sqrt to norm2_do_sqrt. Scale up result
1413 and clear norm2_scale again.
1415 2019-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
1418 * trans-decl.c (generate_coarray_sym_init): For an array
1419 constructor in a DATA statement of a coarray variable, set the
1420 rank to 1 to avoid confusion later on. If the constructor
1421 contains only one value, use that for initiailizig.
1423 2019-02-14 Janne Blomqvist <jb@gcc.gnu.org>
1426 * gfortran.h (gfc_option_t): Make flag_init_integer_value a long.
1427 * options.c (gfc_handle_option): Use strtol instead of atoi.
1428 * invoke.texi: Document -finit-integer behavior in more detail.
1430 2019-02-14 Harald Anlauf <anlauf@gmx.de>
1433 * symbol.c: Move check for labeled DO statement from
1434 gfc_define_st_label to gfc_reference_st_label.
1436 2019-02-14 Cesar Philippidis <cesar@codesourcery.com>
1439 * openmp.c (resolve_oacc_nested_loops): Error on do concurrent
1442 2019-02-13 Martin Liska <mliska@suse.cz>
1445 * resolve.c (resolve_operator): Initialize 't' right
1446 after function entry. Skip switch (e->value.op.op)
1447 for -fdec operands that become function calls.
1449 2019-02-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1452 * expr.c (gfc_check_assign): Add argument is_init_expr. If we are
1453 looking at an init expression, issue error if the target is not a
1454 TARGET and we are not looking at a procedure pointer.
1455 * gfortran.h (gfc_check_assign): Add optional argument
1458 2019-02-09 Harald Anlauf <anlauf@gmx.de>
1461 * resolve.c (gfc_resolve_substring_charlen): Check substring
1462 length for constantness prior to general calculation of length.
1464 2019-02-09 Paul Thomas <pault@gcc.gnu.org>
1467 * trans-array.c (gfc_trans_create_temp_array): Set the 'span'
1468 field for derived types.
1470 2019-02-04 Harald Anlauf <anlauf@gmx.de>
1473 * decl.c (add_init_expr_to_sym): Copy length of string initializer
1476 2019-02-04 Martin Liska <mliska@suse.cz>
1479 * resolve.c (resolve_ref): Remove breakout variable as
1480 we need to prevent prev = &(*prev)->next to happen
1483 2019-02-04 Martin Liska <mliska@suse.cz>
1486 * scanner.c (load_file): Report error for -fpre-include
1487 file and do not ICE.
1489 2019-02-02 Dominique d'Humieres <dominiq@gcc.gnu.org>
1492 * invoke.texi: Document the behavior of repeated -ffpe-trap
1495 2019-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1498 * arith.c (gfc_int2int): Do not warn if src->do_not_warn is set.
1499 * gfortran.h (gfc_expr): Add flag do_not_warn.
1500 * intrinsic.c (gfc_convert_type_warn): Set expr->do_not_warn if
1501 no warning is desired.
1503 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
1506 * trans-expr.c (gfc_conv_procedure_call): For derived entities,
1507 passed in parentheses to class formals, invert the order of
1508 copying allocatable components to taking the _data of the
1511 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
1514 * trans-array.c (gfc_array_init_size): Add element_size to the
1516 (gfc_array_allocate): Remove the recalculation of the size of
1517 the element and use element_size from the call to the above.
1518 Unconditionally set the span field of the descriptor.
1520 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
1523 * expr.c (is_subref_array): Move the check for class pointer
1524 dummy arrays to after the reference check. If we haven't seen
1525 an array reference other than an element and a component is not
1526 class or derived, return false.
1528 2019-02-01 Jakub Jelinek <jakub@redhat.com>
1532 * trans-decl.c (generate_local_decl): Add referenced FL_PARAMETERs
1533 if sym->ns->construct_entities rather than if
1534 sym->ns->parent->code->op == EXEC_BLOCK.
1536 2019-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
1539 * resolve.c (resolve_component): If the reference is a BT_CLASS,
1540 copy the contiguous attribute from the reference and use the
1543 2019-01-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1546 * io.c (match_io): Add check for comma after '*' without subsequent
1549 2019-01-30 Dominique d'Humieres <dominiq@gcc.gnu.org>
1552 * invoke.texi: Document the promotion of double precision
1555 2019-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1558 * interface.c (gfc_compare_types): If a derived type and an
1559 integer both have a derived type, and they are identical,
1560 this is a C binding type and compares equal.
1562 2019-01-26 Harald Anlauf <anlauf@gmx.de>
1565 * expr.c (check_inquiry): Add list of inquiry functions allowed in
1566 constant expressions for F2008+.
1568 2019-01-25 Steven G. Kargl <kargl@gcc.gnu.org>
1571 * decl.c (gfc_match_subroutine): Check for conflict between BIND(C)
1572 and alternative return.
1574 2019-01-24 Paul Thomas <pault@gcc.gnu.org>
1577 * trans-array.c (gfc_conv_descriptor_elem_len): New function.
1578 * trans-array.h : Add prototype for above.
1579 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Take account of
1580 assumed rank arrays being flagged by rank = -1 in expressions.
1581 Intent in arrays need a pointer to a copy of the data to be
1582 assigned to the descriptor passed for conversion. This should
1583 then be freed, together with the CFI descriptor on return from
1586 2019-01-22 Harald Anlauf <anlauf@gmx.de>
1589 * trans-expr.c (gfc_conv_power_op): Handle cases of (2**e) ** integer
1590 and (- 2**e) ** integer.
1592 2019-01-19 Dominique d'Humieres <dominiq@gcc.gnu.org>
1595 * resolve.c (resolve_types): Add !flag_automatic.
1596 * symbol.c (gfc_add_save): Silence warnings.
1598 2019-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
1601 * io.c (match_io_element): input-item cannot be an external function.
1603 2018-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1604 Paul Thomas <pault@gcc.gnu.org>
1607 * trans-expr.c (gfc_conv_procedure_call): Call
1608 gfc_conv_subref_array_arg if the formal arg is contiguous
1609 and the actual arg may not be.
1611 2019-01-17 Thomas Koenig <tkoenig@gcc.gnu.org>
1614 * resolve.c (resolve_ref): Fix logic for removal of
1617 2019-01-19 Jakub Jelinek <jakub@redhat.com>
1620 * trans-decl.c (gfc_get_symbol_decl): Don't add length to function
1621 or parent function if it has been added there already.
1623 2019-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1626 * resolve.c (resolve_array_ref): Add equal_length argument; set it
1627 if the length of the substring equals that of the orignal
1629 (resolve_ref): Remove the substring if it is equal in length to
1630 the original variable, unless it is an EXPR_SUBSTRING).
1632 2019-01-15 Steven G. Kargl <kargl@gcc.gnu.org>
1635 * resolve.c (resolve_symbol): Host associated varaibles can appear
1636 in the specification statement of a RESULT array.
1638 2019-01-15 Paul Thomas <pault@gcc.gnu.org>
1640 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Deal with exprs
1641 that are indirect references; ie. dummy arguments.
1643 2019-01-13 Dominique d'Humieres <dominiq@gcc.gnu.org>
1646 * gfortran.texi: Replace @xref with @ref and adjust the sentence.
1648 2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1651 * trans-array.c (gfc_conv_array_parameter): Do not pack/unpack
1652 functions with contiguous results.
1654 2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1657 * trans-array.c (gfc_conv_array_parameter): Remove TODO. Do not
1658 pack/unpack results of functions which return an explicit-shaped
1659 or allocatable array.
1661 2019-01-12 Steven G. Kargl <kargl@gcc.gnu.org>
1664 * resolve.c (gfc_verify_binding_labels): Break if-elseif-elseif
1665 structure into independent if's with a return to simplify logic.
1666 Avoid a check for ENTRY name with bind(c).
1668 2019-01-12 Paul Thomas <pault@gcc.gnu.org>
1670 * gfortran.texi: Add description in sections on TS 29113 and
1671 further interoperability with C.
1672 * trans-array.c (gfc_conv_descriptor_attribute): New function.
1673 (gfc_get_dataptr_offset): Remove static function attribute.
1674 * trans-array.h: Add prototypes for above functions.
1675 * trans-decl.c: Add declarations for the library functions
1676 cfi_desc_to_gfc_desc and gfc_desc_to_cfi_desc.
1677 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): New function.
1678 (gfc_conv_procedure_call): Call it for scalar and array actual
1679 arguments, when the formal arguments are bind_c with assumed
1680 shape or assumed rank.
1681 * trans.h: External declarations for gfor_fndecl_cfi_to_gfc
1682 and gfor_fndecl_gfc_to_cfi.
1684 2019-01-11 Steven G. Kargl <kargl@gcc.gnu.org>
1687 * decl.c (gfc_match_entry): Check for F2018:C1546. Fix nearby
1690 2019-01-11 Jakub Jelinek <jakub@redhat.com>
1694 * trans-openmp.c: Include attribs.h.
1695 (gfc_walk_alloc_comps, gfc_omp_clause_linear_ctor): Handle
1696 VAR_DECL max bound with "omp dummy var" attribute like NULL or
1697 error_mark_node - recompute number of elts independently.
1699 2019-01-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1702 * trans-array.c (gfc_conv_parameter_array): Temporary
1703 arrays generated for expressions do not need to be repacked.
1705 2019-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
1708 * decl.c (top_var_list): Set locus of expr.
1709 (gfc_match_data): Detect pointer on non-rightmost part-refs.
1711 2019-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
1714 * resolve.c (is_illegal_recursion): Remove an assert().
1716 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
1719 * expr.c: Change "can not" to "cannot".
1721 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
1724 * class.c: Mechanically replace "can not" with "cannot".
1727 * gfc-internals.texi: Likewise.
1728 * intrinsic.texi: Likewise.
1729 * invoke.texi: Likewise.
1731 * match.c: Likewise.
1732 * parse.c: Likewise.
1733 * primary.c: Likewise.
1734 * resolve.c: Likewise.
1735 * symbol.c: Likewise.
1736 * trans-array.c: Likewise.
1737 * trans-decl.c: Likewise.
1738 * trans-intrinsic.c: Likewise.
1739 * trans-stmt.c: Likewise.
1741 2019-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
1744 * simplify.c (gfc_simplify_spread): Also simplify if the
1745 type of source is an EXPR_STRUCTURE.
1747 2019-01-08 Janus Weil <janus@gcc.gnu.org>
1750 * class.c (gfc_find_vtab): For polymorphic typespecs, the components of
1751 the class container may not be available (in case of invalid code).
1753 2019-01-08 Richard Biener <rguenther@suse.de>
1756 * trans-expr.c (gfc_conv_initializer): For ISOCBINDING_NULL_*
1757 directly build the expected GENERIC tree.
1759 2019-01-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1760 Harald Anlauf <anlauf@gmx.de>
1761 Tobias Burnus <burnus@gcc.gnu.org>
1764 * check.c (gfc_check_is_contiguous): New function.
1765 * expr.c (gfc_is_not_contiguous): New function.
1766 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IS_CONTIGUOUS.
1767 Add prototype for gfc_is_not_contiguous.
1768 * intrinsic.c (do_ts29113_check): Add GFC_ISYM_IS_CONTIGUOUS.
1769 (add_function): Add is_contiguous.
1770 * intrinsic.h: Add prototypes for gfc_check_is_contiguous,
1771 gfc_simplify_is_contiguous and gfc_resolve_is_contiguous.
1772 * intrinsic.texi: Add IS_CONTIGUOUS.
1773 * iresolve.c (gfc_resolve_is_contiguous): New function.
1774 * simplify.c (gfc_simplify_is_contiguous): New function.
1775 * trans-decl.c (gfor_fncecl_is_contiguous0): New variable.
1776 (gfc_build_intrinsic_function_decl): Add it.
1777 * trans-intrinsic.c (gfc_conv_intrinsic_is_contiguous): New
1779 (gfc_conv_intrinsic_function): Handle GFC_ISYM_IS_CONTIGUOUS.
1781 2019-01-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1784 * gfortran.h: Add macro gfc_real_4_kind
1785 * simplify.c (simplify_min_max): Special case for the types of
1786 AMAX0, AMIN0, MAX1 and MIN1, which actually change the types of
1789 2019-01-05 Janus Weil <janus@gcc.gnu.org>
1792 * class.c (gfc_find_derived_vtab): Mark the _final component as
1794 (find_intrinsic_vtab): Ditto. Also add an extra check to avoid
1795 dereferencing a null pointer and adjust indentation.
1796 * resolve.c (resolve_fl_variable): Add extra check to avoid
1797 dereferencing a null pointer. Move variable declarations to local scope.
1798 (resolve_fl_procedure): Add extra check to avoid dereferencing a null
1800 * symbol.c (check_conflict): Suppress errors for artificial symbols.
1802 2019-01-01 Steven G. Kargl <kargl@gcc.gnu.org>
1804 * parse.c (decode_statement): Suppress "Unclassifiable statement"
1805 error if previous error messages were emittes.
1807 2019-01-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1810 * primary.c (gfc_convert_to_structure_constructor): If a character
1811 in a constructor is too long, add a warning with
1812 -Wcharacter-truncation.
1814 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1816 Update copyright years.
1818 * gfortranspec.c (lang_specific_driver): Update copyright notice
1820 * gfc-internals.texi: Bump @copying's copyright year.
1821 * gfortran.texi: Ditto.
1822 * intrinsic.texi: Ditto.
1823 * invoke.texi: Ditto.
1825 Copyright (C) 2019 Free Software Foundation, Inc.
1827 Copying and distribution of this file, with or without modification,
1828 are permitted in any medium without royalty provided the copyright
1829 notice and this notice are preserved.