1 2020-07-11 Thomas Koenig <tkoenig@gcc.gnu.org>
4 * frontend-passes.c (check_externals_procedure): Add locus
5 information for new_sym.
6 * interface.c (gfc_check_dummy_characteristics): Do not warn
7 about INTENT for artificially generated variables.
9 2020-07-10 Harald Anlauf <anlauf@gmx.de>
12 * class.c (gfc_add_component_ref, gfc_build_class_symbol):
13 Add checks for NULL pointer dereference.
14 * primary.c (gfc_variable_attr): Likewise.
15 * resolve.c (resolve_variable, resolve_assoc_var)
16 (resolve_fl_var_and_proc, resolve_fl_variable_derived)
17 (resolve_symbol): Likewise.
19 2020-07-10 Harald Anlauf <anlauf@gmx.de>
22 * match.c (gfc_match_select_rank): Catch NULL pointer
24 * resolve.c (resolve_assoc_var): Catch NULL pointer dereference
25 that may occur after an illegal declaration.
27 2020-07-09 Julian Brown <julian@codesourcery.com>
29 * trans-openmp.c (gfc_trans_omp_clauses): Use 'inner' not 'decl' for
30 derived type members which themselves have derived types.
32 2020-07-08 Harald Anlauf <anlauf@gmx.de>
35 * resolve.c (gfc_resolve_code): Check whether assign target is a
38 2020-07-06 Harald Anlauf <anlauf@gmx.de>
41 * match.c (copy_ts_from_selector_to_associate, build_class_sym):
42 Distinguish between unlimited polymorphic and ordinary variables
43 to avoid NULL pointer dereference.
44 * resolve.c (resolve_select_type):
45 Distinguish between unlimited polymorphic and ordinary variables
46 to avoid NULL pointer dereference.
48 2020-07-06 Harald Anlauf <anlauf@gmx.de>
51 * resolve.c (gfc_resolve_code): Check for valid arguments to
54 2020-07-05 Thomas Koenig <tkoenig@gcc.gnu.org>
57 * frontend-passes.c (check_against_globals): New function.
58 (gfc_check_externals): Split; also invoke check_against_globals
60 (gfc_check_externals0): Recursive part formerly in
62 * resolve.c (resolve_global_procedure): Set sym->error on
64 * symbol.c (ambiguous_symbol): Check for, and set sym->error.
66 2020-07-02 Harald Anlauf <anlauf@gmx.de>
69 * resolve.c (resolve_symbol): Avoid NULL pointer dereference.
71 2020-07-02 Harald Anlauf <anlauf@gmx.de>
74 * class.c (gfc_find_derived_vtab): Punt if name is not set.
76 2020-07-02 Mark Eggleston <markeggleston@gcc.gnu.org>
79 * check.c (gfc_invalid_boz): Change array declaration for
82 2020-07-02 Steven G. Kargl <kargl@gcc.gnu.org>
83 Mark Eggleston <markeggleston@gcc.gnu.org>
86 * interface.c (generic_correspondence): Only use the pointer
87 to a symbol if exists.
89 2020-07-01 David Edelsohn <dje.gcc@gmail.com>
91 * check.c (gfc_invalid_boz): Fix bootstrap. Revert
92 Mark hint for translation using _().
94 2020-07-01 Mark Eggleston <markeggleston@gcc.gnu.org>
97 * arith.c (reduce_binary_aa): Mark for translation the string
98 parameter to gfc_check_conformance with G_().
99 * check.c (gfc_invalid_boz): Mark hint for translation using
100 _(). (gfc_check_achar): Mark for translation the message
101 parameter to gfc_invalid_boz using G_(). (gfc_check_char):
102 Mark for translation the message parameter to gfc_invalid_boz
103 using G_(). (gfc_check_complex): Mark for translation the
104 message parameter to gfc_invalid_boz using G_().
105 (gfc_check_float): Mark for translation the message
106 parameter to gfc_invalid_boz using G_(). (check_rest): Mark
107 for translation the string parameter to gfc_check_conformance
108 with _(). (gfc_check_minloc_maxloc): Mark for translation
109 the string parameter to gfc_check_conformance with _().
110 (gfc_check_findloc): Mark for translation the string parameter
111 to gfc_check_conformance with _(). (check_reduction): Mark
112 for translation the string parameter to gfc_check_conformance
113 with _(). (gfc_check_pack): Mark for translation the string
114 parameter to gfc_check_conformance with _().
115 * decl.c (match_old_style_init): Mark for translation the
116 message parameter to gfc_invalid_boz using G_().
117 * expr.c (gfc_check_assign): Mark for translation the string
118 parameter to gfc_check_conformance with _().
119 * intrinsic.c (check_specific): Mark for translation the string
120 parameter to gfc_check_conformance with _().
121 (gfc_check_intrinsic_standard): Mark symstd_msg strings for
122 translation using G_(). No need to mark symstd_msg for
123 translation in call to gfc_warning or when setting symstd.
124 * io.c (check_open_constraints): Mark strings for translation
125 using G_() in all calls to warn_or_error. (match_io_element):
126 Mark for translation the message parameter to gfc_invalid_boz
128 * primary.c (match_boz_constant): Mark for translation the
129 message parameter to gfc_invalid_boz using G_().
130 * resolve.c (resolve_elemental_actual): Mark for translation
131 the string parameter to gfc_check_conformance with _().
132 (resolve_operator): Mark for translation the string parameter
133 to gfc_check_conformance with _(). Mark translation strings
134 assigned to msg using G_() for use in a call to cfg_warning.
136 2020-07-01 Steven G. Kargl <kargl@gcc.gnu.org>
137 Mark Eggleston <markeggleston@gcc.gnu.org>
140 * resolve.c (resolve_elemental_actual): Add code to check for
141 non-optional argument of the same rank. Revise warning message
142 to refer to the Fortran 2018 standard.
144 2020-07-01 Steven G. Kargl <kargl@gcc.gnu.org>
145 Mark Eggleston <markeggleston@gcc.gnu.org>
148 * decl.c (gfc_match_decl_type_spec): Compare with "* ) " instead
151 2020-06-30 Harald Anlauf <anlauf@gmx.de>
154 * resolve.c (resolve_assoc_var): Avoid NULL pointer dereference.
156 2020-06-30 Thomas Koenig <tkoenig@gcc.gnu.org>
159 * gfortran.h (gfc_typename): Add optional argument for_hash.
160 * misc.c (gfc_typename): When for_hash is true, just retur
162 * class.c (gfc_intrinsic_hash_value): Call gfc_typename with
165 2020-06-29 Harald Anlauf <anlauf@gmx.de>
168 * decl.c (gfc_match_data): Avoid NULL pointer dereference.
170 2020-06-29 Thomas Koenig <tkoenig@gcc.gnu.org>
173 * trans-decl.c (gfc_generate_function_code): Do not generate
174 recursion check for compiler-generated procedures.
176 2020-06-29 Harald Anlauf <anlauf@gmx.de>
179 * trans-stmt.c (gfc_trans_sync): Do proper kind conversion in
180 bounds-checking code.
182 2020-06-28 Harald Anlauf <anlauf@gmx.de>
185 * match.c (gfc_match_select_rank): Do not dereference NULL pointer.
187 2020-06-28 Harald Anlauf <anlauf@gmx.de>
190 * symbol.c (gfc_add_type): If sym->ns->proc_name is set, use it,
191 otherwise fall back to sym->name.
193 2020-06-27 Harald Anlauf <anlauf@gmx.de>
196 * resolve.c (resolve_symbol): Avoid NULL pointer dereference.
198 2020-06-25 Harald Anlauf <anlauf@gmx.de>
201 * match.c (select_rank_set_tmp): Enlarge internal buffer used in
202 generating a mangled name.
203 * resolve.c (resolve_select_rank): Likewise.
205 2020-06-25 Harald Anlauf <anlauf@gmx.de>
208 * decl.c (gfc_match_decl_type_spec): Replace a fixed size
209 buffer by a pointer and reallocate if necessary.
211 2020-06-25 Tobias Burnus <tobias@codesourcery.com>
214 * resolve.c (gfc_resolve_substring_charlen): Remove
215 bogus ts.kind setting for the expression.
217 2020-06-25 Tobias Burnus <tobias@codesourcery.com>
218 Kwok Cheung Yeung <kcy@codesourery.com>
221 * trans-openmp.c (gfc_trans_omp_target): Use correct scoping block.
223 2020-06-25 Kwok Cheung Yeung <kcy@codesourcery.com>
225 * trans-openmp.c (gfc_split_omp_clauses): Add if clause
226 to target and simd sub-constructs.
228 2020-06-24 Harald Anlauf <anlauf@gmx.de>
231 * iresolve.c (gfc_get_string): Enlarge internal buffer used in
232 generating the mangled name.
234 2020-06-23 Thomas Koenig <tkoenig@gcc.gnu.org>
237 * dependency.c (ref_same_as_full_array): Handle case of AR_FULL
240 2020-06-23 Steven G. Kargl <kargl@gcc.gnu.org>
241 Mark Eggleston <markeggleston@gcc.gnu.org>
244 * decl.c (gfc_match_implicit): Only perform else branch if
245 the type spect is not BT_DERIVED.
247 2020-06-22 Steven G. Kargl <kargl@gcc.gnu.org>
248 Mark Eggleston <markeggleston@gcc.gnu.org>
251 * intrinsic.c (add_functions): Replace CLASS_INQUIRY with
252 CLASS_TRANSFORMATIONAL for intrinsic num_images.
253 (make_generic): Replace ACTUAL_NO with ACTUAL_YES for
254 intrinsic team_number.
255 * resolve.c (resolve_fl_procedure): Check pointer ts.u.derived
256 exists before using it.
258 2020-06-22 Steven G. Kargl <kargl@gcc.gnu.org>
259 Mark Eggleston <markeggleston@gcc.gnu.org>
262 * check.c (gfc_check_reshape): Add check for a value when
263 the symbol has an attribute flavor FL_PARAMETER.
265 2020-06-22 Mark Eggleston <markeggleston@gcc.gnu.org>
268 * arith.c (gfc_arith_error): Enclose strings in G_() instead
271 2020-06-20 Harald Anlauf <anlauf@gmx.de>
274 * gfortran.h (gfc_common_head): Enlarge buffer.
275 * trans-common.c (gfc_sym_mangled_common_id): Enlarge temporary
276 buffers, and add check on length on mangled name to prevent
279 2020-06-20 Harald Anlauf <anlauf@gmx.de>
282 * iresolve.c (gfc_get_string): Enlarge static buffer size.
284 2020-06-20 Harald Anlauf <anlauf@gmx.de>
287 * class.c (get_unique_type_string): Return a string with dynamic
289 (get_unique_hashed_string, gfc_hash_value): Use dynamic result
290 from get_unique_type_string instead of static buffer.
292 2020-06-20 Harald Anlauf <anlauf@gmx.de>
295 * interface.c (check_sym_interfaces): Enlarge temporary buffer,
296 and add check on length on mangled name to prevent overflow.
298 2020-06-20 Harald Anlauf <anlauf@gmx.de>
301 * match.c (gfc_match_equivalence): Check constraints on
302 EQUIVALENCE objects also for CLASS variables.
304 2020-06-18 Tobias Burnus <tobias@codesourcery.com>
306 * openmp.c (resolve_omp_clauses): Reject vars with
307 allocatable components in OpenMP map clauses.
309 2020-06-16 Tobias Burnus <tobias@codesourcery.com>
311 * parse.c (decode_oacc_directive): Permit 'acc routine' also
312 inside pure procedures.
313 * openmp.c (gfc_match_oacc_routine): Inside pure procedures
314 do not permit gang, worker or vector clauses.
316 2020-06-16 Tobias Burnus <tobias@codesourcery.com>
318 * parse.c (decode_omp_directive): Remove "or ELEMENTAL"
319 from "in PURE" error message also for -fopenmp-simd.
321 2020-06-16 Tobias Burnus <tobias@codesourcery.com>
323 * parse.c (decode_omp_directive): Remove "or ELEMENTAL"
324 from "in PURE" error message.
326 2020-06-14 Thomas Koenig <tkoenig@gcc.gnu.org>
329 * dump-parse-tree.c (gfc_dump_global_symbols): If the symroot is
330 empty, just output "empty".
332 2020-06-14 Harald Anlauf <anlauf@gmx.de>
335 * class.c (get_unique_type_string): Replace use of fixed size
336 buffer by internally passing a pointer to strings.
338 2020-06-14 Thomas Koenig <tkoenig@gcc.gnu.org>
340 * check.c (gfc_check_random_seed): Always use locations
341 from get and put arguments for error messages.
343 2020-06-14 Thomas Koenig <tkoenig@gcc.gnu.org>
346 * class.c (finalize_component): Return early if finalization has
347 already happened for expression and component within namespace.
348 * gfortran.h (gfc_was_finalized): New type.
349 (gfc_namespace): Add member was_finalzed.
350 (gfc_expr): Remove finalized.
351 * symbol.c (gfc_free_namespace): Free was_finalized.
353 2020-06-11 Harald Anlauf <anlauf@gmx.de>
354 Steven G. Kargl <kargl@gcc.gnu.org>
357 * decl.c (access_attr_decl): Use correct symbol in error message.
359 2020-06-11 Steven G. Kargl <kargl@gcc.gnu.org>
360 Harald Anlauf <anlauf@gmx.de>
363 * check.c (invalid_null_arg): Rename to gfc_invalid_null_arg.
364 (gfc_check_associated, gfc_check_kind, gfc_check_merge)
365 (gfc_check_shape, gfc_check_size, gfc_check_spread)
366 (gfc_check_transfer): Adjust.
367 (gfc_check_len_lentrim, gfc_check_trim): Check for NULL() argument.
368 * gfortran.h: Declare gfc_invalid_null_arg ().
369 * intrinsic.c (check_arglist): Check for NULL() argument.
371 2020-06-11 Harald Anlauf <anlauf@gmx.de>
374 * expr.c (gfc_check_pointer_assign): Skip contiguity check of rhs
375 of pointer assignment if lhs cannot be simply contiguous.
377 2020-06-11 José Rui Faustino de Sousa <jrfsousa@gmail.com>
380 * trans-array.c (gfc_conv_array_ref): For class array dummy
381 arguments use the transformed descriptor in sym->backend_decl
382 instead of the original descriptor.
384 2020-06-11 José Rui Faustino de Sousa <jrfsousa@gmail.com>
388 * trans-array.c (gfc_conv_expr_descriptor): Enable the
389 creation of a new descriptor with the correct one based
390 indexing for array sections. Rework array descriptor
391 indexing offset calculation.
393 2020-06-11 José Rui Faustino de Sousa <jrfsousa@gmail.com>
396 * trans-expr.c (gfc_conv_procedure_call): In the case of
397 assumed-size arrays ensure that the reference is to a full array.
399 2020-06-07 Harald Anlauf <anlauf@gmx.de>
402 * class.c (gfc_hash_value): Add cast.
404 2020-06-07 Harald Anlauf <anlauf@gmx.de>
407 * class.c (get_unique_type_string, gfc_hash_value): Enlarge
408 buffers, and check whether the strings returned by
409 get_unique_type_string() fit.
411 2020-06-05 Harald Anlauf <anlauf@gmx.de>
415 * decl.c (gfc_match_decl_type_spec): Enlarge buffer, and enhance
416 string copy to detect buffer overflow.
417 * gfortran.h (gfc_common_head): Enlarge buffer.
418 * trans-common.c (finish_equivalences): Enhance string copy to
419 detect buffer overflow.
421 2020-06-05 Tom Tromey <tromey@adacore.com>
424 * misc.c (gfc_closest_fuzzy_match): Update cutoff value
427 2020-06-04 Steven G. Kargl <kargl@gcc.gnu.org>
428 Harald Anlauf <anlauf@gmx.de>
431 * trans-expr.c (gfc_conv_expr_reference): Do not dereference NULL
434 2020-06-03 José Rui Faustino de Sousa <jrfsousa@gmail.com>
439 * trans-expr.c (gfc_maybe_dereference_var): Add assumed-rank to
440 character dummy arguments list of possible attributes.
442 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
444 * f95-lang.c (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
445 * trans-openmp.c (gfc_omp_predetermined_mapping): New.
446 * trans.h (gfc_omp_predetermined_mapping): Declare.
448 2020-05-31 Thomas Koenig <tkoenig@gcc.gnu.org>
451 * class.c (finalize_component): Use expr->finalized instead of
453 * gfortran.h (gfc_component): Remove finalized member.
454 (gfc_expr): Add it here instead.
456 2020-05-30 Harald Anlauf <anlauf@gmx.de>
459 * primary.c (is_inquiry_ref): Move validity check of inquiry
460 references against selected Fortran standard from here...
461 (gfc_match_varspec) ...to here.
463 2020-05-30 Harald Anlauf <anlauf@gmx.de>
466 * class.c (get_unique_type_string): Use buffer overrun check.
468 2020-05-29 Harald Anlauf <anlauf@gmx.de>
471 * class.c (get_unique_type_string): Enlarge temporary for
472 name-mangling. Use strncpy to prevent buffer overrun.
473 (get_unique_hashed_string): Enlarge temporary.
474 (gfc_hash_value): Enlarge temporary for name-mangling.
476 2020-05-28 Harald Anlauf <anlauf@gmx.de>
479 * primary.c (is_inquiry_ref): Check validity of inquiry
480 references against selected Fortran standard.
482 2020-05-28 Steven G. Kargl <kargl@gcc.gnu.org>
483 Mark Eggleston <markeggleston@gcc.gnu.org>
484 Mark Eggleston <markeggleston@gcc.gnu.org>
487 * match.c (gfc_match_type_spec): New variable ok initialised
488 to true. Set ok with the return value of gfc_reduce_init_expr
489 called only if the expression is not EXPR_CONSTANT and is not
490 EXPR_VARIABLE. Add !ok to the check for type not being integer
491 or the rank being greater than zero.
493 2020-05-27 Harald Anlauf <anlauf@gmx.de>
496 * iresolve.c (gfc_get_string): Enlarge temporary for
499 2020-05-27 Tobias Burnus <tobias@codesourcery.com>
500 Mark Eggleston <markeggleston@gnu.gcc.org>
503 * trans-decl.c (gfc_get_symbol_decl): Remove unnecessary block
504 delimiters. Add auxiliary variables if a label is assigned to
505 a return variable. (gfc_gat_fake_result): If the symbol has an
506 assign attribute set declaration from the symbol's backend
509 2020-05-26 Harald Anlauf <anlauf@gmx.de>
512 * trans-types.c (gfc_get_derived_type): Enlarge temporary to hold
513 mangled name "_caf_symbol".
515 2020-05-26 Alexandre Oliva <oliva@adacore.com>
517 * options.c (gfc_get_option_string): Drop auxbase, add
520 2020-05-24 Harald Anlauf <anlauf@gmx.de>
523 * trans-common.c (gfc_sym_mangled_common_id): Enlarge temporaries
526 2020-05-23 Thomas Koenig <tkoenig@gcc.gnu.org>
529 * libgfortran.h (libgfortran_error_codes): Add
530 LIBERROR_BAD_WAIT_ID.
532 2020-05-20 Mark Eggleston <markeggleston@gcc.gnu.org>
535 * resolve.c (resolve_fl_procedure): Set name depending on
536 whether the result attribute is set. For PROCEDURE/RESULT
537 conflict use the name in sym->ns->proc_name->name.
538 * symbol.c (gfc_add_type): Add check for function and result
539 attributes use sym->ns->proc_name->name if both are set.
540 Where the symbol cannot have a type use the name in
541 sym->ns->proc_name->name.
543 2020-05-18 Harald Anlauf <anlauf@gmx.de>
546 * arith.c (gfc_divide): Revert hunk introduced by patch for
548 * decl.c (variable_decl): Generate error for array shape not being
550 (gfc_get_pdt_instance): Generate error if KIND or LEN expressions
551 in declaration of a PDT instance do not simplify to INTEGER
554 2020-05-15 Tobias Burnus <tobias@codesourcery.com>
557 * openmp.c (resolve_omp_do): Permit more clauses for SIMD
560 2020-05-14 Jakub Jelinek <jakub@redhat.com>
562 * trans-openmp.c: Include function.h.
563 (gfc_trans_omp_target): Set cfun->has_omp_target.
565 2020-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
568 * decl.c (char_len_param_value): Check whether character
569 length expression is of type EXPR_OP and if so simplify it.
570 * resolve.c (resolve_charlen): Reject length if it has a
573 2020-05-13 Tobias Burnus <tobias@codesourcery.com>
576 * openmp.c (OMP_DISTRIBUTE_CLAUSES): Add OMP_CLAUSE_LASTPRIVATE.
577 (gfc_resolve_do_iterator): Skip the private handling for SIMD as
578 that is handled by ME code.
579 * trans-openmp.c (gfc_trans_omp_do): Don't add private/lastprivate
580 for dovar_found == 0, unless !simple.
582 2020-05-11 Harald Anlauf <anlauf@gmx.de>
585 * arith.c (gfc_divide): Do not error out if operand 2 is
586 non-numeric. Defer checks to later stage.
588 2020-05-11 Tobias Burnus <tobias@codesourcery.com>
591 * trans.h (gfc_conv_expr_present): Add use_saved_decl=false argument.
592 * trans-expr.c (gfc_conv_expr_present): Likewise; use DECL directly
593 and only if use_saved_decl is true, use the actual PARAM_DECL arg (saved
595 * trans-array.c (gfc_trans_dummy_array_bias): Set local 'arg.0'
596 variable to NULL if 'arg' is not present.
597 * trans-openmp.c (gfc_omp_check_optional_argument): Simplify by checking
598 'arg.0' instead of the true PARM_DECL.
599 (gfc_omp_finish_clause): Remove setting 'arg.0' to NULL.
601 2020-05-11 Janus Weil <janus@gcc.gnu.org>
602 Dominique d'Humieres <dominiq@lps.ens.fr>
605 * gfortran.h: Rename field resolved as resolve_symbol_called
606 and assign two 2 bits instead of 1.
607 * interface.c (check_dtio_interface1): Use new field name.
608 (gfc_find_typebound_dtio_proc): Use new field name.
609 * resolve.c (gfc_resolve_intrinsic): Replace check of the formal
610 field with resolve_symbol_called is at least 2, if it is not
611 set the field to 2. (resolve_typebound_procedure): Use new field
612 name. (resolve_symbol): Use new field name and check whether it
613 is at least 1, if it is not set the field to 1.
615 2020-05-10 Harald Anlauf <anlauf@gmx.de>
618 * arith.c (gfc_divide): Catch division by zero.
619 (eval_intrinsic_f3): Safeguard for NULL operands.
621 2020-05-05 Steve Kargl <kargl@gcc.gnu.org>
622 Harald Anlauf <anlauf@gmx.de>
625 * check.c (gfc_check_associated, invalid_null_arg): Factorize
626 check for presence of invalid NULL() argument.
627 (gfc_check_kind, gfc_check_merge, gfc_check_shape)
628 (gfc_check_sizeof, gfc_check_spread, gfc_check_transfer): Use this
629 check for presence of invalid NULL() arguments.
631 2020-04-29 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
634 * io.c (check_io_constraints): Initialize local variable num to
635 -1 and assert that it receives a meaningful value by function
636 compare_to_allowed_values.
638 2020-04-27 Thomas Koenig <tkoenig@gcc.gnu.org>
642 * expr.c (gfc_check_pointer_assign): Revert patch for PR 93956.
643 * interface.c: Likewise.
645 2020-04-25 Thomas Koenig <tkoenig@gcc.gnu.org>
648 * trans-expr.c (arrayfunc_assign_needs_temporary): If the
649 LHS is a subref pointer, we also need a temporary.
651 2020-04-23 Thomas Koenig <tkoenig@gcc.gnu.org>
654 * expr.c (gfc_check_pointer_assign): Also set subref_array_pointer
655 when a function returns a pointer.
656 * interface.c (gfc_set_subref_array_pointer_arg): New function.
657 (gfc_procedure_use): Call it.
659 2020-04-22 Fritz Reese <foreese@gcc.gnu.org>
661 * trigd_fe.inc: Use mpfr to compute cosd(30) rather than a host-
662 precision floating point literal based on an invalid macro.
664 2020-04-22 José Rui Faustino de Sousa <jrfsousa@gmail.com>
667 * simplify.c (simplify_bound): In the case of assumed-size arrays
668 check if the reference is to a full array.
670 2020-04-22 Tobias Burnus <tobias@codesourcery.com>
673 * scanner.c (load_line): In fixed form, also treat 'C' as comment and
674 'D'/'d' only with -fd-lines-as-comments. Treat '!$' with -fopenmp,
675 '!$acc' with -fopenacc and '!GCC$' as non-comment to permit <tab>
676 and truncation warnings.
678 2020-04-20 Thomas Koenig <tkoenig@gcc.gnu.org>
680 * dump-parse-tree.c (show_attr): Add numerous flags, some cleanup.
682 2020-04-20 Harald Anlauf <anlauf@gmx.de>
685 * array.c (gfc_set_array_spec): Check for sum of rank and corank
686 not exceeding GFC_MAX_DIMENSIONS.
688 2020-04-20 Steve Kargl <kargl@gcc.gnu.org>
689 Thomas Koenig <tkoenig@gcc.gnu.org>
692 * decl.c (variable_decl): Reject Hollerith constants as type
695 2020-04-19 Thomas Koenig <tkoenig@gcc.gnu.org>
698 * resolve.c (resolve_operator): If both operands are
700 * simplify.c (simplify_bound): If a division by zero
701 was seen during bound simplification, free the
702 corresponcing expression and return &gfc_bad_expr.
704 2020-04-17 Thomas Koenig <tkoenig@gcc.gnu.org>
707 * gfortran.dg (gfc_compare_interfaces): Add
708 optional argument bad_result_characteristics.
709 * interface.c (gfc_check_result_characteristics): Fix
711 (gfc_compare_interfaces): Handle new argument; return
712 true if function return values are wrong.
713 * resolve.c (resolve_global_procedure): Hard error if
714 the return value of a function is wrong.
716 2020-04-15 Fritz Reese <foreese@gcc.gnu.org>
717 Linus Koenig <link@sig-st.de>
720 * simplify.c (simplify_bound): Simplify condition for error check.
722 2020-04-14 Tobias Burnus <tobias@codesourcery.com>
724 * module.c (gfc_match_use): Fix name-conflict check for use-associating
725 the same symbol again in a submodule.
727 2020-04-13 Linus Koenig <link@sig-st.de>
730 * resolve.c (resolve_fl_var_and_proc): Set flag "error" to 1 if
731 pointer is found to not have an assumed rank or a deferred shape.
732 * simplify.c (simplify_bound): If an error has been issued for a
733 given pointer, one should not attempt to find its bounds.
735 2020-04-09 Fritz Reese <foreese@gcc.gnu.org>
738 * gfortran.h (gfc_resolve_open, gfc_resolve_close): Add
740 (gfc_resolve_dt): Add code parameter.
741 * io.c (async_io_dt, check_char_variable, is_char_type): Removed.
742 (resolve_tag_format): Add locus to error message regarding
743 zero-sized array in FORMAT tag.
744 (check_open_constraints, check_close_constraints): New functions
745 called at resolution time.
746 (gfc_match_open, gfc_match_close, match_io): Move checks which don't
747 affect the match result to new functions check_open_constraints,
748 check_close_constraints, check_io_constraints.
749 (gfc_resolve_open, gfc_resolve_close): Call new functions
750 check_open_constraints, check_close_constraints after all tags have
751 been independently resolved. Remove duplicate constraints which are
752 already verified by resolve_tag. Explicitly pass locus to all error
754 (compare_to_allowed_values): Add locus parameter and provide
755 explicit locus all error reports.
756 (match_open_element, match_close_element, match_file_element,
757 match_dt_element, match_inquire_element): Remove redundant special
758 cases for ASYNCHRONOUS and IOMSG tags.
759 (gfc_resolve_dt): Remove redundant special case for format
760 expression. Call check_io_constraints, forwarding an I/O list as
761 the io_code parameter if present.
762 (check_io_constraints): Change return type to bool. Pass explicit
763 locus to error reports. Move generic checks after tag-specific
764 checks, since errors are no longer buffered. Move simplification of
765 format string to match_io. Remove redundant checks which are
766 verified by resolve_tag. Remove usage of async_io_dt flag and
767 explicitly mark symbols used in asynchronous I/O with the
768 asynchronous attribute.
769 * resolve.c (resolve_transfer, resolve_fl_namelist): Remove checks
770 for async_io_dt flag. This is now done in io.c.
771 (check_io_constraints).
772 (gfc_resolve_code): Pass code locus to gfc_resolve_open,
773 gfc_resolve_close, gfc_resolve_dt.
775 2020-04-07 Fritz Reese <foreese@gcc.gnu.org>
776 Steven G. Kargl <kargl@gcc.gnu.org>
779 * gfortran.h (GFC_ISYM_ACOSD, GFC_ISYM_ASIND, GFC_ISYM_ATAN2D,
780 GFC_ISYM_ATAND, GFC_ISYM_COSD, GFC_ISYM_COTAND, GFC_ISYM_SIND,
782 * intrinsic.c (add_functions): Remove check for flag_dec_math.
783 Give degree trig functions simplification and name resolution
784 functions (e.g, gfc_simplify_atrigd () and gfc_resolve_atrigd ()).
785 (do_simplify): Remove special casing of degree trig functions.
786 * intrinsic.h (gfc_simplify_acosd, gfc_simplify_asind,
787 gfc_simplify_atand, gfc_simplify_cosd, gfc_simplify_cotand,
788 gfc_simplify_sind, gfc_simplify_tand, gfc_resolve_trigd2): Add new
790 (gfc_simplify_atrigd, gfc_simplify_trigd, gfc_resolve_cotan,
791 resolve_atrigd): Remove prototypes of deleted functions.
792 * iresolve.c (is_trig_resolved, copy_replace_function_shallow,
793 gfc_resolve_cotan, get_radians, get_degrees, resolve_trig_call,
794 gfc_resolve_atrigd, gfc_resolve_atan2d): Delete functions.
795 (gfc_resolve_trigd, gfc_resolve_trigd2): Resolve to library functions.
796 * simplify.c (rad2deg, deg2rad, gfc_simplify_acosd, gfc_simplify_asind,
797 gfc_simplify_atand, gfc_simplify_atan2d, gfc_simplify_cosd,
798 gfc_simplify_sind, gfc_simplify_tand, gfc_simplify_cotand): New
800 (gfc_simplify_atan2): Fix error message.
801 (simplify_trig_call, gfc_simplify_trigd, gfc_simplify_atrigd,
802 radians_f): Delete functions.
803 * trans-intrinsic.c: Add LIB_FUNCTION decls for sind, cosd, tand.
804 (rad2deg, gfc_conv_intrinsic_atrigd, gfc_conv_intrinsic_cotan,
805 gfc_conv_intrinsic_cotand, gfc_conv_intrinsic_atan2d): New functions.
806 (gfc_conv_intrinsic_function): Handle ACOSD, ASIND, ATAND, COTAN,
808 * trigd_fe.inc: New file. Included by simplify.c to implement
809 simplify_sind, simplify_cosd, simplify_tand with code common to the
810 libgfortran implementation.
812 2020-04-06 Steven G. Kargl <kargl@gcc.gnu.org>
815 * decl.c (gfc_match_data): Handle data matching for derived type
818 2020-04-02 Tobias Burnus <tobias@codesourcery.com>
820 * gfortran.h (gfc_resolve_formal_arglist): Add prototype.
821 * interface.c (check_dtio_interface1): Call it.
822 * resolve.c (gfc_resolve_formal_arglist): Renamed from
823 resolve_formal_arglist, removed static.
824 (find_arglists, resolve_types): Update calls.
826 2020-04-02 Tobias Burnus <tobias@codesourcery.com>
829 * match.c (gfc_match_select_rank): Fix error cleanup.
831 2020-04-02 Steven G. Kargl <kargl@gcc.gnu.org>
834 * check.c (gfc_check_findloc): If the kinds of the arguments
835 differ goto label "incompat".
837 2020-04-02 Steven G. Kargl <kargl@gcc.gnu.org>
840 * resolve.c (resolve_equivalence): Correct formatting
841 around the label "identical_types". Instead of using
842 gfc_resolve_array_spec use is_non_constants_shape_array
843 to determine whether the array can be used in a in an
844 equivalence statement.
846 2020-04-01 Mark Eggleston <mark.eggleston@codethink.com>
849 expr.c (simplify_parameter_variable): Restore code deleted
852 2020-03-28 Paul Thomas <pault@gcc.gnu.org>
855 * arith.c : Remove trailing white space.
856 * expr.c (scalarize_intrinsic_call): Remove the error checking.
857 Make a copy of the expression to be simplified and only replace
858 the original if the simplification succeeds.
860 2020-03-28 Tobias Burnus <tobias@codesourcery.com>
863 * decl.c (gfc_match_submod_proc): Add result var to the
866 2020-03-27 Tobias Burnus <tobias@codesourcery.com>
869 * trans-array.c (gfc_alloc_allocatable_for_assignment): Accept
870 nonallocatable, nonpointer deferred-rank arrays.
872 2020-03-27 Tobias Burnus <tobias@codesourcery.com>
875 * resolve.c (resolve_assoc_var): Reject association to DT and
878 2020-03-25 Steven G. Kargl <kargl@gcc.gnu.org>
881 * match.c (gfc_match_type_spec): Replace gfc_match_init_expr with
882 gfc_match_expr. Return m if m is MATCH_NO or MATCH_ERROR.
884 2020-03-23 Mark Eggleston <mark.eggleston@codethink.com>
885 Steven G. Kargl <kargl@gcc.gnu.org>
888 * expr.c (simplify_parameter_variable): Check whether the ref
889 chain contains INQUIRY_LEN or INQUIRY_KIND and set inquiry
890 boolean. When an empty array has been identified and a new
891 new EXPR_ARRAY expression has been created only return that
892 expression if inquiry is not set. This allows the new
893 expression to drop through to be simplified into a
894 EXPR_CONSTANT representing %kind or %len.
895 * matc.c (gfc_match_assignment): If lvalue doesn't have a
896 symtree free both lvalue and rvalue expressions and return
898 * resolv.c (gfc_resolve_ref): Ensure that code to handle
899 INQUIRY_LEN is only performed for arrays with deferred types.
901 2020-03-18 Jakub Jelinek <jakub@redhat.com>
903 * class.c (generate_finalization_wrapper): Fix up duplicated word
905 * trans-types.c (gfc_get_nodesc_array_type): Likewise.
907 2020-03-17 Jakub Jelinek <jakub@redhat.com>
909 * array.c (gfc_check_iter_variable): Fix up duplicated word issue
911 * arith.c (gfc_arith_concat): Likewise.
912 * resolve.c (gfc_resolve_ref): Likewise.
913 * frontend-passes.c (matmul_lhs_realloc): Likewise.
914 * module.c (gfc_match_submodule, load_needed): Likewise.
915 * trans-expr.c (gfc_init_se): Likewise.
917 2020-03-15 Lewis Hyatt <lhyatt@gmail.com>
919 * lang.opt: Avoid redundancy in the help text.
921 2020-03-12 Tobias Burnus <tobias@codesourcery.com>
924 * openmp.c (gfc_match_oacc_declare): Accept function-result
925 variables; reject variables declared in a different scoping unit.
927 2020-03-08 Paul Thomas <pault@gcc.gnu.org>
930 * resolve.c (gfc_resolve_ref): Modify array refs to be elements
931 if the ref chain ends in INQUIRY_LEN.
932 * trans-array.c (gfc_get_dataptr_offset): Provide the offsets
933 for INQUIRY_RE and INQUIRY_IM.
935 2020-03-05 Steven G. Kargl <kargl@gcc.gnu.org>
938 * decl.c (variable_decl): If param and initializer check
939 for BOZ, if found, output an error, set m to MATCH_ERROR
942 2020-03-02 Andrew Benson <abensonca@gmail.com>
945 * module.c: Increase size of variables used to read module names
946 when loading interfaces from module files to permit cases where
947 the name is the concatenation of a module and submodule name.
948 * gfortran.dg/pr93486.f90: New test.
950 2020-03-01 Paul Thomas <pault@gcc.gnu.org>
953 * match.c (select_type_set_tmp): If the selector array spec has
954 explicit bounds, make the temporary's bounds deferred.
956 2020-03-01 Paul Thomas <pault@gcc.gnu.org>
959 * trans-intrinsic.c (gfc_conv_associated): Eliminate
960 'nonzero_charlen' and move the chunk to evaluate zero character
961 length until after the argument evaluation so that the string
964 2020-02-28 Paul Thomas <pault@gcc.gnu.org>
967 * trans-expr.c (gfc_conv_intrinsic_to_class): Renormalise non-
968 variable expressions to be unity lbound based.
970 2020-02-25 Steven G. Kargl <kargl@gcc.gnu.org>
972 * simplify.c (degrees_f): Remove unused code.
974 2020-02-25 Jakub Jelinek <jakub@redhat.com>
977 * intrinsic.texi (CO_BROADCAST): Fix typo, paramter -> parameter.
978 * trans-array.c (gfc_allocate_pdt_comp, gfc_deallocate_pdt_comp,
979 gfc_check_pdt_dummy): Fix comment typo paramter -> parameter.
981 2020-02-24 Mark Eggleston <mark.eggleston@codethink.com>
982 Steven G. Kargl <kargl@gcc.gnu.org>
985 * decl.c (gfc_match_data) : Check whether the data expression
986 is a derived type and is a constructor. If a BOZ constant
987 is encountered in the constructor output an error and return
990 2020-02-24 Steven G. Kargl <kargl@gcc.gnu.org>
993 * decl.c (gfc_match_data) : Check whether the data expression
994 is a derived type and is a constructor. If a BOZ constant
995 is encountered in the constructor output an error and return
998 2020-02-24 Tobias Burnus <tobias@codesourcery.com>
1001 * match.c (match_exit_cycle): With OpenACC, check the kernels loop
1002 directive and tile clause as well.
1004 2020-02-23 Thomas Koenig <tkoenig@gcc.gnu.org>
1007 * interface.c (compare_parameter): Fix error message.
1009 2020-02-23 Thomas Koenig <tkoenig@gcc.gnu.org>
1012 * interface.c: Replace "can not" by "cannot" and remove trailing
1015 2020-02-20 Tobias Burnus <tobias@codesourcery.com>
1018 * openmp.c (resolve_oacc_loop_blocks): Move call to
1019 resolve_oacc_nested_loops from here ...
1020 (resolve_oacc_loop): ... to here.
1022 2020-02-18 Mark Eggleston <markeggleston@gcc.gnu.org>
1025 * expr.c (gfc_check_pointer_assign): Move check for
1026 matching character length to after checking the lvalue
1027 attributes for target or pointer.
1029 2020-02-18 Steven G. Kargl <kargl@gcc.gnu.org>
1032 * match.c (gfc_match_assignment) : Reject assignment if
1033 the lhs stype is BT_CLASS and the rhs type is BT_BOZ.
1035 2020-02-18 Steven G. Kargl <kargl@gcc.gnu.org>
1038 * match.c (gfc_match_associate) : If target expression
1039 has the type BT_BOZ output an error and goto
1042 2020-02-18 Steven G. Kargl <kargl@gcc.gnu.org>
1043 Mark Eggleston <markeggleston@gcc.gnu.org>
1046 * primary.c (gfc_match_varspec): If the symbol following %
1047 is re or im and the primary expression type is not BT_COMPLEX
1048 issue an error. If the symbol is len and the primary
1049 expression type is not BT_CHARACTER is an error.
1051 2020-02-10 Andrew Benson <abensonca@gmail.com>
1054 * array.c: Do not attempt to set the array spec for a submodule
1055 function symbol (as it has already been set in the corresponding
1056 module procedure interface).
1057 * symbol.c: Do not reject duplicate POINTER, ALLOCATABLE, or
1058 DIMENSION attributes in declarations of a submodule function.
1059 * gfortran.h: Add a macro that tests for a module procedure in a
1061 * gfortran.dg/pr83113.f90: New test.
1063 2020-02-03 Julian Brown <julian@codesourcery.com>
1064 Tobias Burnus <tobias@codesourcery.com>
1066 * cpp.c (cpp_define_builtins): Update _OPENACC define to 201711.
1067 * intrinsic.texi: Update mentions of OpenACC version to 2.6.
1068 * gfortran.texi: Likewise. Remove experimental disclamer for OpenACC.
1069 * invoke.texi: Remove experimental disclamer for OpenACC.
1071 2020-02-03 Tobias Burnus <tobias@codesourcery.com>
1074 * intrinisic.texi (OpenMP Modules OMP_LIB and OMP_LIB_KINDS):
1075 Add undocumented parameters from omp_lib.f90.in.
1077 2020-02-03 Tobias Burnus <tobias@codesourcery.com>
1080 * resolve.c (resolve_assoc_var): Remove too strict check.
1081 * gfortran.dg/associate_51.f90: Update test case.
1083 2020-02-01 Jakub Jelinek <jakub@redhat.com>
1086 * trans-types.c (gfc_get_function_type): Also push boolean_type_node
1087 types for non-character scalar VALUE optional dummy arguments.
1088 * trans-decl.c (create_function_arglist): Skip those in
1089 hidden_typelist. Formatting fix.
1091 2020-01-31 Tobias Burnus <tobias@codesourcery.com>
1094 * frontend-passes.c (gfc_code_walker): For EXEC_OACC_ATOMIC, set
1095 in_omp_atomic to true prevent front-end optimization.
1097 2020-01-30 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1100 * expr.c (gfc_check_conformance): Check vsnprintf for truncation.
1101 * iresolve.c (gfc_get_string): Likewise.
1102 * symbol.c (gfc_new_symbol): Remove check for maximum symbol
1103 name length. Remove redundant 0 setting of new calloc()ed
1106 2020-01-30 Paul Thomas <pault@gcc.gnu.org>
1107 Jakub Jelinek <jakub@redhat.com>
1110 * trans-decl.c (gfc_get_symbol_decl): Call gfc_defer_symbol_init for
1112 (gfc_build_builtin_function_decls): Use ".w." instead of ".ww" or ".wR"
1113 for gfor_fndecl_{cfi_to_gfc,gfc_to_cfi}.
1114 (convert_CFI_desc): Handle references to CFI descriptors.
1116 2020-01-29 Jakub Jelinek <jakub@redhat.com>
1119 * openmp.c (oacc_code_to_statement): Handle
1120 EXEC_OACC_{ROUTINE,UPDATE,WAIT,CACHE,{ENTER,EXIT}_DATA,DECLARE}.
1122 2020-01-28 Andrew Benson <abensonca@gmail.com>
1125 * trans.h: Increase GFC_MAX_MANGLED_SYMBOL_LEN to
1126 GFC_MAX_SYMBOL_LEN*3+5 to allow for inclusion of submodule name,
1127 plus the "." between module and submodule names.
1128 * gfortran.dg/pr93461.f90: New test.
1130 2020-01-28 Andrew Benson <abensonca@gmail.com>
1133 * parse.c: Increase length of char variables to allow them to hold
1134 a concatenated module + submodule name.
1135 * gfortran.dg/pr93473.f90: New test.
1137 2020-01-28 Julian Brown <julian@codesourcery.com>
1140 * openmp.c (resolve_omp_clauses): Check array references for contiguity.
1142 2020-01-28 Julian Brown <julian@codesourcery.com>
1144 * gfortran.h (gfc_symbol): Add comp_mark bitfield.
1145 * openmp.c (resolve_omp_clauses): Disallow mixed component and
1146 full-derived-type accesses to the same variable within a single
1149 2020-01-28 Tobias Burnus <tobias@codesourcery.com>
1152 * openmp.c (gfc_omp_check_optional_argument): Avoid ICE when
1153 DECL_LANG_SPECIFIC and GFC_DESCRIPTOR_TYPE_P but not
1154 GFC_DECL_SAVED_DESCRIPTOR as for local allocatable character vars.
1156 2020-01-28 Tobias Burnus <tobias@codesourcery.com>
1158 * gfortran.texi (Runtime): Remove tailing '.' in @menu.
1160 2020-01-27 Tobias Burnus <tobias@codesourcery.com>
1163 * trans-expr.c (gfc_conv_substring): Handle non-ARRAY_TYPE strings
1164 of Bind(C) procedures.
1166 2020-01-22 Jakub Jelinek <jakub@redhat.com>
1168 * parse.c (parse_omp_structured_block): Handle ST_OMP_TARGET_PARALLEL.
1169 * trans-openmp.c (gfc_trans_omp_target)
1170 <case EXEC_OMP_TARGET_PARALLEL>: Call pushlevel first.
1173 * openmp.c (omp_code_to_statement): Handle remaining EXEC_OMP_*
1176 2020-01-21 Tobias Burnus <tobias@codesourcery.com>
1179 * interface.c (gfc_procedure_use): Also check parent namespace for
1180 'implict none (external)'.
1181 * symbol.c (gfc_get_namespace): Don't set has_implicit_none_export
1182 to parent namespace's setting.
1184 2020-01-19 Thomas König <tkoenig@gcc.gnu.org>
1187 * primary.c (gfc_match_rvalue): Break after setting MATCH_ERROR.
1188 * resolve.c (resolve_function): Issue error when a
1189 function call contains a reference.
1191 2020-01-17 Mark Eggleston <mark.eggleston@codethink.com>
1194 * resolve.c (resolve_types): Declare boolean recursive and set with the
1195 value of the recursive attribute of namespace proc_name symbol
1196 structure if it exists. Call gfc_save_all if both flag_automatic and
1197 recursive are false or ns->save_all is true.
1199 2020-01-16 Tobias Burnus <tobias@codesourcery.com>
1202 * check.c (gfc_invalid_boz): Mention -fallow-invalid-boz
1203 in the error message.
1204 * gfortran.texi (BOZ literal constants): List another missing
1205 extension and refer to -fallow-invalid-boz.
1206 * lang.opt (fallow-invalid-boz): Also mention 'X' in the help text
1207 as it is not covered by the previous wording.
1208 * primary.c (match_boz_constant): Tweak wording such that it is
1209 clear how to fix the nonstandard use.
1211 2020-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
1214 * array.c (empty_constructor): New variable.
1215 (empty_ts): New variable.
1216 (expand_constructor): Save typespec in empty_ts.
1217 Unset empty_constructor if there is an element.
1218 (gfc_expand_constructor): Initialize empty_constructor
1219 and empty_ts. If there was no explicit constructor
1220 type and the constructor is empty, take the type from
1223 2020-01-09 Tobias Burnus <tobias@codesourcery.com>
1226 * array.c (gfc_set_array_spec): Fix shifting of codimensions
1227 when adding a dimension.
1228 * decl.c (merge_array_spec): Ditto. Fix using correct codimensions.
1230 2020-01-07 Jakub Jelinek <jakub@redhat.com>
1233 * trans-openmp.c (gfc_trans_omp_clauses): Check for REF_ARRAY type
1234 before testing u.ar.type == AR_FULL.
1236 2020-01-04 Tobias Burnus <tobias@codesourcery.com>
1239 * trans-expr.c (gfc_conv_procedure_call): Avoid copy-out for nonvariable
1240 arguments to contiguous dummy args. Avoid re-checking whether fsym is
1243 2020-01-03 Tobias Burnus <tobias@codesourcery.com>
1245 * trans-openmp.c (gfc_omp_check_optional_argument): Always return a
1246 Boolean expression; handle unallocated/disassociated actual arguments
1247 as absent if passed to nonallocatable/nonpointer dummy array arguments.
1248 (gfc_build_cond_assign): Change to assume a Boolean expr not a pointer.
1249 (gfc_omp_finish_clause, gfc_trans_omp_clauses): Assign NULL to generated
1250 array-data variable if the argument is absent. Simplify code as
1251 'present' is now a Boolean expression.
1253 2020-01-03 Tobias Burnus <tobias@codesourcery.com>
1256 * primary.c (gfc_match_rvalue): Add some flavor checks
1257 gfc_matching_procptr_assignment.
1258 * resolve.c (resolve_assoc_var): Add more checks for invalid targets.
1260 2020-01-02 Tobias Burnus <tobias@codesourcery.com>
1263 * array.c (gfc_match_array_spec): Fix implied-type matching
1266 2020-01-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1269 * dependency.c (gfc_dep_resolver): Handle REF_INQUIRY in switch
1272 2020-01-01 Jakub Jelinek <jakub@redhat.com>
1274 Update copyright years.
1276 * gfortranspec.c (lang_specific_driver): Update copyright notice
1278 * gfc-internals.texi: Bump @copying's copyright year.
1279 * gfortran.texi: Ditto.
1280 * intrinsic.texi: Ditto.
1281 * invoke.texi: Ditto.
1283 Copyright (C) 2020 Free Software Foundation, Inc.
1285 Copying and distribution of this file, with or without modification,
1286 are permitted in any medium without royalty provided the copyright
1287 notice and this notice are preserved.