1 2021-03-15 Paul Thomas <pault@gcc.gnu.org>
3 Backported from master:
4 2021-03-15 Paul Thomas <pault@gcc.gnu.org>
7 * trans-stmt.c (gfc_trans_allocate): Mark the initialization
8 assignment by setting init_flag.
10 2021-02-26 Harald Anlauf <anlauf@gmx.de>
12 Backported from master:
13 2021-01-14 Harald Anlauf <anlauf@gmx.de>
15 * gfortran.h (gfc_resolve_substring): Add prototype.
16 * primary.c (match_string_constant): Simplify substrings with
17 constant starting and ending points.
18 * resolve.c: Rename resolve_substring to gfc_resolve_substring.
19 (gfc_resolve_ref): Use renamed function gfc_resolve_substring.
21 2021-02-24 Paul Thomas <pault@gcc.gnu.org>
23 Backported from master:
24 2021-02-23 Paul Thomas <pault@gcc.gnu.org>
27 * resolve.c (resolve_fl_procedure): Include class results in
28 the test for F2018, C15100.
29 * trans-array.c (get_class_info_from_ss): Do not use the saved
30 descriptor to obtain the class expression for variables. Use
31 gfc_get_class_from_expr instead.
33 2021-02-23 Harald Anlauf <anlauf@gmx.de>
35 Backported from master:
36 2021-02-21 Harald Anlauf <anlauf@gmx.de>
38 * trans-expr.c (gfc_conv_procedure_call): Do not add clobber to
39 allocatable intent(out) argument.
41 2021-02-11 Paul Thomas <pault@gcc.gnu.org>
43 Backported from master:
44 2021-02-11 Paul Thomas <pault@gcc.gnu.org>
47 * primary.c (gfc_match_varspec): Test for non-null 'previous'
48 before using its name in the error message.
50 2021-01-28 Harald Anlauf <anlauf@gmx.de>
52 Backported from master:
53 2021-01-28 Harald Anlauf <anlauf@gmx.de>
56 * trans.c (gfc_call_malloc): Allocate area of size 1 if passed
57 size is NULL (as documented).
59 2021-01-25 Paul Thomas <pault@gcc.gnu.org>
61 Backported from master:
62 2021-01-25 Steve Kargl <kargl@gcc.gnu.org>
65 * resolve.c (resolve_charlen): Check that length expression is
66 present before testing for scalar/integer..
68 2021-01-25 Paul Thomas <pault@gcc.gnu.org>
70 Backported from master:
71 2020-12-29 Paul Thomas <pault@gcc.gnu.org>
74 * trans-array.c (get_array_ctor_var_strlen): If the character
75 length backend_decl cannot be found, convert the expression and
76 use the string length. Clear up some minor white space issues
77 in the rest of the file.
79 2021-01-23 Paul Thomas <pault@gcc.gnu.org>
81 Backported from master:
82 2020-12-26 Paul Thomas <pault@gcc.gnu.org>
85 * data.c (gfc_assign_data_value): Throw an error for inquiry
86 references. Follow with corrected code that would provide the
87 expected result and provides clean error recovery.
89 2021-01-23 Paul Thomas <pault@gcc.gnu.org>
91 Backported from master:
92 2020-12-12 Paul Thomas <pault@gcc.gnu.org>
95 * data.c (gfc_assign_data_value): Handle inquiry references in
96 the data statement object list.
98 2021-01-19 Tobias Burnus <tobias@codesourcery.com>
100 Backported from master:
101 2020-01-04 Tobias Burnus <tobias@codesourcery.com>
104 * trans-expr.c (gfc_conv_procedure_call): Avoid copy-out for nonvariable
105 arguments to contiguous dummy args. Avoid re-checking whether fsym is
108 2021-01-07 Harald Anlauf <anlauf@gmx.de>
110 Backported from master:
111 2021-01-06 Harald Anlauf <anlauf@gmx.de>
113 * resolve.c (resolve_component): Add check for valid CLASS
114 reference before trying to access CLASS data.
116 2021-01-07 Paul Thomas <pault@gcc.gnu.org>
118 Backported from master:
119 2020-08-02 Paul Thomas <pault@gcc.gnu.org>
122 * primary.c (gfc_match_varspec): In the case that a component
123 reference is added to an intrinsic type component, emit the
124 error message in this function.
126 2021-01-07 Paul Thomas <pault@gcc.gnu.org>
128 Backported from master:
129 2020-12-26 Paul Thomas <pault@gcc.gnu.org>
132 * trans-array.c (gfc_alloc_allocatable_for_assignment): Make
133 sure that class expressions are captured for dummy arguments by
134 use of gfc_get_class_from_gfc_expr otherwise the wrong vptr is
136 * trans-expr.c (gfc_get_class_from_gfc_expr): New function.
137 (gfc_get_class_from_expr): If a constant expression is
138 encountered, return NULL_TREE;
139 (gfc_trans_assignment_1): Deallocate rhs allocatable components
140 after passing derived type function results to class lhs.
141 * trans.h : Add prototype for gfc_get_class_from_gfc_expr.
143 2021-01-07 Paul Thomas <pault@gcc.gnu.org>
145 Backported from master:
146 2020-12-18 Paul Thomas <pault@gcc.gnu.org>
150 * resolve.c (resolve_ordinary_assign): Generate a vtable if
151 necessary for scalar non-polymorphic rhs's to unlimited lhs's.
152 * trans-array.c (get_class_info_from_ss): New function.
153 (gfc_trans_allocate_array_storage): Defer obtaining class
154 element type until all sources of class exprs are tried. Use
155 class API rather than TREE_OPERAND. Look for class expressions
156 in ss->info by calling get_class_info_from_ss. After, obtain
157 the element size for class descriptors. Where the element type
158 is unknown, cast the data as character(len=size) to overcome
159 unlimited polymorphic problems.
160 (gfc_conv_ss_descriptor): Do not fix class variable refs.
161 (build_class_array_ref, structure_alloc_comps): Replace code
162 replicating the new function gfc_resize_class_size_with_len.
163 (gfc_alloc_allocatable_for_assignment): Obtain element size
164 for lhs in cases of deferred characters and class enitities.
165 Move code for the element size of rhs to start of block. Clean
166 up extraction of class parameters throughout this function.
167 After the shape check test whether or not the lhs and rhs
168 element sizes are the same. Use earlier evaluation of
169 'cond_null'. Reallocation of lhs only to happen if size changes
170 or element size changes.
171 * trans-expr.c (gfc_resize_class_size_with_len): New function.
172 (gfc_get_class_from_expr): If a constant expression is
173 encountered, return NULL_TREE;
174 (trans_scalar_class_assign): New function.
175 (gfc_conv_procedure_call): Ensure the vtable is present for
176 passing a non-class actual to an unlimited formal.
177 (trans_class_vptr_len_assignment): For expressions of type
178 BT_CLASS, extract the class expression if necessary. Use a
179 statement block outside the loop body. Ensure that 'rhs' is
180 of the correct type. Obtain rhs vptr in all circumstances.
181 (gfc_trans_scalar_assign): Call trans_scalar_class_assign to
182 make maximum use of the vptr copy in place of assignment.
183 (trans_class_assignment): Actually do reallocation if needed.
184 (gfc_trans_assignment_1): Simplify some of the logic with
185 'realloc_flag'. Set 'vptr_copy' for all array assignments to
186 unlimited polymorphic lhs.
187 * trans.c (gfc_build_array_ref): Call gfc_resize_class_size_
188 with_len to correct span for unlimited polymorphic decls.
189 * trans.h : Add prototype for gfc_resize_class_size_with_len.
191 2021-01-06 Tobias Burnus <tobias@codesourcery.com>
193 Backported from master:
194 2020-04-14 Tobias Burnus <tobias@codesourcery.com>
196 * module.c (gfc_match_use): Fix name-conflict check for use-associating
197 the same symbol again in a submodule.
199 2021-01-04 Harald Anlauf <anlauf@gmx.de>
201 Backported from master:
202 2021-01-01 Harald Anlauf <anlauf@gmx.de>
204 * class.c (gfc_find_vtab): Add check on attribute is_class.
206 2021-01-04 Tobias Burnus <tobias@codesourcery.com>
208 Backported from master:
209 2020-12-17 Tobias Burnus <tobias@codesourcery.com>
212 * match.c (gfc_match_assignment): Move gfc_find_vtab call from here ...
213 * resolve.c (gfc_resolve_code): ... to here.
215 2021-01-04 Paul Thomas <pault@gcc.gnu.org>
218 * interface.c (gfc_check_dummy_characteristics): If a module
219 procedure arrives with assumed shape in the interface and
220 deferred shape in the procedure itself, update the latter and
221 copy the lower bounds.
223 2021-01-04 Paul Thomas <pault@gcc.gnu.org>
226 * expr.c (scalarize_intrinsic_call): Remove the error checking.
227 Make a copy of the expression to be simplified and only replace
228 the original if the simplification succeeds.
230 2020-12-29 Harald Anlauf <anlauf@gmx.de>
232 Backported from master:
233 2020-12-25 Harald Anlauf <anlauf@gmx.de>
235 * data.c (gfc_assign_data_value): Restrict use of
236 create_character_initializer to constant initializers.
237 * trans-expr.c (gfc_conv_initializer): Ensure that character
238 initializer is constant, otherwise fall through to get the same
239 error handling as for non-character cases.
241 2020-12-28 Paul Thomas <pault@gcc.gnu.org>
243 Backported from master:
244 2020-08-20 Paul Thomas <pault@gcc.gnu.org>
248 * trans-array.c (get_array_charlen): Tidy up the evaluation of
249 the string length for array constructors. Avoid trailing array
250 references. Ensure string lengths of deferred length components
251 are set. For parentheses operator apply string length to both
252 the primary expression and the enclosed expression.
254 2020-12-23 Harald Anlauf <anlauf@gmx.de>
256 Backported from master:
257 2020-12-17 Harald Anlauf <anlauf@gmx.de>
260 * trans-stmt.c (check_forall_dependencies): Extend dependency
261 check to allocatable components of derived types.
263 2020-12-11 Harald Anlauf <anlauf@gmx.de>
265 Backported from master:
266 2020-11-29 Harald Anlauf <anlauf@gmx.de>
268 * expr.c (simplify_parameter_variable): Fix up character length
269 after copying an array-valued expression.
271 2020-12-04 Harald Anlauf <anlauf@gmx.de>
273 Backported from master:
274 2020-12-03 Harald Anlauf <anlauf@gmx.de>
277 * decl.c (gfc_match_function_decl): Avoid NULL pointer dereference.
278 (gfc_match_subroutine): Likewise.
280 2020-11-12 Tobias Burnus <tobias@codesourcery.com>
282 Backported from master:
283 2020-11-10 Tobias Burnus <tobias@codesourcery.com>
286 * trans-decl.c (gfc_get_symbol_decl): Do not (re)set the location
287 of an external procedure.
288 (build_entry_thunks, generate_coarray_init, create_main_function,
289 gfc_generate_function_code): Use fndecl's location in BIND_EXPR.
291 2020-11-06 Tobias Burnus <tobias@codesourcery.com>
293 Backported from master:
294 2020-11-06 Tobias Burnus <tobias@codesourcery.com>
297 * module.c (mio_symbol): Fix symbol name for pdt_type.
299 2020-10-08 Harald Anlauf <anlauf@gmx.de>
301 Backported from master:
302 2020-10-04 Harald Anlauf <anlauf@gmx.de>
305 * trans-intrinsic.c (strip_kind_from_actual): Helper function for
306 removal of KIND argument.
307 (gfc_conv_intrinsic_minmaxloc): Ignore KIND argument here, as it
308 is treated elsewhere.
310 2020-09-28 Mark Eggleston <markeggleston@gcc.gnu.org>
313 2020-09-27 Steven G. Kargl <kargl@gcc.gnu.org>
314 Mark Eggleston <markeggleston@gcc.gnu.org>
317 * decl.c (gfc_get_common): Use gfc_match_common_name instead
318 of match_common_name.
319 * decl.c (gfc_bind_idents): Use gfc_match_common_name instead
320 of match_common_name.
321 * match.c : Rename match_common_name to gfc_match_common_name.
322 * match.c (gfc_match_common): Use gfc_match_common_name instead
323 of match_common_name.
324 * match.h : Rename match_common_name to gfc_match_common_name.
325 * resolve.c (resolve_common_vars): Check each symbol in a
326 common block has a global symbol. If there is a global symbol
327 issue an error if the symbol type is known as is not a common
330 2020-09-27 Mark Eggleston <markeggleston@gcc.gnu.org>
332 Backported from master:
333 2020-09-27 Steven G. Kargl <kargl@gcc.gnu.org>
334 Mark Eggleston <markeggleston@gcc.gnu.org>
337 * decl.c (gfc_get_common): Use gfc_match_common_name instead
338 of match_common_name.
339 * decl.c (gfc_bind_idents): Use gfc_match_common_name instead
340 of match_common_name.
341 * match.c : Rename match_common_name to gfc_match_common_name.
342 * match.c (gfc_match_common): Use gfc_match_common_name instead
343 of match_common_name.
344 * match.h : Rename match_common_name to gfc_match_common_name.
345 * resolve.c (resolve_common_vars): Check each symbol in a
346 common block has a global symbol. If there is a global symbol
347 issue an error if the symbol type is known as is not a common
350 2020-09-19 Tobias Burnus <tobias@codesourcery.com>
352 Backported from master:
353 2020-09-17 Tobias Burnus <tobias@codesourcery.com>
357 * decl.c (gfc_match_submod_proc): Avoid later double-free
360 2020-09-19 Harald Anlauf <anlauf@gmx.de>
362 Backported from master:
363 2020-07-02 Harald Anlauf <anlauf@gmx.de>
366 * resolve.c (resolve_symbol): Avoid NULL pointer dereference.
368 2020-09-08 Thomas Koenig <tkoenig@gcc.gnu.org>
370 Backported from master:
371 2020-09-08 Thomas Koenig <tkoenig@gcc.gnu.org>
373 * intrinsic.texi: Fix description of FINDLOC result.
375 2020-08-27 Mark Eggleston <markeggleston@gcc.gnu.org>
377 Backported from master:
378 2020-08-27 Mark Eggleston <markeggleston@gcc.gnu.org>
381 * decl.c (char_len_param_value): Check gfc_seen_div0 and
382 if it is set return MATCH_ERROR.
384 2020-07-27 Mark Eggleston <markeggleston@gcc.gnu.org>
386 Backported from master:
387 2020-07-14 Steven G. Kargl <kargl@gcc.gnu.org>
388 Mark Eggleston <markeggleston@gcc.gnu.org>
391 * expr.c (gfc_check_pointer_assigb): Output an error if
392 rvalue is a zero sized array or output an error if rvalue
393 doesn't have a symbol tree.
395 2020-07-26 Mark Eggleston <markeggleston@gcc.gnu.org>
397 Backported from master:
398 2020-06-22 Steven G. Kargl <kargl@gcc.gnu.org>
399 Mark Eggleston <markeggleston@gcc.gnu.org>
402 * check.c (gfc_check_reshape): Add check for a value when
403 the symbol has an attribute flavor FL_PARAMETER.
405 2020-07-23 Harald Anlauf <anlauf@gmx.de>
407 Backported from master:
408 2020-07-21 Harald Anlauf <anlauf@gmx.de>
411 * trans-decl.c (gfc_get_extern_function_decl): Check whether a
412 symbol belongs to a different module.
414 2020-07-23 Thomas Koenig <tkoenig@gcc.gnu.org>
417 * frontend-passes.c (gfc_check_externals): Adjust formatting.
418 (implicit_pure_call): New function.
419 (implicit_pure_expr): New function.
420 (gfc_fix_implicit_pure): New function.
421 * gfortran.h (gfc_fix_implicit_pure): New prototype.
422 * parse.c (translate_all_program_units): Call gfc_fix_implicit_pure.
424 2020-07-23 Thomas Koenig <tkoenig@gcc.gnu.org>
426 Backported from master:
427 2020-07-19 Thomas Koenig <tkoenig@gcc.gnu.org>
430 * dump-parse-tree.c (get_c_type_name): Always use the entries from
431 c_interop_kinds_table to find the correct C type.
433 2020-07-08 Harald Anlauf <anlauf@gmx.de>
435 Backported from master:
436 2020-07-06 Harald Anlauf <anlauf@gmx.de>
439 * resolve.c (gfc_resolve_code): Check for valid arguments to
442 2020-07-07 Harald Anlauf <anlauf@gmx.de>
444 Backported from master:
445 2020-07-02 Harald Anlauf <anlauf@gmx.de>
448 * class.c (gfc_find_derived_vtab): Punt if name is not set.
450 2020-07-05 Harald Anlauf <anlauf@gmx.de>
452 Backported from master:
453 2020-06-30 Harald Anlauf <anlauf@gmx.de>
456 * resolve.c (resolve_assoc_var): Avoid NULL pointer dereference.
458 2020-07-01 Harald Anlauf <anlauf@gmx.de>
460 Backported from master:
461 2020-06-29 Harald Anlauf <anlauf@gmx.de>
464 * trans-stmt.c (gfc_trans_sync): Do proper kind conversion in
465 bounds-checking code.
467 2020-07-01 Harald Anlauf <anlauf@gmx.de>
469 Backported from master:
470 2020-06-28 Harald Anlauf <anlauf@gmx.de>
473 * symbol.c (gfc_add_type): If sym->ns->proc_name is set, use it,
474 otherwise fall back to sym->name.
476 2020-07-01 Mark Eggleston <markeggleston@gcc.gnu.org>
478 Backported from master:
479 2020-07-01 Steven G. Kargl <kargl@gcc.gnu.org>
480 Mark Eggleston <markeggleston@gcc.gnu.org>
483 * decl.c (gfc_match_decl_type_spec): Compare with "* ) " instead
486 2020-06-30 Thomas Koenig <tkoenig@gcc.gnu.org>
488 Backported from master:
489 2020-06-29 Thomas Koenig <tkoenig@gcc.gnu.org>
492 * trans-decl.c (gfc_generate_function_code): Do not generate
493 recursion check for compiler-generated procedures.
495 2020-06-27 Harald Anlauf <anlauf@gmx.de>
497 Backported from master:
498 2020-06-27 Harald Anlauf <anlauf@gmx.de>
501 * resolve.c (resolve_symbol): Avoid NULL pointer dereference.
503 2020-06-24 Harald Anlauf <anlauf@gmx.de>
506 * interface.c (check_sym_interfaces): Enlarge temporary buffer,
507 and add check on length on mangled name to prevent overflow.
509 2020-06-23 Harald Anlauf <anlauf@gmx.de>
511 Backported from master:
512 2020-06-20 Harald Anlauf <anlauf@gmx.de>
515 * interface.c (check_sym_interfaces): Enlarge temporary buffer,
516 and add check on length on mangled name to prevent overflow.
518 2020-06-23 Harald Anlauf <anlauf@gmx.de>
520 Backported from master:
521 2020-06-20 Harald Anlauf <anlauf@gmx.de>
524 * match.c (gfc_match_equivalence): Check constraints on
525 EQUIVALENCE objects also for CLASS variables.
527 2020-06-23 Mark Eggleston <markeggleston@gcc.gnu.org>
529 Backported from master:
530 2020-06-22 Steven G. Kargl <kargl@gcc.gnu.org>
531 Mark Eggleston <markeggleston@gcc.gnu.org>
534 * intrinsic.c (add_functions): Replace CLASS_INQUIRY with
535 CLASS_TRANSFORMATIONAL for intrinsic num_images.
536 (make_generic): Replace ACTUAL_NO with ACTUAL_YES for
537 intrinsic team_number.
538 * resolve.c (resolve_fl_procedure): Check pointer ts.u.derived
539 exists before using it.
541 2020-06-14 Harald Anlauf <anlauf@gmx.de>
544 * expr.c (gfc_check_pointer_assign): Skip contiguity check of rhs
545 of pointer assignment if lhs cannot be simply contiguous.
547 2020-06-14 Thomas Koenig <tkoenig@gcc.gnu.org>
550 * class.c (finalize_component): Return early if finalization has
551 already happened for expression and component within namespace.
552 * gfortran.h (gfc_was_finalized): New type.
553 (gfc_namespace): Add member was_finalzed.
554 (gfc_expr): Remove finalized.
555 * symbol.c (gfc_free_namespace): Free was_finalized.
557 2020-06-11 Harald Anlauf <anlauf@gmx.de>
558 Steven G. Kargl <kargl@gcc.gnu.org>
561 * decl.c (access_attr_decl): Use correct symbol in error message.
563 2020-06-11 Harald Anlauf <anlauf@gmx.de>
566 * class.c (gfc_hash_value): Add cast.
568 2020-06-11 Harald Anlauf <anlauf@gmx.de>
571 * class.c (get_unique_type_string, gfc_hash_value): Enlarge
572 buffers, and check whether the strings returned by
573 get_unique_type_string() fit.
575 2020-06-05 Harald Anlauf <anlauf@gmx.de>
578 * primary.c (is_inquiry_ref): Move validity check of inquiry
579 references against selected Fortran standard from here...
580 (gfc_match_varspec) ...to here.
582 2020-06-05 Harald Anlauf <anlauf@gmx.de>
585 * primary.c (is_inquiry_ref): Check validity of inquiry
586 references against selected Fortran standard.
588 2020-06-05 Harald Anlauf <anlauf@gmx.de>
591 * trans-common.c (gfc_sym_mangled_common_id): Enlarge temporaries
594 2020-06-05 Harald Anlauf <anlauf@gmx.de>
598 * decl.c (gfc_match_decl_type_spec): Enlarge buffer, and enhance
599 string copy to detect buffer overflow.
600 * gfortran.h (gfc_common_head): Enlarge buffer.
601 * trans-common.c (finish_equivalences): Enhance string copy to
602 detect buffer overflow.
604 2020-06-05 Steven G. Kargl <kargl@gcc.gnu.org>
605 Harald Anlauf <anlauf@gmx.de>
608 * trans-expr.c (gfc_conv_expr_reference): Do not dereference NULL
611 2020-06-01 Thomas Koenig <tkoenig@gcc.gnu.org>
614 * class.c (finalize_component): Use expr->finalized instead of
616 * gfortran.h (gfc_component): Remove finalized member.
617 (gfc_expr): Add it here instead.
619 2020-05-28 Steven G. Kargl <kargl@gcc.gnu.org>
620 Mark Eggleston <markeggleston@gcc.gnu.org>
621 Mark Eggleston <markeggleston@gcc.gnu.org>
624 * match.c (gfc_match_type_spec): New variable ok initialised
625 to true. Set ok with the return value of gfc_reduce_init_expr
626 called only if the expression is not EXPR_CONSTANT and is not
627 EXPR_VARIABLE. Add !ok to the check for type not being integer
628 or the rank being greater than zero.
630 2020-05-28 Tobias Burnus <tobias@codesourcery.com>
631 Mark Eggleston <markeggleston@gnu.gcc.org>
634 * trans-decl.c (gfc_get_symbol_decl): Remove unnecessary block
635 delimiters. Add auxiliary variables if a label is assigned to
636 a return variable. (gfc_gat_fake_result): If the symbol has an
637 assign attribute set declaration from the symbol's backend
640 2020-05-27 Thomas Koenig <tkoenig@gcc.gnu.org>
643 * libgfortran.h (libgfortran_error_codes): Add
644 LIBERROR_BAD_WAIT_ID.
646 2020-05-20 Mark Eggleston <markeggleston@gcc.gnu.org>
649 * resolve.c (resolve_fl_procedure): Set name depending on
650 whether the result attribute is set. For PROCEDURE/RESULT
651 conflict use the name in sym->ns->proc_name->name.
652 * symbol.c (gfc_add_type): Add check for function and result
653 attributes use sym->ns->proc_name->name if both are set.
654 Where the symbol cannot have a type use the name in
655 sym->ns->proc_name->name.
657 2020-05-13 Mark Eggleston <markeggleston@gcc.gnu.org>
659 Backported from master
660 2020-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
663 * decl.c (char_len_param_value): Check whether character
664 length expression is of type EXPR_OP and if so simplify it.
665 * resolve.c (resolve_charlen): Reject length if it has a
668 2020-05-11 Mark Eggleston <markeggleston@gcc.gnu.org>
670 Backported from mainline
671 2020-05-11 Janus Weil <janus@gcc.gnu.org>
672 Dominique d'Humieres <dominiq@lps.ens.fr>
675 * gfortran.h: Rename field resolved as resolve_symbol_called
676 and assign two 2 bits instead of 1.
677 * interface.c (gfc_find_typebound_dtio_proc): Use new field name.
678 * resolve.c (gfc_resolve_intrinsic): Replace check of the formal
679 field with resolve_symbol_called is at least 2, if it is not
680 set the field to 2. (resolve_typebound_procedure): Use new field
681 name. (resolve_symbol): Use new field name and check whether it
682 is at least 1, if it is not set the field to 1.
684 2020-05-04 Tobias Burnus <tobias@codesourcery.com>
686 Backport from mainline.
687 2020-03-08 Paul Thomas <pault@gcc.gnu.org>
690 * resolve.c (gfc_resolve_ref): Modify array refs to be elements
691 if the ref chain ends in INQUIRY_LEN.
692 * trans-array.c (gfc_get_dataptr_offset): Provide the offsets
693 for INQUIRY_RE and INQUIRY_IM.
695 2020-04-27 Thomas Koenig <tkoenig@gcc.gnu.org>
699 * expr.c (gfc_check_pointer_assign): Revert patch for PR 93956.
700 * interface.c: Likewise.
702 2020-04-24 Thomas Koenig <tkoenig@gcc.gnu.org>
706 * expr.c (gfc_check_pointer_assign): Also set subref_array_pointer
707 when a function returns a pointer.
708 * interface.c (gfc_set_subref_array_pointer_arg): New function.
709 (gfc_procedure_use): Call it.
711 2020-04-20 Harald Anlauf <anlauf@gmx.de>
713 Backport from mainline.
715 * array.c (gfc_set_array_spec): Check for sum of rank and corank
716 not exceeding GFC_MAX_DIMENSIONS.
718 2020-04-14 Thomas Koenig <tkoenig@gcc.gnu.org>
722 * trans-decl.c (generate_local_decl): Do not warn if the
725 2020-04-06 Fritz Reese <foreese@gcc.gnu.org>
728 Steven G. Kargl <kargl@gcc.gnu.org>
731 * decl.c (gfc_match_data): Handle data matching for derived type
734 2020-04-02 Mark Eggleston <markeggleston@gcc.gnu.org>
737 Steven G. Kargl <kargl@gcc.gnu.org>
740 * check.c (gfc_check_findloc): If the kinds of the arguments
741 differ goto label "incompat".
743 2020-04-02 Mark Eggleston <markeggleston@gcc.gnu.org>
746 2020-04-02 Steven G. Kargl <kargl@gcc.gnu.org>
749 * resolve.c (resolve_equivalence): Correct formatting
750 around the label "identical_types". Instead of using
751 gfc_resolve_array_spec use is_non_constants_shape_array
752 to determine whether the array can be used in a in an
753 equivalence statement.
755 2020-03-28 Tobias Burnus <tobias@codesourcery.com>
757 Backport from mainline
758 2020-03-28 Tobias Burnus <tobias@codesourcery.com>
761 * decl.c (gfc_match_submod_proc): Add result var to the
764 2020-03-25 Mark Eggleston <markeggleston@gcc.gnu.org>
767 2020-03-25 Mark Eggleston <markeggleston@gcc.gnu.org>
770 * match.c (gfc_match_type_spec): Replace gfc_match_init_expr with
771 gfc_match_expr. Return m if m is MATCH_NO or MATCH_ERROR.
773 2020-03-12 Release Manager
775 * GCC 9.3.0 released.
777 2020-03-05 Paul Thomas <pault@gcc.gnu.org>
781 * match.c (select_type_set_tmp): Variable 'selector' to replace
782 select_type_stack->selector. If the selector array spec has
783 explicit bounds, make the temporary's bounds deferred.
785 2020-02-19 Mark Eggleston <markeggleston@gcc.gnu.org>
787 Backported from mainline
788 2020-02-18 Mark Eggleston <markeggleston@gcc.gnu.org>
791 * expr.c (gfc_check_pointer_assign): Move check for
792 matching character length to after checking the lvalue
793 attributes for target or pointer.
795 2020-02-18 Mark Eggleston <markeggleston@gcc.gnu.org>
797 Backported from mainline
798 2020-02-18 Steven G. Kargl <kargl@gcc.gnu.org>
799 Mark Eggleston <markeggleston@gcc.gnu.org>
802 * primary.c (gfc_match_varspec): If the symbol following %
803 is re or im and the primary expression type is not BT_COMPLEX
804 issue an error. If the symbol is len and the primary
805 expression type is not BT_CHARACTER is an error.
807 2020-02-13 Jakub Jelinek <jakub@redhat.com>
809 Backported from mainline
810 2020-01-29 Jakub Jelinek <jakub@redhat.com>
813 * openmp.c (oacc_code_to_statement): Handle
814 EXEC_OACC_{ROUTINE,UPDATE,WAIT,CACHE,{ENTER,EXIT}_DATA,DECLARE}.
816 2020-02-03 Tobias Burnus <tobias@codesourcery.com>
818 Backported from mainline
819 2020-02-03 Tobias Burnus <tobias@codesourcery.com>
822 * intrinisic.texi (OpenMP Modules OMP_LIB and OMP_LIB_KINDS):
823 Add undocumented parameters from omp_lib.f90.in.
825 2020-02-03 Tobias Burnus <tobias@codesourcery.com>
827 Backported from mainline
828 2020-01-31 Tobias Burnus <tobias@codesourcery.com>
831 * frontend-passes.c (gfc_code_walker): For EXEC_OACC_ATOMIC, set
832 in_omp_atomic to true prevent front-end optimization.
834 2020-02-03 Tobias Burnus <tobias@codesourcery.com>
836 Backported from mainline
837 2020-01-21 Tobias Burnus <tobias@codesourcery.com>
840 * interface.c (gfc_procedure_use): Also check parent namespace for
841 'implict none (external)'.
842 * symbol.c (gfc_get_namespace): Don't set has_implicit_none_export
843 to parent namespace's setting.
845 2020-01-22 Jakub Jelinek <jakub@redhat.com>
847 * parse.c (parse_omp_structured_block): Handle ST_OMP_TARGET_PARALLEL.
848 * trans-openmp.c (gfc_trans_omp_target)
849 <case EXEC_OMP_TARGET_PARALLEL>: Call pushlevel first.
852 * openmp.c (omp_code_to_statement): Handle remaining EXEC_OMP_*
855 2020-01-17 Mark Eggleston <mark.eggleston@codethink.com>
857 Backport from mainline
858 Mark Eggleston <mark.eggleston@codethink.com>
861 * resolve.c (resolve_types): Declare boolean recursive and set with the
862 value of the recursive attribute of namespace proc_name symbol
863 structure if it exists. Call gfc_save_all if both flag_automatic and
864 recursive are false or ns->save_all is true.
866 2020-01-10 Tobias Burnus <tobias@codesourcery.com>
868 Backported from mainline
869 2020-01-09 Tobias Burnus <tobias@codesourcery.com>
872 * array.c (gfc_set_array_spec): Fix shifting of codimensions
873 when adding a dimension.
874 * decl.c (merge_array_spec): Ditto. Fix using correct codimensions.
876 2019-12-30 Thomas Koenig <tkoenig@gcc.gnu.org>
880 * gfortran.h (gfc_seen_div0): Add declaration.
881 * arith.h (gfc_seen_div0): Add definition.
882 (eval_intrinsic): For integer division by zero, set gfc_seen_div0.
883 * decl.c (variable_decl): If resolution resp. simplification
884 fails for array spec and a division of zero error has been
885 seen, return MATCH_ERROR.
887 2019-12-21  Paul Thomas  <pault@gcc.gnu.org>
889 Backported from mainline
891 * expr.c (find_inquiry_ref): Catch INQUIRY_LEN case, where the
892 temporary expression has been converted to a constant and make
893 the new expression accordingly. Correct the error in INQUIRY_RE
894 and INQUIRY_IM cases. The original rather than the resolved
895 expression was being used as the source in mpfr_set.
897 2019-12-20 Jakub Jelinek <jakub@redhat.com>
899 Backported from mainline
900 2019-12-19 Jakub Jelinek <jakub@redhat.com>
903 * frontend-passes.c (call_external_blas): Use || instead of |.
906 * frontend-passes.c (in_omp_atomic): New variable.
907 (cfe_expr_0, matmul_to_var_expr, matmul_temp_args,
908 inline_matmul_assign, call_external_blas): Don't optimize in
910 (optimize_namespace): Clear in_omp_atomic.
911 (gfc_code_walker): Set in_omp_atomic for EXEC_OMP_ATOMIC, save/restore
914 2019-12-11 Jakub Jelinek <jakub@redhat.com>
917 * trans-openmp.c (gfc_trans_omp_atomic): For GFC_OMP_ATOMIC_SWAP,
918 do look through conversion on expr2 if any.
920 2019-12-06 Jakub Jelinek <jakub@redhat.com>
923 * trans.h (struct lang_type, struct lang_decl): Remove span member.
924 (GFC_DECL_SPAN, GFC_TYPE_ARRAY_SPAN): Remove macros.
925 * trans-array.h (gfc_get_descriptor_offsets_for_info): Add another
927 * trans-array.c (gfc_get_descriptor_offsets_for_info): Add SPAN_OFF
928 argument and initialize *SPAN_OFF to the offset of span field.
929 * trans-types.c (gfc_get_array_descr_info): Adjust
930 gfc_get_descriptor_offsets_for_info caller. Compute elem_size
931 as base->span instead of TYPE_SIZE_UNIT (etype) constant.
933 2019-12-05 Jakub Jelinek <jakub@redhat.com>
936 * trans-decl.c (gfc_get_symbol_decl): If sym->backend_decl is
937 current_function_decl, add length to current rather than parent
938 function and expect DECL_CONTEXT (length) to be current_function_decl.
940 2019-11-27 Jakub Jelinek <jakub@redhat.com>
943 * simplify.c (gfc_simplify_spread): Check gfc_init_expr_flag instead
944 of gfc_current_ns->sym_root->n.sym->attr.flavor == FL_PARAMETER.
946 2019-12-12 Harald Anlauf <anlauf@gmx.de>
948 Backport from mainline
950 * check.c (gfc_check_is_contiguous): Simplify check to handle
951 arbitrary NULL() argument.
953 2019-12-11 Steven G. Kargl <kargl@gcc.gnu.org>
956 * array.c (gfc_set_array_spec): Remove invalid assert() triggered
957 by invalid Fortran code.
959 2019-11-29 Harald Anlauf <anlauf@gmx.de>
961 Backport from mainline
963 * simplify.c (convert_mpz_to_unsigned): Skip assert for argument
964 range when -fno-range-check is specified.
966 2019-11-25 Tobias Burnus <tobias@codesourcery.com
968 Backport from mainline
969 2019-10-11 Tobias Burnus <tobias@codesourcery.com>
972 * trans-expr.c (gfc_conv_procedure_call): Handle code generated
975 2019-11-10 Thomas Koenig <tkoenig@gcc.gnu.org>
979 * trans-decl.c (gfc_get_symbol_decl): If __def_init actually
980 contains a value, put it into the read-only section.
982 2019-11-10 Thomas Koenig <tkoenig@gcc.gnu.org>
986 * frontend-passes.c (call_external_blas): Commit symbol for
987 external BLAS routine.
989 2019-11-08 Tobias Burnus <tobias@codesourcery.com
991 Backport from mainline
992 2019-11-08 Tobias Burnus <tobias@codesourcery.com
995 * scanner.c (skip_fixed_comments): Move comment
996 lines to next if block.
997 (gfc_next_char_literal): Fix continue_line setting.
998 (get_file): Remove bogus ATTRIBUTE_UNUSED.
1000 2019-11-05 Tobias Burnus <tobias@codesourcery.com>
1003 Backport from mainline
1004 2019-10-31 Tobias Burnus <tobias@codesourcery.com>
1007 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Fix DECL_ARTIFICIAL
1010 2019-11-04 Tobias Burnus <tobias@codesourcery.com>
1012 Backport from mainline
1013 2019-10-30 Tobias Burnus <tobias@codesourcery.com>
1016 * trans-array.c (gfc_conv_array_parameter): Only copy
1017 string-length backend_decl if expression is not a function.
1019 2019-11-04 Tobias Burnus <tobias@codesourcery.com>
1021 Backport from mainline
1022 2019-10-31 Tobias Burnus <tobias@codesourcery.com>
1025 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Free CFI descriptor
1026 at the end; partial revised revert of Rev. 277502.
1028 2019-10-28  Paul Thomas  <pault@gcc.gnu.org>
1032 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Correct the
1033 assignment of the attribute field to account correctly for an
1034 assumed shape dummy. Assign separately to the gfc and cfi
1035 descriptors since the atribute can be different. Add branch to
1036 correctly handle missing optional dummies.
1038 2019-10-28 Tobias Burnus <tobias@codesourcery.com>
1040 Backport from mainline
1041 2019-10-28 Tobias Burnus <tobias@codesourcery.com>
1044 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Don't free data
1045 memory as that's done on the Fortran side.
1046 (gfc_conv_procedure_call): Handle void* pointers from
1047 gfc_conv_gfc_desc_to_cfi_desc.
1049 2019-10-27 Paul Thomas <pault@gcc.gnu.org>
1051 Backport from mainline
1053 * resolve.c (flag_fn_result_spec): Correct a typo before the
1054 function declaration.
1055 * trans-decl.c (gfc_sym_identifier): Boost the length of 'name'
1056 to allow for all variants. Simplify the code by using a pointer
1057 to the symbol's proc_name and taking the return out of each of
1058 the conditional branches. Allow symbols with fn_result_spec set
1059 that do not come from a procedure namespace and have a module
1060 name to go through the non-fn_result_spec branch.
1062 2019-10-22 Steven G. Kargl <kargl@gcc.gnu.org>
1065 * decl.c (attr_decl1): Move check for F2018:C822 from here ...
1066 * array.c (gfc_set_array_spec): ... to here.
1068 2019-10-18 Steven G. Kargl <kargl@gcc.gnu.org>
1071 * trans-decl.c (generate_local_decl): Avoid misconstructed
1072 intrinsic modules in a BLOCK construct.
1074 2019-10-18 Tobias Burnus <tobias@codesourcery.com>
1076 Backport from mainline
1077 2019-10-18 Tobias Burnus <tobias@codesourcery.com>
1080 * class.c (gfc_find_derived_vtab): Return NULL
1081 instead of deref'ing NULL pointer.
1083 2019-10-17 Steven G. Kargl <kargl@gcc.gnu.org>
1087 decl.c (gfc_match_function_decl): Ignore duplicate BIND(C) for function
1088 declaration in submodule. Implement at check for F2018 C1550.
1089 (gfc_match_entry): Use temporary for locus, which allows removal of
1090 one gfc_error_now().
1091 (gfc_match_subroutine): Ignore duplicate BIND(C) for subroutine
1092 declaration in submodule. Implement at check for F2018 C1550.
1094 2019-10-11 Steven G. Kargl <kargl@gcc.gnu.org>
1097 * decl.c (gfc_match_prefix): If matching a type-spec returns an error,
1098 it's an error so re-act correctly.
1100 2019-10-11 Steven G. Kargl <kargl@gcc.gnu.org>
1103 check.c (gfc_check_findloc): Additional checking for valid arguments
1105 2019-10-10 Steven G. Kargl <kargl@gcc.gnu.org>
1108 * simplify.c (gfc_simplify_reshape): Convert a gcc_assert into a
1109 gfc_error as a user can easily hit the condition.
1111 2019-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1115 * trans-decl.c (gfc_get_symbol_decl): For __def_init, set
1116 DECL_ARTIFICAL and do not set TREE_READONLY.
1118 2019-10-05 Steven G. Kargl <kargl@gcc.gnu.org>
1121 * decl.c (variable_decl): Do not search parent namespace for symbol.
1123 2019-10-04 Steven G. Kargl <kargl@gcc.gnu.org>
1126 * io.c (match_vtag): Check for non-NULL result->symtree.
1127 (match_out_tag): Check for invalid constant due to inquiry parameter.
1128 (match_filepos): Instead of a syntax error, go to cleanup to get better
1131 2019-10-04 Steven G. Kargl <kargl@gcc.gnu.org>
1134 * primary.c (gfc_match_varspec): Ensure an inquiry parameter has
1137 2019-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
1140 * gcc/fortran/io.c (match_io_element): An inquiry parameter cannot be
1142 * gcc/fortran/match.c (gfc_match_allocate): An inquiry parameter
1143 can be neither an allocate-object nor stat variable.
1144 (gfc_match_deallocate): An inquiry parameter cannot be deallocated.
1146 2019-10-01 Steven G. Kargl <kargl@gcc.ngu.org>
1148 Backport of r276254+276265
1150 * decl.c (attr_decl1): Check if rank+corank > 15.
1152 2019-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
1155 * decl.c (gfc_match_decl_type_spec): Issue errors for a few
1158 2019-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
1161 * check.c (gfc_check_is_contiguous): null() cannot be an actual
1162 argument to is_contiguous().
1164 2019-09-21 Paul Thomas <pault@gcc.gnu.org>
1166 Backport from mainline
1168 * expr.c (check_inquiry): Remove extended component refs by
1169 using symbol pointers. If a function argument is an associate
1170 variable with a constant target, copy the target expression in
1171 place of the argument expression. Check that the charlen is not
1172 NULL before using the string length.
1174 2019-09-19 Steven G. Kargl <kargl@gcc.gnu.org>
1177 * resolve.c (conformable_arrays): If array-spec is NULL, then
1178 allocate-object is a scalar. a conformability check only occurs
1179 for an array source-expr.
1181 2019-09-18 Thomas Koenig <tkoenig@gcc.gnu.org>
1185 * frontend-passes.c (do_subscript): If step equals
1186 zero, a previuos error has been reported; do nothing
1188 * resolve.c (gfc_resolve_iterator): Move error checking
1189 after type conversion.
1191 2019-09-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1195 * trans-decl.c (generate_local_decl): Do not warn if the symbol
1197 * trans-types.c (get_formal_from_actual_arglist): Set artificial
1198 attribute on dummy arguments.
1200 2019-09-14 Steven G. Kargl <kargl@gcc.gnu.org>
1203 * simplify.c (gfc_convert_constant): During conversion check if the
1204 constant is enclosed in parenthesis, and simplify expression.
1206 2019-09-14 Steven G. Kargl <kargl@gcc.gnu.org>
1209 * simplify.c (gfc_simplify_merge): Need to simplify expression
1210 after insertation of parenthesis.
1212 2019-09-14 Steven G. Kargl <kargl@gcc.gnu.org>
1215 * io.c (gfc_match_inquire): null() cannot be in an iolength inquire
1218 2019-09-07 Paul Thomas <pault@gcc.gnu.org>
1220 Backport from mainline
1222 * primary.c (gfc_match_varspec): Return MATCH_NO on an apparent
1223 component ref, when the primary type is intrinsic.
1225 2019-09-05 Harald Anlauf <anlauf@gmx.de>
1227 Backport from mainline
1229 * gfortran.h: Extend struct gfc_iterator for loop annotations.
1230 * array.c (gfc_copy_iterator): Copy loop annotations by IVDEP,
1231 VECTOR, and NOVECTOR pragmas.
1232 * decl.c (gfc_match_gcc_ivdep, gfc_match_gcc_vector)
1233 (gfc_match_gcc_novector): New matcher functions handling IVDEP,
1234 VECTOR, and NOVECTOR pragmas.
1235 * match.h: Declare prototypes of matcher functions handling IVDEP,
1236 VECTOR, and NOVECTOR pragmas.
1237 * parse.c (decode_gcc_attribute, parse_do_block)
1238 (parse_executable): Decode IVDEP, VECTOR, and NOVECTOR pragmas;
1239 emit warning for unrecognized pragmas instead of error.
1240 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do): Add code to
1241 emit annotations for IVDEP, VECTOR, and NOVECTOR pragmas.
1242 * gfortran.texi: Document IVDEP, VECTOR, and NOVECTOR pragmas.
1245 * parse.c (parse_executable): Improve error messages for
1246 improperly placed pragmas not preceeding a loop.
1248 2019-09-05 Steven G. Kargl <kargl@gcc.gnu.org>
1251 * decl.c (gfc_match_decl_type_spec): Improve and restore error
1252 message for malformed types-spec.
1254 2019-09-02 Steven G. Kargl <kargl@gc.gnu.org>
1257 * array.c (walk_array_constructor): New function.
1258 (gfc_match_array_constructor): Use it.
1260 2019-08-30 Steven G. Kargl <kargl@gcc.gnu.org>
1263 * io.c (match_filepos): MATCH_ERROR should branch to a syntax error.
1265 2019-08-30 Steven G. Kargl <kargl@gcc.gnu.org>
1268 * simplify.c (gfc_simplify_reshape): Add additional checks of the
1269 ORDER dummy argument.
1271 2019-08-30 Steven G. Kargl <kargl@gcc.gnu.org>
1274 * check.c (gfc_check_kill_sub): Additional checks on status dummy
1277 2019-08-30 Steven G. Kargl <kargl@gcc.gnu.org>
1280 * intrinsic.c (sort_actual): ALLOCATED has one argument. Check for
1283 2019-08-30 Steven G. Kargl <kargl@gcc.gnu.org>
1286 module.c (gfc_match_use): User defined operator cannot conflict with
1289 2019-08-17 Steven G. Kargl <kargl@gcc.gnu.org>
1292 * primary.c (gfc_variable_attr): Remove a gfc_internal_error(),
1293 which cannot be reached by conforming Fortran code, but seems to
1294 be reachable from nonconforming Fortran code. Treat the AR_UNKNOWN
1297 2019-08-17 Steven G. Kargl <kargl@gcc.gnu.org>
1300 * match.c (gfc_match_st_function): When matching a statement function,
1301 need to check if the statement function name shadows the function
1304 2019-08-17 Steven G. Kargl <kargl@gcc.gnu.org>
1307 * decl.c (get_proc_name): Check for a CLASS entity when trying to
1308 add attributes to an entity that already has an explicit interface.
1310 2019-08-17 Steven G. Kargl <kargl@gcc.gnu.org>
1313 * module.c (gfc_match_use): When renaming a module entity, search
1314 current namespace for conflicting symbol.
1316 2019-08-13 Steven G. Kargl <kargl@gcc.gnu.org>
1319 * resolve.c (check_data_variable): data-stmt-object with pointer
1320 attribute requires a data-stmt-value with the target attribute.
1322 2013-08-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1326 * frontend-passes.c (insert_index): Suppress errors while
1327 simplifying the resulting expression.
1329 2019-08-13 Steven G. Kargl <kargl@gcc.gnu.org>
1332 * misc.c (gfc_typename): Do not point to something that ought not to
1335 2019-08-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1339 * trans.h (gfc_evaluate_now_function_scope): New function.
1340 * trans.c (gfc_evaluate_now_function_scope): New function.
1341 * trans-expr.c (gfc_trans_assignment): Use it.
1343 2019-08-13 Steven G. Kargl <kargl@gcc.gnu.org>
1346 resolve.c (resolve_typebound_procedure): Allow host associated
1347 procedure to be a binding target. While here, wrap long line.
1349 2019-08-13 Steven G. Kargl <kargl@gcc.gnu.org>
1352 * expr.c (gfc_simplify_expr): Simplifcation of an array with a kind
1353 type inquiry suffix yields a constant expression.
1355 2019-08-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1359 * frontend-passes.c (do_subscript): Do not warn for an
1360 expression a second time. Do not warn about a zero-trip loop.
1361 (doloop_warn): Also look at contained namespaces.
1363 2019-08-12 Steven G. Kargl <kargl@gcc.gnu.org>
1366 * trans-decl.c (gfc_generate_return): Ensure something is returned
1369 2019-08-12 Steven G. Kargl <kargl@gcc.gnu.org>
1372 * check.c(gfc_check_allocated): Add comment pointing to ...
1373 * intrinsic.c(sort_actual): ... the checking done here.
1375 2019-08-12 Release Manager
1377 * GCC 9.2.0 released.
1379 2019-08-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1383 * expr.c (check_restricted): Relax constraint C1279 which was
1384 removed from F2008 and above.
1386 2019-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1389 * interface.c (compare_actual_expr): When checking for aliasing, add
1390 a case to handle REF_INQUIRY (e.g., foo(x%re, x%im) do not alias).
1392 2019-07-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1393 Paul Thomas <pault@gcc.gnu.org>
1398 * trans-expr.c (pointer_assignment_is_proc_pointer) Remove as
1399 it is very simple and only called from one place.
1400 (gfc_trans_pointer_assignment): Rename non_proc_pointer_assign
1401 as non_proc_ptr_assign. Assign to it directly, rather than call
1402 to above, deleted function and use gfc_expr_attr instead of
1403 only checking the reference chain.
1404 * dump-parse-tree.c (show_global_symbol): New function.
1405 (gfc_dump_global_symbols): New function.
1406 * gfortran.h (gfc_traverse_gsymbol): Add prototype.
1407 (gfc_dump_global_symbols): Likewise.
1408 * invoke.texi: Document -fdump-fortran-global.
1409 * lang.opt: Add -fdump-fortran-global.
1410 * parse.c (gfc_parse_file): Handle flag_dump_fortran_global.
1411 * symbol.c (gfc_traverse_gsymbol): New function.
1412 * trans-decl.c (sym_identifier): New function.
1413 (mangled_identifier): New function, doing most of the work
1414 of gfc_sym_mangled_identifier.
1415 (gfc_sym_mangled_identifier): Use mangled_identifier. Add mangled
1416 identifier to global symbol table.
1417 (get_proc_pointer_decl): Use backend decl from global identifier
1420 2019-07-23 Thomas König <tkoenig@gcc.gnu.org>
1424 * gfortran.texi (GFORTRAN_FORMATTED_BUFFER_SIZE): Document.
1425 (GFORTRAN_UNFORMATTED_BUFFER_SIZE): Likewise.
1427 2019-07-07 Paul Thomas <pault@gcc.gnu.org>
1429 Backport from mainline
1431 * trans-array.c (gfc_conv_scalarized_array_ref) Delete code
1432 that gave symbol backend decl for subref arrays and deferred
1435 2019-06-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1439 * trans-types.c (get_formal_from_actual_arglist): Get symbol from
1440 current namespace so it will be freed later. If symbol is of type
1441 character, get an empty character length.
1443 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
1445 Backport from mainline
1447 * match.c (gfc_match_stopcode): Check F2008 condition on stop code.
1449 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
1451 Backport from mainline
1453 * array.c (gfc_free_array_spec): When freeing an array-spec, avoid
1454 an ICE for assumed-shape coarrays.
1456 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
1458 Backport from mainline
1460 * expr.c (gfc_check_vardef_context): Check for INTENT(IN) variable
1461 in SELECT TYPE construct.
1463 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
1465 Backport from mainline
1467 * resolve.c (resolve_contained_fntype): Do not dereference a NULL
1470 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
1472 Backport from mainline
1474 * symbol.c (verify_bind_c_derived_type): Remove erroneous error
1475 checking for BIND(C) and PRIVATE attributes.
1477 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
1479 Backport from mainline
1481 * /decl.c (variable_decl): Mark a variable that is a target in pointer
1482 initialization when in PROGRAM, MODULE, or SUBMODULE scope with an
1485 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
1487 Backport from mainline
1489 * match.c (gfc_match_select_type): SELECT TYPE is an executable
1490 statement, and cannot appear in MODULE or SUBMODULE scope.
1492 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
1494 Backport from mainline
1496 * decl.c (attr_decl): Check for duplicate DIMENSION attribute for a
1499 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
1501 Backport from mainline
1503 * resolve.c (is_dt_name): New function to compare symbol name against
1504 list of derived types.
1505 (resolve_actual_arglist): Use it to find wrong code.
1507 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
1509 Backport from mainline
1510 * arith.c (arith_power): Rework overflow of an integer to an integer
1513 2019-06-18 Harald Anlauf <anlauf@gmx.de>
1515 Backport from mainline
1516 2019-06-14 Harald Anlauf <anlauf@gmx.de>
1520 * trans-intrinsic.c (gfc_conv_intrinsic_shift): Properly
1521 distinguish logical/arithmetic shifts.
1522 * intrinsic.texi: Update documentation for SHIFTR/SHIFTL/SHIFTA
1523 (Fortran 2008) and LSHIFT/RSHIFT (GNU extensions).
1525 2019-06-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1526 Tomáš Trnka <trnka@scm.com>
1530 * trans-types.c (get_formal_from_actual_arglist): Unset typespec
1531 flags which make no sense for procedures without explicit
1534 2019-05-30 Marek Polacek <polacek@redhat.com>
1536 * lang.opt (ftail-call-workaround): Fix a typo.
1538 2019-05-30 Jakub Jelinek <jakub@redhat.com>
1540 * lang.opt (ftail-call-workaround=): Fix a typo - lenghts to lengths.
1542 2019-05-29 Jakub Jelinek <jakub@redhat.com>
1545 Backported from mainline
1546 2019-05-29 Jakub Jelinek <jakub@redhat.com>
1549 * lang.opt (fbroken-callers): Remove.
1550 (ftail-call-workaround, ftail-call-workaround=): New options.
1551 * gfortran.h (struct gfc_namespace): Add implicit_interface_calls.
1552 * interface.c (gfc_procedure_use): Set implicit_interface_calls
1553 for calls to implicit interface procedures.
1554 * trans-decl.c (create_function_arglist): Use flag_tail_call_workaround
1555 instead of flag_broken_callers. If it is not 2, also require
1556 sym->ns->implicit_interface_calls.
1557 * invoke.texi (fbroken-callers): Remove documentation.
1558 (ftail-call-workaround, ftail-call-workaround=): Document.
1560 2019-05-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1563 * invoke.texi: Document -fbroken-callers.
1564 * lang.opt: Add -fbroken-callers.
1565 * trans-decl.c (create_function_arglist): Only set
1566 DECL_HIDDEN_STRING_LENGTH if flag_broken_callers is set.
1568 2019-05-16 Jakub Jelinek <jakub@redhat.com>
1571 * trans-decl.c (create_function_arglist): Set
1572 DECL_HIDDEN_STRING_LENGTH on hidden string length PARM_DECLs if
1575 2019-05-21 Janne Blomqvist <jb@gcc.gnu.org>
1579 * intrinsic.texi (EXECUTE_COMMAND_LINE): Explain new
1580 wait=.false. implementation.
1582 2019-05-19 Paul Thomas <pault@gcc.gnu.org>
1586 * trans-stmt.c (trans_associate_var) Do not use the saved
1587 descriptor if the expression is a COMPONENT_REF.
1589 2019-05-15 Janne Blomqvist <jb@gcc.gnu.org>
1592 * parse.c (gfc_parse_file): Remove translation string markers.
1594 2019-05-12 Janne Blomqvist <jb@gcc.gnu.org>
1597 * dump-parse-tree.c (get_c_type_name): Use macros for complex type
1599 * parse.c (gfc_parse_file): Define complex macros, add CPP support
1600 when printing C prototypes.
1602 2019-05-11 Paul Thomas <pault@gcc.gnu.org>
1606 * trans-decl.c (convert_CFI_desc): Test that the dummy is
1607 present before doing any of the conversions.
1610 * decl.c (gfc_verify_c_interop_param): Restore the error for
1611 charlen > 1 actual arguments passed to bind(C) procs.
1612 Clean up trailing white space.
1615 * trans-array.c (gfc_trans_create_temp_array): Set the 'span'
1616 field to the element length for all types.
1617 (gfc_conv_expr_descriptor): The force_no_tmp flag is used to
1618 prevent temporary creation, especially for substrings.
1619 * trans-decl.c (gfc_trans_deferred_vars): Rather than assert
1620 that the backend decl for the string length is non-null, use it
1621 as a condition before calling gfc_trans_vla_type_sizes.
1622 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): 'force_no_tmp'
1623 is set before calling gfc_conv_expr_descriptor.
1624 * trans.c (get_array_span): Move the code for extracting 'span'
1625 from gfc_build_array_ref to this function. This is specific to
1626 descriptors that are component and indirect references.
1627 * trans.h : Add the force_no_tmp flag bitfield to gfc_se.
1629 2019-05-09 Thomas Koenig <tkoenig@gcc.gnu.org>
1634 * gfortran.dg/dump-parse-tree.c: Include version.h.
1635 (gfc_dump_external_c_prototypes): New function.
1636 (get_c_type_name): Select "char" as a name for a simple char.
1637 Adjust to handling external functions. Also handle complex.
1638 (write_decl): Add argument bind_c. Adjust for dumping of external
1640 (write_proc): Likewise.
1641 (write_interop_decl): Add bind_c argument to call of write_proc.
1642 * gfortran.h: Add prototype for gfc_dump_external_c_prototypes.
1643 * lang.opt: Add -fc-prototypes-external flag.
1644 * parse.c (gfc_parse_file): Move dumping of BIND(C) prototypes.
1645 Call gfc_dump_external_c_prototypes if option is set.
1646 * invoke.texi: Document -fc-prototypes-external.
1648 2019-05-03 Release Manager
1650 * GCC 9.1.0 released.
1652 2019-04-19 Steven G. Kargl <kargl@gcc.gnu.org>
1655 * decl.c (in_module_or_interface): New function to check that the
1656 current state is in a module, submodule, or interface.
1657 (gfc_match_prefix): Use it.
1659 2019-04-22 Paul Thomas <pault@gcc.gnu.org>
1662 * resolve.c (find_array_spec): If this is a class expression
1663 and the symbol and component array specs are the same, this is
1665 *trans-intrinsic.c (gfc_conv_intrinsic_size): If a class symbol
1666 argument, has no namespace, it has come from the interface
1667 mapping and the _data component must be accessed directly.
1669 2019-04-17 Thomas Schwinge <thomas@codesourcery.com>
1672 * openmp.c (gfc_resolve_do_iterator): Handle sharing_clauses for
1674 (gfc_resolve_oacc_blocks): Populate sharing_clauses with private
1677 2019-04-14 Paul Thomas <pault@gcc.gnu.org>
1680 * trans-decl.c (gfc_get_symbol_decl): Assumed shape and assumed
1681 rank dummies of bind C procs require deferred initialization.
1682 (convert_CFI_desc): New procedure to convert incoming CFI
1683 descriptors to gfc types and back again.
1684 (gfc_trans_deferred_vars): Call it.
1685 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Null the CFI
1686 descriptor pointer. Free the descriptor in all cases.
1689 * expr.c (is_CFI_desc): New function.
1690 (is_subref_array): Tidy up by referencing the symbol directly.
1691 * gfortran.h : Prototype for is_CFI_desc.
1692 * trans_array.c (get_CFI_desc): New function.
1693 (gfc_get_array_span, gfc_conv_scalarized_array_ref,
1694 gfc_conv_array_ref): Use it.
1695 * trans.c (get_array_span): Extract the span from descriptors
1696 that are indirect references.
1699 * trans-decl.c (gfc_get_symbol_decl): Make sure that the se
1700 expression is a pointer type before converting it to the symbol
1702 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Eliminate
1703 temporary creation for intent(in).
1705 2019-04-13 Dominique d'Humieres <dominiq@gcc.gnu.org>
1708 * module.c (gfc_use_module): use complete sentences.
1710 2019-04-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1712 PR translation/89939
1713 * frontend-passes.c (B_ERROR): Delete macro.
1714 (C_ERROR): Delete macro.
1715 (B_ERROR_1): New macro.
1716 (C_ERROR_1): New macro.
1717 (C_ERROR_2): New macro.
1718 (inline_matmul_assign): Use new macros.
1719 (call_external_blas): Likewise.
1721 2019-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1724 * gfortran.h (gfc_component): Add finalized field.
1725 * class.c (finalize_component): If the component is already
1726 finalized, return early. Set component->finalized on exit.
1728 2019-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1731 * resolve.c (resolve_global_procedure): If the global symbol is an
1732 ENTRY, also look up its name among the entries.
1734 2019-04-04 Harald Anlauf <anlauf@gmx.de>
1737 * check.c (gfc_check_transfer): Reject procedures as actual
1738 arguments for SOURCE and MOLD of TRANSFER intrinsic.
1740 2019-04-03 Steven G. Kargl <kargl@gcc.gnu.org>
1743 * expr.c (gfc_reduce_init_expr): Add extra check to avoid
1744 dereferencing a null pointer.
1746 2019-04-03 Dominique d'Humieres <dominiq@gcc.gnu.org>
1749 * expr.c (comp_pointer): Remove redundant condition.
1751 2019-03-31 Harald Anlauf <anlauf@gmx.de>
1755 * trans-types.c (gfc_typenode_for_spec): Handle conversion for
1757 * target-memory.c (gfc_element_size): Handle size determination
1758 for procedure pointers.
1760 2019-03-31 Thomas Koenig <tkoenig@gcc.gnu.org>
1762 * dump-parse-tree.c (debug): Add for symbol_attribute *,
1763 symbol_attribute and gfc_ref * arguments.
1765 2019-03-30 Paul Thomas <pault@gcc.gnu.org>
1768 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Use the formal
1769 argument attributes rather than those of the actual argument.
1772 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Call
1773 'set_dtype_for_unallocated' for any type of arrayspec.
1775 2019-03-27 Janus Weil <janus@gcc.gnu.org>
1778 * expr.c (gfc_check_assign_symbol): Reject internal and dummy procedures
1779 in procedure pointer initialization.
1781 2019-03-27 Paul Thomas <pault@gcc.gnu.org>
1784 * expr.c (is_subref_array): Permit substrings to be detected
1786 * trans-array.c (get_array_ctor_var_strlen): Obtain the length
1787 of deferred length strings. Handle substrings with a NULL end
1789 (trans_array_constructor): Remove an unnecessary blank line.
1790 (gfc_conv_scalarized_array_ref): Skip to label 'done' if 'decl'
1792 (get_array_charlen): If the expression is an array, convert the
1793 first element of the constructor and use its string length. Get
1794 a new charlen if necessary.
1795 (gfc_conv_expr_descriptor): Call 'get_array_charlen' for array
1796 constructor expressions. If the ss_info string length is
1797 available, use that to set the span of character arrays.
1798 * trans-expr.c (gfc_get_expr_charlen): Handle substrings
1799 * trans-stmt.c (trans_associate_var): Set the pointer array
1800 flag for variable targets and constant array constructors. Take
1801 care not to reset the string length or the span in the case of
1802 expressions that are not converted as direct by reference.
1804 2019-03-25 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1806 * intrinsic.texi (MINLOC): Fix typo in BACK argument documentation.
1809 2019-03-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1812 * interface.c (compare_actual_formal): Change errors about
1813 missing or extra to gfc_error_now to make sure they are issued.
1814 Change "spec" to "specifier" in message.
1815 * resolve.c (resolve_global_procedure): Also check for mismatching
1816 interface with global symbols if the namespace has already been
1819 2019-03-21 Thomas Schwinge <thomas@codesourcery.com>
1822 * openmp.c (gfc_match_oacc_routine): Set the level of parallelism
1824 (gfc_resolve_oacc_routines): Call gfc_add_omp_declare_target.
1827 * gfortran.h (gfc_oacc_routine_name): Add loc member.
1828 (gfc_resolve_oacc_routines): Declare.
1829 * openmp.c (gfc_match_oacc_routine): Move some error checking
1831 (gfc_resolve_oacc_routines): ... this new function.
1832 * resolve.c (resolve_codes): Call it.
1835 * openmp.c (gfc_match_oacc_routine): Clarify.
1838 * module.c (verify_OACC_ROUTINE_LOP_NONE): New function.
1839 (enum ab_attribute): Add AB_OACC_ROUTINE_LOP_GANG,
1840 AB_OACC_ROUTINE_LOP_WORKER, AB_OACC_ROUTINE_LOP_VECTOR,
1841 AB_OACC_ROUTINE_LOP_SEQ.
1842 (attr_bits): Add these.
1843 (mio_symbol_attribute): Handle these.
1845 2019-03-20 Janus Weil <janus@gcc.gnu.org>
1848 * symbol.c (check_conflict): ABSTRACT attribute conflicts with
1849 INTRINSIC attribute.
1851 2019-03-18 Thomas Koenig <tkoeng@gcc.gnu.org>
1854 * iresolve.c: Include trans.h.
1855 (gfc_resolve_fe_runtine_error): Set backend_decl on
1858 2019-03-17 Thomas Koenig <tkoenig@gcc.gnu.org>
1861 * gfortran.h (expr_t): Add EXPR_UNKNOWN.
1862 * expr.c (gfc_copy_expr): Add EXPR_UNKNOWN to switch statement.
1863 (gfc_simplify_expr): Likewise.
1864 * module.c (mio_expr): Likewise.
1865 * resovle.c (extract_compcall_passed_object): Issue error on
1867 (check_typebound_baseobject): Issue error on wrong type.
1868 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Add
1869 EXPR_UNKNOWN to switch statement.
1871 2019-03-16 Jakub Jelinek <jakub@redhat.com>
1874 * scanner.c (load_line): Remove linenum and current_line static
1875 variables, add warned_tabs automatic variable. Use current_file->line
1876 instead of current_line and warned_tabs boolean to avoid diagnosing
1877 tabs multiple times on the same line.
1879 2019-03-16 Thomas Koenig <tkoenig@gcc.gnu.org>
1882 * symbol.c (gfc_add_subroutine): If we are encountering a
1883 subrtoutine within a BLOCK DATA and the name starts with an
1884 underscore, do not check.
1886 2019-03-15 Harald Anlauf <anlauf@gmx.de>
1889 * expr.c (gfc_check_pointer_assign): Correct and improve error
1890 messages for invalid pointer assignments.
1892 2019-03-14 Thomas Koenig <tkoenig@gcc.gnu.org>
1894 * gfortran.texi: Document Q edit descriptor under
1895 "Extensions not implemented in GNU Fortran".
1897 2019-03-13 Harald Anlauf <anlauf@gmx.de>
1900 * trans-expr.c (gfc_trans_pointer_assignment): Move check for same
1901 string length so that we do not get false errors for deferred
1904 2019-03-13 Janus Weil <janus@gcc.gnu.org>
1907 * decl.c (gfc_match_formal_arglist): Reject empty type parameter lists.
1908 (gfc_match_derived_decl): Mark as PDT only if type parameter list was
1909 matched successfully.
1911 2019-03-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1916 * gfortran.h (gfc_symbol): Add bind_c component.
1917 (gfc_get_gsymbol): Add argument bind_c.
1918 * decl.c (add_global_entry): Add bind_c argument to
1920 * parse.c (parse_block_data): Likewise.
1921 (parse_module): Likewise.
1922 (add_global_procedure): Likewise.
1923 (add_global_program): Likewise.
1924 * resolve.c (resolve_common_blocks): Likewise.
1925 (resolve_global_procedure): Likewise.
1926 (gfc_verify_binding_labels): Likewise.
1927 * symbol.c (gfc_get_gsymbol): Add argument bind_c. Set bind_c
1929 * trans-decl.c (gfc_get_module_backend_decl): Add bind_c argument
1931 (gfc_get_extern_function_decl): If the sym has a binding label
1932 and it cannot be found in the global symbol tabel, it is the wrong
1935 2019-03-12 Thomas Koenig <tkoenig@gcc.gnu.org>
1938 * match.c (gfc_match_type_spec): Remove call to
1939 gfc_resolve_expr for character length.
1941 2019-03-12 Martin Liska <mliska@suse.cz>
1943 * decl.c (add_init_expr_to_sym): Replace usage of 'can't'
1945 (variable_decl): Likewise.
1946 (cray_pointer_decl): Likewise.
1947 (match_binding_attributes): Likewise.
1948 * f95-lang.c (gfc_init): Likewise.
1949 * interface.c (gfc_check_typebound_override): Likewise.
1950 * intrinsic.c (make_generic): Likewise.
1951 * module.c (dump_module): Likewise.
1952 (gfc_use_module): Likewise.
1953 * primary.c (gfc_convert_to_structure_constructor): Likewise.
1954 * resolve.c (resolve_entries): Likewise.
1955 (check_generic_tbp_ambiguity): Likewise.
1956 (get_checked_tb_operator_target): Likewise.
1957 * scanner.c (load_file): Likewise.
1958 * trans-expr.c (gfc_conv_intrinsic_to_class): Likewise.
1960 2019-03-12 Paul Thomas <pault@gcc.gnu.org>
1964 * trans-expr.c (set_dtype_for_unallocated): New function.
1965 (gfc_conv_gfc_desc_to_cfi_desc): Call it for allocatable and
1967 (gfc_conv_procedure_call): Likewise. Also, set the ubound of
1968 the final dimension to -1 for assumed rank formal args that are
1969 associated with assumed size arrays.
1970 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Return -1 for
1971 the final dimension of assumed rank entities that are argument
1972 associated with assumed size arrays.
1973 (gfc_conv_intrinsic_shape): Likewise return -1 for the final
1974 dimension of the shape intrinsic.
1976 2019-03-11 Jakub Jelinek <jakub@redhat.com>
1979 * trans-openmp.c (gfc_omp_clause_default_ctor): Set TREE_NO_WARNING
1980 on decl if adding COND_EXPR for allocatable.
1981 (gfc_omp_clause_copy_ctor): Set TREE_NO_WARNING on dest.
1983 2019-03-11 Martin Liska <mliska@suse.cz>
1985 * decl.c (match_record_decl): Wrap an option name
1986 in a string format message and fix GNU coding style.
1987 (gfc_match_pointer): Likewise.
1988 * expr.c (find_array_section): Likewise.
1989 * intrinsic.c (gfc_is_intrinsic): Likewise.
1990 * options.c (gfc_post_options): Likewise.
1991 * primary.c (match_integer_constant): Likewise.
1992 * trans-common.c (translate_common): Likewise.
1994 2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1997 * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
1998 Return false if a scalar tempoary is needed.
1999 (gfc_walk_variable_expr): Fix up class refs.
2001 2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
2004 * symbol.c (gfc_add_procedure): Only throw an error if the
2005 procedure has not been declared either PUBLIC or PRIVATE.
2007 2019-03-09 Thomas Koenig <tkoenig@gcc.gnu.org>
2010 * trans-types.c (gfc_typenode_for_spec) Set ts->is_c_interop of
2012 (create_fn_spec): Mark argument as escaping if ts->is_c_interop is set.
2014 2019-03-09 Janus Weil <janus@gcc.gnu.org>
2017 * expr.c (gfc_check_assign_symbol): Deal with procedure pointers to
2018 pointer-valued functions.
2020 2019-03-09 Thomas König <tkoenig@gcc.gnu.org>
2023 * decl.c (add_init_expr_to_sym): Add shape if init has none. Add
2024 asserts that it has to be an EXPR_ARRAY in this case.
2026 2019-03-08 Jakub Jelinek <jakub@redhat.com>
2029 * arith.c (gfc_complex2complex): Avoid two spaces in the middle of
2031 * resolve.c (resolve_allocate_expr): Likewise.
2033 2019-03-06 Harald Anlauf <anlauf@gmx.de>
2036 * expr.c (simplify_const_ref): Avoid null pointer dereference.
2038 2019-03-03 Harald Anlauf <anlauf@gmx.de>
2039 Steven G. Kargl <kargl@gcc.gnu.org>
2042 * symbol.c (check_conflict): Check for valid procedure name
2043 passed to error reporting routine.
2045 2019-03-03 Thomas Koenig <tkoenig@gcc.gnu.org>
2048 * resolve.c (resolve_allocate_expr): Add some tests for coarrays.
2050 2019-03-02 Harald Anlauf <anlauf@gmx.de>
2053 * check.c (gfc_calculate_transfer_sizes): Correct checks for cases
2054 where storage size of elements of MOLD is 0.
2056 2019-02-28 Thomas Schwinge <thomas@codesourcery.com>
2057 Cesar Philippidis <cesar@codesourcery.com>
2061 * openmp.c (gfc_match_oacc_routine): Handle repeated use of the
2062 Fortran OpenACC 'routine' directive.
2065 * gfortran.h (enum oacc_routine_lop): Add OACC_ROUTINE_LOP_ERROR.
2066 * openmp.c (gfc_oacc_routine_lop, gfc_match_oacc_routine): Use it.
2067 * trans-decl.c (add_attributes_to_decl): Likewise.
2071 * openmp.c (gfc_match_oacc_routine): Accept intrinsic symbols.
2073 2019-02-26 Harald Anlauf <anlauf@gmx.de>
2076 * check.c (gfc_calculate_transfer_sizes): Handle cases where
2077 storage size of elements of MOLD is 0.
2079 2019-02-26 Thomas Koenig <tkoenig@gcc.gnu.org>
2082 * trans-types.c (get_formal_from_actual_arglist): If
2083 the actual arglist has no expression, the corresponding
2084 formal arglist is an alternate return.
2086 2019-02-26 Jakub Jelinek <jakub@redhat.com>
2089 * trans-array.c (gfc_conv_array_initializer): Use RANGE_EXPR instead
2090 of duplicating the initializer possibly many times.
2092 2019-02-24 Thomas Koenig <tkoenig@gcc.gnu.org>
2095 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Add is_mold
2096 to arguments. If we are dealing with a MOLD, call
2097 gfc_expr_to_initialize().
2098 * trans-stmt.c (gfc_trans_allocate): For MOLD, pass is_mold=true
2099 to gfc_find_and_cut_at_last_class_ref.
2100 * trans.h (gfc_find_and_cut_at_last_class_ref): Add optional
2101 argument is_mold with default false.
2103 2019-02-24 Harald Anlauf <anlauf@gmx.de>
2107 * target-memory.c (gfc_element_size): Return false if element size
2108 cannot be determined; element size is returned separately.
2109 (gfc_target_expr_size): Return false if expression size cannot be
2110 determined; expression size is returned separately.
2111 * target-memory.h: Adjust prototypes.
2112 * check.c (gfc_calculate_transfer_sizes): Adjust references to
2113 gfc_target_expr_size, gfc_element_size.
2114 * arith.c (hollerith2representation): Likewise.
2115 * class.c (find_intrinsic_vtab): Likewise.
2116 * simplify.c (gfc_simplify_sizeof): Likewise.
2118 2019-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2121 * trans-io.c (transfer_expr): Do not return if there are no
2122 components to the derived type or class.
2124 2019-02-23 Paul Thomas <pault@gcc.gnu.org>
2127 * resolve.c (deferred_op_assign): Return if the lhs expression
2128 has the pointer attribute.
2129 * trans-expr.c (gfc_trans_assignment_1): Do not fix the string
2130 length if the lhs expression has the pointer attribute.
2132 2019-02-23 Paul Thomas <pault@gcc.gnu.org>
2136 * decl.c (gfc_verify_c_interop_param): Restriction on string
2137 length being one is lifted for F2018.
2138 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): For scalar
2139 characters with intent in, make a temporary and copy the result
2140 of the expression evaluation into it.
2141 (gfc_conv_procedure_call): Set a flag for character formal args
2142 having a character length that is not unity. If the procedure
2143 is bind C, call gfc_conv_gfc_desc_to_cfi_desc in this case.
2144 Also, extend bind C calls to unconditionally convert both
2145 pointers and allocatable expressions.
2147 2019-02-23 David Malcolm <dmalcolm@redhat.com>
2148 Jakub Jelinek <jakub@redhat.com>
2151 * simplify.c (norm2_do_sqrt, gfc_simplify_norm2): Use
2152 mpfr_number_p && !mpfr_zero_p instead of mpfr_regular_p.
2153 (norm2_add_squared): Likewise. Use mp_exp_t rather than mpfr_exp_t.
2155 2019-02-22 Harald Anlauf <anlauf@gmx.de>
2158 * io.c (gfc_match_open): Fix logic in checks of OPEN statement
2159 when NEWUNIT= is specified.
2161 2019-02-22 Steven G. Kargl <kargl@gcc.gnu.org>
2164 * gfortran.texi: Fix documentation to match the implementation.
2166 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2167 Cesar Philippidis <cesar@codesourcery.com>
2170 * gfortran.h (oacc_routine_lop): New enum.
2171 (symbol_attribute): Use it.
2172 * openmp.c (gfc_oacc_routine_dims): Replace with...
2173 (gfc_oacc_routine_lop): ... this new function.
2174 (gfc_match_oacc_routine): Adjust.
2175 * trans-decl.c (add_attributes_to_decl): Likewise.
2177 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2179 * openmp.c (gfc_match_oacc_declare): Revert earlier changes.
2181 2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
2183 * dump-parse-tree.c (debug): Implement for gfc_expr *,
2184 gfc_typespec *, gfc_typespec and gfc_symbol *.
2186 2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
2189 * class.c (gfc_get_len_component): Add argument k for kind.
2190 If the kind of the resulting expression is not equal to k,
2192 * gfortran.h (gfc_len_component): Adjust prototype.
2193 * simplify.c (gfc_simplify_len): Pass kind to
2194 gfc_get_len_component.
2196 2019-02-20 Martin Liska <mliska@suse.cz>
2198 * gfortran.texi: Change singular to plural.
2200 2019-02-20 Martin Liska <mliska@suse.cz>
2202 * gfortran.texi: Document Fortran header directive.
2204 2019-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
2207 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): If the dummy
2208 argument is contiguous and the actual argument may not be,
2209 use gfc_conv_subref_array_arg.
2211 2019-02-19 Thomas Schwinge <thomas@codesourcery.com>
2214 * openmp.c (gfc_match_omp_clauses): Add representation of wait clause
2215 without argument as 'wait (GOMP_ASYNC_NOVAL)'.
2217 2019-02-18 Thomas Koenig <tkoenig@gcc.gnu.org>
2220 * trans-decl.c (gfc_get_extern_function_decl): Add argument
2221 actual_args and pass it through to gfc_get_function_type.
2222 * trans-expr.c (conv_function_val): Add argument actual_args
2223 and pass it on to gfc_get_extern_function_decl.
2224 (conv_procedure_call): Pass actual arguments to conv_function_val.
2225 * trans-types.c (get_formal_from_actual_arglist): New function.
2226 (gfc_get_function_type): Add argument actual_args. Generate
2227 formal args from actual args if necessary.
2228 * trans-types.h (gfc_get_function_type): Add optional argument.
2229 * trans.h (gfc_get_extern_function_decl): Add optional argument.
2231 2019-02-18 Martin Liska <mliska@suse.cz>
2233 * decl.c (gfc_match_gcc_builtin): Add support for filtering
2234 of builtin directive based on multilib ABI name.
2236 2019-02-17 Harald Anlauf <anlauf@gmx.de>
2239 * resolve.c (resolve_common_blocks,resolve_common_vars): Move
2240 check for obsolent COMMON feature in F2018 to better place.
2242 2019-02-17 Harald Anlauf <anlauf@gmx.de>
2245 * decl.c (gfc_set_constant_character_len): Clear original string
2246 representation after padding has been performed to target length.
2248 2019-02-16 Jakub Jelinek <jakub@redhat.com>
2251 * simplify.c (simplify_transformation_to_array): Run post_op
2252 immediately after processing corresponding row, rather than at the
2254 (norm2_scale): New variable.
2255 (add_squared): Rename to ...
2256 (norm2_add_squared): ... this. Scale down operand and/or result
2258 (do_sqrt): Rename to ...
2259 (norm2_do_sqrt): ... this. Handle the result == e case. Scale up
2260 result and clear norm2_scale.
2261 (gfc_simplify_norm2): Clear norm2_scale. Change add_squared to
2262 norm2_add_squared and &do_sqrt to norm2_do_sqrt. Scale up result
2263 and clear norm2_scale again.
2265 2019-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
2268 * trans-decl.c (generate_coarray_sym_init): For an array
2269 constructor in a DATA statement of a coarray variable, set the
2270 rank to 1 to avoid confusion later on. If the constructor
2271 contains only one value, use that for initiailizig.
2273 2019-02-14 Janne Blomqvist <jb@gcc.gnu.org>
2276 * gfortran.h (gfc_option_t): Make flag_init_integer_value a long.
2277 * options.c (gfc_handle_option): Use strtol instead of atoi.
2278 * invoke.texi: Document -finit-integer behavior in more detail.
2280 2019-02-14 Harald Anlauf <anlauf@gmx.de>
2283 * symbol.c: Move check for labeled DO statement from
2284 gfc_define_st_label to gfc_reference_st_label.
2286 2019-02-14 Cesar Philippidis <cesar@codesourcery.com>
2289 * openmp.c (resolve_oacc_nested_loops): Error on do concurrent
2292 2019-02-13 Martin Liska <mliska@suse.cz>
2295 * resolve.c (resolve_operator): Initialize 't' right
2296 after function entry. Skip switch (e->value.op.op)
2297 for -fdec operands that become function calls.
2299 2019-02-10 Thomas Koenig <tkoenig@gcc.gnu.org>
2302 * expr.c (gfc_check_assign): Add argument is_init_expr. If we are
2303 looking at an init expression, issue error if the target is not a
2304 TARGET and we are not looking at a procedure pointer.
2305 * gfortran.h (gfc_check_assign): Add optional argument
2308 2019-02-09 Harald Anlauf <anlauf@gmx.de>
2311 * resolve.c (gfc_resolve_substring_charlen): Check substring
2312 length for constantness prior to general calculation of length.
2314 2019-02-09 Paul Thomas <pault@gcc.gnu.org>
2317 * trans-array.c (gfc_trans_create_temp_array): Set the 'span'
2318 field for derived types.
2320 2019-02-04 Harald Anlauf <anlauf@gmx.de>
2323 * decl.c (add_init_expr_to_sym): Copy length of string initializer
2326 2019-02-04 Martin Liska <mliska@suse.cz>
2329 * resolve.c (resolve_ref): Remove breakout variable as
2330 we need to prevent prev = &(*prev)->next to happen
2333 2019-02-04 Martin Liska <mliska@suse.cz>
2336 * scanner.c (load_file): Report error for -fpre-include
2337 file and do not ICE.
2339 2019-02-02 Dominique d'Humieres <dominiq@gcc.gnu.org>
2342 * invoke.texi: Document the behavior of repeated -ffpe-trap
2345 2019-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
2348 * arith.c (gfc_int2int): Do not warn if src->do_not_warn is set.
2349 * gfortran.h (gfc_expr): Add flag do_not_warn.
2350 * intrinsic.c (gfc_convert_type_warn): Set expr->do_not_warn if
2351 no warning is desired.
2353 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
2356 * trans-expr.c (gfc_conv_procedure_call): For derived entities,
2357 passed in parentheses to class formals, invert the order of
2358 copying allocatable components to taking the _data of the
2361 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
2364 * trans-array.c (gfc_array_init_size): Add element_size to the
2366 (gfc_array_allocate): Remove the recalculation of the size of
2367 the element and use element_size from the call to the above.
2368 Unconditionally set the span field of the descriptor.
2370 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
2373 * expr.c (is_subref_array): Move the check for class pointer
2374 dummy arrays to after the reference check. If we haven't seen
2375 an array reference other than an element and a component is not
2376 class or derived, return false.
2378 2019-02-01 Jakub Jelinek <jakub@redhat.com>
2382 * trans-decl.c (generate_local_decl): Add referenced FL_PARAMETERs
2383 if sym->ns->construct_entities rather than if
2384 sym->ns->parent->code->op == EXEC_BLOCK.
2386 2019-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
2389 * resolve.c (resolve_component): If the reference is a BT_CLASS,
2390 copy the contiguous attribute from the reference and use the
2393 2019-01-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2396 * io.c (match_io): Add check for comma after '*' without subsequent
2399 2019-01-30 Dominique d'Humieres <dominiq@gcc.gnu.org>
2402 * invoke.texi: Document the promotion of double precision
2405 2019-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
2408 * interface.c (gfc_compare_types): If a derived type and an
2409 integer both have a derived type, and they are identical,
2410 this is a C binding type and compares equal.
2412 2019-01-26 Harald Anlauf <anlauf@gmx.de>
2415 * expr.c (check_inquiry): Add list of inquiry functions allowed in
2416 constant expressions for F2008+.
2418 2019-01-25 Steven G. Kargl <kargl@gcc.gnu.org>
2421 * decl.c (gfc_match_subroutine): Check for conflict between BIND(C)
2422 and alternative return.
2424 2019-01-24 Paul Thomas <pault@gcc.gnu.org>
2427 * trans-array.c (gfc_conv_descriptor_elem_len): New function.
2428 * trans-array.h : Add prototype for above.
2429 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Take account of
2430 assumed rank arrays being flagged by rank = -1 in expressions.
2431 Intent in arrays need a pointer to a copy of the data to be
2432 assigned to the descriptor passed for conversion. This should
2433 then be freed, together with the CFI descriptor on return from
2436 2019-01-22 Harald Anlauf <anlauf@gmx.de>
2439 * trans-expr.c (gfc_conv_power_op): Handle cases of (2**e) ** integer
2440 and (- 2**e) ** integer.
2442 2019-01-19 Dominique d'Humieres <dominiq@gcc.gnu.org>
2445 * resolve.c (resolve_types): Add !flag_automatic.
2446 * symbol.c (gfc_add_save): Silence warnings.
2448 2019-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
2451 * io.c (match_io_element): input-item cannot be an external function.
2453 2018-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
2454 Paul Thomas <pault@gcc.gnu.org>
2457 * trans-expr.c (gfc_conv_procedure_call): Call
2458 gfc_conv_subref_array_arg if the formal arg is contiguous
2459 and the actual arg may not be.
2461 2019-01-17 Thomas Koenig <tkoenig@gcc.gnu.org>
2464 * resolve.c (resolve_ref): Fix logic for removal of
2467 2019-01-19 Jakub Jelinek <jakub@redhat.com>
2470 * trans-decl.c (gfc_get_symbol_decl): Don't add length to function
2471 or parent function if it has been added there already.
2473 2019-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
2476 * resolve.c (resolve_array_ref): Add equal_length argument; set it
2477 if the length of the substring equals that of the orignal
2479 (resolve_ref): Remove the substring if it is equal in length to
2480 the original variable, unless it is an EXPR_SUBSTRING).
2482 2019-01-15 Steven G. Kargl <kargl@gcc.gnu.org>
2485 * resolve.c (resolve_symbol): Host associated varaibles can appear
2486 in the specification statement of a RESULT array.
2488 2019-01-15 Paul Thomas <pault@gcc.gnu.org>
2490 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Deal with exprs
2491 that are indirect references; ie. dummy arguments.
2493 2019-01-13 Dominique d'Humieres <dominiq@gcc.gnu.org>
2496 * gfortran.texi: Replace @xref with @ref and adjust the sentence.
2498 2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
2501 * trans-array.c (gfc_conv_array_parameter): Do not pack/unpack
2502 functions with contiguous results.
2504 2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
2507 * trans-array.c (gfc_conv_array_parameter): Remove TODO. Do not
2508 pack/unpack results of functions which return an explicit-shaped
2509 or allocatable array.
2511 2019-01-12 Steven G. Kargl <kargl@gcc.gnu.org>
2514 * resolve.c (gfc_verify_binding_labels): Break if-elseif-elseif
2515 structure into independent if's with a return to simplify logic.
2516 Avoid a check for ENTRY name with bind(c).
2518 2019-01-12 Paul Thomas <pault@gcc.gnu.org>
2520 * gfortran.texi: Add description in sections on TS 29113 and
2521 further interoperability with C.
2522 * trans-array.c (gfc_conv_descriptor_attribute): New function.
2523 (gfc_get_dataptr_offset): Remove static function attribute.
2524 * trans-array.h: Add prototypes for above functions.
2525 * trans-decl.c: Add declarations for the library functions
2526 cfi_desc_to_gfc_desc and gfc_desc_to_cfi_desc.
2527 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): New function.
2528 (gfc_conv_procedure_call): Call it for scalar and array actual
2529 arguments, when the formal arguments are bind_c with assumed
2530 shape or assumed rank.
2531 * trans.h: External declarations for gfor_fndecl_cfi_to_gfc
2532 and gfor_fndecl_gfc_to_cfi.
2534 2019-01-11 Steven G. Kargl <kargl@gcc.gnu.org>
2537 * decl.c (gfc_match_entry): Check for F2018:C1546. Fix nearby
2540 2019-01-11 Jakub Jelinek <jakub@redhat.com>
2544 * trans-openmp.c: Include attribs.h.
2545 (gfc_walk_alloc_comps, gfc_omp_clause_linear_ctor): Handle
2546 VAR_DECL max bound with "omp dummy var" attribute like NULL or
2547 error_mark_node - recompute number of elts independently.
2549 2019-01-11 Thomas Koenig <tkoenig@gcc.gnu.org>
2552 * trans-array.c (gfc_conv_parameter_array): Temporary
2553 arrays generated for expressions do not need to be repacked.
2555 2019-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
2558 * decl.c (top_var_list): Set locus of expr.
2559 (gfc_match_data): Detect pointer on non-rightmost part-refs.
2561 2019-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
2564 * resolve.c (is_illegal_recursion): Remove an assert().
2566 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
2569 * expr.c: Change "can not" to "cannot".
2571 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
2574 * class.c: Mechanically replace "can not" with "cannot".
2577 * gfc-internals.texi: Likewise.
2578 * intrinsic.texi: Likewise.
2579 * invoke.texi: Likewise.
2581 * match.c: Likewise.
2582 * parse.c: Likewise.
2583 * primary.c: Likewise.
2584 * resolve.c: Likewise.
2585 * symbol.c: Likewise.
2586 * trans-array.c: Likewise.
2587 * trans-decl.c: Likewise.
2588 * trans-intrinsic.c: Likewise.
2589 * trans-stmt.c: Likewise.
2591 2019-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
2594 * simplify.c (gfc_simplify_spread): Also simplify if the
2595 type of source is an EXPR_STRUCTURE.
2597 2019-01-08 Janus Weil <janus@gcc.gnu.org>
2600 * class.c (gfc_find_vtab): For polymorphic typespecs, the components of
2601 the class container may not be available (in case of invalid code).
2603 2019-01-08 Richard Biener <rguenther@suse.de>
2606 * trans-expr.c (gfc_conv_initializer): For ISOCBINDING_NULL_*
2607 directly build the expected GENERIC tree.
2609 2019-01-07 Thomas Koenig <tkoenig@gcc.gnu.org>
2610 Harald Anlauf <anlauf@gmx.de>
2611 Tobias Burnus <burnus@gcc.gnu.org>
2614 * check.c (gfc_check_is_contiguous): New function.
2615 * expr.c (gfc_is_not_contiguous): New function.
2616 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IS_CONTIGUOUS.
2617 Add prototype for gfc_is_not_contiguous.
2618 * intrinsic.c (do_ts29113_check): Add GFC_ISYM_IS_CONTIGUOUS.
2619 (add_function): Add is_contiguous.
2620 * intrinsic.h: Add prototypes for gfc_check_is_contiguous,
2621 gfc_simplify_is_contiguous and gfc_resolve_is_contiguous.
2622 * intrinsic.texi: Add IS_CONTIGUOUS.
2623 * iresolve.c (gfc_resolve_is_contiguous): New function.
2624 * simplify.c (gfc_simplify_is_contiguous): New function.
2625 * trans-decl.c (gfor_fncecl_is_contiguous0): New variable.
2626 (gfc_build_intrinsic_function_decl): Add it.
2627 * trans-intrinsic.c (gfc_conv_intrinsic_is_contiguous): New
2629 (gfc_conv_intrinsic_function): Handle GFC_ISYM_IS_CONTIGUOUS.
2631 2019-01-06 Thomas Koenig <tkoenig@gcc.gnu.org>
2634 * gfortran.h: Add macro gfc_real_4_kind
2635 * simplify.c (simplify_min_max): Special case for the types of
2636 AMAX0, AMIN0, MAX1 and MIN1, which actually change the types of
2639 2019-01-05 Janus Weil <janus@gcc.gnu.org>
2642 * class.c (gfc_find_derived_vtab): Mark the _final component as
2644 (find_intrinsic_vtab): Ditto. Also add an extra check to avoid
2645 dereferencing a null pointer and adjust indentation.
2646 * resolve.c (resolve_fl_variable): Add extra check to avoid
2647 dereferencing a null pointer. Move variable declarations to local scope.
2648 (resolve_fl_procedure): Add extra check to avoid dereferencing a null
2650 * symbol.c (check_conflict): Suppress errors for artificial symbols.
2652 2019-01-01 Steven G. Kargl <kargl@gcc.gnu.org>
2654 * parse.c (decode_statement): Suppress "Unclassifiable statement"
2655 error if previous error messages were emittes.
2657 2019-01-01 Thomas Koenig <tkoenig@gcc.gnu.org>
2660 * primary.c (gfc_convert_to_structure_constructor): If a character
2661 in a constructor is too long, add a warning with
2662 -Wcharacter-truncation.
2664 2019-01-01 Jakub Jelinek <jakub@redhat.com>
2666 Update copyright years.
2668 * gfortranspec.c (lang_specific_driver): Update copyright notice
2670 * gfc-internals.texi: Bump @copying's copyright year.
2671 * gfortran.texi: Ditto.
2672 * intrinsic.texi: Ditto.
2673 * invoke.texi: Ditto.
2675 Copyright (C) 2019 Free Software Foundation, Inc.
2677 Copying and distribution of this file, with or without modification,
2678 are permitted in any medium without royalty provided the copyright
2679 notice and this notice are preserved.