1 2021-10-06 Tobias Burnus <tobias@codesourcery.com>
3 * resolve.c (resolve_values): Only show
4 deprecated warning if attr.referenced.
6 2021-10-04 Tobias Burnus <tobias@codesourcery.com>
9 * resolve.c (can_generate_init, resolve_fl_variable_derived,
10 resolve_symbol): Only do initialization with intent(out) if not
11 inside of an interface block.
13 2021-10-01 Martin Sebor <msebor@redhat.com>
16 * array.c: Remove an unnecessary test.
17 * trans-array.c: Same.
19 2021-10-01 Jakub Jelinek <jakub@redhat.com>
21 * gfortran.h (gfc_omp_clauses): Add order_reproducible bitfield.
22 * dump-parse-tree.c (show_omp_clauses): Print REPRODUCIBLE: for it.
23 * openmp.c (gfc_match_omp_clauses): Set order_reproducible for
24 explicit reproducible: modifier.
25 * trans-openmp.c (gfc_trans_omp_clauses): Set
26 OMP_CLAUSE_ORDER_REPRODUCIBLE for order_reproducible.
27 (gfc_split_omp_clauses): Also copy order_reproducible.
29 2021-09-30 Harald Anlauf <anlauf@gmx.de>
32 * simplify.c (simplify_size): Resolve expressions used in array
33 specifications so that SIZE can be simplified.
35 2021-09-30 Harald Anlauf <anlauf@gmx.de>
37 * expr.c: The correct reference to Fortran standard is: F2018:10.1.12.
39 2021-09-30 Tobias Burnus <tobias@codesourcery.com>
43 * trans-intrinsic.c (gfc_conv_same_type_as): Fix handling
45 * trans.h (gfc_vtpr_hash_get): Renamed prototype to ...
46 (gfc_vptr_hash_get): ... this to match function name.
48 2021-09-29 Harald Anlauf <anlauf@gmx.de>
51 * array.c (expand_constructor): Do not dereference NULL pointer.
53 2021-09-27 Tobias Burnus <tobias@codesourcery.com>
56 * trans-array.c (gfc_tree_array_size): New function to
57 find size inline (whole array or one dimension).
58 (array_parameter_size): Use it, take stmt_block as arg.
59 (gfc_conv_array_parameter): Update call.
60 * trans-array.h (gfc_tree_array_size): Add prototype.
61 * trans-decl.c (gfor_fndecl_size0, gfor_fndecl_size1): Remove
63 (gfc_build_intrinsic_function_decls): Remove their initialization.
64 * trans-expr.c (gfc_conv_procedure_call): Update
65 bounds of pointer/allocatable actual args to nonallocatable/nonpointer
66 dummies to be one based.
67 * trans-intrinsic.c (gfc_conv_intrinsic_shape): Fix case for
68 assumed rank with allocatable/pointer dummy.
69 (gfc_conv_intrinsic_size): Update to use inline function.
70 * trans.h (gfor_fndecl_size0, gfor_fndecl_size1): Remove var decl.
72 2021-09-26 Tobias Burnus <tobias@codesourcery.com>
75 * trans-intrinsic.c (gfc_conv_associated): Support assumed-rank
76 'pointer' with scalar/array 'target' argument.
78 2021-09-24 Harald Anlauf <anlauf@gmx.de>
81 * expr.c (is_non_constant_intrinsic): Check for intrinsics
82 excluded in constant expressions (F2018:10.1.2).
83 (gfc_is_constant_expr): Use that check.
85 2021-09-24 Sandra Loosemore <sandra@codesourcery.com>
88 * interface.c (compare_parameter): Enforce F2018 C711.
90 2021-09-24 Tobias Burnus <tobias@codesourcery.com>
93 * scanner.c (load_file): Return void, call (gfc_)fatal_error for
95 (include_line, include_stmt, gfc_new_file): Remove exit call
96 for failed load_file run.
98 2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
101 * decl.c (gfc_verify_c_interop_param): Handle F2018 C1557,
104 2021-09-23 Harald Anlauf <anlauf@gmx.de>
105 Tobias Burnus <tobias@codesourcery.com>
108 * trans-intrinsic.c (gfc_conv_allocated): Cleanup. Handle
109 coindexed scalar coarrays.
111 2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
114 * interface.c (gfc_compare_actual_formal): Extend existing
115 assumed-type diagnostic to also check for argument with type
118 2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
121 * check.c (gfc_check_associated): Allow an assumed-rank
122 array for the pointer argument.
123 * interface.c (compare_parameter): Also give rank mismatch
124 error on assumed-rank array.
126 2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
128 * trans-stmt.c (trans_associate_var): Check that result of
129 GFC_DECL_SAVED_DESCRIPTOR is not null before using it.
131 2021-09-22 Tobias Burnus <tobias@codesourcery.com>
134 * cpp.c (gfc_cpp_register_include_paths, gfc_cpp_post_options):
135 Add new bool verbose_missing_dir_warn argument.
136 * cpp.h (gfc_cpp_post_options): Update prototype.
137 * f95-lang.c (gfc_init): Remove duplicated file-not found diag.
138 * gfortran.h (gfc_check_include_dirs): Takes bool
139 verbose_missing_dir_warn arg.
140 (gfc_new_file): Returns now void.
141 * options.c (gfc_post_options): Update to warn for -I and -J,
142 only, by default but for all when user requested.
143 * scanner.c (gfc_do_check_include_dir):
144 (gfc_do_check_include_dirs, gfc_check_include_dirs): Take bool
145 verbose warn arg and update to avoid printing the same message
147 (load_file): Fix indent.
148 (gfc_new_file): Return void and exit when load_file failed
149 as all other load_file users do.
151 2021-09-22 Tobias Burnus <tobias@codesourcery.com>
153 * trans-expr.c (gfc_simple_for_loop): New.
154 * trans.h (gfc_simple_for_loop): New prototype.
156 2021-09-21 Tobias Burnus <tobias@codesourcery.com>
159 * cpp.c: Define GCC_C_COMMON_C for #include "options.h" to make
160 cpp_reason_option_codes available.
161 (gfc_cpp_register_include_paths): Make static, set pfile's
162 warn_missing_include_dirs and move before caller.
163 (gfc_cpp_init_cb): New, cb code moved from ...
164 (gfc_cpp_init_0): ... here.
165 (gfc_cpp_post_options): Call gfc_cpp_init_cb.
166 (cb_cpp_diagnostic_cpp_option): New. As implemented in c-family
167 to match CppReason flags to -W... names.
168 (cb_cpp_diagnostic): Use it to replace single special case.
169 * cpp.h (gfc_cpp_register_include_paths): Remove as now static.
170 * gfortran.h (gfc_check_include_dirs): New prototype.
171 (gfc_add_include_path): Add new bool arg.
172 * options.c (gfc_init_options): Don't set -Wmissing-include-dirs.
173 (gfc_post_options): Set it here after commandline processing. Call
174 gfc_add_include_path with defer_warn=false.
175 (gfc_handle_option): Call it with defer_warn=true.
176 * scanner.c (gfc_do_check_include_dir, gfc_do_check_include_dirs,
177 gfc_check_include_dirs): New. Diagnostic moved from ...
178 (add_path_to_list): ... here, which came before cmdline processing.
179 Take additional bool defer_warn argument.
180 (gfc_add_include_path): Take additional defer_warn arg.
181 * scanner.h (struct gfc_directorylist): Reorder for alignment issues,
184 2021-09-20 Tobias Burnus <tobias@codesourcery.com>
186 * gfortran.h (gfc_omp_clauses): Add order_unconstrained.
187 * dump-parse-tree.c (show_omp_clauses): Dump it.
188 * openmp.c (gfc_match_omp_clauses): Match unconstrained/reproducible
189 modifiers to ordered(concurrent).
190 (OMP_DISTRIBUTE_CLAUSES): Accept ordered clause.
191 (resolve_omp_clauses): Reject ordered + order on same directive.
192 * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses): Pass
193 on unconstrained modifier of ordered(concurrent).
195 2021-09-17 Harald Anlauf <anlauf@gmx.de>
198 * trans-decl.c (gfc_finish_var_decl): Disable the warning message
199 for variables moved from stack to static storange if they are
200 declared in the main, but allow the move to happen.
202 2021-09-17 Sandra Loosemore <sandra@codesourcery.com>
204 * intrinsic.texi (ISO_C_BINDING): Change C_FLOAT128 to correspond
205 to _Float128 rather than __float128.
206 * iso-c-binding.def (c_float128): Update comments.
207 * trans-intrinsic.c (gfc_builtin_decl_for_float_kind): Likewise.
208 (build_round_expr): Likewise.
209 (gfc_build_intrinsic_lib_fndcecls): Likewise.
210 * trans-types.h (gfc_real16_is_float128): Likewise.
212 2021-09-16 Harald Anlauf <anlauf@gmx.de>
215 * trans-expr.c (gfc_conv_procedure_call): Wrap deallocation of
216 allocatable components of optional allocatable derived type
217 procedure arguments with INTENT(OUT) into a presence check.
219 2021-09-14 Harald Anlauf <anlauf@gmx.de>
222 * resolve.c (resolve_entries): Attempt to recover cleanly after
223 rejecting mismatched function entries.
225 2021-09-14 Tobias Burnus <tobias@codesourcery.com>
228 * parse.c (gfc_ascii_statement): Add missing ST_OMP_END_SCOPE.
230 2021-09-13 Harald Anlauf <anlauf@gmx.de>
233 * decl.c (add_init_expr_to_sym): For proper initialization of
234 array-valued named constants the array bounds need to be
235 simplified before adding the initializer.
237 2021-09-13 Harald Anlauf <anlauf@gmx.de>
240 * expr.c (find_substring_ref): Handle given substring start and
241 end indices as signed integers, not unsigned.
243 2021-09-09 Harald Anlauf <anlauf@gmx.de>
246 * trans-expr.c (gfc_conv_substring): Do not generate substring
247 bounds check for implied do loop index variable before it actually
250 2021-09-08 liuhongt <hongtao.liu@intel.com>
252 * options.c (gfc_post_options): Issue an error for
253 -fexcess-precision=16.
255 2021-09-07 Harald Anlauf <anlauf@gmx.de>
258 * expr.c (find_array_element): When bounds cannot be determined as
259 constant, return error instead of aborting.
261 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
263 * openmp.c (gfc_match_omp_flush): Parse 'seq_cst' clause on 'flush'
265 * trans-openmp.c (gfc_trans_omp_flush): Handle OMP_MEMORDER_SEQ_CST.
267 2021-09-03 Tobias Burnus <tobias@codesourcery.com>
269 * decl.c (gfc_verify_c_interop_param): Reject pointer with
270 CONTIGUOUS attributes as dummy arg. Reject character len > 1
271 when passed as byte stream.
273 2021-09-01 Harald Anlauf <anlauf@gmx.de>
276 * resolve.c (resolve_common_vars): Fix grammar and improve wording
277 of error message rejecting an unlimited polymorphic in COMMON.
279 2021-08-31 Harald Anlauf <anlauf@gmx.de>
282 * simplify.c (substring_has_constant_len): Minimize checks for
283 substring expressions being allowed.
285 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
287 * gfortran.h: Add variable for 'ancestor' in struct gfc_omp_clauses.
288 * openmp.c (gfc_match_omp_clauses): Parse device-modifiers 'device_num'
289 and 'ancestor' in 'target device' clauses.
290 * trans-openmp.c (gfc_trans_omp_clauses): Set OMP_CLAUSE_DEVICE_ANCESTOR.
292 2021-08-30 Harald Anlauf <anlauf@gmx.de>
295 * match.c (gfc_match_goto): Allow for whitespace in parsing list
298 2021-08-30 Harald Anlauf <anlauf@gmx.de>
301 * resolve.c (resolve_allocate_expr): An unlimited polymorphic
302 argument to ALLOCATE must be ALLOCATABLE or a POINTER. Fix the
305 2021-08-28 Harald Anlauf <anlauf@gmx.de>
308 * resolve.c (resolve_entries): For functions of type CHARACTER
309 tighten the checks for matching characteristics.
311 2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
314 * cpp.c (gfc_cpp_post_options): Call new function
315 diagnostic_initialize_input_context().
317 2021-08-24 Harald Anlauf <anlauf@gmx.de>
320 * trans-decl.c (gfc_finish_var_decl): Adjust check to handle
321 implicit SAVE as well as variables in the main program. Improve
322 warning message text.
324 2021-08-23 Tobias Burnus <tobias@codesourcery.com>
326 * openmp.c (gfc_match_dupl_check, gfc_match_dupl_memorder,
327 gfc_match_dupl_atomic): New.
328 (gfc_match_omp_clauses): Use them; remove duplicate
329 'release'/'relaxed' clause matching; improve error dignostic
332 2021-08-23 Tobias Burnus <tobias@codesourcery.com>
334 * dump-parse-tree.c (show_omp_clauses): Handle 'strict' modifier
335 on grainsize/num_tasks
336 * gfortran.h (gfc_omp_clauses): Add grainsize_strict
337 and num_tasks_strict.
338 * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses):
339 Handle 'strict' modifier on grainsize/num_tasks.
340 * openmp.c (gfc_match_omp_clauses): Likewise.
342 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
345 (error_uinteger): Take 'long long unsigned' instead
346 of 'long unsigned' as argumpent.
347 (error_integer): Take 'long long' instead of 'long'.
348 (error_hwuint, error_hwint): New.
349 (error_print): Update to handle 'll' and 'w'
351 * simplify.c (substring_has_constant_len): Use '%wd'
354 2021-08-20 Harald Anlauf <anlauf@gmx.de>
357 * simplify.c (substring_has_constant_len): Fix format string of
358 gfc_error, pass HOST_WIDE_INT bounds values via char buffer.
360 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
362 * dump-parse-tree.c (show_omp_clauses): Handle 'at', 'severity'
363 and 'message' clauses.
364 (show_omp_node, show_code_node): Handle EXEC_OMP_ERROR.
365 * gfortran.h (gfc_statement): Add ST_OMP_ERROR.
366 (gfc_omp_severity_type, gfc_omp_at_type): New.
367 (gfc_omp_clauses): Add 'at', 'severity' and 'message' clause;
368 use more bitfields + ENUM_BITFIELD.
369 (gfc_exec_op): Add EXEC_OMP_ERROR.
370 * match.h (gfc_match_omp_error): New.
371 * openmp.c (enum omp_mask1): Add OMP_CLAUSE_(AT,SEVERITY,MESSAGE).
372 (gfc_match_omp_clauses): Handle new clauses.
373 (OMP_ERROR_CLAUSES, gfc_match_omp_error): New.
374 (resolve_omp_clauses): Resolve new clauses.
375 (omp_code_to_statement, gfc_resolve_omp_directive): Handle
377 * parse.c (decode_omp_directive, next_statement,
378 gfc_ascii_statement): Handle 'omp error'.
379 * resolve.c (gfc_resolve_blocks): Likewise.
380 * st.c (gfc_free_statement): Likewise.
381 * trans-openmp.c (gfc_trans_omp_error): Likewise.
382 (gfc_trans_omp_directive): Likewise.
383 * trans.c (trans_code): Likewise.
385 2021-08-20 Jakub Jelinek <jakub@redhat.com>
387 * types.def (BT_FN_VOID_CONST_PTR_SIZE): New DEF_FUNCTION_TYPE_2.
388 * f95-lang.c (ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST): Define.
390 2021-08-19 Harald Anlauf <anlauf@gmx.de>
393 * simplify.c (substring_has_constant_len): New.
394 (gfc_simplify_len): Handle case of substrings with constant
397 2021-08-18 Tobias Burnus <tobias@codesourcery.com>
399 * match.h (gfc_match_omp_nothing): New.
400 * openmp.c (gfc_match_omp_nothing): New.
401 * parse.c (decode_omp_directive): Match 'nothing' directive.
403 2021-08-17 Tobias Burnus <tobias@codesourcery.com>
405 * dump-parse-tree.c (show_omp_node, show_code_node): Handle
407 * gfortran.h (enum gfc_statement): Add ST_OMP_(END_)SCOPE.
408 (enum gfc_exec_op): Add EXEC_OMP_SCOPE.
409 * match.h (gfc_match_omp_scope): New.
410 * openmp.c (OMP_SCOPE_CLAUSES): Define
411 (gfc_match_omp_scope): New.
412 (gfc_match_omp_cancellation_point, gfc_match_omp_end_nowait):
413 Improve error diagnostic.
414 (omp_code_to_statement): Handle ST_OMP_SCOPE.
415 (gfc_resolve_omp_directive): Handle EXEC_OMP_SCOPE.
416 * parse.c (decode_omp_directive, next_statement,
417 gfc_ascii_statement, parse_omp_structured_block,
418 parse_executable): Handle OpenMP's scope construct.
419 * resolve.c (gfc_resolve_blocks): Likewise
420 * st.c (gfc_free_statement): Likewise
421 * trans-openmp.c (gfc_trans_omp_scope): New.
422 (gfc_trans_omp_directive): Call it.
423 * trans.c (trans_code): handle EXEC_OMP_SCOPE.
425 2021-08-16 Tobias Burnus <tobias@codesourcery.com>
427 * dump-parse-tree.c (show_omp_clauses): Handle 'filter' clause.
428 (show_omp_node, show_code_node): Handle (combined) omp masked construct.
429 * frontend-passes.c (gfc_code_walker): Likewise.
430 * gfortran.h (enum gfc_statement): Add ST_OMP_*_MASKED*.
431 (enum gfc_exec_op): Add EXEC_OMP_*_MASKED*.
432 * match.h (gfc_match_omp_masked, gfc_match_omp_masked_taskloop,
433 gfc_match_omp_masked_taskloop_simd, gfc_match_omp_parallel_masked,
434 gfc_match_omp_parallel_masked_taskloop,
435 gfc_match_omp_parallel_masked_taskloop_simd): New prototypes.
436 * openmp.c (enum omp_mask1): Add OMP_CLAUSE_FILTER.
437 (gfc_match_omp_clauses): Match it.
438 (OMP_MASKED_CLAUSES, gfc_match_omp_parallel_masked,
439 gfc_match_omp_parallel_masked_taskloop,
440 gfc_match_omp_parallel_masked_taskloop_simd,
441 gfc_match_omp_masked, gfc_match_omp_masked_taskloop,
442 gfc_match_omp_masked_taskloop_simd): New.
443 (resolve_omp_clauses): Resolve filter clause.
444 (gfc_resolve_omp_parallel_blocks, resolve_omp_do,
445 omp_code_to_statement, gfc_resolve_omp_directive): Handle
446 omp masked constructs.
447 * parse.c (decode_omp_directive, case_exec_markers,
448 gfc_ascii_statement, parse_omp_do, parse_omp_structured_block,
449 parse_executable): Likewise.
450 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
451 * st.c (gfc_free_statement): Likewise.
452 * trans-openmp.c (gfc_trans_omp_clauses): Handle filter clause.
453 (GFC_OMP_SPLIT_MASKED, GFC_OMP_MASK_MASKED): New enum values.
454 (gfc_trans_omp_masked): New.
455 (gfc_split_omp_clauses): Handle combined masked directives.
456 (gfc_trans_omp_master_taskloop): Rename to ...
457 (gfc_trans_omp_master_masked_taskloop): ... this; handle also
458 combined masked directives.
459 (gfc_trans_omp_parallel_master): Rename to ...
460 (gfc_trans_omp_parallel_master_masked): ... this; handle
461 combined masked directives.
462 (gfc_trans_omp_directive): Handle EXEC_OMP_*_MASKED*.
463 * trans.c (trans_code): Likewise.
465 2021-08-15 Harald Anlauf <anlauf@gmx.de>
468 * match.c (sync_statement): Replace %v code by %e in gfc_match to
469 allow for function references as STAT and ERRMSG arguments.
470 * resolve.c (resolve_sync): Adjust checks of STAT= and ERRMSG= to
471 being definable arguments. Function references with a data
472 pointer result are accepted.
473 * trans-stmt.c (gfc_trans_sync): Adjust assertion.
475 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
477 * gfortran.h (gfc_omp_proc_bind_kind): Add OMP_PROC_BIND_PRIMARY.
478 * dump-parse-tree.c (show_omp_clauses): Add TODO comment to
479 change 'master' to 'primary' in proc_bind for OpenMP 5.1.
480 * intrinsic.texi (OMP_LIB): Mention OpenMP 5.1; add
481 omp_proc_bind_primary.
482 * openmp.c (gfc_match_omp_clauses): Accept
483 'primary' as alias for 'master'.
484 * trans-openmp.c (gfc_trans_omp_clauses): Handle
485 OMP_PROC_BIND_PRIMARY.
487 2021-08-11 Sandra Loosemore <sandra@codesourcery.com>
489 * iso-c-binding.def (c_float128, c_float128_complex): Check
490 float128_type_node instead of gfc_float128_type_node.
491 * trans-types.c (gfc_init_kinds, gfc_build_real_type):
492 Update comments re supported 128-bit floating-point types.
494 2021-08-11 Richard Biener <rguenther@suse.de>
496 * trans-common.c (create_common): Set TREE_THIS_VOLATILE on the
497 COMPONENT_REF if the field is volatile.
499 2021-08-07 Harald Anlauf <anlauf@gmx.de>
502 * primary.c (gfc_expr_attr): Variable attribute can only be
503 inquired when symtree is non-NULL.
505 2021-07-28 Harald Anlauf <anlauf@gmx.de>
508 * expr.c (gfc_check_vardef_context): Add check for KIND and LEN
510 * match.c (gfc_match): Fix comment for %v code.
511 (gfc_match_allocate, gfc_match_deallocate): Replace use of %v code
512 by %e in gfc_match to allow for function references as STAT and
514 * resolve.c (resolve_allocate_deallocate): Avoid NULL pointer
515 dereferences and shortcut for bad STAT and ERRMSG argument to
516 (DE)ALLOCATE. Remove bogus parts of checks for STAT and ERRMSG.
518 2021-07-26 José Rui Faustino de Sousa <jrfsousa@gmail.com>
519 Tobias Burnus <tobias@codesourcery.com>
526 * trans-decl.c (convert_CFI_desc): Only copy out the descriptor
528 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Updated attribute
529 handling which reflect a previous intermediate version of the
530 standard. Only copy out the descriptor if necessary.
532 2021-07-23 Harald Anlauf <anlauf@gmx.de>
535 * check.c (array_check): Adjust check for the case of CLASS
538 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
539 Joseph Myers <joseph@codesourcery.com>
540 Cesar Philippidis <cesar@codesourcery.com>
542 * dump-parse-tree.c (show_attr): Update.
543 * gfortran.h (symbol_attribute): Add 'oacc_routine_nohost' member.
544 (gfc_omp_clauses): Add 'nohost' member.
545 * module.c (ab_attribute): Add 'AB_OACC_ROUTINE_NOHOST'.
546 (attr_bits, mio_symbol_attribute): Update.
547 * openmp.c (omp_mask2): Add 'OMP_CLAUSE_NOHOST'.
548 (gfc_match_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
549 (OACC_ROUTINE_CLAUSES): Add 'OMP_CLAUSE_NOHOST'.
550 (gfc_match_oacc_routine): Update.
551 * trans-decl.c (add_attributes_to_decl): Update.
552 * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
554 2021-07-21 Harald Anlauf <anlauf@gmx.de>
557 * target-memory.c (gfc_interpret_derived): Size of array component
558 of derived type can only be computed here for explicit shape.
559 * trans-types.c (gfc_get_nodesc_array_type): Do not dereference
562 2021-07-21 Tobias Burnus <tobias@codesourcery.com>
564 * decl.c (gfc_verify_c_interop_param): Update for F2008 + F2018
565 changes; reject unsupported bits with 'Error: Sorry,'.
566 * trans-expr.c (gfc_conv_procedure_call): Fix condition to
567 For using CFI descriptor with characters.
569 2021-07-18 Harald Anlauf <anlauf@gmx.de>
572 * io.c (resolve_tag_format): Extend FORMAT check to unknown type.
574 2021-07-14 Harald Anlauf <anlauf@gmx.de>
577 * trans-expr.c (gfc_trans_class_init_assign): Call
578 gfc_conv_expr_present only for dummy variables.
580 2021-07-06 Thomas Koenig <tkoenig@gcc.gnu.org>
583 * frontend-passes.c (traverse_io_block): Adjust test for
584 when a variable is eligible for the transformation to
587 2021-06-28 Martin Sebor <msebor@redhat.com>
589 * trans-array.c (trans_array_constructor): Replace direct uses
590 of TREE_NO_WARNING with warning_suppressed_p, and suppress_warning.
591 * trans-decl.c (gfc_build_qualified_array): Same.
592 (gfc_build_dummy_array_decl): Same.
593 (generate_local_decl): Same.
594 (gfc_generate_function_code): Same.
595 * trans-openmp.c (gfc_omp_clause_default_ctor): Same.
596 (gfc_omp_clause_copy_ctor): Same.
597 * trans-types.c (get_dtype_type_node): Same.
598 (gfc_get_desc_dim_type): Same.
599 (gfc_get_array_descriptor_base): Same.
600 (gfc_get_caf_vector_type): Same.
601 (gfc_get_caf_reference_type): Same.
602 * trans.c (gfc_create_var_np): Same.
604 2021-06-23 Tobias Burnus <tobias@codesourcery.com>
606 * dump-parse-tree.c (show_omp_clauses): Fix enum type used
607 for dumping gfc_omp_defaultmap_category.
609 2021-06-23 Andre Vehreschild <vehre@gcc.gnu.org>
612 * trans-intrinsic.c (conv_co_collective): Check stat for null ptr
613 before dereferrencing.
615 2021-06-18 Harald Anlauf <anlauf@gmx.de>
619 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Unconditionally
620 convert result of min/max to result type.
622 2021-06-16 Harald Anlauf <anlauf@gmx.de>
626 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
628 * match.c (gfc_match_pointer_assignment): Likewise.
629 * parse.c (gfc_check_do_variable): Avoid comparison with NULL
632 2021-06-16 Harald Anlauf <anlauf@gmx.de>
635 2021-06-16 Harald Anlauf <anlauf@gmx.de>
639 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
641 * match.c (gfc_match_pointer_assignment): Likewise.
642 * parse.c (gfc_check_do_variable): Avoid comparison with NULL
645 2021-06-16 Harald Anlauf <anlauf@gmx.de>
649 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
651 * match.c (gfc_match_pointer_assignment): Likewise.
652 * parse.c (gfc_check_do_variable): Avoid comparison with NULL
655 2021-06-15 Tobias Burnus <tobias@codesourcery.com>
658 * dump-parse-tree.c (show_omp_clauses): Update for defaultmap.
659 * f95-lang.c (LANG_HOOKS_OMP_ALLOCATABLE_P,
660 LANG_HOOKS_OMP_SCALAR_TARGET_P): New.
661 * gfortran.h (enum gfc_omp_defaultmap,
662 enum gfc_omp_defaultmap_category): New.
663 * openmp.c (gfc_match_omp_clauses): Update defaultmap matching.
664 * trans-decl.c (gfc_finish_decl_attrs): Set GFC_DECL_SCALAR_TARGET.
665 * trans-openmp.c (gfc_omp_allocatable_p, gfc_omp_scalar_target_p): New.
666 (gfc_omp_scalar_p): Take 'ptr_alloc_ok' argument.
667 (gfc_trans_omp_clauses, gfc_split_omp_clauses): Update for
669 * trans.h (gfc_omp_scalar_p): Update prototype.
670 (gfc_omp_allocatable_p, gfc_omp_scalar_target_p): New.
671 (struct lang_decl): Add scalar_target.
672 (GFC_DECL_SCALAR_TARGET, GFC_DECL_GET_SCALAR_TARGET): New.
674 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
676 * resolve.c (resolve_variable): Remove *XCNEW used to
677 nullify nullified memory.
679 2021-06-09 Martin Liska <mliska@suse.cz>
681 * intrinsic.texi: Add missing @headitem to tables with a header.
683 2021-06-09 Jakub Jelinek <jakub@redhat.com>
686 * trans-openmp.c (gfc_omp_finish_clause): Gimplify OMP_CLAUSE_SIZE.
688 2021-06-08 Tobias Burnus <tobias@codesourcery.com>
691 * trans-openmp.c (gfc_add_clause_implicitly): New.
692 (gfc_split_omp_clauses): Use it.
693 (gfc_free_split_omp_clauses): New.
694 (gfc_trans_omp_do_simd, gfc_trans_omp_parallel_do,
695 gfc_trans_omp_parallel_do_simd, gfc_trans_omp_distribute,
696 gfc_trans_omp_teams, gfc_trans_omp_target, gfc_trans_omp_taskloop,
697 gfc_trans_omp_master_taskloop, gfc_trans_omp_parallel_master): Use it.
699 2021-06-08 Martin Liska <mliska@suse.cz>
701 * intrinsic.texi: Fix typo.
702 * trans-expr.c (gfc_trans_pointer_assignment): Likewise.
704 2021-06-05 José Rui Faustino de Sousa <jrfsousa@gmail.com>
711 * trans-array.c (gfc_get_array_span): rework the way character
712 array "span" was calculated.
713 (gfc_conv_expr_descriptor): improve handling of character sections
714 and unlimited polymorphic objects.
715 * trans-expr.c (gfc_get_character_len): new function to calculate
716 character string length.
717 (gfc_get_character_len_in_bytes): new function to calculate
718 character string length in bytes.
719 (gfc_conv_scalar_to_descriptor): add call to set the "span".
720 (gfc_trans_pointer_assignment): set "_len" and antecipate the
721 initialization of the deferred character length hidden argument.
722 * trans-intrinsic.c (gfc_conv_associated): set "force_no_tmp" to
723 avoid the creation of a temporary.
724 * trans-types.c (gfc_get_dtype_rank_type): rework type detection
725 so that unlimited polymorphic objects get proper type infomation,
726 also important for bind(c).
727 (gfc_get_dtype): add argument to pass the rank if necessary.
728 (gfc_get_array_type_bounds): cosmetic change to have character
729 arrays called character instead of unknown.
730 * trans-types.h (gfc_get_dtype): modify prototype.
731 * trans.c (get_array_span): rework the way character array "span"
733 * trans.h (gfc_get_character_len): new prototype.
734 (gfc_get_character_len_in_bytes): new prototype.
735 Add "unlimited_polymorphic" flag to "gfc_se" type to signal when
736 expression carries an unlimited polymorphic object.
738 2021-06-04 Harald Anlauf <anlauf@gmx.de>
741 * frontend-passes.c (inline_matmul_assign): Do not inline matmul
742 if the assignment to the resulting array if it is not of canonical
743 type (real/integer/complex/logical).
745 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
747 * dump-parse-tree.c (show_code_node): Handle
748 EXEC_OMP_(TARGET_)(,PARALLEL_,TEAMS_)LOOP.
750 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
752 * scanner.c (skip_fixed_omp_sentinel): Set openacc_flag if
753 this is not an (OpenMP) continuation line.
754 (skip_fixed_oacc_sentinel): Likewise for openmp_flag and OpenACC.
755 (gfc_next_char_literal): gfc_error_now to force error for mixed OMP/ACC
756 continuation once per location and return '\n'.
758 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
761 * openmp.c (gfc_match_omp_clauses): Fix typo in error message.
763 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
766 * dump-parse-tree.c (show_omp_clauses): Handle bind clause.
767 (show_omp_node): Handle loop directive.
768 * frontend-passes.c (gfc_code_walker): Likewise.
769 * gfortran.h (enum gfc_statement): Add
770 ST_OMP_(END_)(TARGET_)(|PARALLEL_|TEAMS_)LOOP.
771 (enum gfc_omp_bind_type): New.
772 (gfc_omp_clauses): Use it.
773 (enum gfc_exec_op): Add EXEC_OMP_(TARGET_)(|PARALLEL_|TEAMS_)LOOP.
774 * match.h (gfc_match_omp_loop, gfc_match_omp_parallel_loop,
775 gfc_match_omp_target_parallel_loop, gfc_match_omp_target_teams_loop,
776 gfc_match_omp_teams_loop): New.
777 * openmp.c (enum omp_mask1): Add OMP_CLAUSE_BIND.
778 (gfc_match_omp_clauses): Handle it.
779 (OMP_LOOP_CLAUSES, gfc_match_omp_loop, gfc_match_omp_teams_loop,
780 gfc_match_omp_target_teams_loop, gfc_match_omp_parallel_loop,
781 gfc_match_omp_target_parallel_loop): New.
782 (resolve_omp_clauses, resolve_omp_do, omp_code_to_statement,
783 gfc_resolve_omp_directive): Handle omp loop.
784 * parse.c (decode_omp_directive case_exec_markers, gfc_ascii_statement,
785 parse_omp_do, parse_executable): Likewise.
786 (parse_omp_structured_block): Remove ST_ which use parse_omp_do.
787 * resolve.c (gfc_resolve_blocks): Add omp loop.
788 * st.c (gfc_free_statement): Likewise.
789 * trans-openmp.c (gfc_trans_omp_clauses): Handle bind clause.
790 (gfc_trans_omp_do, gfc_trans_omp_parallel_do, gfc_trans_omp_distribute,
791 gfc_trans_omp_teams, gfc_trans_omp_target, gfc_trans_omp_directive):
792 Handle loop directive.
793 (gfc_split_omp_clauses): Likewise; fix firstprivate/lastprivate
794 and (in_)reduction for taskloop.
795 * trans.c (trans_code): Handle omp loop directive.
797 2021-06-01 Tobias Burnus <tobias@codesourcery.com>
800 * dump-parse-tree.c (show_omp_node, show_code_node): Handle
801 (parallel) master taskloop (simd).
802 * frontend-passes.c (gfc_code_walker): Set in_omp_workshare
803 to false for parallel master taskloop (simd).
804 * gfortran.h (enum gfc_statement):
805 Add ST_OMP_(END_)(PARALLEL_)MASTER_TASKLOOP(_SIMD).
806 (enum gfc_exec_op): EXEC_OMP_(PARALLEL_)MASTER_TASKLOOP(_SIMD).
807 * match.h (gfc_match_omp_master_taskloop,
808 gfc_match_omp_master_taskloop_simd,
809 gfc_match_omp_parallel_master_taskloop,
810 gfc_match_omp_parallel_master_taskloop_simd): New prototype.
811 * openmp.c (gfc_match_omp_parallel_master_taskloop,
812 gfc_match_omp_parallel_master_taskloop_simd,
813 gfc_match_omp_master_taskloop,
814 gfc_match_omp_master_taskloop_simd): New.
815 (gfc_match_omp_taskloop_simd): Permit 'reduction' clause.
816 (resolve_omp_clauses): Handle new combined directives; remove
817 inscan-reduction check to reduce multiple errors; add
818 task-reduction error for 'taskloop simd'.
819 (gfc_resolve_omp_parallel_blocks,
820 resolve_omp_do, omp_code_to_statement,
821 gfc_resolve_omp_directive): Handle new combined constructs.
822 * parse.c (decode_omp_directive, next_statement,
823 gfc_ascii_statement, parse_omp_do, parse_omp_structured_block,
824 parse_executable): Likewise.
825 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
826 * st.c (gfc_free_statement): Likewise.
827 * trans.c (trans_code): Likewise.
828 * trans-openmp.c (gfc_split_omp_clauses,
829 gfc_trans_omp_directive): Likewise.
830 (gfc_trans_omp_parallel_master): Move after gfc_trans_omp_master_taskloop;
831 handle parallel master taskloop (simd) as well.
832 (gfc_trans_omp_taskloop): Take gfc_exec_op as arg.
833 (gfc_trans_omp_master_taskloop): New.
835 2021-05-30 Gerald Pfeifer <gerald@pfeifer.com>
837 * gfortran.texi (BOZ literal constants): Fix typo.
839 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
841 * dump-parse-tree.c (show_iterator): New.
842 (show_omp_namelist): Handle iterators.
843 (show_omp_clauses): Handle affinity.
844 * gfortran.h (gfc_free_omp_namelist): New union with 'udr' and new 'ns'.
845 * match.c (gfc_free_omp_namelist): Add are to choose union element.
846 * openmp.c (gfc_free_omp_clauses, gfc_match_omp_detach,
847 gfc_match_omp_clause_reduction, gfc_match_omp_flush): Update
848 call to gfc_free_omp_namelist.
849 (gfc_match_omp_variable_list): Likewise; permit preceeding whitespace.
850 (enum omp_mask1): Add OMP_CLAUSE_AFFINITY.
851 (gfc_match_iterator): New.
852 (gfc_match_omp_clauses): Use it; update call to gfc_free_omp_namelist.
853 (OMP_TASK_CLAUSES): Add OMP_CLAUSE_AFFINITY.
854 (gfc_match_omp_taskwait): Match depend clause.
855 (resolve_omp_clauses): Handle affinity; update for udr/union change.
856 (gfc_resolve_omp_directive): Resolve clauses of taskwait.
857 * st.c (gfc_free_statement): Update gfc_free_omp_namelist call.
858 * trans-openmp.c (gfc_trans_omp_array_reduction_or_udr): Likewise
859 (handle_iterator): New.
860 (gfc_trans_omp_clauses): Handle iterators for depend/affinity clause.
861 (gfc_trans_omp_taskwait): Handle depend clause.
862 (gfc_trans_omp_directive): Update call.
864 2021-05-27 Harald Anlauf <anlauf@gmx.de>
867 * trans-intrinsic.c (gfc_conv_intrinsic_size): Use CLASS data
868 attributes for CLASS arrays for generation of runtime error.
870 2021-05-27 Harald Anlauf <anlauf@gmx.de>
873 * trans-array.c (gfc_conv_ss_startstride): Do not call check for
874 presence of a dummy argument when a symbol actually refers to a
877 2021-05-25 Tobias Burnus <tobias@codesourcery.com>
878 Johannes Nendwich <a08727063@unet.univie.ac.at>
880 * intrinsic.texi (GERROR, GETARGS, GETLOG, NORM2, PARITY, RANDOM_INIT,
881 RANDOM_NUMBER): Fix typos and copy'n'paste errors.
883 2021-05-24 Tobias Burnus <tobias@codesourcery.com>
886 * trans-expr.c (gfc_copy_class_to_class): Add unshare_expr.
887 * trans-openmp.c (gfc_is_polymorphic_nonptr,
888 gfc_is_unlimited_polymorphic_nonptr): New.
889 (gfc_omp_clause_copy_ctor, gfc_omp_clause_dtor): Handle
892 2021-05-23 Harald Anlauf <anlauf@gmx.de>
895 * trans-expr.c (gfc_conv_procedure_call): Adjust check for
896 implicit conversion of actual argument to an unlimited polymorphic
899 2021-05-23 Tobias Burnus <tobias@codesourcery.com>
901 * intrinsic.texi (ATOMIC_ADD, ATOMIC_FETCH_ADD): Use the
902 proper variable name in the description.
904 2021-05-22 Andre Vehreschild <vehre@gcc.gnu.org>
905 Steve Kargl <kargl@gcc.gnu.org>
908 * trans-decl.c (gfc_build_builtin_function_decls): Move decl.
909 * trans-intrinsic.c (conv_intrinsic_random_init): Use bool for
910 lib-call of caf_random_init instead of logical (4-byte).
911 * trans.h: Add tree var for random_init.
913 2021-05-20 Marcel Vollweiler <marcel@codesourcery.com>
915 * openmp.c (gfc_match_omp_clauses): Support map-type-modifier 'close'.
917 2021-05-18 Tobias Burnus <tobias@codesourcery.com>
920 * openmp.c (omp_code_to_statement): Add missing EXEC_OMP_DEPOBJ.
922 2021-05-17 Harald Anlauf <anlauf@gmx.de>
925 * trans-decl.c (gfc_finish_var_decl): Add check for explicit SAVE
928 2021-05-17 Tobias Burnus <tobias@codesourcery.com>
931 * resolve.c (gfc_resolve_code): Reject nonintrinsic assignments in
934 2021-05-14 Tobias Burnus <tobias@codesourcery.com>
936 * dump-parse-tree.c (show_omp_node, show_code_node): Handle
937 EXEC_OMP_PARALLEL_MASTER.
938 * frontend-passes.c (gfc_code_walker): Likewise.
939 * gfortran.h (enum gfc_statement): Add ST_OMP_PARALLEL_MASTER and
940 ST_OMP_END_PARALLEL_MASTER.
941 (enum gfc_exec_op): Add EXEC_OMP_PARALLEL_MASTER..
942 * match.h (gfc_match_omp_parallel_master): Handle it.
943 * openmp.c (gfc_match_omp_parallel_master, resolve_omp_clauses,
944 omp_code_to_statement, gfc_resolve_omp_directive): Likewise.
945 * parse.c (decode_omp_directive, case_exec_markers,
946 gfc_ascii_statement, parse_omp_structured_block,
947 parse_executable): Likewise.
948 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
949 * st.c (gfc_free_statement): Likewise.
950 * trans-openmp.c (gfc_trans_omp_parallel_master,
951 gfc_trans_omp_workshare, gfc_trans_omp_directive): Likewise.
952 * trans.c (trans_code): Likewise.
954 2021-05-14 Tobias Burnus <tobias@codesourcery.com>
956 * resolve.c (resolve_symbol): Handle implicit SAVE of main-program
957 for vars in 'omp threadprivate' and 'omp declare target'.
959 2021-05-10 Martin Liska <mliska@suse.cz>
961 * decl.c (variable_decl): Use startswith
962 function instead of strncmp.
963 (gfc_match_end): Likewise.
964 * gfortran.h (gfc_str_startswith): Likewise.
965 * module.c (load_omp_udrs): Likewise.
966 (read_module): Likewise.
967 * options.c (gfc_handle_runtime_check_option): Likewise.
968 * primary.c (match_arg_list_function): Likewise.
969 * trans-decl.c (gfc_get_symbol_decl): Likewise.
970 * trans-expr.c (gfc_conv_procedure_call): Likewise.
971 * trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Likewise.
973 2021-05-06 Paul Thomas <pault@gcc.gnu.org>
977 * class.c (gfc_build_class_symbol): Remove the error that
978 disables assumed size class arrays. Class array types that are
979 not deferred shape or assumed rank are given a unique name and
980 placed in the procedure namespace.
981 * trans-array.c (gfc_trans_g77_array): Obtain the data pointer
983 (gfc_trans_dummy_array_bias): Suppress the runtime error for
984 extent violations in explicit shape class arrays because it
986 * trans-expr.c (gfc_conv_procedure_call): Handle assumed size
987 class actual arguments passed to non-descriptor formal args by
988 using the data pointer, stored as the symbol's backend decl.
990 2021-05-05 Harald Anlauf <anlauf@gmx.de>
993 * interface.c (gfc_compare_actual_formal): Continue checks after
994 emitting warning for argument length mismatch.
995 * trans-expr.c (gfc_conv_procedure_call): Check for NULL pointer
998 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
1001 * trans-openmp.c (gfc_trans_omp_depobj): Fix pasto in enum values.
1003 2021-04-28 Tobias Burnus <tobias@codesourcery.com>
1005 * openmp.c (gfc_match_omp_variable_list): Gobble whitespace before
1006 checking whether a '%' or parenthesis-open follows as next character.
1008 2021-04-28 José Rui Faustino de Sousa <jrfsousa@gmail.com>
1011 * trans-expr.c (gfc_conv_procedure_call): Evaluate function result
1012 and then pass a pointer.
1014 2021-04-26 Thomas Schwinge <thomas@codesourcery.com>
1015 Nathan Sidwell <nathan@codesourcery.com>
1016 Tom de Vries <vries@codesourcery.com>
1017 Julian Brown <julian@codesourcery.com>
1018 Kwok Cheung Yeung <kcy@codesourcery.com>
1020 * lang.opt (Wopenacc-parallelism): New.
1022 2021-04-24 Harald Anlauf <anlauf@gmx.de>
1025 * check.c (variable_check): Allow function reference having a data
1027 (arg_strlen_is_zero): New function.
1028 (gfc_check_fgetputc_sub): Add static check of character and status
1030 (gfc_check_fgetput_sub): Likewise.
1031 * intrinsic.c (add_subroutines): Fix argument name for the
1032 character argument to intrinsic subroutines fget[c], fput[c].
1034 2021-04-24 Harald Anlauf <anlauf@gmx.de>
1037 * expr.c (gfc_check_vardef_context): Extend check to allow pointer
1038 from a function reference.
1040 2021-04-22 Martin Liska <mliska@suse.cz>
1044 * frontend-passes.c (optimize_expr): Fix typos and missing comments.
1046 2021-04-22 Michael Meissner <meissner@linux.ibm.com>
1049 * trans-intrinsic.c (build_round_expr): If int type is larger than
1050 long long, do the round and convert to the integer type. Do not
1051 try to find a floating point type the exact size of the integer
1054 2021-04-21 Tobias Burnus <tobias@codesourcery.com>
1056 * dump-parse-tree.c (show_omp_namelist): Handle depobj + mutexinoutset
1057 in the depend clause.
1058 (show_omp_clauses, show_omp_node, show_code_node): Handle depobj.
1059 * gfortran.h (enum gfc_statement): Add ST_OMP_DEPOBJ.
1060 (enum gfc_omp_depend_op): Add OMP_DEPEND_UNSET,
1061 OMP_DEPEND_MUTEXINOUTSET and OMP_DEPEND_DEPOBJ.
1062 (gfc_omp_clauses): Add destroy, depobj_update and depobj.
1063 (enum gfc_exec_op): Add EXEC_OMP_DEPOBJ
1064 * match.h (gfc_match_omp_depobj): Match 'omp depobj'.
1065 * openmp.c (gfc_match_omp_clauses): Add depobj + mutexinoutset
1067 (gfc_match_omp_depobj, resolve_omp_clauses, gfc_resolve_omp_directive):
1068 Handle 'omp depobj'.
1069 * parse.c (decode_omp_directive, next_statement, gfc_ascii_statement):
1071 * resolve.c (gfc_resolve_code): Likewise.
1072 * st.c (gfc_free_statement): Likewise.
1073 * trans-openmp.c (gfc_trans_omp_clauses): Handle depobj + mutexinoutset
1074 in the depend clause.
1075 (gfc_trans_omp_depobj, gfc_trans_omp_directive): Handle EXEC_OMP_DEPOBJ.
1076 * trans.c (trans_code): Likewise.
1078 2021-04-20 Paul Thomas <pault@gcc.gnu.org>
1081 * trans-decl.c (gfc_get_symbol_decl): Replace test for host
1082 association with a check that the current and symbol namespaces
1085 2021-04-19 Thomas Schwinge <thomas@codesourcery.com>
1087 * lang.opt (fopenacc-kernels=): Remove.
1089 2021-04-16 José Rui Faustino de Sousa <jrfsousa@gmail.com>
1092 * trans-array.c (gfc_trans_deferred_array): Add code to initialize
1093 pointers and allocatables with correct TKR parameters.
1095 2021-04-16 José Rui Faustino de Sousa <jrfsousa@gmail.com>
1098 * resolve.c: Add association check before de-referencing pointer.
1100 2021-04-16 Harald Anlauf <anlauf@gmx.de>
1101 Paul Thomas <pault@gcc.gnu.org>
1104 * module.c (write_symtree): Do not write interface of intrinsic
1105 procedure to module file for F2003 and newer.
1107 2021-04-15 Paul Thomas <pault@gcc.gnu.org>
1110 * symbol.c: Remove trailing white space.
1111 * trans-array.c (gfc_trans_create_temp_array): Create a class
1112 temporary for class expressions and assign the new descriptor
1114 (build_class_array_ref): If the class expr can be extracted,
1115 then use that for 'decl'. Class function results are reliably
1116 handled this way. Call gfc_find_and_cut_at_last_class_ref to
1117 eliminate largely redundant code. Remove dead code and recast
1118 the rest of the code to extract 'decl' for remaining cases.
1119 Call gfc_build_spanned_array_ref.
1120 (gfc_alloc_allocatable_for_assignment): Use class descriptor
1121 element length for 'elemsize1'. Eliminate repeat set of dtype
1122 for class expressions.
1123 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Include
1124 additional code from build_class_array_ref, and use optional
1125 gfc_typespec pointer argument.
1126 (gfc_trans_scalar_assign): Make use of pre and post blocks for
1127 all class expressions.
1128 * trans.c (get_array_span): For unlimited polymorphic exprs
1129 multiply the span by the value of the _len field.
1130 (gfc_build_spanned_array_ref): New function.
1131 (gfc_build_array_ref): Call gfc_build_spanned_array_ref and
1132 eliminate repeated code.
1133 * trans.h: Add arg to gfc_find_and_cut_at_last_class_ref and
1134 add prototype for gfc_build_spanned_array_ref.
1136 2021-04-14 Martin Liska <mliska@suse.cz>
1138 * intrinsic.texi: The table has first column empty and it makes
1139 trouble when processing makeinfo --xml output.
1141 2021-04-09 Tobias Burnus <tobias@codesourcery.com>
1144 * trans-types.c (gfc_get_function_type): Also generate hidden
1145 coarray argument for character arguments.
1147 2021-04-03 Paul Thomas <pault@gcc.gnu.org>
1150 * interface.c (compare_parameter): The codimension attribute is
1151 applied to the _data field of class formal arguments.
1153 2021-04-01 Harald Anlauf <anlauf@gmx.de>
1156 * simplify.c (gfc_simplify_transpose): Properly initialize
1159 2021-03-28 Paul Thomas <pault@gcc.gnu.org>
1162 * trans-expr.c (gfc_conv_procedure_call): Use the _data attrs
1163 for class expressions and detect proc pointer evaluations by
1164 the non-null actual argument list.
1166 2021-03-27 Steve Kargl <kargl@gcc.gnu.org>
1168 * misc.c (gfc_typename): Fix off-by-one in buffer sizes.
1170 2021-03-26 Tobias Burnus <tobias@codesourcery.com>
1173 * intrinsic.c (gfc_intrinsic_func_interface): Set
1174 attr.proc = PROC_INTRINSIC if FL_PROCEDURE.
1176 2021-03-24 Tobias Burnus <tobias@codesourcery.com>
1179 * resolve.c (resolve_operator): Make 'msg' buffer larger
1182 2021-03-23 Tobias Burnus <tobias@codesourcery.com>
1185 * trans-decl.c (build_function_decl): Add comment;
1186 increment hidden_typelist for caf_token/caf_offset.
1187 * trans-types.c (gfc_get_function_type): Add comment;
1188 add missing caf_token/caf_offset args.
1190 2021-03-22 Tobias Burnus <tobias@codesourcery.com>
1193 * match.c (select_type_set_tmp, gfc_match_select_type,
1194 gfc_match_select_rank): Fix 'name' buffersize to avoid out of bounds.
1195 * resolve.c (resolve_select_type): Likewise.
1197 2021-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1199 * frontend-passes.c (inline_limit_check): Add rank_a
1200 argument. If a is rank 1, set the second dimension to 1.
1201 (inline_matmul_assign): Pass rank_a argument to inline_limit_check.
1202 (call_external_blas): Likewise.
1204 2021-03-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1207 * frontend-passes.c (doloop_contained_procedure_code):
1208 Properly handle EXEC_IOLENGTH.
1210 2021-03-15 Paul Thomas <pault@gcc.gnu.org>
1213 * trans-stmt.c (gfc_trans_allocate): Mark the initialization
1214 assignment by setting init_flag.
1216 2021-03-14 Harald Anlauf <anlauf@gmx.de>
1217 Paul Thomas <pault@gcc.gnu.org>
1219 * trans-expr.c (gfc_conv_procedure_call): Fix runtime checks for
1221 * trans-intrinsic.c (gfc_conv_intrinsic_size): Likewise.
1223 2021-03-13 Paul Thomas <pault@gcc.gnu.org>
1226 * trans-array.c (gfc_conv_expr_descriptor): For deferred length
1227 length components use the ss_info string length instead of
1228 gfc_get_expr_charlen. Make sure that the deferred string length
1229 is a variable before assigning to it. Otherwise use the expr.
1230 * trans-expr.c (gfc_conv_string_length): Make sure that the
1231 deferred string length is a variable before assigning to it.
1233 2021-03-12 Tobias Burnus <tobias@codesourcery.com>
1236 * resolve.c (resolve_symbol): Accept vars which are in DATA
1237 and hence (either) implicit SAVE (or in common).
1239 2021-03-10 Harald Anlauf <anlauf@gmx.de>
1242 * data.c (gfc_assign_data_value): Reject non-constant character
1244 * trans-array.c (gfc_conv_array_initializer): Restrict loop to
1245 elements which are defined to avoid NULL pointer dereference.
1247 2021-03-10 Tobias Burnus <tobias@codesourcery.com>
1249 * intrinsic.texi (MIN): Correct 'maximum' to 'minimum'.
1251 2021-03-10 Eric Botcazou <ebotcazou@adacore.com>
1254 * trans-intrinsic.c (build_round_expr): Do not implicitly assume
1255 that __float128 is the 128-bit floating-point type.
1257 2021-03-08 Harald Anlauf <anlauf@gmx.de>
1260 * data.c (gfc_assign_data_value): Reject variable with PARAMETER
1261 attribute in DATA statement.
1263 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
1267 * invoke.texi (-freal{4,8}-real-*): Extend description.
1268 * primary.c (match_real_constant): Also promote real literals
1269 with '_kind' number.
1271 2021-03-04 Tobias Burnus <tobias@codesourcery.com>
1274 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Avoid
1275 redoing kind conversions.
1276 * primary.c (match_real_constant): Likewise.
1278 2021-02-28 Jakub Jelinek <jakub@redhat.com>
1281 * openmp.c (gfc_omp_requires_add_clause): Fix up diagnostic message
1283 (resolve_omp_clauses): Likewise.
1285 2021-02-28 Jakub Jelinek <jakub@redhat.com>
1288 * frontend-passes.c (doloop_code): Replace double space in diagnostics
1289 with a single space.
1291 2021-02-24 Paul Thomas <pault@gcc.gnu.org>
1294 * trans-expr.c (gfc_conv_derived_to_class): Add optional arg.
1295 'derived_array' to hold the fixed, parmse expr in the case of
1296 assumed rank formal arguments. Deal with optional arguments.
1297 (gfc_conv_procedure_call): Null 'derived' array for each actual
1298 argument. Add its address to the call to gfc_conv_derived_to_
1299 class. Access the 'data' field of scalar descriptors before
1300 deallocating allocatable components. Also strip NOPs before the
1301 calls to gfc_deallocate_alloc_comp. Use 'derived' array as the
1302 input to gfc_deallocate_alloc_comp if it is available.
1303 * trans.h : Include the optional argument 'derived_array' to
1304 the prototype of gfc_conv_derived_to_class. The default value
1307 2021-02-23 Paul Thomas <pault@gcc.gnu.org>
1310 * resolve.c (resolve_fl_procedure): Include class results in
1311 the test for F2018, C15100.
1312 * trans-array.c (get_class_info_from_ss): Do not use the saved
1313 descriptor to obtain the class expression for variables. Use
1314 gfc_get_class_from_expr instead.
1316 2021-02-23 Harald Anlauf <anlauf@gmx.de>
1319 * simplify.c (gfc_simplify_reshape): Set string length for
1320 character arguments.
1322 2021-02-22 Tobias Burnus <tobias@codesourcery.com>
1325 * trans-openmp.c (gfc_omp_is_optional_argument): Regard optional
1326 dummy procs as nonoptional as no special treatment is needed.
1328 2021-02-21 Harald Anlauf <anlauf@gmx.de>
1330 * trans-expr.c (gfc_conv_procedure_call): Do not add clobber to
1331 allocatable intent(out) argument.
1333 2021-02-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1336 * match.c (gfc_match_namelist): If BT_UNKNOWN, check for
1337 IMPLICIT NONE and and issue an error, otherwise set the type
1338 to its IMPLICIT type so that any subsequent use of objects will
1339 will confirm their types.
1341 2021-02-19 Harald Anlauf <anlauf@gmx.de>
1343 * symbol.c (gfc_add_flavor): Reverse order of conditions.
1345 2021-02-19 Tobias Burnus <tobias@codesourcery.com>
1348 * dependency.c (gfc_dep_resolver): Fix coarray handling.
1350 2021-02-19 Tobias Burnus <tobias@codesourcery.com>
1355 2021-02-19 Tobias Burnus <tobias@codesourcery.com>
1358 * simplify.c (simplify_bound_dim): Honor DIMEN_ELEMENT
1361 2021-02-17 Julian Brown <julian@codesourcery.com>
1363 * openmp.c (resolve_omp_clauses): Disallow selecting components
1364 of arrays of derived type.
1366 2021-02-17 Julian Brown <julian@codesourcery.com>
1368 * trans-openmp.c (gfc_trans_omp_clauses): Handle element selection
1369 for arrays of derived types.
1371 2021-02-16 Tobias Burnus <tobias@codesourcery.com>
1373 * expr.c (gfc_is_simplify_contiguous): Handle REF_INQUIRY, i.e.
1374 %im and %re which are EXPR_VARIABLE.
1375 * openmp.c (resolve_omp_clauses): Diagnose %re/%im explicitly.
1377 2021-02-16 Tobias Burnus <tobias@codesourcery.com>
1380 * io.c (resolve_tag_format): Reject BT_DERIVED/CLASS/VOID
1381 as (array-valued) FORMAT tag.
1383 2021-02-12 Tobias Burnus <tobias@codesourcery.com>
1386 * trans-expr.c (gfc_conv_procedure_call): Don't reset
1387 rank of assumed-rank array.
1389 2021-02-11 Paul Thomas <pault@gcc.gnu.org>
1392 * match.c (gfc_match_call): Include associate names as possible
1393 entities with typebound subroutines. The target needs to be
1394 resolved for the type.
1396 2021-02-11 Paul Thomas <pault@gcc.gnu.org>
1399 * primary.c (gfc_match_varspec): Test for non-null 'previous'
1400 before using its name in the error message.
1402 2021-02-11 Tobias Burnus <tobias@codesourcery.com>
1404 * intrinsic.texi (FINDLOC): Add 'MASK' to argument table.
1405 (MAXLOC, MAXVAL, MINLOC, MINVAL): For 'MASK', remove 'an
1406 array' as scalars are also permitted.
1408 2021-02-10 Julian Brown <julian@codesourcery.com>
1411 * openmp.c (resolve_omp_clauses): Omit OpenACC update in
1412 contiguity check and stride-specified error.
1414 2021-02-04 Julian Brown <julian@codesourcery.com>
1416 * openmp.c (resolve_omp_clauses): Omit OpenACC update in
1417 contiguity check and stride-specified error.
1419 2021-02-04 Julian Brown <julian@codesourcery.com>
1421 * trans-openmp.c (gfc_trans_omp_clauses): Use class_pointer attribute
1424 2021-02-04 Julian Brown <julian@codesourcery.com>
1426 * trans-openmp.c (gfc_trans_omp_clauses): Fix dereferencing for
1429 2021-02-04 Tobias Burnus <tobias@codesourcery.com>
1431 * openmp.c (resolve_omp_clauses): Explicitly diagnose
1432 substrings as not permitted.
1434 2021-02-03 Jeff Law <law@redhat.com>
1436 * intrinsic.texi (ANINT): Fix typo.
1438 2021-02-03 Tobias Burnus <tobias@codesourcery.com>
1441 * dependency.c (gfc_dep_resolver): Treat local access
1442 to coarrays like any array access in dependency analysis.
1444 2021-01-28 Harald Anlauf <anlauf@gmx.de>
1447 * trans.c (gfc_call_malloc): Allocate area of size 1 if passed
1448 size is NULL (as documented).
1450 2021-01-27 Paul Thomas <pault@gcc.gnu.org>
1454 * trans-expr.c (gfc_conv_procedure_call): Suppress the call to
1455 gfc_conv_intrinsic_to_class for unlimited polymorphic procedure
1457 (gfc_trans_assignment_1): Similarly suppress class assignment
1458 for class valued procedure pointers.
1460 2021-01-27 Paul Thomas <pault@gcc.gnu.org>
1463 * trans-array.c (gfc_conv_expr_descriptor): Include elemental
1464 procedure pointers in the assert under the comment 'elemental
1465 function' and eliminate the second, spurious assert.
1467 2021-01-25 Harald Anlauf <anlauf@gmx.de>
1470 * data.c (create_character_initializer): Check substring indices
1472 (gfc_assign_data_value): Catch error returned from
1473 create_character_initializer.
1475 2021-01-25 Tobias Burnus <tobias@codesourcery.com>
1477 * intrinsic.texi (CO_BROADCAST, CO_MIN, CO_REDUCE, CO_SUM): Fix typos.
1479 2021-01-25 Steve Kargl <kargl@gcc.gnu.org>
1482 * resolve.c (resolve_charlen): Check that length expression is
1483 present before testing for scalar/integer..
1485 2021-01-22 Paul Thomas <pault@gcc.gnu.org>
1488 * trans-intrinsic.c (gfc_conv_associated): Do not add a _data
1489 component for scalar class function targets. Instead, fix the
1490 function result and access the _data from that.
1492 2021-01-21 Jorge D'Elia <jdelia@cimec.unl.edu.ar>
1494 * intrinsic.texi (CO_MAX): Fix typo.
1496 2021-01-21 Paul Thomas <pault@gcc.gnu.org>
1499 * decl.c (gfc_match_modproc): It is not an error to find a
1500 module procedure declaration within a contains block.
1501 * expr.c (gfc_check_vardef_context): Pure procedure result is
1502 assignable. Change 'own_scope' accordingly.
1503 * resolve.c (resolve_typebound_procedure): A procedure that
1504 has the module procedure attribute is almost certainly a
1505 module procedure, whatever its interface.
1507 2021-01-19 Tobias Burnus <tobias@codesourcery.com>
1510 * openmp.c (resolve_omp_clauses): Change use_device_ptr
1511 to use_device_addr for unless type(c_ptr); check all
1512 list item for is_device_ptr.
1514 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1516 * dump-parse-tree.c (show_omp_clauses): Handle detach clause.
1517 * frontend-passes.c (gfc_code_walker): Walk detach expression.
1518 * gfortran.h (struct gfc_omp_clauses): Add detach field.
1519 (gfc_c_intptr_kind): New.
1520 * openmp.c (gfc_free_omp_clauses): Free detach clause.
1521 (gfc_match_omp_detach): New.
1522 (enum omp_mask1): Add OMP_CLAUSE_DETACH.
1523 (enum omp_mask2): Remove OMP_CLAUSE_DETACH.
1524 (gfc_match_omp_clauses): Handle OMP_CLAUSE_DETACH for OpenMP.
1525 (OMP_TASK_CLAUSES): Add OMP_CLAUSE_DETACH.
1526 (resolve_omp_clauses): Prevent use of detach with mergeable and
1527 overriding the data sharing mode of the event handle.
1528 * trans-openmp.c (gfc_trans_omp_clauses): Handle detach clause.
1529 * trans-types.c (gfc_c_intptr_kind): New.
1530 (gfc_init_kinds): Initialize gfc_c_intptr_kind.
1532 (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT): Rename
1534 (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT_PTR):
1535 ...this. Add extra argument.
1537 2021-01-14 Harald Anlauf <anlauf@gmx.de>
1539 * gfortran.h (gfc_resolve_substring): Add prototype.
1540 * primary.c (match_string_constant): Simplify substrings with
1541 constant starting and ending points.
1542 * resolve.c: Rename resolve_substring to gfc_resolve_substring.
1543 (gfc_resolve_ref): Use renamed function gfc_resolve_substring.
1545 2021-01-14 Harald Anlauf <anlauf@gmx.de>
1548 * resolve.c (resolve_component): Derived type components with
1549 ALLOCATABLE or POINTER attribute shall have a deferred shape.
1551 2021-01-14 Harald Anlauf <anlauf@gmx.de>
1554 2021-01-14 Harald Anlauf <anlauf@gmx.de>
1557 * resolve.c (resolve_component): Derived type components with
1558 ALLOCATABLE or POINTER attribute shall have a deferred shape.
1560 2021-01-14 Harald Anlauf <anlauf@gmx.de>
1563 * resolve.c (resolve_component): Derived type components with
1564 ALLOCATABLE or POINTER attribute shall have a deferred shape.
1566 2021-01-08 Paul Thomas <pault@gcc.gnu.org>
1569 * trans-expr.c (gfc_conv_component_ref): Remove the condition
1570 that deferred character length components only be allocatable.
1572 2021-01-08 Paul Thomas <pault@gcc.gnu.org>
1575 * simplify.c (is_constant_array_expr): If an array constructor
1576 expression has elements other than constants or structures, try
1577 fixing the expression with gfc_reduce_init_expr. Also, if shape
1578 is NULL, obtain the array size and set it.
1580 2021-01-07 Paul Thomas <pault@gcc.gnu.org>
1583 * resolve.c (find_array_spec): Put static prototype for
1584 resolve_assoc_var before this function and call for associate
1587 2021-01-06 Harald Anlauf <anlauf@gmx.de>
1589 * resolve.c (resolve_component): Add check for valid CLASS
1590 reference before trying to access CLASS data.
1592 2021-01-04 Martin Liska <mliska@suse.cz>
1594 * ChangeLog-2018: Remove duplicate ChangeLog entries.
1596 2021-01-01 Harald Anlauf <anlauf@gmx.de>
1598 * class.c (gfc_find_vtab): Add check on attribute is_class.
1600 2021-01-01 Jakub Jelinek <jakub@redhat.com>
1602 * gfortranspec.c (lang_specific_driver): Update copyright notice
1604 * gfc-internals.texi: Bump @copying's copyright year.
1605 * gfortran.texi: Ditto.
1606 * intrinsic.texi: Ditto.
1607 * invoke.texi: Ditto.
1609 2021-01-01 Jakub Jelinek <jakub@redhat.com>
1611 * ChangeLog-2020: Rotate ChangeLog. New file.
1614 Copyright (C) 2021 Free Software Foundation, Inc.
1616 Copying and distribution of this file, with or without modification,
1617 are permitted in any medium without royalty provided the copyright
1618 notice and this notice are preserved.