]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/fortran/ChangeLog
4fb4f3c6b0493eec787eba2cfdbd1a6db0ab1e5f
[thirdparty/gcc.git] / gcc / fortran / ChangeLog
1 2021-12-07 Harald Anlauf <anlauf@gmx.de>
2
3 PR fortran/103607
4 * frontend-passes.c (do_subscript): Ensure that array bounds are
5 of type INTEGER before performing checks on array subscripts.
6
7 2021-12-07 Harald Anlauf <anlauf@gmx.de>
8
9 PR fortran/103588
10 * array.c (gfc_ref_dimen_size): Do not generate internal error on
11 failed simplification of stride expression; just return failure.
12
13 2021-12-07 Harald Anlauf <anlauf@gmx.de>
14
15 PR fortran/103591
16 * match.c (match_case_selector): Check type of upper bound in case
17 range.
18
19 2021-12-04 Tobias Burnus <tobias@codesourcery.com>
20
21 * dump-parse-tree.c (show_omp_clauses): Handle
22 weak/compare/fail clause.
23 * gfortran.h (gfc_omp_clauses): Add weak, compare, fail.
24 * openmp.c (enum omp_mask1, gfc_match_omp_clauses,
25 OMP_ATOMIC_CLAUSES): Update for new clauses.
26 (gfc_match_omp_atomic): Update for 5.1 atomic changes.
27 (is_conversion): Support widening in one go.
28 (is_scalar_intrinsic_expr): New.
29 (resolve_omp_atomic): Update for 5.1 atomic changes.
30 * parse.c (parse_omp_oacc_atomic): Update for compare.
31 * resolve.c (gfc_resolve_blocks): Update asserts.
32 * trans-openmp.c (gfc_trans_omp_atomic): Handle new clauses.
33
34 2021-12-03 Harald Anlauf <anlauf@gmx.de>
35 Steven G. Kargl <kargl@gcc.gnu.org>
36
37 PR fortran/103505
38 * array.c (match_array_element_spec): Try to simplify array
39 element specifications to improve early checking.
40 * expr.c (gfc_try_simplify_expr): New. Try simplification of an
41 expression via gfc_simplify_expr. When an error occurs, roll
42 back.
43 * gfortran.h (gfc_try_simplify_expr): Declare it.
44
45 2021-12-03 Tobias Burnus <tobias@codesourcery.com>
46
47 * trans-stmt.c (gfc_trans_allocate): Set e3_has_nodescriptor to true
48 only for non-named arrays.
49
50 2021-12-02 Chung-Lin Tang <cltang@codesourcery.com>
51
52 PR fortran/90030
53 * trans-openmp.c (gfc_omp_finish_clause): Remove fold_convert to pointer
54 to char_type_node, add gcc_assert of POINTER_TYPE_P.
55 (gfc_trans_omp_array_section): Likewise.
56 (gfc_trans_omp_clauses): Likewise.
57
58 2021-11-30 Harald Anlauf <anlauf@gmx.de>
59
60 PR fortran/102787
61 * array.c (expand_constructor): When encountering a constant array
62 expression or array section within a constructor, simplify it to
63 enable better expansion.
64
65 2021-11-30 Harald Anlauf <anlauf@gmx.de>
66
67 PR fortran/103473
68 * simplify.c (simplify_minmaxloc_nodim): Avoid NULL pointer
69 dereference when shape is not set.
70
71 2021-11-30 Harald Anlauf <anlauf@gmx.de>
72 Steven G. Kargl <kargl@gcc.gnu.org>
73
74 PR fortran/101565
75 * check.c (gfc_check_image_index): Verify that SUB argument to
76 IMAGE_INDEX is of type integer.
77
78 2021-11-30 Richard Biener <rguenther@suse.de>
79
80 * frontend-passes.c (gfc_expr_walker): Add comment to
81 indicate tail recursion.
82
83 2021-11-30 Richard Biener <rguenther@suse.de>
84
85 * target-memory.c (gfc_element_size): Remove unreachable return.
86
87 2021-11-30 Thomas Schwinge <thomas@codesourcery.com>
88
89 * openmp.c (resolve_oacc_loop_blocks): Remove "gang reduction on
90 an orphan loop" checking.
91 (oacc_is_parallel, oacc_is_kernels, oacc_is_serial)
92 (oacc_is_compute_construct): Remove.
93
94 2021-11-30 Frederik Harwath <frederik@codesourcery.com>
95 Thomas Schwinge <thomas@codesourcery.com>
96
97 * openmp.c (oacc_is_parallel_or_serial): Evolve into...
98 (oacc_is_compute_construct): ... this function.
99 (resolve_oacc_loop_blocks): Use "oacc_is_compute_construct"
100 instead of "oacc_is_parallel_or_serial" for checking that a
101 loop is not orphaned.
102
103 2021-11-30 Kwok Cheung Yeung <kcy@codesourcery.com>
104 Thomas Schwinge <thomas@codesourcery.com>
105
106 * openmp.c (oacc_is_serial, oacc_is_parallel_or_serial): New.
107 (resolve_oacc_loop_blocks): Use oacc_is_parallel_or_serial instead of
108 oacc_is_parallel.
109
110 2021-11-30 Cesar Philippidis <cesar@codesourcery.com>
111 Thomas Schwinge <thomas@codesourcery.com>
112
113 * openmp.c (oacc_is_parallel, oacc_is_kernels): New 'static'
114 functions.
115 (resolve_oacc_loop_blocks): Emit an error on orphan OpenACC gang
116 reductions.
117
118 2021-11-30 Richard Biener <rguenther@suse.de>
119
120 * decl.c (gfc_insert_parameter_exprs): Only return after
121 resetting type_param_spec_list.
122
123 2021-11-30 Richard Biener <rguenther@suse.de>
124
125 * frontend-passes.c (gfc_expr_walker): Remove unreachable
126 break.
127 * scanner.c (skip_fixed_comments): Remove unreachable
128 gcc_unreachable.
129 * trans-expr.c (gfc_expr_is_variable): Refactor to make
130 control flow more obvious.
131
132 2021-11-29 Eric Gallager <egallager@gcc.gnu.org>
133
134 PR other/103021
135 * Make-lang.in: Use ETAGS variable in TAGS target.
136
137 2021-11-26 Harald Anlauf <anlauf@gmx.de>
138
139 PR fortran/103411
140 * check.c (gfc_check_reshape): Improve check of size of source
141 array for the RESHAPE intrinsic against the given shape when pad
142 is not given, and shape is a parameter. Try other simplifications
143 of shape.
144
145 2021-11-23 Harald Anlauf <anlauf@gmx.de>
146
147 PR fortran/103392
148 * simplify.c (simplify_bound): Do not try to simplify
149 LBOUND/UBOUND for arrays with POINTER or ALLOCATABLE attribute.
150
151 2021-11-23 Harald Anlauf <anlauf@gmx.de>
152
153 PR fortran/87711
154 PR fortran/87851
155 * trans-array.c (arg_evaluated_for_scalarization): Add LEN_TRIM to
156 list of intrinsics for which an optional KIND argument needs to be
157 removed before scalarization.
158
159 2021-11-21 Jakub Jelinek <jakub@redhat.com>
160
161 PR debug/103315
162 * trans-types.c (gfc_get_array_descr_info): Use DW_OP_deref_size 1
163 instead of DW_OP_deref for DW_AT_rank.
164
165 2021-11-21 Harald Anlauf <anlauf@gmx.de>
166 Steven G. Kargl <kargl@gcc.gnu.org>
167
168 PR fortran/99061
169 * trans-intrinsic.c (gfc_lookup_intrinsic): Helper function for
170 looking up gfortran builtin intrinsics.
171 (gfc_conv_intrinsic_atrigd): Use it.
172 (gfc_conv_intrinsic_cotan): Likewise.
173 (gfc_conv_intrinsic_cotand): Likewise.
174 (gfc_conv_intrinsic_atan2d): Likewise.
175
176 2021-11-18 Harald Anlauf <anlauf@gmx.de>
177 Steven G. Kargl <kargl@gcc.gnu.org>
178
179 PR fortran/101329
180 * check.c (is_c_interoperable): Reject NULL() as it is not
181 interoperable.
182
183 2021-11-16 Harald Anlauf <anlauf@gmx.de>
184
185 PR fortran/103286
186 * resolve.c (resolve_select): Choose appropriate range limit to
187 avoid NULL pointer dereference when generating error message.
188
189 2021-11-16 Mikael Morin <mikael@gcc.gnu.org>
190
191 * interface.c (gfc_dummy_arg_get_name): New function.
192 * gfortran.h (gfc_dummy_arg_get_name): Declare it.
193 * trans-array.c (arg_evaluated_for_scalarization): Pass a dummy
194 argument wrapper as argument instead of an actual argument
195 and an index number. Check it’s non-NULL. Use its name
196 to identify it.
197 (gfc_walk_elemental_function_args): Update call to
198 arg_evaluated for scalarization. Remove argument counting.
199
200 2021-11-16 Mikael Morin <mikael@gcc.gnu.org>
201
202 * gfortran.h (gfc_actual_arglist::missing_arg_type): Remove.
203 * interface.c (gfc_compare_actual_formal): Remove
204 missing_arg_type initialization.
205 * intrinsic.c (sort_actual): Ditto.
206 * trans-expr.c (gfc_conv_procedure_call): Use associated_dummy
207 and gfc_dummy_arg_get_typespec to get the dummy argument type.
208
209 2021-11-16 Mikael Morin <mikael@gcc.gnu.org>
210
211 * interface.c (gfc_dummy_arg_get_typespec,
212 gfc_dummy_arg_is_optional): New functions.
213 * gfortran.h (gfc_dummy_arg_get_typespec,
214 gfc_dummy_arg_is_optional): Declare them.
215 * trans.h (gfc_ss_info::dummy_arg): Use the wrapper type
216 as declaration type.
217 * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
218 use gfc_dummy_arg_get_typespec function to get the type.
219 (gfc_walk_elemental_function_args): Remove proc_ifc argument.
220 Get info about the dummy arg using the associated_dummy field.
221 * trans-array.h (gfc_walk_elemental_function_args): Update declaration.
222 * trans-intrinsic.c (gfc_walk_intrinsic_function):
223 Update call to gfc_walk_elemental_function_args.
224 * trans-stmt.c (gfc_trans_call): Ditto.
225 (get_proc_ifc_for_call): Remove.
226
227 2021-11-16 Mikael Morin <mikael@gcc.gnu.org>
228
229 * gfortran.h (gfc_dummy_arg_kind, gfc_dummy_arg): New.
230 (gfc_actual_arglist): New field associated_dummy.
231 (gfc_intrinsic_arg): Remove field actual.
232 * interface.c (get_nonintrinsic_dummy_arg): New.
233 (gfc_compare_actual): Initialize associated_dummy.
234 * intrinsic.c (get_intrinsic_dummy_arg): New.
235 (sort_actual):  Add argument vectors.
236 Use loops with indices on argument vectors.
237 Initialize associated_dummy.
238
239 2021-11-16 Mikael Morin <mikael@gcc.gnu.org>
240
241 * intrinsic.c (sort_actual): initialise variable and use it earlier.
242
243 2021-11-15 Tobias Burnus <tobias@codesourcery.com>
244
245 * openmp.c (OMP_TARGET_CLAUSES): Add thread_limit.
246 * trans-openmp.c (gfc_split_omp_clauses): Add thread_limit also to
247 teams.
248
249 2021-11-12 Tobias Burnus <tobias@codesourcery.com>
250
251 * parse.c (decode_omp_directive): Fix permitting 'nowait' for some
252 combined directives, add missing 'omp end ... loop'.
253 (gfc_ascii_statement): Fix ST_OMP_END_TEAMS_LOOP result.
254 * openmp.c (resolve_omp_clauses): Add missing combined loop constructs
255 case values to the 'if(directive-name: ...)' check.
256 * trans-openmp.c (gfc_split_omp_clauses): Put nowait on target if
257 first leaf construct accepting it.
258
259 2021-11-12 Martin Jambor <mjambor@suse.cz>
260
261 * trans-types.c (gfc_get_array_descr_info): Use build_debug_expr_decl
262 instead of building DEBUG_EXPR_DECL manually.
263
264 2021-11-12 Mikael Morin <mikael@gcc.gnu.org>
265
266 PR fortran/97896
267 * intrinsic.c (add_sym_4ind): Remove.
268 (add_functions): Use add_sym4 instead of add_sym4ind.
269 Don’t special case the index intrinsic.
270 * iresolve.c (gfc_resolve_index_func): Use the individual arguments
271 directly instead of the full argument list.
272 * intrinsic.h (gfc_resolve_index_func): Update the declaration
273 accordingly.
274 * trans-decl.c (gfc_get_extern_function_decl): Don’t modify the
275 list of arguments in the case of the index intrinsic.
276 * trans-array.h (gfc_get_intrinsic_for_expr,
277 gfc_get_proc_ifc_for_expr): New.
278 * trans-array.c (gfc_get_intrinsic_for_expr,
279 arg_evaluated_for_scalarization): New.
280 (gfc_walk_elemental_function_args): Add intrinsic procedure
281 as argument. Count arguments. Check arg_evaluated_for_scalarization.
282 * trans-intrinsic.c (gfc_walk_intrinsic_function): Update call.
283 * trans-stmt.c (get_intrinsic_for_code): New.
284 (gfc_trans_call): Update call.
285
286 2021-11-12 Jakub Jelinek <jakub@redhat.com>
287
288 * types.def (BT_FN_VOID_UINT_UINT): Remove.
289 (BT_FN_BOOL_UINT_UINT_UINT_BOOL): New.
290
291 2021-11-11 Tobias Burnus <tobias@codesourcery.com>
292
293 * gfortran.h (struct gfc_omp_clauses): Rename num_teams to
294 num_teams_upper, add num_teams_upper.
295 * dump-parse-tree.c (show_omp_clauses): Update to handle
296 lower-bound num_teams clause.
297 * frontend-passes.c (gfc_code_walker): Likewise
298 * openmp.c (gfc_free_omp_clauses, gfc_match_omp_clauses,
299 resolve_omp_clauses): Likewise.
300 * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses,
301 gfc_trans_omp_target): Likewise.
302
303 2021-11-11 Jakub Jelinek <jakub@redhat.com>
304
305 * trans-openmp.c (gfc_trans_omp_clauses): Use
306 OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of OMP_CLAUSE_NUM_TEAMS_EXPR.
307
308 2021-11-10 Harald Anlauf <anlauf@gmx.de>
309
310 PR fortran/103137
311 PR fortran/103138
312 * check.c (gfc_check_shape): Avoid NULL pointer dereference on
313 missing ref.
314 * simplify.c (gfc_simplify_cshift): Avoid NULL pointer dereference
315 when shape not set.
316 (gfc_simplify_transpose): Likewise.
317
318 2021-11-09 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
319
320 PR fortran/68800
321 * class.c (generate_finalization_wrapper): Do not leak
322 finalization wrappers if they will not be used.
323 * expr.c (gfc_free_actual_arglist): Formatting fix.
324 * gfortran.h (gfc_free_symbol): Pass argument by reference.
325 (gfc_release_symbol): Likewise.
326 (gfc_free_namespace): Likewise.
327 * symbol.c (gfc_release_symbol): Adjust acordingly.
328 (free_components): Set procedure pointer components
329 of derived types to NULL after freeing.
330 (free_tb_tree): Likewise.
331 (gfc_free_symbol): Set sym to NULL after freeing.
332 (gfc_free_namespace): Set namespace to NULL after freeing.
333
334 2021-11-09 Martin Liska <mliska@suse.cz>
335
336 * symbol.c (gfc_get_ultimate_derived_super_type): Remove.
337
338 2021-11-09 Aldy Hernandez <aldyh@redhat.com>
339
340 * misc.c (gfc_dummy_typename): Make sure ts->kind is
341 non-negative.
342
343 2021-11-07 Thomas Koenig <tkoenig@gcc.gnu.org>
344
345 * intrinsic.c (add_subroutines): Change keyword "operator"
346 to the correct one, "operation".
347 * check.c (gfc_check_co_reduce): Change OPERATOR to
348 OPERATION in error messages.
349 * intrinsic.texi: Change OPERATOR to OPERATION in
350 documentation.
351
352 2021-11-07 Sandra Loosemore <sandra@codesourcery.com>
353
354 * interface.c (gfc_compare_actual_formal): Continue checking
355 all arguments after encountering an error.
356 * intrinsic.c (do_ts29113_check): Likewise.
357 * resolve.c (resolve_operator): Continue resolving on op2 error.
358
359 2021-11-06 Harald Anlauf <anlauf@gmx.de>
360
361 PR fortran/102715
362 * decl.c (add_init_expr_to_sym): Reject rank mismatch between
363 array and its initializer.
364
365 2021-11-05 Harald Anlauf <anlauf@gmx.de>
366
367 PR fortran/102817
368 * expr.c (simplify_parameter_variable): Copy shape of referenced
369 subobject when simplifying.
370
371 2021-11-05 Harald Anlauf <anlauf@gmx.de>
372
373 PR fortran/69419
374 * match.c (gfc_match_common): Check array spec of a symbol in a
375 COMMON object list and reject it if it is a coarray.
376
377 2021-11-05 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
378
379 PR fortran/100972
380 * decl.c (gfc_match_implicit_none): Fix typo in warning.
381 * resolve.c (resolve_unknown_f): Reject external procedures
382 without explicit EXTERNAL attribute whe IMPLICIT none (external)
383 is in effect.
384
385 2021-11-05 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
386
387 * decl.c (gfc_insert_kind_parameter_exprs): Make static.
388 * expr.c (gfc_build_init_expr): Make static
389 (gfc_build_default_init_expr): Move below its static helper.
390 * gfortran.h (gfc_insert_kind_parameter_exprs, gfc_add_saved_common,
391 gfc_add_common, gfc_use_derived_tree, gfc_free_charlen,
392 gfc_get_ultimate_derived_super_type,
393 gfc_resolve_oacc_parallel_loop_blocks, gfc_build_init_expr,
394 gfc_iso_c_sub_interface): Delete.
395 * symbol.c (gfc_new_charlen, gfc_get_derived_super_type): Make
396 static.
397
398 2021-11-05 Sandra Loosemore <sandra@codesourcery.com>
399
400 PR fortran/35276
401 * gfortran.texi (Mixed-Language Programming): Talk about C++,
402 and how to link.
403
404 2021-11-04 Sandra Loosemore <sandra@codesourcery.com>
405
406 * gfortran.texi (Projects): Add bullet for helping with
407 incomplete standards compliance.
408 (Proposed Extensions): Delete section.
409
410 2021-11-04 Sandra Loosemore <sandra@codesourcery.com>
411
412 * intrinsic.texi (Introduction to Intrinsics): Genericize
413 references to standard versions.
414 * invoke.texi (-fall-intrinsics): Likewise.
415 (-fmax-identifier-length=): Likewise.
416
417 2021-11-04 Sandra Loosemore <sandra@codesourcery.com>
418
419 * gfortran.texi (Interoperability with C): Copy-editing. Add
420 more index entries.
421 (Intrinsic Types): Likewise.
422 (Derived Types and struct): Likewise.
423 (Interoperable Global Variables): Likewise.
424 (Interoperable Subroutines and Functions): Likewise.
425 (Working with C Pointers): Likewise.
426 (Further Interoperability of Fortran with C): Likewise. Rewrite
427 to reflect that this is now fully supported by gfortran.
428
429 2021-11-04 Sandra Loosemore <sandra@codesourcery.com>
430
431 * gfortran.texi (About GNU Fortran): Consolidate material
432 formerly in other sections. Copy-editing.
433 (Preprocessing and conditional compilation): Delete, moving
434 most material to invoke.texi.
435 (GNU Fortran and G77): Delete.
436 (Project Status): Delete.
437 (Standards): Update.
438 (Fortran 95 status): Mention conditional compilation here.
439 (Fortran 2003 status): Rewrite to mention the 1 missing feature
440 instead of all the ones implemented.
441 (Fortran 2008 status): Similarly for the 2 missing features.
442 (Fortran 2018 status): Rewrite to reflect completion of TS29113
443 feature support.
444 * invoke.texi (Preprocessing Options): Move material formerly
445 in introductory chapter here.
446
447 2021-11-04 Sandra Loosemore <sandra@codesourcery.com>
448
449 * gfortran.texi (Standards): Move discussion of specific
450 standard versions here....
451 (Fortran standards status): ...from here, and delete this node.
452
453 2021-10-31 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
454
455 * symbol.c (gfc_get_typebound_proc): Revert memcpy.
456
457 2021-10-31 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
458
459 * resolve.c (resolve_fl_procedure): Initialize
460 allocatable_or_pointer.
461
462 2021-10-30 Manfred Schwarb <manfred99@gmx.ch>
463
464 * intrinsic.texi: Remove entries for SHORT and LONG intrinsics.
465
466 2021-10-30 Manfred Schwarb <manfred99@gmx.ch>
467
468 * check.c (gfc_check_intconv): Change error message.
469
470 2021-10-30 Manfred Schwarb <manfred99@gmx.ch>
471
472 * intrinsic.texi (REAL): Fix entries in Specific names table.
473
474 2021-10-30 Manfred Schwarb <manfred99@gmx.ch>
475
476 * intrinsic.texi: Adjust @columnfractions commands to improve
477 appearance for narrow 80 character terminals.
478
479 2021-10-30 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
480
481 * parse.c (clean_up_modules): Free gsym.
482
483 2021-10-30 Harald Anlauf <anlauf@gmx.de>
484
485 * gfortran.texi (bug reports): credit Gerhard Steinmetz for
486 numerous bug reports.
487
488 2021-10-30 Steve Kargl <kargl@gcc.gnu.org>
489
490 PR fortran/99853
491 * resolve.c (resolve_select): Generate regular gfc_error on
492 invalid conversions instead of an gfc_internal_error.
493
494 2021-10-29 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
495
496 * symbol.c (free_tb_tree): Free type-bound procedure struct.
497 (gfc_get_typebound_proc): Use explicit memcpy for clarity.
498
499 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
500
501 * intrinsic.h (gfc_check_sum, gfc_resolve_atan2d, gfc_resolve_kill,
502 gfc_resolve_kill_sub): Delete declaration.
503
504 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
505
506 * trans-types.h (gfc_convert_function_code): Delete.
507
508 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
509
510 * trans-stmt.h (gfc_trans_deallocate_array): Delete.
511
512 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
513
514 * trans-array.c (gfc_trans_scalarized_loop_end): Make static.
515 * trans-array.h (gfc_trans_scalarized_loop_end,
516 gfc_conv_tmp_ref, gfc_conv_array_transpose): Delete declaration.
517
518 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
519
520 * constructor.c (gfc_constructor_get_base): Make static.
521 (gfc_constructor_expr_foreach, gfc_constructor_swap): Delete.
522 * constructor.h (gfc_constructor_get_base): Remove declaration.
523 (gfc_constructor_expr_foreach, gfc_constructor_swap): Delete.
524
525 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
526
527 * decl.c (gfc_match_old_kind_spec, set_com_block_bind_c,
528 set_verify_bind_c_sym, set_verify_bind_c_com_block,
529 get_bind_c_idents, gfc_match_suffix, gfc_get_type_attr_spec,
530 check_extended_derived_type): Make static.
531 (gfc_match_gcc_unroll): Add comment.
532 * match.c (gfc_match_small_int_expr): Delete definition.
533 * match.h (gfc_match_small_int_expr): Delete declaration.
534 (gfc_match_name_C, gfc_match_old_kind_spec, set_com_block_bind_c,
535 set_verify_bind_c_sym, set_verify_bind_c_com_block,
536 get_bind_c_idents, gfc_match_suffix,
537 gfc_get_type_attr_spec): Delete declaration.
538
539 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
540
541 * expr.c (is_non_empty_structure_constructor): Make static.
542 * gfortran.h (gfc_check_any_c_kind): Delete.
543 * match.c (gfc_match_label): Make static.
544 * match.h (gfc_match_label): Delete declaration.
545 * scanner.c (file_changes_cur, file_changes_count,
546 file_changes_allocated): Make static.
547 * trans-expr.c (gfc_get_character_len): Make static.
548 (gfc_class_len_or_zero_get): Make static.
549 (VTAB_GET_FIELD_GEN): Undefine.
550 (gfc_get_class_array_ref): Make static.
551 (gfc_finish_interface_mapping): Make static.
552 * trans-types.c (gfc_check_any_c_kind): Delete.
553 (pfunc_type_node, dtype_type_node, gfc_get_ppc_type): Make static.
554 * trans-types.h (gfc_get_ppc_type): Delete declaration.
555 * trans.c (gfc_msg_wrong_return): Delete.
556 * trans.h (gfc_class_len_or_zero_get, gfc_class_vtab_extends_get,
557 gfc_vptr_extends_get, gfc_get_class_array_ref, gfc_get_character_len,
558 gfc_finish_interface_mapping, gfc_msg_wrong_return,
559 gfc_get_function_decl): Delete declaration.
560
561 2021-10-27 Tobias Burnus <tobias@codesourcery.com>
562
563 * trans-stmt.c (gfc_trans_select_rank_cases): Fix condition
564 for allocatables/pointers.
565
566 2021-10-26 Harald Anlauf <anlauf@gmx.de>
567
568 PR fortran/102956
569 * symbol.c (gfc_check_conflict): Add conflict check for PDT KIND
570 and LEN type parameters.
571
572 2021-10-26 Harald Anlauf <anlauf@gmx.de>
573
574 PR fortran/102917
575 * decl.c (match_attr_spec): Remove invalid integer kind checks on
576 KIND and LEN attributes of PDTs.
577
578 2021-10-26 Harald Anlauf <anlauf@gmx.de>
579
580 PR fortran/102816
581 * resolve.c (resolve_structure_cons): Reject invalid array spec of
582 a DT component referenced in a structure constructor.
583
584 2021-10-26 Tobias Burnus <tobias@codesourcery.com>
585
586 PR fortran/102885
587 * trans-decl.c (gfc_conv_cfi_to_gfc): Properly handle nonconstant
588 character lenghts.
589
590 2021-10-25 Andrew MacLeod <amacleod@redhat.com>
591
592 * trans-decl.c (gfc_conv_cfi_to_gfc): Initialize rank to NULL_TREE.
593
594 2021-10-22 Eric Gallager <egallager@gcc.gnu.org>
595
596 PR other/102663
597 * Make-lang.in: Allow dvi-formatted documentation
598 to be installed.
599
600 2021-10-22 Tobias Burnus <tobias@codesourcery.com>
601
602 PR fortran/92621
603 * trans-expr.c (gfc_trans_assignment_1): Add STRIP_NOPS.
604
605 2021-10-21 Chung-Lin Tang <cltang@codesourcery.com>
606
607 * decl.c (gfc_match_end): Add COMP_OMP_STRICTLY_STRUCTURED_BLOCK case
608 together with COMP_BLOCK.
609 * parse.c (parse_omp_structured_block): Change return type to
610 'gfc_statement', add handling for strictly-structured block case, adjust
611 recursive calls to parse_omp_structured_block.
612 (parse_executable): Adjust calls to parse_omp_structured_block.
613 * parse.h (enum gfc_compile_state): Add
614 COMP_OMP_STRICTLY_STRUCTURED_BLOCK.
615 * trans-openmp.c (gfc_trans_omp_workshare): Add EXEC_BLOCK case
616 handling.
617
618 2021-10-21 Sandra Loosemore <sandra@codesourcery.com>
619
620 PR fortran/94070
621 * expr.c (gfc_simplify_expr): Handle GFC_ISYM_SHAPE along with
622 GFC_ISYM_LBOUND and GFC_ISYM_UBOUND.
623 * trans-array.c (gfc_conv_ss_startstride): Likewise.
624 (set_loop_bounds): Likewise.
625 * trans-intrinsic.c (gfc_trans_intrinsic_bound): Extend to
626 handle SHAPE. Correct logic for zero-size special cases and
627 detecting assumed-rank arrays associated with an assumed-size
628 argument.
629 (gfc_conv_intrinsic_shape): Deleted.
630 (gfc_conv_intrinsic_function): Handle GFC_ISYM_SHAPE like
631 GFC_ISYM_LBOUND and GFC_ISYM_UBOUND.
632 (gfc_add_intrinsic_ss_code): Likewise.
633 (gfc_walk_intrinsic_bound): Likewise.
634
635 2021-10-20 Chung-Lin Tang <cltang@codesourcery.com>
636
637 * openmp.c (gfc_match_omp_clause_reduction): Add 'openmp_target' default
638 false parameter. Add 'always,tofrom' map for OMP_LIST_IN_REDUCTION case.
639 (gfc_match_omp_clauses): Add 'openmp_target' default false parameter,
640 adjust call to gfc_match_omp_clause_reduction.
641 (match_omp): Adjust call to gfc_match_omp_clauses
642 * trans-openmp.c (gfc_trans_omp_taskgroup): Add call to
643 gfc_match_omp_clause, create and return block.
644
645 2021-10-19 Tobias Burnus <tobias@codesourcery.com>
646
647 * trans-types.c (create_fn_spec): For allocatable/pointer
648 character(len=:), use 'w' not 'R' as fn spec for the length dummy
649 argument.
650
651 2021-10-19 Tobias Burnus <tobias@codesourcery.com>
652
653 PR fortran/92482
654 * trans-expr.c (gfc_conv_procedure_call): Use TREE_OPERAND not
655 build_fold_indirect_ref_loc to undo an ADDR_EXPR.
656
657 2021-10-18 Tobias Burnus <tobias@codesourcery.com>
658
659 PR fortran/102086
660 PR fortran/92189
661 PR fortran/92621
662 PR fortran/101308
663 PR fortran/101309
664 PR fortran/101635
665 PR fortran/92482
666 * decl.c (gfc_verify_c_interop_param): Remove 'sorry' for
667 scalar allocatable/pointer and len=*.
668 * expr.c (is_CFI_desc): Return true for for those.
669 * gfortran.h (CFI_type_kind_shift, CFI_type_mask,
670 CFI_type_from_type_kind, CFI_VERSION, CFI_MAX_RANK,
671 CFI_attribute_pointer, CFI_attribute_allocatable,
672 CFI_attribute_other, CFI_type_Integer, CFI_type_Logical,
673 CFI_type_Real, CFI_type_Complex, CFI_type_Character,
674 CFI_type_ucs4_char, CFI_type_struct, CFI_type_cptr,
675 CFI_type_cfunptr, CFI_type_other): New #define.
676 * trans-array.c (CFI_FIELD_BASE_ADDR, CFI_FIELD_ELEM_LEN,
677 CFI_FIELD_VERSION, CFI_FIELD_RANK, CFI_FIELD_ATTRIBUTE,
678 CFI_FIELD_TYPE, CFI_FIELD_DIM, CFI_DIM_FIELD_LOWER_BOUND,
679 CFI_DIM_FIELD_EXTENT, CFI_DIM_FIELD_SM,
680 gfc_get_cfi_descriptor_field, gfc_get_cfi_desc_base_addr,
681 gfc_get_cfi_desc_elem_len, gfc_get_cfi_desc_version,
682 gfc_get_cfi_desc_rank, gfc_get_cfi_desc_type,
683 gfc_get_cfi_desc_attribute, gfc_get_cfi_dim_item,
684 gfc_get_cfi_dim_lbound, gfc_get_cfi_dim_extent, gfc_get_cfi_dim_sm):
685 New define/functions to access the CFI array descriptor.
686 (gfc_conv_descriptor_type): New function for the GFC descriptor.
687 (gfc_get_array_span): Handle expr of CFI descriptors and
688 assumed-type descriptors.
689 (gfc_trans_array_bounds): Remove 'static'.
690 (gfc_conv_expr_descriptor): For assumed type, use the dtype of
691 the actual argument.
692 (structure_alloc_comps): Remove ' ' inside tabs.
693 * trans-array.h (gfc_trans_array_bounds, gfc_conv_descriptor_type,
694 gfc_get_cfi_desc_base_addr, gfc_get_cfi_desc_elem_len,
695 gfc_get_cfi_desc_version, gfc_get_cfi_desc_rank,
696 gfc_get_cfi_desc_type, gfc_get_cfi_desc_attribute,
697 gfc_get_cfi_dim_lbound, gfc_get_cfi_dim_extent, gfc_get_cfi_dim_sm):
698 New prototypes.
699 * trans-decl.c (gfor_fndecl_cfi_to_gfc, gfor_fndecl_gfc_to_cfi):
700 Remove global vars.
701 (gfc_build_builtin_function_decls): Remove their initialization.
702 (gfc_get_symbol_decl, create_function_arglist,
703 gfc_trans_deferred_vars): Update for CFI.
704 (convert_CFI_desc): Remove and replace by ...
705 (gfc_conv_cfi_to_gfc): ... this function
706 (gfc_generate_function_code): Call it; create local GFC var for CFI.
707 * trans-expr.c (gfc_maybe_dereference_var): Handle CFI.
708 (gfc_conv_subref_array_arg): Handle the if-noncontigous-only copy in
709 when the result should be a descriptor.
710 (gfc_conv_gfc_desc_to_cfi_desc): Completely rewritten.
711 (gfc_conv_procedure_call): CFI fixes.
712 * trans-openmp.c (gfc_omp_is_optional_argument,
713 gfc_omp_check_optional_argument): Handle optional
714 CFI.
715 * trans-stmt.c (gfc_trans_select_rank_cases): Cleanup, avoid invalid
716 code for allocatable/pointer dummies, which cannot be assumed size.
717 * trans-types.c (gfc_cfi_descriptor_base): New global var.
718 (gfc_get_dtype_rank_type): Skip rank init for rank < 0.
719 (gfc_sym_type): Handle CFI dummies.
720 (gfc_get_function_type): Update call.
721 (gfc_get_cfi_dim_type, gfc_get_cfi_type): New.
722 * trans-types.h (gfc_sym_type): Update prototype.
723 (gfc_get_cfi_type): New prototype.
724 * trans.c (gfc_trans_runtime_check): Make conditions more consistent
725 to avoid '<logical> AND_THEN <long int>' in conditions.
726 * trans.h (gfor_fndecl_cfi_to_gfc, gfor_fndecl_gfc_to_cfi): Remove
727 global-var declaration.
728
729 2021-10-18 Tobias Burnus <tobias@codesourcery.com>
730
731 PR fortran/102745
732 * intrinsic.c (gfc_convert_type_warn): Fix checks by checking CLASS
733 and do typcheck in correct order for type extension.
734 * misc.c (gfc_typename): Print proper not internal CLASS type name.
735
736 2021-10-15 Harald Anlauf <anlauf@gmx.de>
737 Tobias Burnus <tobias@codesourcery.com>
738
739 PR fortran/102685
740 * decl.c (match_clist_expr): Set rank/shape of clist initializer
741 to match LHS.
742 * resolve.c (resolve_structure_cons): In a structure constructor,
743 compare shapes of array components against declared shape.
744
745 2021-10-14 Harald Anlauf <anlauf@gmx.de>
746
747 PR fortran/102717
748 * simplify.c (gfc_simplify_reshape): Replace assert by error
749 message for negative elements in SHAPE array.
750
751 2021-10-14 Harald Anlauf <anlauf@gmx.de>
752
753 PR fortran/102716
754 * check.c (gfc_check_shape): Reorder checks so that invalid KIND
755 arguments can be detected.
756
757 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
758
759 * gfortran.h (enum gfc_statement): Add ST_OMP_DECLARE_VARIANT.
760 (enum gfc_omp_trait_property_kind): New.
761 (struct gfc_omp_trait_property): New.
762 (gfc_get_omp_trait_property): New macro.
763 (struct gfc_omp_selector): New.
764 (gfc_get_omp_selector): New macro.
765 (struct gfc_omp_set_selector): New.
766 (gfc_get_omp_set_selector): New macro.
767 (struct gfc_omp_declare_variant): New.
768 (gfc_get_omp_declare_variant): New macro.
769 (struct gfc_namespace): Add omp_declare_variant field.
770 (gfc_free_omp_declare_variant_list): New prototype.
771 * match.h (gfc_match_omp_declare_variant): New prototype.
772 * openmp.c (gfc_free_omp_trait_property_list): New.
773 (gfc_free_omp_selector_list): New.
774 (gfc_free_omp_set_selector_list): New.
775 (gfc_free_omp_declare_variant_list): New.
776 (gfc_match_omp_clauses): Add extra optional argument. Handle end of
777 clauses for context selectors.
778 (omp_construct_selectors, omp_device_selectors,
779 omp_implementation_selectors, omp_user_selectors): New.
780 (gfc_match_omp_context_selector): New.
781 (gfc_match_omp_context_selector_specification): New.
782 (gfc_match_omp_declare_variant): New.
783 * parse.c: Include tree-core.h and omp-general.h.
784 (decode_omp_directive): Handle 'declare variant'.
785 (case_omp_decl): Include ST_OMP_DECLARE_VARIANT.
786 (gfc_ascii_statement): Handle ST_OMP_DECLARE_VARIANT.
787 (gfc_parse_file): Initialize omp_requires_mask.
788 * symbol.c (gfc_free_namespace): Call
789 gfc_free_omp_declare_variant_list.
790 * trans-decl.c (gfc_get_extern_function_decl): Call
791 gfc_trans_omp_declare_variant.
792 (gfc_create_function_decl): Call gfc_trans_omp_declare_variant.
793 * trans-openmp.c (gfc_trans_omp_declare_variant): New.
794 * trans-stmt.h (gfc_trans_omp_declare_variant): New prototype.
795
796 2021-10-13 Tobias Burnus <tobias@codesourcery.com>
797
798 * dump-parse-tree.c (show_omp_clauses): Handle ancestor modifier,
799 avoid ICE for GFC_OMP_ATOMIC_SWAP.
800 * gfortran.h (gfc_omp_clauses): Change 'anecestor' into a bitfield.
801
802 2021-10-12 Tobias Burnus <tobias@codesourcery.com>
803
804 PR fortran/102541
805 * check.c (gfc_check_present): Handle optional CLASS.
806 * interface.c (gfc_compare_actual_formal): Likewise.
807 * trans-array.c (gfc_trans_g77_array): Likewise.
808 * trans-decl.c (gfc_build_dummy_array_decl): Likewise.
809 * trans-types.c (gfc_sym_type): Likewise.
810 * primary.c (gfc_variable_attr): Fixes for dummy and
811 pointer when 'class%_data' is passed.
812 * trans-expr.c (set_dtype_for_unallocated, gfc_conv_procedure_call):
813 For assumed-rank dummy, fix setting rank for dealloc/notassoc actual
814 and setting ubound to -1 for assumed-size actuals.
815
816 2021-10-10 Harald Anlauf <anlauf@gmx.de>
817
818 PR fortran/99348
819 PR fortran/102521
820 * decl.c (add_init_expr_to_sym): Extend initialization of
821 parameter arrays from scalars to handle derived types.
822
823 2021-10-09 Harald Anlauf <anlauf@gmx.de>
824
825 PR fortran/65454
826 * module.c (read_module): Handle old and new-style relational
827 operators when used in USE module, ONLY: OPERATOR(op).
828
829 2021-10-08 Sandra Loosemore <sandra@codesourcery.com>
830
831 PR fortran/54753
832 * interface.c (gfc_compare_actual_formal): Add diagnostic
833 for F2018:C839. Refactor shared code and fix bugs with class
834 array info lookup, and extend similar diagnostic from PR94110
835 to also cover class types.
836
837 2021-10-08 Martin Liska <mliska@suse.cz>
838
839 * options.c (gfc_post_options): Use new macro
840 OPTION_SET_P.
841
842 2021-10-06 Tobias Burnus <tobias@codesourcery.com>
843
844 * resolve.c (resolve_values): Only show
845 deprecated warning if attr.referenced.
846
847 2021-10-04 Tobias Burnus <tobias@codesourcery.com>
848
849 PR fortran/54753
850 * resolve.c (can_generate_init, resolve_fl_variable_derived,
851 resolve_symbol): Only do initialization with intent(out) if not
852 inside of an interface block.
853
854 2021-10-01 Martin Sebor <msebor@redhat.com>
855
856 PR c/102103
857 * array.c: Remove an unnecessary test.
858 * trans-array.c: Same.
859
860 2021-10-01 Jakub Jelinek <jakub@redhat.com>
861
862 * gfortran.h (gfc_omp_clauses): Add order_reproducible bitfield.
863 * dump-parse-tree.c (show_omp_clauses): Print REPRODUCIBLE: for it.
864 * openmp.c (gfc_match_omp_clauses): Set order_reproducible for
865 explicit reproducible: modifier.
866 * trans-openmp.c (gfc_trans_omp_clauses): Set
867 OMP_CLAUSE_ORDER_REPRODUCIBLE for order_reproducible.
868 (gfc_split_omp_clauses): Also copy order_reproducible.
869
870 2021-09-30 Harald Anlauf <anlauf@gmx.de>
871
872 PR fortran/102458
873 * simplify.c (simplify_size): Resolve expressions used in array
874 specifications so that SIZE can be simplified.
875
876 2021-09-30 Harald Anlauf <anlauf@gmx.de>
877
878 * expr.c: The correct reference to Fortran standard is: F2018:10.1.12.
879
880 2021-09-30 Tobias Burnus <tobias@codesourcery.com>
881
882 PR fortran/71703
883 PR fortran/84007
884 * trans-intrinsic.c (gfc_conv_same_type_as): Fix handling
885 of UNLIMITED_POLY.
886 * trans.h (gfc_vtpr_hash_get): Renamed prototype to ...
887 (gfc_vptr_hash_get): ... this to match function name.
888
889 2021-09-29 Harald Anlauf <anlauf@gmx.de>
890
891 PR fortran/102520
892 * array.c (expand_constructor): Do not dereference NULL pointer.
893
894 2021-09-27 Tobias Burnus <tobias@codesourcery.com>
895
896 PR fortran/94070
897 * trans-array.c (gfc_tree_array_size): New function to
898 find size inline (whole array or one dimension).
899 (array_parameter_size): Use it, take stmt_block as arg.
900 (gfc_conv_array_parameter): Update call.
901 * trans-array.h (gfc_tree_array_size): Add prototype.
902 * trans-decl.c (gfor_fndecl_size0, gfor_fndecl_size1): Remove
903 these global vars.
904 (gfc_build_intrinsic_function_decls): Remove their initialization.
905 * trans-expr.c (gfc_conv_procedure_call): Update
906 bounds of pointer/allocatable actual args to nonallocatable/nonpointer
907 dummies to be one based.
908 * trans-intrinsic.c (gfc_conv_intrinsic_shape): Fix case for
909 assumed rank with allocatable/pointer dummy.
910 (gfc_conv_intrinsic_size): Update to use inline function.
911 * trans.h (gfor_fndecl_size0, gfor_fndecl_size1): Remove var decl.
912
913 2021-09-26 Tobias Burnus <tobias@codesourcery.com>
914
915 PR fortran/101334
916 * trans-intrinsic.c (gfc_conv_associated): Support assumed-rank
917 'pointer' with scalar/array 'target' argument.
918
919 2021-09-24 Harald Anlauf <anlauf@gmx.de>
920
921 PR fortran/102458
922 * expr.c (is_non_constant_intrinsic): Check for intrinsics
923 excluded in constant expressions (F2018:10.1.2).
924 (gfc_is_constant_expr): Use that check.
925
926 2021-09-24 Sandra Loosemore <sandra@codesourcery.com>
927
928 PR fortran/101333
929 * interface.c (compare_parameter): Enforce F2018 C711.
930
931 2021-09-24 Tobias Burnus <tobias@codesourcery.com>
932
933 PR fortran/55534
934 * scanner.c (load_file): Return void, call (gfc_)fatal_error for
935 all errors.
936 (include_line, include_stmt, gfc_new_file): Remove exit call
937 for failed load_file run.
938
939 2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
940
941 PR fortran/101320
942 * decl.c (gfc_verify_c_interop_param): Handle F2018 C1557,
943 aka TS29113 C516.
944
945 2021-09-23 Harald Anlauf <anlauf@gmx.de>
946 Tobias Burnus <tobias@codesourcery.com>
947
948 PR fortran/93834
949 * trans-intrinsic.c (gfc_conv_allocated): Cleanup. Handle
950 coindexed scalar coarrays.
951
952 2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
953
954 PR fortran/101319
955 * interface.c (gfc_compare_actual_formal): Extend existing
956 assumed-type diagnostic to also check for argument with type
957 parameters.
958
959 2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
960
961 PR fortran/101334
962 * check.c (gfc_check_associated): Allow an assumed-rank
963 array for the pointer argument.
964 * interface.c (compare_parameter): Also give rank mismatch
965 error on assumed-rank array.
966
967 2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
968
969 * trans-stmt.c (trans_associate_var): Check that result of
970 GFC_DECL_SAVED_DESCRIPTOR is not null before using it.
971
972 2021-09-22 Tobias Burnus <tobias@codesourcery.com>
973
974 PR fortran/55534
975 * cpp.c (gfc_cpp_register_include_paths, gfc_cpp_post_options):
976 Add new bool verbose_missing_dir_warn argument.
977 * cpp.h (gfc_cpp_post_options): Update prototype.
978 * f95-lang.c (gfc_init): Remove duplicated file-not found diag.
979 * gfortran.h (gfc_check_include_dirs): Takes bool
980 verbose_missing_dir_warn arg.
981 (gfc_new_file): Returns now void.
982 * options.c (gfc_post_options): Update to warn for -I and -J,
983 only, by default but for all when user requested.
984 * scanner.c (gfc_do_check_include_dir):
985 (gfc_do_check_include_dirs, gfc_check_include_dirs): Take bool
986 verbose warn arg and update to avoid printing the same message
987 twice or never.
988 (load_file): Fix indent.
989 (gfc_new_file): Return void and exit when load_file failed
990 as all other load_file users do.
991
992 2021-09-22 Tobias Burnus <tobias@codesourcery.com>
993
994 * trans-expr.c (gfc_simple_for_loop): New.
995 * trans.h (gfc_simple_for_loop): New prototype.
996
997 2021-09-21 Tobias Burnus <tobias@codesourcery.com>
998
999 PR fortran/55534
1000 * cpp.c: Define GCC_C_COMMON_C for #include "options.h" to make
1001 cpp_reason_option_codes available.
1002 (gfc_cpp_register_include_paths): Make static, set pfile's
1003 warn_missing_include_dirs and move before caller.
1004 (gfc_cpp_init_cb): New, cb code moved from ...
1005 (gfc_cpp_init_0): ... here.
1006 (gfc_cpp_post_options): Call gfc_cpp_init_cb.
1007 (cb_cpp_diagnostic_cpp_option): New. As implemented in c-family
1008 to match CppReason flags to -W... names.
1009 (cb_cpp_diagnostic): Use it to replace single special case.
1010 * cpp.h (gfc_cpp_register_include_paths): Remove as now static.
1011 * gfortran.h (gfc_check_include_dirs): New prototype.
1012 (gfc_add_include_path): Add new bool arg.
1013 * options.c (gfc_init_options): Don't set -Wmissing-include-dirs.
1014 (gfc_post_options): Set it here after commandline processing. Call
1015 gfc_add_include_path with defer_warn=false.
1016 (gfc_handle_option): Call it with defer_warn=true.
1017 * scanner.c (gfc_do_check_include_dir, gfc_do_check_include_dirs,
1018 gfc_check_include_dirs): New. Diagnostic moved from ...
1019 (add_path_to_list): ... here, which came before cmdline processing.
1020 Take additional bool defer_warn argument.
1021 (gfc_add_include_path): Take additional defer_warn arg.
1022 * scanner.h (struct gfc_directorylist): Reorder for alignment issues,
1023 add new 'bool warn'.
1024
1025 2021-09-20 Tobias Burnus <tobias@codesourcery.com>
1026
1027 * gfortran.h (gfc_omp_clauses): Add order_unconstrained.
1028 * dump-parse-tree.c (show_omp_clauses): Dump it.
1029 * openmp.c (gfc_match_omp_clauses): Match unconstrained/reproducible
1030 modifiers to ordered(concurrent).
1031 (OMP_DISTRIBUTE_CLAUSES): Accept ordered clause.
1032 (resolve_omp_clauses): Reject ordered + order on same directive.
1033 * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses): Pass
1034 on unconstrained modifier of ordered(concurrent).
1035
1036 2021-09-17 Harald Anlauf <anlauf@gmx.de>
1037
1038 PR fortran/102366
1039 * trans-decl.c (gfc_finish_var_decl): Disable the warning message
1040 for variables moved from stack to static storange if they are
1041 declared in the main, but allow the move to happen.
1042
1043 2021-09-17 Sandra Loosemore <sandra@codesourcery.com>
1044
1045 * intrinsic.texi (ISO_C_BINDING): Change C_FLOAT128 to correspond
1046 to _Float128 rather than __float128.
1047 * iso-c-binding.def (c_float128): Update comments.
1048 * trans-intrinsic.c (gfc_builtin_decl_for_float_kind): Likewise.
1049 (build_round_expr): Likewise.
1050 (gfc_build_intrinsic_lib_fndcecls): Likewise.
1051 * trans-types.h (gfc_real16_is_float128): Likewise.
1052
1053 2021-09-16 Harald Anlauf <anlauf@gmx.de>
1054
1055 PR fortran/102287
1056 * trans-expr.c (gfc_conv_procedure_call): Wrap deallocation of
1057 allocatable components of optional allocatable derived type
1058 procedure arguments with INTENT(OUT) into a presence check.
1059
1060 2021-09-14 Harald Anlauf <anlauf@gmx.de>
1061
1062 PR fortran/102311
1063 * resolve.c (resolve_entries): Attempt to recover cleanly after
1064 rejecting mismatched function entries.
1065
1066 2021-09-14 Tobias Burnus <tobias@codesourcery.com>
1067
1068 PR fortran/102313
1069 * parse.c (gfc_ascii_statement): Add missing ST_OMP_END_SCOPE.
1070
1071 2021-09-13 Harald Anlauf <anlauf@gmx.de>
1072
1073 PR fortran/82314
1074 * decl.c (add_init_expr_to_sym): For proper initialization of
1075 array-valued named constants the array bounds need to be
1076 simplified before adding the initializer.
1077
1078 2021-09-13 Harald Anlauf <anlauf@gmx.de>
1079
1080 PR fortran/85130
1081 * expr.c (find_substring_ref): Handle given substring start and
1082 end indices as signed integers, not unsigned.
1083
1084 2021-09-09 Harald Anlauf <anlauf@gmx.de>
1085
1086 PR fortran/98490
1087 * trans-expr.c (gfc_conv_substring): Do not generate substring
1088 bounds check for implied do loop index variable before it actually
1089 becomes defined.
1090
1091 2021-09-08 liuhongt <hongtao.liu@intel.com>
1092
1093 * options.c (gfc_post_options): Issue an error for
1094 -fexcess-precision=16.
1095
1096 2021-09-07 Harald Anlauf <anlauf@gmx.de>
1097
1098 PR fortran/101327
1099 * expr.c (find_array_element): When bounds cannot be determined as
1100 constant, return error instead of aborting.
1101
1102 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1103
1104 * openmp.c (gfc_match_omp_flush): Parse 'seq_cst' clause on 'flush'
1105 directive.
1106 * trans-openmp.c (gfc_trans_omp_flush): Handle OMP_MEMORDER_SEQ_CST.
1107
1108 2021-09-03 Tobias Burnus <tobias@codesourcery.com>
1109
1110 * decl.c (gfc_verify_c_interop_param): Reject pointer with
1111 CONTIGUOUS attributes as dummy arg. Reject character len > 1
1112 when passed as byte stream.
1113
1114 2021-09-01 Harald Anlauf <anlauf@gmx.de>
1115
1116 PR fortran/56985
1117 * resolve.c (resolve_common_vars): Fix grammar and improve wording
1118 of error message rejecting an unlimited polymorphic in COMMON.
1119
1120 2021-08-31 Harald Anlauf <anlauf@gmx.de>
1121
1122 PR fortran/100950
1123 * simplify.c (substring_has_constant_len): Minimize checks for
1124 substring expressions being allowed.
1125
1126 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
1127
1128 * gfortran.h: Add variable for 'ancestor' in struct gfc_omp_clauses.
1129 * openmp.c (gfc_match_omp_clauses): Parse device-modifiers 'device_num'
1130 and 'ancestor' in 'target device' clauses.
1131 * trans-openmp.c (gfc_trans_omp_clauses): Set OMP_CLAUSE_DEVICE_ANCESTOR.
1132
1133 2021-08-30 Harald Anlauf <anlauf@gmx.de>
1134
1135 PR fortran/102113
1136 * match.c (gfc_match_goto): Allow for whitespace in parsing list
1137 of labels.
1138
1139 2021-08-30 Harald Anlauf <anlauf@gmx.de>
1140
1141 PR fortran/101349
1142 * resolve.c (resolve_allocate_expr): An unlimited polymorphic
1143 argument to ALLOCATE must be ALLOCATABLE or a POINTER. Fix the
1144 corresponding check.
1145
1146 2021-08-28 Harald Anlauf <anlauf@gmx.de>
1147
1148 PR fortran/87737
1149 * resolve.c (resolve_entries): For functions of type CHARACTER
1150 tighten the checks for matching characteristics.
1151
1152 2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
1153
1154 PR other/93067
1155 * cpp.c (gfc_cpp_post_options): Call new function
1156 diagnostic_initialize_input_context().
1157
1158 2021-08-24 Harald Anlauf <anlauf@gmx.de>
1159
1160 PR fortran/98411
1161 * trans-decl.c (gfc_finish_var_decl): Adjust check to handle
1162 implicit SAVE as well as variables in the main program. Improve
1163 warning message text.
1164
1165 2021-08-23 Tobias Burnus <tobias@codesourcery.com>
1166
1167 * openmp.c (gfc_match_dupl_check, gfc_match_dupl_memorder,
1168 gfc_match_dupl_atomic): New.
1169 (gfc_match_omp_clauses): Use them; remove duplicate
1170 'release'/'relaxed' clause matching; improve error dignostic
1171 for 'default'.
1172
1173 2021-08-23 Tobias Burnus <tobias@codesourcery.com>
1174
1175 * dump-parse-tree.c (show_omp_clauses): Handle 'strict' modifier
1176 on grainsize/num_tasks
1177 * gfortran.h (gfc_omp_clauses): Add grainsize_strict
1178 and num_tasks_strict.
1179 * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses):
1180 Handle 'strict' modifier on grainsize/num_tasks.
1181 * openmp.c (gfc_match_omp_clauses): Likewise.
1182
1183 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
1184
1185 * error.c
1186 (error_uinteger): Take 'long long unsigned' instead
1187 of 'long unsigned' as argumpent.
1188 (error_integer): Take 'long long' instead of 'long'.
1189 (error_hwuint, error_hwint): New.
1190 (error_print): Update to handle 'll' and 'w'
1191 length modifiers.
1192 * simplify.c (substring_has_constant_len): Use '%wd'
1193 in gfc_error.
1194
1195 2021-08-20 Harald Anlauf <anlauf@gmx.de>
1196
1197 PR fortran/100950
1198 * simplify.c (substring_has_constant_len): Fix format string of
1199 gfc_error, pass HOST_WIDE_INT bounds values via char buffer.
1200
1201 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
1202
1203 * dump-parse-tree.c (show_omp_clauses): Handle 'at', 'severity'
1204 and 'message' clauses.
1205 (show_omp_node, show_code_node): Handle EXEC_OMP_ERROR.
1206 * gfortran.h (gfc_statement): Add ST_OMP_ERROR.
1207 (gfc_omp_severity_type, gfc_omp_at_type): New.
1208 (gfc_omp_clauses): Add 'at', 'severity' and 'message' clause;
1209 use more bitfields + ENUM_BITFIELD.
1210 (gfc_exec_op): Add EXEC_OMP_ERROR.
1211 * match.h (gfc_match_omp_error): New.
1212 * openmp.c (enum omp_mask1): Add OMP_CLAUSE_(AT,SEVERITY,MESSAGE).
1213 (gfc_match_omp_clauses): Handle new clauses.
1214 (OMP_ERROR_CLAUSES, gfc_match_omp_error): New.
1215 (resolve_omp_clauses): Resolve new clauses.
1216 (omp_code_to_statement, gfc_resolve_omp_directive): Handle
1217 EXEC_OMP_ERROR.
1218 * parse.c (decode_omp_directive, next_statement,
1219 gfc_ascii_statement): Handle 'omp error'.
1220 * resolve.c (gfc_resolve_blocks): Likewise.
1221 * st.c (gfc_free_statement): Likewise.
1222 * trans-openmp.c (gfc_trans_omp_error): Likewise.
1223 (gfc_trans_omp_directive): Likewise.
1224 * trans.c (trans_code): Likewise.
1225
1226 2021-08-20 Jakub Jelinek <jakub@redhat.com>
1227
1228 * types.def (BT_FN_VOID_CONST_PTR_SIZE): New DEF_FUNCTION_TYPE_2.
1229 * f95-lang.c (ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST): Define.
1230
1231 2021-08-19 Harald Anlauf <anlauf@gmx.de>
1232
1233 PR fortran/100950
1234 * simplify.c (substring_has_constant_len): New.
1235 (gfc_simplify_len): Handle case of substrings with constant
1236 bounds.
1237
1238 2021-08-18 Tobias Burnus <tobias@codesourcery.com>
1239
1240 * match.h (gfc_match_omp_nothing): New.
1241 * openmp.c (gfc_match_omp_nothing): New.
1242 * parse.c (decode_omp_directive): Match 'nothing' directive.
1243
1244 2021-08-17 Tobias Burnus <tobias@codesourcery.com>
1245
1246 * dump-parse-tree.c (show_omp_node, show_code_node): Handle
1247 EXEC_OMP_SCOPE.
1248 * gfortran.h (enum gfc_statement): Add ST_OMP_(END_)SCOPE.
1249 (enum gfc_exec_op): Add EXEC_OMP_SCOPE.
1250 * match.h (gfc_match_omp_scope): New.
1251 * openmp.c (OMP_SCOPE_CLAUSES): Define
1252 (gfc_match_omp_scope): New.
1253 (gfc_match_omp_cancellation_point, gfc_match_omp_end_nowait):
1254 Improve error diagnostic.
1255 (omp_code_to_statement): Handle ST_OMP_SCOPE.
1256 (gfc_resolve_omp_directive): Handle EXEC_OMP_SCOPE.
1257 * parse.c (decode_omp_directive, next_statement,
1258 gfc_ascii_statement, parse_omp_structured_block,
1259 parse_executable): Handle OpenMP's scope construct.
1260 * resolve.c (gfc_resolve_blocks): Likewise
1261 * st.c (gfc_free_statement): Likewise
1262 * trans-openmp.c (gfc_trans_omp_scope): New.
1263 (gfc_trans_omp_directive): Call it.
1264 * trans.c (trans_code): handle EXEC_OMP_SCOPE.
1265
1266 2021-08-16 Tobias Burnus <tobias@codesourcery.com>
1267
1268 * dump-parse-tree.c (show_omp_clauses): Handle 'filter' clause.
1269 (show_omp_node, show_code_node): Handle (combined) omp masked construct.
1270 * frontend-passes.c (gfc_code_walker): Likewise.
1271 * gfortran.h (enum gfc_statement): Add ST_OMP_*_MASKED*.
1272 (enum gfc_exec_op): Add EXEC_OMP_*_MASKED*.
1273 * match.h (gfc_match_omp_masked, gfc_match_omp_masked_taskloop,
1274 gfc_match_omp_masked_taskloop_simd, gfc_match_omp_parallel_masked,
1275 gfc_match_omp_parallel_masked_taskloop,
1276 gfc_match_omp_parallel_masked_taskloop_simd): New prototypes.
1277 * openmp.c (enum omp_mask1): Add OMP_CLAUSE_FILTER.
1278 (gfc_match_omp_clauses): Match it.
1279 (OMP_MASKED_CLAUSES, gfc_match_omp_parallel_masked,
1280 gfc_match_omp_parallel_masked_taskloop,
1281 gfc_match_omp_parallel_masked_taskloop_simd,
1282 gfc_match_omp_masked, gfc_match_omp_masked_taskloop,
1283 gfc_match_omp_masked_taskloop_simd): New.
1284 (resolve_omp_clauses): Resolve filter clause.
1285 (gfc_resolve_omp_parallel_blocks, resolve_omp_do,
1286 omp_code_to_statement, gfc_resolve_omp_directive): Handle
1287 omp masked constructs.
1288 * parse.c (decode_omp_directive, case_exec_markers,
1289 gfc_ascii_statement, parse_omp_do, parse_omp_structured_block,
1290 parse_executable): Likewise.
1291 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
1292 * st.c (gfc_free_statement): Likewise.
1293 * trans-openmp.c (gfc_trans_omp_clauses): Handle filter clause.
1294 (GFC_OMP_SPLIT_MASKED, GFC_OMP_MASK_MASKED): New enum values.
1295 (gfc_trans_omp_masked): New.
1296 (gfc_split_omp_clauses): Handle combined masked directives.
1297 (gfc_trans_omp_master_taskloop): Rename to ...
1298 (gfc_trans_omp_master_masked_taskloop): ... this; handle also
1299 combined masked directives.
1300 (gfc_trans_omp_parallel_master): Rename to ...
1301 (gfc_trans_omp_parallel_master_masked): ... this; handle
1302 combined masked directives.
1303 (gfc_trans_omp_directive): Handle EXEC_OMP_*_MASKED*.
1304 * trans.c (trans_code): Likewise.
1305
1306 2021-08-15 Harald Anlauf <anlauf@gmx.de>
1307
1308 PR fortran/99351
1309 * match.c (sync_statement): Replace %v code by %e in gfc_match to
1310 allow for function references as STAT and ERRMSG arguments.
1311 * resolve.c (resolve_sync): Adjust checks of STAT= and ERRMSG= to
1312 being definable arguments. Function references with a data
1313 pointer result are accepted.
1314 * trans-stmt.c (gfc_trans_sync): Adjust assertion.
1315
1316 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
1317
1318 * gfortran.h (gfc_omp_proc_bind_kind): Add OMP_PROC_BIND_PRIMARY.
1319 * dump-parse-tree.c (show_omp_clauses): Add TODO comment to
1320 change 'master' to 'primary' in proc_bind for OpenMP 5.1.
1321 * intrinsic.texi (OMP_LIB): Mention OpenMP 5.1; add
1322 omp_proc_bind_primary.
1323 * openmp.c (gfc_match_omp_clauses): Accept
1324 'primary' as alias for 'master'.
1325 * trans-openmp.c (gfc_trans_omp_clauses): Handle
1326 OMP_PROC_BIND_PRIMARY.
1327
1328 2021-08-11 Sandra Loosemore <sandra@codesourcery.com>
1329
1330 * iso-c-binding.def (c_float128, c_float128_complex): Check
1331 float128_type_node instead of gfc_float128_type_node.
1332 * trans-types.c (gfc_init_kinds, gfc_build_real_type):
1333 Update comments re supported 128-bit floating-point types.
1334
1335 2021-08-11 Richard Biener <rguenther@suse.de>
1336
1337 * trans-common.c (create_common): Set TREE_THIS_VOLATILE on the
1338 COMPONENT_REF if the field is volatile.
1339
1340 2021-08-07 Harald Anlauf <anlauf@gmx.de>
1341
1342 PR fortran/68568
1343 * primary.c (gfc_expr_attr): Variable attribute can only be
1344 inquired when symtree is non-NULL.
1345
1346 2021-07-28 Harald Anlauf <anlauf@gmx.de>
1347
1348 PR fortran/101564
1349 * expr.c (gfc_check_vardef_context): Add check for KIND and LEN
1350 parameter inquiries.
1351 * match.c (gfc_match): Fix comment for %v code.
1352 (gfc_match_allocate, gfc_match_deallocate): Replace use of %v code
1353 by %e in gfc_match to allow for function references as STAT and
1354 ERRMSG arguments.
1355 * resolve.c (resolve_allocate_deallocate): Avoid NULL pointer
1356 dereferences and shortcut for bad STAT and ERRMSG argument to
1357 (DE)ALLOCATE. Remove bogus parts of checks for STAT and ERRMSG.
1358
1359 2021-07-26 José Rui Faustino de Sousa <jrfsousa@gmail.com>
1360 Tobias Burnus <tobias@codesourcery.com>
1361
1362 PR fortran/93308
1363 PR fortran/93963
1364 PR fortran/94327
1365 PR fortran/94331
1366 PR fortran/97046
1367 * trans-decl.c (convert_CFI_desc): Only copy out the descriptor
1368 if necessary.
1369 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Updated attribute
1370 handling which reflect a previous intermediate version of the
1371 standard. Only copy out the descriptor if necessary.
1372
1373 2021-07-23 Harald Anlauf <anlauf@gmx.de>
1374
1375 PR fortran/101536
1376 * check.c (array_check): Adjust check for the case of CLASS
1377 arrays.
1378
1379 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1380 Joseph Myers <joseph@codesourcery.com>
1381 Cesar Philippidis <cesar@codesourcery.com>
1382
1383 * dump-parse-tree.c (show_attr): Update.
1384 * gfortran.h (symbol_attribute): Add 'oacc_routine_nohost' member.
1385 (gfc_omp_clauses): Add 'nohost' member.
1386 * module.c (ab_attribute): Add 'AB_OACC_ROUTINE_NOHOST'.
1387 (attr_bits, mio_symbol_attribute): Update.
1388 * openmp.c (omp_mask2): Add 'OMP_CLAUSE_NOHOST'.
1389 (gfc_match_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
1390 (OACC_ROUTINE_CLAUSES): Add 'OMP_CLAUSE_NOHOST'.
1391 (gfc_match_oacc_routine): Update.
1392 * trans-decl.c (add_attributes_to_decl): Update.
1393 * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
1394
1395 2021-07-21 Harald Anlauf <anlauf@gmx.de>
1396
1397 PR fortran/101514
1398 * target-memory.c (gfc_interpret_derived): Size of array component
1399 of derived type can only be computed here for explicit shape.
1400 * trans-types.c (gfc_get_nodesc_array_type): Do not dereference
1401 NULL pointers.
1402
1403 2021-07-21 Tobias Burnus <tobias@codesourcery.com>
1404
1405 * decl.c (gfc_verify_c_interop_param): Update for F2008 + F2018
1406 changes; reject unsupported bits with 'Error: Sorry,'.
1407 * trans-expr.c (gfc_conv_procedure_call): Fix condition to
1408 For using CFI descriptor with characters.
1409
1410 2021-07-18 Harald Anlauf <anlauf@gmx.de>
1411
1412 PR fortran/101084
1413 * io.c (resolve_tag_format): Extend FORMAT check to unknown type.
1414
1415 2021-07-14 Harald Anlauf <anlauf@gmx.de>
1416
1417 PR fortran/100949
1418 * trans-expr.c (gfc_trans_class_init_assign): Call
1419 gfc_conv_expr_present only for dummy variables.
1420
1421 2021-07-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1422
1423 PR fortran/100227
1424 * frontend-passes.c (traverse_io_block): Adjust test for
1425 when a variable is eligible for the transformation to
1426 array slice.
1427
1428 2021-06-28 Martin Sebor <msebor@redhat.com>
1429
1430 * trans-array.c (trans_array_constructor): Replace direct uses
1431 of TREE_NO_WARNING with warning_suppressed_p, and suppress_warning.
1432 * trans-decl.c (gfc_build_qualified_array): Same.
1433 (gfc_build_dummy_array_decl): Same.
1434 (generate_local_decl): Same.
1435 (gfc_generate_function_code): Same.
1436 * trans-openmp.c (gfc_omp_clause_default_ctor): Same.
1437 (gfc_omp_clause_copy_ctor): Same.
1438 * trans-types.c (get_dtype_type_node): Same.
1439 (gfc_get_desc_dim_type): Same.
1440 (gfc_get_array_descriptor_base): Same.
1441 (gfc_get_caf_vector_type): Same.
1442 (gfc_get_caf_reference_type): Same.
1443 * trans.c (gfc_create_var_np): Same.
1444
1445 2021-06-23 Tobias Burnus <tobias@codesourcery.com>
1446
1447 * dump-parse-tree.c (show_omp_clauses): Fix enum type used
1448 for dumping gfc_omp_defaultmap_category.
1449
1450 2021-06-23 Andre Vehreschild <vehre@gcc.gnu.org>
1451
1452 PR fortran/100337
1453 * trans-intrinsic.c (conv_co_collective): Check stat for null ptr
1454 before dereferrencing.
1455
1456 2021-06-18 Harald Anlauf <anlauf@gmx.de>
1457
1458 PR fortran/100283
1459 PR fortran/101123
1460 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Unconditionally
1461 convert result of min/max to result type.
1462
1463 2021-06-16 Harald Anlauf <anlauf@gmx.de>
1464
1465 PR fortran/95501
1466 PR fortran/95502
1467 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
1468 dereference.
1469 * match.c (gfc_match_pointer_assignment): Likewise.
1470 * parse.c (gfc_check_do_variable): Avoid comparison with NULL
1471 symtree.
1472
1473 2021-06-16 Harald Anlauf <anlauf@gmx.de>
1474
1475 Revert:
1476 2021-06-16 Harald Anlauf <anlauf@gmx.de>
1477
1478 PR fortran/95501
1479 PR fortran/95502
1480 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
1481 dereference.
1482 * match.c (gfc_match_pointer_assignment): Likewise.
1483 * parse.c (gfc_check_do_variable): Avoid comparison with NULL
1484 symtree.
1485
1486 2021-06-16 Harald Anlauf <anlauf@gmx.de>
1487
1488 PR fortran/95501
1489 PR fortran/95502
1490 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
1491 dereference.
1492 * match.c (gfc_match_pointer_assignment): Likewise.
1493 * parse.c (gfc_check_do_variable): Avoid comparison with NULL
1494 symtree.
1495
1496 2021-06-15 Tobias Burnus <tobias@codesourcery.com>
1497
1498 PR fortran/92568
1499 * dump-parse-tree.c (show_omp_clauses): Update for defaultmap.
1500 * f95-lang.c (LANG_HOOKS_OMP_ALLOCATABLE_P,
1501 LANG_HOOKS_OMP_SCALAR_TARGET_P): New.
1502 * gfortran.h (enum gfc_omp_defaultmap,
1503 enum gfc_omp_defaultmap_category): New.
1504 * openmp.c (gfc_match_omp_clauses): Update defaultmap matching.
1505 * trans-decl.c (gfc_finish_decl_attrs): Set GFC_DECL_SCALAR_TARGET.
1506 * trans-openmp.c (gfc_omp_allocatable_p, gfc_omp_scalar_target_p): New.
1507 (gfc_omp_scalar_p): Take 'ptr_alloc_ok' argument.
1508 (gfc_trans_omp_clauses, gfc_split_omp_clauses): Update for
1509 defaultmap changes.
1510 * trans.h (gfc_omp_scalar_p): Update prototype.
1511 (gfc_omp_allocatable_p, gfc_omp_scalar_target_p): New.
1512 (struct lang_decl): Add scalar_target.
1513 (GFC_DECL_SCALAR_TARGET, GFC_DECL_GET_SCALAR_TARGET): New.
1514
1515 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
1516
1517 * resolve.c (resolve_variable): Remove *XCNEW used to
1518 nullify nullified memory.
1519
1520 2021-06-09 Martin Liska <mliska@suse.cz>
1521
1522 * intrinsic.texi: Add missing @headitem to tables with a header.
1523
1524 2021-06-09 Jakub Jelinek <jakub@redhat.com>
1525
1526 PR fortran/100965
1527 * trans-openmp.c (gfc_omp_finish_clause): Gimplify OMP_CLAUSE_SIZE.
1528
1529 2021-06-08 Tobias Burnus <tobias@codesourcery.com>
1530
1531 PR middle-end/99928
1532 * trans-openmp.c (gfc_add_clause_implicitly): New.
1533 (gfc_split_omp_clauses): Use it.
1534 (gfc_free_split_omp_clauses): New.
1535 (gfc_trans_omp_do_simd, gfc_trans_omp_parallel_do,
1536 gfc_trans_omp_parallel_do_simd, gfc_trans_omp_distribute,
1537 gfc_trans_omp_teams, gfc_trans_omp_target, gfc_trans_omp_taskloop,
1538 gfc_trans_omp_master_taskloop, gfc_trans_omp_parallel_master): Use it.
1539
1540 2021-06-08 Martin Liska <mliska@suse.cz>
1541
1542 * intrinsic.texi: Fix typo.
1543 * trans-expr.c (gfc_trans_pointer_assignment): Likewise.
1544
1545 2021-06-05 José Rui Faustino de Sousa <jrfsousa@gmail.com>
1546
1547 PR fortran/100120
1548 PR fortran/100816
1549 PR fortran/100818
1550 PR fortran/100819
1551 PR fortran/100821
1552 * trans-array.c (gfc_get_array_span): rework the way character
1553 array "span" was calculated.
1554 (gfc_conv_expr_descriptor): improve handling of character sections
1555 and unlimited polymorphic objects.
1556 * trans-expr.c (gfc_get_character_len): new function to calculate
1557 character string length.
1558 (gfc_get_character_len_in_bytes): new function to calculate
1559 character string length in bytes.
1560 (gfc_conv_scalar_to_descriptor): add call to set the "span".
1561 (gfc_trans_pointer_assignment): set "_len" and antecipate the
1562 initialization of the deferred character length hidden argument.
1563 * trans-intrinsic.c (gfc_conv_associated): set "force_no_tmp" to
1564 avoid the creation of a temporary.
1565 * trans-types.c (gfc_get_dtype_rank_type): rework type detection
1566 so that unlimited polymorphic objects get proper type infomation,
1567 also important for bind(c).
1568 (gfc_get_dtype): add argument to pass the rank if necessary.
1569 (gfc_get_array_type_bounds): cosmetic change to have character
1570 arrays called character instead of unknown.
1571 * trans-types.h (gfc_get_dtype): modify prototype.
1572 * trans.c (get_array_span): rework the way character array "span"
1573 was calculated.
1574 * trans.h (gfc_get_character_len): new prototype.
1575 (gfc_get_character_len_in_bytes): new prototype.
1576 Add "unlimited_polymorphic" flag to "gfc_se" type to signal when
1577 expression carries an unlimited polymorphic object.
1578
1579 2021-06-04 Harald Anlauf <anlauf@gmx.de>
1580
1581 PR fortran/99839
1582 * frontend-passes.c (inline_matmul_assign): Do not inline matmul
1583 if the assignment to the resulting array if it is not of canonical
1584 type (real/integer/complex/logical).
1585
1586 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
1587
1588 * dump-parse-tree.c (show_code_node): Handle
1589 EXEC_OMP_(TARGET_)(,PARALLEL_,TEAMS_)LOOP.
1590
1591 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
1592
1593 * scanner.c (skip_fixed_omp_sentinel): Set openacc_flag if
1594 this is not an (OpenMP) continuation line.
1595 (skip_fixed_oacc_sentinel): Likewise for openmp_flag and OpenACC.
1596 (gfc_next_char_literal): gfc_error_now to force error for mixed OMP/ACC
1597 continuation once per location and return '\n'.
1598
1599 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
1600
1601 PR middle-end/99928
1602 * openmp.c (gfc_match_omp_clauses): Fix typo in error message.
1603
1604 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
1605
1606 PR middle-end/99928
1607 * dump-parse-tree.c (show_omp_clauses): Handle bind clause.
1608 (show_omp_node): Handle loop directive.
1609 * frontend-passes.c (gfc_code_walker): Likewise.
1610 * gfortran.h (enum gfc_statement): Add
1611 ST_OMP_(END_)(TARGET_)(|PARALLEL_|TEAMS_)LOOP.
1612 (enum gfc_omp_bind_type): New.
1613 (gfc_omp_clauses): Use it.
1614 (enum gfc_exec_op): Add EXEC_OMP_(TARGET_)(|PARALLEL_|TEAMS_)LOOP.
1615 * match.h (gfc_match_omp_loop, gfc_match_omp_parallel_loop,
1616 gfc_match_omp_target_parallel_loop, gfc_match_omp_target_teams_loop,
1617 gfc_match_omp_teams_loop): New.
1618 * openmp.c (enum omp_mask1): Add OMP_CLAUSE_BIND.
1619 (gfc_match_omp_clauses): Handle it.
1620 (OMP_LOOP_CLAUSES, gfc_match_omp_loop, gfc_match_omp_teams_loop,
1621 gfc_match_omp_target_teams_loop, gfc_match_omp_parallel_loop,
1622 gfc_match_omp_target_parallel_loop): New.
1623 (resolve_omp_clauses, resolve_omp_do, omp_code_to_statement,
1624 gfc_resolve_omp_directive): Handle omp loop.
1625 * parse.c (decode_omp_directive case_exec_markers, gfc_ascii_statement,
1626 parse_omp_do, parse_executable): Likewise.
1627 (parse_omp_structured_block): Remove ST_ which use parse_omp_do.
1628 * resolve.c (gfc_resolve_blocks): Add omp loop.
1629 * st.c (gfc_free_statement): Likewise.
1630 * trans-openmp.c (gfc_trans_omp_clauses): Handle bind clause.
1631 (gfc_trans_omp_do, gfc_trans_omp_parallel_do, gfc_trans_omp_distribute,
1632 gfc_trans_omp_teams, gfc_trans_omp_target, gfc_trans_omp_directive):
1633 Handle loop directive.
1634 (gfc_split_omp_clauses): Likewise; fix firstprivate/lastprivate
1635 and (in_)reduction for taskloop.
1636 * trans.c (trans_code): Handle omp loop directive.
1637
1638 2021-06-01 Tobias Burnus <tobias@codesourcery.com>
1639
1640 PR middle-end/99928
1641 * dump-parse-tree.c (show_omp_node, show_code_node): Handle
1642 (parallel) master taskloop (simd).
1643 * frontend-passes.c (gfc_code_walker): Set in_omp_workshare
1644 to false for parallel master taskloop (simd).
1645 * gfortran.h (enum gfc_statement):
1646 Add ST_OMP_(END_)(PARALLEL_)MASTER_TASKLOOP(_SIMD).
1647 (enum gfc_exec_op): EXEC_OMP_(PARALLEL_)MASTER_TASKLOOP(_SIMD).
1648 * match.h (gfc_match_omp_master_taskloop,
1649 gfc_match_omp_master_taskloop_simd,
1650 gfc_match_omp_parallel_master_taskloop,
1651 gfc_match_omp_parallel_master_taskloop_simd): New prototype.
1652 * openmp.c (gfc_match_omp_parallel_master_taskloop,
1653 gfc_match_omp_parallel_master_taskloop_simd,
1654 gfc_match_omp_master_taskloop,
1655 gfc_match_omp_master_taskloop_simd): New.
1656 (gfc_match_omp_taskloop_simd): Permit 'reduction' clause.
1657 (resolve_omp_clauses): Handle new combined directives; remove
1658 inscan-reduction check to reduce multiple errors; add
1659 task-reduction error for 'taskloop simd'.
1660 (gfc_resolve_omp_parallel_blocks,
1661 resolve_omp_do, omp_code_to_statement,
1662 gfc_resolve_omp_directive): Handle new combined constructs.
1663 * parse.c (decode_omp_directive, next_statement,
1664 gfc_ascii_statement, parse_omp_do, parse_omp_structured_block,
1665 parse_executable): Likewise.
1666 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
1667 * st.c (gfc_free_statement): Likewise.
1668 * trans.c (trans_code): Likewise.
1669 * trans-openmp.c (gfc_split_omp_clauses,
1670 gfc_trans_omp_directive): Likewise.
1671 (gfc_trans_omp_parallel_master): Move after gfc_trans_omp_master_taskloop;
1672 handle parallel master taskloop (simd) as well.
1673 (gfc_trans_omp_taskloop): Take gfc_exec_op as arg.
1674 (gfc_trans_omp_master_taskloop): New.
1675
1676 2021-05-30 Gerald Pfeifer <gerald@pfeifer.com>
1677
1678 * gfortran.texi (BOZ literal constants): Fix typo.
1679
1680 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
1681
1682 * dump-parse-tree.c (show_iterator): New.
1683 (show_omp_namelist): Handle iterators.
1684 (show_omp_clauses): Handle affinity.
1685 * gfortran.h (gfc_free_omp_namelist): New union with 'udr' and new 'ns'.
1686 * match.c (gfc_free_omp_namelist): Add are to choose union element.
1687 * openmp.c (gfc_free_omp_clauses, gfc_match_omp_detach,
1688 gfc_match_omp_clause_reduction, gfc_match_omp_flush): Update
1689 call to gfc_free_omp_namelist.
1690 (gfc_match_omp_variable_list): Likewise; permit preceeding whitespace.
1691 (enum omp_mask1): Add OMP_CLAUSE_AFFINITY.
1692 (gfc_match_iterator): New.
1693 (gfc_match_omp_clauses): Use it; update call to gfc_free_omp_namelist.
1694 (OMP_TASK_CLAUSES): Add OMP_CLAUSE_AFFINITY.
1695 (gfc_match_omp_taskwait): Match depend clause.
1696 (resolve_omp_clauses): Handle affinity; update for udr/union change.
1697 (gfc_resolve_omp_directive): Resolve clauses of taskwait.
1698 * st.c (gfc_free_statement): Update gfc_free_omp_namelist call.
1699 * trans-openmp.c (gfc_trans_omp_array_reduction_or_udr): Likewise
1700 (handle_iterator): New.
1701 (gfc_trans_omp_clauses): Handle iterators for depend/affinity clause.
1702 (gfc_trans_omp_taskwait): Handle depend clause.
1703 (gfc_trans_omp_directive): Update call.
1704
1705 2021-05-27 Harald Anlauf <anlauf@gmx.de>
1706
1707 PR fortran/100602
1708 * trans-intrinsic.c (gfc_conv_intrinsic_size): Use CLASS data
1709 attributes for CLASS arrays for generation of runtime error.
1710
1711 2021-05-27 Harald Anlauf <anlauf@gmx.de>
1712
1713 PR fortran/100656
1714 * trans-array.c (gfc_conv_ss_startstride): Do not call check for
1715 presence of a dummy argument when a symbol actually refers to a
1716 non-dummy.
1717
1718 2021-05-25 Tobias Burnus <tobias@codesourcery.com>
1719 Johannes Nendwich <a08727063@unet.univie.ac.at>
1720
1721 * intrinsic.texi (GERROR, GETARGS, GETLOG, NORM2, PARITY, RANDOM_INIT,
1722 RANDOM_NUMBER): Fix typos and copy'n'paste errors.
1723
1724 2021-05-24 Tobias Burnus <tobias@codesourcery.com>
1725
1726 PR fortran/86470
1727 * trans-expr.c (gfc_copy_class_to_class): Add unshare_expr.
1728 * trans-openmp.c (gfc_is_polymorphic_nonptr,
1729 gfc_is_unlimited_polymorphic_nonptr): New.
1730 (gfc_omp_clause_copy_ctor, gfc_omp_clause_dtor): Handle
1731 polymorphic scalars.
1732
1733 2021-05-23 Harald Anlauf <anlauf@gmx.de>
1734
1735 PR fortran/100551
1736 * trans-expr.c (gfc_conv_procedure_call): Adjust check for
1737 implicit conversion of actual argument to an unlimited polymorphic
1738 procedure argument.
1739
1740 2021-05-23 Tobias Burnus <tobias@codesourcery.com>
1741
1742 * intrinsic.texi (ATOMIC_ADD, ATOMIC_FETCH_ADD): Use the
1743 proper variable name in the description.
1744
1745 2021-05-22 Andre Vehreschild <vehre@gcc.gnu.org>
1746 Steve Kargl <kargl@gcc.gnu.org>
1747
1748 PR fortran/98301
1749 * trans-decl.c (gfc_build_builtin_function_decls): Move decl.
1750 * trans-intrinsic.c (conv_intrinsic_random_init): Use bool for
1751 lib-call of caf_random_init instead of logical (4-byte).
1752 * trans.h: Add tree var for random_init.
1753
1754 2021-05-20 Marcel Vollweiler <marcel@codesourcery.com>
1755
1756 * openmp.c (gfc_match_omp_clauses): Support map-type-modifier 'close'.
1757
1758 2021-05-18 Tobias Burnus <tobias@codesourcery.com>
1759
1760 PR fortran/100642
1761 * openmp.c (omp_code_to_statement): Add missing EXEC_OMP_DEPOBJ.
1762
1763 2021-05-17 Harald Anlauf <anlauf@gmx.de>
1764
1765 PR fortran/98411
1766 * trans-decl.c (gfc_finish_var_decl): Add check for explicit SAVE
1767 attribute.
1768
1769 2021-05-17 Tobias Burnus <tobias@codesourcery.com>
1770
1771 PR fortran/100633
1772 * resolve.c (gfc_resolve_code): Reject nonintrinsic assignments in
1773 OMP WORKSHARE.
1774
1775 2021-05-14 Tobias Burnus <tobias@codesourcery.com>
1776
1777 * dump-parse-tree.c (show_omp_node, show_code_node): Handle
1778 EXEC_OMP_PARALLEL_MASTER.
1779 * frontend-passes.c (gfc_code_walker): Likewise.
1780 * gfortran.h (enum gfc_statement): Add ST_OMP_PARALLEL_MASTER and
1781 ST_OMP_END_PARALLEL_MASTER.
1782 (enum gfc_exec_op): Add EXEC_OMP_PARALLEL_MASTER..
1783 * match.h (gfc_match_omp_parallel_master): Handle it.
1784 * openmp.c (gfc_match_omp_parallel_master, resolve_omp_clauses,
1785 omp_code_to_statement, gfc_resolve_omp_directive): Likewise.
1786 * parse.c (decode_omp_directive, case_exec_markers,
1787 gfc_ascii_statement, parse_omp_structured_block,
1788 parse_executable): Likewise.
1789 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
1790 * st.c (gfc_free_statement): Likewise.
1791 * trans-openmp.c (gfc_trans_omp_parallel_master,
1792 gfc_trans_omp_workshare, gfc_trans_omp_directive): Likewise.
1793 * trans.c (trans_code): Likewise.
1794
1795 2021-05-14 Tobias Burnus <tobias@codesourcery.com>
1796
1797 * resolve.c (resolve_symbol): Handle implicit SAVE of main-program
1798 for vars in 'omp threadprivate' and 'omp declare target'.
1799
1800 2021-05-10 Martin Liska <mliska@suse.cz>
1801
1802 * decl.c (variable_decl): Use startswith
1803 function instead of strncmp.
1804 (gfc_match_end): Likewise.
1805 * gfortran.h (gfc_str_startswith): Likewise.
1806 * module.c (load_omp_udrs): Likewise.
1807 (read_module): Likewise.
1808 * options.c (gfc_handle_runtime_check_option): Likewise.
1809 * primary.c (match_arg_list_function): Likewise.
1810 * trans-decl.c (gfc_get_symbol_decl): Likewise.
1811 * trans-expr.c (gfc_conv_procedure_call): Likewise.
1812 * trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Likewise.
1813
1814 2021-05-06 Paul Thomas <pault@gcc.gnu.org>
1815
1816 PR fortran/46991
1817 PR fortran/99819
1818 * class.c (gfc_build_class_symbol): Remove the error that
1819 disables assumed size class arrays. Class array types that are
1820 not deferred shape or assumed rank are given a unique name and
1821 placed in the procedure namespace.
1822 * trans-array.c (gfc_trans_g77_array): Obtain the data pointer
1823 for class arrays.
1824 (gfc_trans_dummy_array_bias): Suppress the runtime error for
1825 extent violations in explicit shape class arrays because it
1826 always fails.
1827 * trans-expr.c (gfc_conv_procedure_call): Handle assumed size
1828 class actual arguments passed to non-descriptor formal args by
1829 using the data pointer, stored as the symbol's backend decl.
1830
1831 2021-05-05 Harald Anlauf <anlauf@gmx.de>
1832
1833 PR fortran/100274
1834 * interface.c (gfc_compare_actual_formal): Continue checks after
1835 emitting warning for argument length mismatch.
1836 * trans-expr.c (gfc_conv_procedure_call): Check for NULL pointer
1837 dereference.
1838
1839 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
1840
1841 PR testsuite/100397
1842 * trans-openmp.c (gfc_trans_omp_depobj): Fix pasto in enum values.
1843
1844 2021-04-28 Tobias Burnus <tobias@codesourcery.com>
1845
1846 * openmp.c (gfc_match_omp_variable_list): Gobble whitespace before
1847 checking whether a '%' or parenthesis-open follows as next character.
1848
1849 2021-04-28 José Rui Faustino de Sousa <jrfsousa@gmail.com>
1850
1851 PR fortran/82376
1852 * trans-expr.c (gfc_conv_procedure_call): Evaluate function result
1853 and then pass a pointer.
1854
1855 2021-04-26 Thomas Schwinge <thomas@codesourcery.com>
1856 Nathan Sidwell <nathan@codesourcery.com>
1857 Tom de Vries <vries@codesourcery.com>
1858 Julian Brown <julian@codesourcery.com>
1859 Kwok Cheung Yeung <kcy@codesourcery.com>
1860
1861 * lang.opt (Wopenacc-parallelism): New.
1862
1863 2021-04-24 Harald Anlauf <anlauf@gmx.de>
1864
1865 PR fortran/100154
1866 * check.c (variable_check): Allow function reference having a data
1867 pointer result.
1868 (arg_strlen_is_zero): New function.
1869 (gfc_check_fgetputc_sub): Add static check of character and status
1870 arguments.
1871 (gfc_check_fgetput_sub): Likewise.
1872 * intrinsic.c (add_subroutines): Fix argument name for the
1873 character argument to intrinsic subroutines fget[c], fput[c].
1874
1875 2021-04-24 Harald Anlauf <anlauf@gmx.de>
1876
1877 PR fortran/100218
1878 * expr.c (gfc_check_vardef_context): Extend check to allow pointer
1879 from a function reference.
1880
1881 2021-04-22 Martin Liska <mliska@suse.cz>
1882
1883 PR testsuite/100159
1884 PR testsuite/100192
1885 * frontend-passes.c (optimize_expr): Fix typos and missing comments.
1886
1887 2021-04-22 Michael Meissner <meissner@linux.ibm.com>
1888
1889 PR fortran/96983
1890 * trans-intrinsic.c (build_round_expr): If int type is larger than
1891 long long, do the round and convert to the integer type. Do not
1892 try to find a floating point type the exact size of the integer
1893 type.
1894
1895 2021-04-21 Tobias Burnus <tobias@codesourcery.com>
1896
1897 * dump-parse-tree.c (show_omp_namelist): Handle depobj + mutexinoutset
1898 in the depend clause.
1899 (show_omp_clauses, show_omp_node, show_code_node): Handle depobj.
1900 * gfortran.h (enum gfc_statement): Add ST_OMP_DEPOBJ.
1901 (enum gfc_omp_depend_op): Add OMP_DEPEND_UNSET,
1902 OMP_DEPEND_MUTEXINOUTSET and OMP_DEPEND_DEPOBJ.
1903 (gfc_omp_clauses): Add destroy, depobj_update and depobj.
1904 (enum gfc_exec_op): Add EXEC_OMP_DEPOBJ
1905 * match.h (gfc_match_omp_depobj): Match 'omp depobj'.
1906 * openmp.c (gfc_match_omp_clauses): Add depobj + mutexinoutset
1907 to depend clause.
1908 (gfc_match_omp_depobj, resolve_omp_clauses, gfc_resolve_omp_directive):
1909 Handle 'omp depobj'.
1910 * parse.c (decode_omp_directive, next_statement, gfc_ascii_statement):
1911 Likewise.
1912 * resolve.c (gfc_resolve_code): Likewise.
1913 * st.c (gfc_free_statement): Likewise.
1914 * trans-openmp.c (gfc_trans_omp_clauses): Handle depobj + mutexinoutset
1915 in the depend clause.
1916 (gfc_trans_omp_depobj, gfc_trans_omp_directive): Handle EXEC_OMP_DEPOBJ.
1917 * trans.c (trans_code): Likewise.
1918
1919 2021-04-20 Paul Thomas <pault@gcc.gnu.org>
1920
1921 PR fortran/100110
1922 * trans-decl.c (gfc_get_symbol_decl): Replace test for host
1923 association with a check that the current and symbol namespaces
1924 are the same.
1925
1926 2021-04-19 Thomas Schwinge <thomas@codesourcery.com>
1927
1928 * lang.opt (fopenacc-kernels=): Remove.
1929
1930 2021-04-16 José Rui Faustino de Sousa <jrfsousa@gmail.com>
1931
1932 PR fortran/100094
1933 * trans-array.c (gfc_trans_deferred_array): Add code to initialize
1934 pointers and allocatables with correct TKR parameters.
1935
1936 2021-04-16 José Rui Faustino de Sousa <jrfsousa@gmail.com>
1937
1938 PR fortran/100018
1939 * resolve.c: Add association check before de-referencing pointer.
1940
1941 2021-04-16 Harald Anlauf <anlauf@gmx.de>
1942 Paul Thomas <pault@gcc.gnu.org>
1943
1944 PR fortran/63797
1945 * module.c (write_symtree): Do not write interface of intrinsic
1946 procedure to module file for F2003 and newer.
1947
1948 2021-04-15 Paul Thomas <pault@gcc.gnu.org>
1949
1950 PR fortran/99307
1951 * symbol.c: Remove trailing white space.
1952 * trans-array.c (gfc_trans_create_temp_array): Create a class
1953 temporary for class expressions and assign the new descriptor
1954 to the data field.
1955 (build_class_array_ref): If the class expr can be extracted,
1956 then use that for 'decl'. Class function results are reliably
1957 handled this way. Call gfc_find_and_cut_at_last_class_ref to
1958 eliminate largely redundant code. Remove dead code and recast
1959 the rest of the code to extract 'decl' for remaining cases.
1960 Call gfc_build_spanned_array_ref.
1961 (gfc_alloc_allocatable_for_assignment): Use class descriptor
1962 element length for 'elemsize1'. Eliminate repeat set of dtype
1963 for class expressions.
1964 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Include
1965 additional code from build_class_array_ref, and use optional
1966 gfc_typespec pointer argument.
1967 (gfc_trans_scalar_assign): Make use of pre and post blocks for
1968 all class expressions.
1969 * trans.c (get_array_span): For unlimited polymorphic exprs
1970 multiply the span by the value of the _len field.
1971 (gfc_build_spanned_array_ref): New function.
1972 (gfc_build_array_ref): Call gfc_build_spanned_array_ref and
1973 eliminate repeated code.
1974 * trans.h: Add arg to gfc_find_and_cut_at_last_class_ref and
1975 add prototype for gfc_build_spanned_array_ref.
1976
1977 2021-04-14 Martin Liska <mliska@suse.cz>
1978
1979 * intrinsic.texi: The table has first column empty and it makes
1980 trouble when processing makeinfo --xml output.
1981
1982 2021-04-09 Tobias Burnus <tobias@codesourcery.com>
1983
1984 PR fortran/99817
1985 * trans-types.c (gfc_get_function_type): Also generate hidden
1986 coarray argument for character arguments.
1987
1988 2021-04-03 Paul Thomas <pault@gcc.gnu.org>
1989
1990 PR fortran/99818
1991 * interface.c (compare_parameter): The codimension attribute is
1992 applied to the _data field of class formal arguments.
1993
1994 2021-04-01 Harald Anlauf <anlauf@gmx.de>
1995
1996 PR fortran/99840
1997 * simplify.c (gfc_simplify_transpose): Properly initialize
1998 resulting shape.
1999
2000 2021-03-28 Paul Thomas <pault@gcc.gnu.org>
2001
2002 PR fortran/99602
2003 * trans-expr.c (gfc_conv_procedure_call): Use the _data attrs
2004 for class expressions and detect proc pointer evaluations by
2005 the non-null actual argument list.
2006
2007 2021-03-27 Steve Kargl <kargl@gcc.gnu.org>
2008
2009 * misc.c (gfc_typename): Fix off-by-one in buffer sizes.
2010
2011 2021-03-26 Tobias Burnus <tobias@codesourcery.com>
2012
2013 PR fortran/99651
2014 * intrinsic.c (gfc_intrinsic_func_interface): Set
2015 attr.proc = PROC_INTRINSIC if FL_PROCEDURE.
2016
2017 2021-03-24 Tobias Burnus <tobias@codesourcery.com>
2018
2019 PR fortran/99369
2020 * resolve.c (resolve_operator): Make 'msg' buffer larger
2021 and use snprintf.
2022
2023 2021-03-23 Tobias Burnus <tobias@codesourcery.com>
2024
2025 PR fortran/93660
2026 * trans-decl.c (build_function_decl): Add comment;
2027 increment hidden_typelist for caf_token/caf_offset.
2028 * trans-types.c (gfc_get_function_type): Add comment;
2029 add missing caf_token/caf_offset args.
2030
2031 2021-03-22 Tobias Burnus <tobias@codesourcery.com>
2032
2033 PR fortran/99688
2034 * match.c (select_type_set_tmp, gfc_match_select_type,
2035 gfc_match_select_rank): Fix 'name' buffersize to avoid out of bounds.
2036 * resolve.c (resolve_select_type): Likewise.
2037
2038 2021-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
2039
2040 * frontend-passes.c (inline_limit_check): Add rank_a
2041 argument. If a is rank 1, set the second dimension to 1.
2042 (inline_matmul_assign): Pass rank_a argument to inline_limit_check.
2043 (call_external_blas): Likewise.
2044
2045 2021-03-15 Thomas Koenig <tkoenig@gcc.gnu.org>
2046
2047 PR fortran/99345
2048 * frontend-passes.c (doloop_contained_procedure_code):
2049 Properly handle EXEC_IOLENGTH.
2050
2051 2021-03-15 Paul Thomas <pault@gcc.gnu.org>
2052
2053 PR fortran/99545
2054 * trans-stmt.c (gfc_trans_allocate): Mark the initialization
2055 assignment by setting init_flag.
2056
2057 2021-03-14 Harald Anlauf <anlauf@gmx.de>
2058 Paul Thomas <pault@gcc.gnu.org>
2059
2060 * trans-expr.c (gfc_conv_procedure_call): Fix runtime checks for
2061 CLASS arguments.
2062 * trans-intrinsic.c (gfc_conv_intrinsic_size): Likewise.
2063
2064 2021-03-13 Paul Thomas <pault@gcc.gnu.org>
2065
2066 PR fortran/99125
2067 * trans-array.c (gfc_conv_expr_descriptor): For deferred length
2068 length components use the ss_info string length instead of
2069 gfc_get_expr_charlen. Make sure that the deferred string length
2070 is a variable before assigning to it. Otherwise use the expr.
2071 * trans-expr.c (gfc_conv_string_length): Make sure that the
2072 deferred string length is a variable before assigning to it.
2073
2074 2021-03-12 Tobias Burnus <tobias@codesourcery.com>
2075
2076 PR fortran/99514
2077 * resolve.c (resolve_symbol): Accept vars which are in DATA
2078 and hence (either) implicit SAVE (or in common).
2079
2080 2021-03-10 Harald Anlauf <anlauf@gmx.de>
2081
2082 PR fortran/99205
2083 * data.c (gfc_assign_data_value): Reject non-constant character
2084 length for lvalue.
2085 * trans-array.c (gfc_conv_array_initializer): Restrict loop to
2086 elements which are defined to avoid NULL pointer dereference.
2087
2088 2021-03-10 Tobias Burnus <tobias@codesourcery.com>
2089
2090 * intrinsic.texi (MIN): Correct 'maximum' to 'minimum'.
2091
2092 2021-03-10 Eric Botcazou <ebotcazou@adacore.com>
2093
2094 PR fortran/96983
2095 * trans-intrinsic.c (build_round_expr): Do not implicitly assume
2096 that __float128 is the 128-bit floating-point type.
2097
2098 2021-03-08 Harald Anlauf <anlauf@gmx.de>
2099
2100 PR fortran/49278
2101 * data.c (gfc_assign_data_value): Reject variable with PARAMETER
2102 attribute in DATA statement.
2103
2104 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
2105
2106 PR fortran/99355
2107 PR fortran/57871
2108 * invoke.texi (-freal{4,8}-real-*): Extend description.
2109 * primary.c (match_real_constant): Also promote real literals
2110 with '_kind' number.
2111
2112 2021-03-04 Tobias Burnus <tobias@codesourcery.com>
2113
2114 PR fortran/99355
2115 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Avoid
2116 redoing kind conversions.
2117 * primary.c (match_real_constant): Likewise.
2118
2119 2021-02-28 Jakub Jelinek <jakub@redhat.com>
2120
2121 PR fortran/99303
2122 * openmp.c (gfc_omp_requires_add_clause): Fix up diagnostic message
2123 wordings.
2124 (resolve_omp_clauses): Likewise.
2125
2126 2021-02-28 Jakub Jelinek <jakub@redhat.com>
2127
2128 PR fortran/99300
2129 * frontend-passes.c (doloop_code): Replace double space in diagnostics
2130 with a single space.
2131
2132 2021-02-24 Paul Thomas <pault@gcc.gnu.org>
2133
2134 PR fortran/98342
2135 * trans-expr.c (gfc_conv_derived_to_class): Add optional arg.
2136 'derived_array' to hold the fixed, parmse expr in the case of
2137 assumed rank formal arguments. Deal with optional arguments.
2138 (gfc_conv_procedure_call): Null 'derived' array for each actual
2139 argument. Add its address to the call to gfc_conv_derived_to_
2140 class. Access the 'data' field of scalar descriptors before
2141 deallocating allocatable components. Also strip NOPs before the
2142 calls to gfc_deallocate_alloc_comp. Use 'derived' array as the
2143 input to gfc_deallocate_alloc_comp if it is available.
2144 * trans.h : Include the optional argument 'derived_array' to
2145 the prototype of gfc_conv_derived_to_class. The default value
2146 is NULL_TREE.
2147
2148 2021-02-23 Paul Thomas <pault@gcc.gnu.org>
2149
2150 PR fortran/99124
2151 * resolve.c (resolve_fl_procedure): Include class results in
2152 the test for F2018, C15100.
2153 * trans-array.c (get_class_info_from_ss): Do not use the saved
2154 descriptor to obtain the class expression for variables. Use
2155 gfc_get_class_from_expr instead.
2156
2157 2021-02-23 Harald Anlauf <anlauf@gmx.de>
2158
2159 PR fortran/99206
2160 * simplify.c (gfc_simplify_reshape): Set string length for
2161 character arguments.
2162
2163 2021-02-22 Tobias Burnus <tobias@codesourcery.com>
2164
2165 PR fortran/99171
2166 * trans-openmp.c (gfc_omp_is_optional_argument): Regard optional
2167 dummy procs as nonoptional as no special treatment is needed.
2168
2169 2021-02-21 Harald Anlauf <anlauf@gmx.de>
2170
2171 * trans-expr.c (gfc_conv_procedure_call): Do not add clobber to
2172 allocatable intent(out) argument.
2173
2174 2021-02-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2175
2176 PR fortran/98686
2177 * match.c (gfc_match_namelist): If BT_UNKNOWN, check for
2178 IMPLICIT NONE and and issue an error, otherwise set the type
2179 to its IMPLICIT type so that any subsequent use of objects will
2180 will confirm their types.
2181
2182 2021-02-19 Harald Anlauf <anlauf@gmx.de>
2183
2184 * symbol.c (gfc_add_flavor): Reverse order of conditions.
2185
2186 2021-02-19 Tobias Burnus <tobias@codesourcery.com>
2187
2188 PR fortran/99010
2189 * dependency.c (gfc_dep_resolver): Fix coarray handling.
2190
2191 2021-02-19 Tobias Burnus <tobias@codesourcery.com>
2192
2193 PR fortran/99146
2194 * interface.c:
2195
2196 2021-02-19 Tobias Burnus <tobias@codesourcery.com>
2197
2198 PR fortran/99027
2199 * simplify.c (simplify_bound_dim): Honor DIMEN_ELEMENT
2200 when using dim=.
2201
2202 2021-02-17 Julian Brown <julian@codesourcery.com>
2203
2204 * openmp.c (resolve_omp_clauses): Disallow selecting components
2205 of arrays of derived type.
2206
2207 2021-02-17 Julian Brown <julian@codesourcery.com>
2208
2209 * trans-openmp.c (gfc_trans_omp_clauses): Handle element selection
2210 for arrays of derived types.
2211
2212 2021-02-16 Tobias Burnus <tobias@codesourcery.com>
2213
2214 * expr.c (gfc_is_simplify_contiguous): Handle REF_INQUIRY, i.e.
2215 %im and %re which are EXPR_VARIABLE.
2216 * openmp.c (resolve_omp_clauses): Diagnose %re/%im explicitly.
2217
2218 2021-02-16 Tobias Burnus <tobias@codesourcery.com>
2219
2220 PR fortran/99111
2221 * io.c (resolve_tag_format): Reject BT_DERIVED/CLASS/VOID
2222 as (array-valued) FORMAT tag.
2223
2224 2021-02-12 Tobias Burnus <tobias@codesourcery.com>
2225
2226 PR fortran/99043
2227 * trans-expr.c (gfc_conv_procedure_call): Don't reset
2228 rank of assumed-rank array.
2229
2230 2021-02-11 Paul Thomas <pault@gcc.gnu.org>
2231
2232 PR fortran/98897
2233 * match.c (gfc_match_call): Include associate names as possible
2234 entities with typebound subroutines. The target needs to be
2235 resolved for the type.
2236
2237 2021-02-11 Paul Thomas <pault@gcc.gnu.org>
2238
2239 PR fortran/99060
2240 * primary.c (gfc_match_varspec): Test for non-null 'previous'
2241 before using its name in the error message.
2242
2243 2021-02-11 Tobias Burnus <tobias@codesourcery.com>
2244
2245 * intrinsic.texi (FINDLOC): Add 'MASK' to argument table.
2246 (MAXLOC, MAXVAL, MINLOC, MINVAL): For 'MASK', remove 'an
2247 array' as scalars are also permitted.
2248
2249 2021-02-10 Julian Brown <julian@codesourcery.com>
2250
2251 PR fortran/98979
2252 * openmp.c (resolve_omp_clauses): Omit OpenACC update in
2253 contiguity check and stride-specified error.
2254
2255 2021-02-04 Julian Brown <julian@codesourcery.com>
2256
2257 * openmp.c (resolve_omp_clauses): Omit OpenACC update in
2258 contiguity check and stride-specified error.
2259
2260 2021-02-04 Julian Brown <julian@codesourcery.com>
2261
2262 * trans-openmp.c (gfc_trans_omp_clauses): Use class_pointer attribute
2263 for BT_CLASS.
2264
2265 2021-02-04 Julian Brown <julian@codesourcery.com>
2266
2267 * trans-openmp.c (gfc_trans_omp_clauses): Fix dereferencing for
2268 BT_DERIVED members.
2269
2270 2021-02-04 Tobias Burnus <tobias@codesourcery.com>
2271
2272 * openmp.c (resolve_omp_clauses): Explicitly diagnose
2273 substrings as not permitted.
2274
2275 2021-02-03 Jeff Law <law@redhat.com>
2276
2277 * intrinsic.texi (ANINT): Fix typo.
2278
2279 2021-02-03 Tobias Burnus <tobias@codesourcery.com>
2280
2281 PR fortran/98913
2282 * dependency.c (gfc_dep_resolver): Treat local access
2283 to coarrays like any array access in dependency analysis.
2284
2285 2021-01-28 Harald Anlauf <anlauf@gmx.de>
2286
2287 PR fortran/86470
2288 * trans.c (gfc_call_malloc): Allocate area of size 1 if passed
2289 size is NULL (as documented).
2290
2291 2021-01-27 Paul Thomas <pault@gcc.gnu.org>
2292
2293 PR fortran/93924
2294 PR fortran/93925
2295 * trans-expr.c (gfc_conv_procedure_call): Suppress the call to
2296 gfc_conv_intrinsic_to_class for unlimited polymorphic procedure
2297 pointers.
2298 (gfc_trans_assignment_1): Similarly suppress class assignment
2299 for class valued procedure pointers.
2300
2301 2021-01-27 Paul Thomas <pault@gcc.gnu.org>
2302
2303 PR fortran/98472
2304 * trans-array.c (gfc_conv_expr_descriptor): Include elemental
2305 procedure pointers in the assert under the comment 'elemental
2306 function' and eliminate the second, spurious assert.
2307
2308 2021-01-25 Harald Anlauf <anlauf@gmx.de>
2309
2310 PR fortran/70070
2311 * data.c (create_character_initializer): Check substring indices
2312 against bounds.
2313 (gfc_assign_data_value): Catch error returned from
2314 create_character_initializer.
2315
2316 2021-01-25 Tobias Burnus <tobias@codesourcery.com>
2317
2318 * intrinsic.texi (CO_BROADCAST, CO_MIN, CO_REDUCE, CO_SUM): Fix typos.
2319
2320 2021-01-25 Steve Kargl <kargl@gcc.gnu.org>
2321
2322 PR fortran/98517
2323 * resolve.c (resolve_charlen): Check that length expression is
2324 present before testing for scalar/integer..
2325
2326 2021-01-22 Paul Thomas <pault@gcc.gnu.org>
2327
2328 PR fortran/98565
2329 * trans-intrinsic.c (gfc_conv_associated): Do not add a _data
2330 component for scalar class function targets. Instead, fix the
2331 function result and access the _data from that.
2332
2333 2021-01-21 Jorge D'Elia <jdelia@cimec.unl.edu.ar>
2334
2335 * intrinsic.texi (CO_MAX): Fix typo.
2336
2337 2021-01-21 Paul Thomas <pault@gcc.gnu.org>
2338
2339 PR fortran/96320
2340 * decl.c (gfc_match_modproc): It is not an error to find a
2341 module procedure declaration within a contains block.
2342 * expr.c (gfc_check_vardef_context): Pure procedure result is
2343 assignable. Change 'own_scope' accordingly.
2344 * resolve.c (resolve_typebound_procedure): A procedure that
2345 has the module procedure attribute is almost certainly a
2346 module procedure, whatever its interface.
2347
2348 2021-01-19 Tobias Burnus <tobias@codesourcery.com>
2349
2350 PR fortran/98476
2351 * openmp.c (resolve_omp_clauses): Change use_device_ptr
2352 to use_device_addr for unless type(c_ptr); check all
2353 list item for is_device_ptr.
2354
2355 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
2356
2357 * dump-parse-tree.c (show_omp_clauses): Handle detach clause.
2358 * frontend-passes.c (gfc_code_walker): Walk detach expression.
2359 * gfortran.h (struct gfc_omp_clauses): Add detach field.
2360 (gfc_c_intptr_kind): New.
2361 * openmp.c (gfc_free_omp_clauses): Free detach clause.
2362 (gfc_match_omp_detach): New.
2363 (enum omp_mask1): Add OMP_CLAUSE_DETACH.
2364 (enum omp_mask2): Remove OMP_CLAUSE_DETACH.
2365 (gfc_match_omp_clauses): Handle OMP_CLAUSE_DETACH for OpenMP.
2366 (OMP_TASK_CLAUSES): Add OMP_CLAUSE_DETACH.
2367 (resolve_omp_clauses): Prevent use of detach with mergeable and
2368 overriding the data sharing mode of the event handle.
2369 * trans-openmp.c (gfc_trans_omp_clauses): Handle detach clause.
2370 * trans-types.c (gfc_c_intptr_kind): New.
2371 (gfc_init_kinds): Initialize gfc_c_intptr_kind.
2372 * types.def
2373 (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT): Rename
2374 to...
2375 (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT_PTR):
2376 ...this. Add extra argument.
2377
2378 2021-01-14 Harald Anlauf <anlauf@gmx.de>
2379
2380 * gfortran.h (gfc_resolve_substring): Add prototype.
2381 * primary.c (match_string_constant): Simplify substrings with
2382 constant starting and ending points.
2383 * resolve.c: Rename resolve_substring to gfc_resolve_substring.
2384 (gfc_resolve_ref): Use renamed function gfc_resolve_substring.
2385
2386 2021-01-14 Harald Anlauf <anlauf@gmx.de>
2387
2388 PR fortran/98661
2389 * resolve.c (resolve_component): Derived type components with
2390 ALLOCATABLE or POINTER attribute shall have a deferred shape.
2391
2392 2021-01-14 Harald Anlauf <anlauf@gmx.de>
2393
2394 Revert:
2395 2021-01-14 Harald Anlauf <anlauf@gmx.de>
2396
2397 PR fortran/98661
2398 * resolve.c (resolve_component): Derived type components with
2399 ALLOCATABLE or POINTER attribute shall have a deferred shape.
2400
2401 2021-01-14 Harald Anlauf <anlauf@gmx.de>
2402
2403 PR fortran/98661
2404 * resolve.c (resolve_component): Derived type components with
2405 ALLOCATABLE or POINTER attribute shall have a deferred shape.
2406
2407 2021-01-08 Paul Thomas <pault@gcc.gnu.org>
2408
2409 PR fortran/93794
2410 * trans-expr.c (gfc_conv_component_ref): Remove the condition
2411 that deferred character length components only be allocatable.
2412
2413 2021-01-08 Paul Thomas <pault@gcc.gnu.org>
2414
2415 PR fortran/98458
2416 * simplify.c (is_constant_array_expr): If an array constructor
2417 expression has elements other than constants or structures, try
2418 fixing the expression with gfc_reduce_init_expr. Also, if shape
2419 is NULL, obtain the array size and set it.
2420
2421 2021-01-07 Paul Thomas <pault@gcc.gnu.org>
2422
2423 PR fortran/93701
2424 * resolve.c (find_array_spec): Put static prototype for
2425 resolve_assoc_var before this function and call for associate
2426 variables.
2427
2428 2021-01-06 Harald Anlauf <anlauf@gmx.de>
2429
2430 * resolve.c (resolve_component): Add check for valid CLASS
2431 reference before trying to access CLASS data.
2432
2433 2021-01-04 Martin Liska <mliska@suse.cz>
2434
2435 * ChangeLog-2018: Remove duplicate ChangeLog entries.
2436
2437 2021-01-01 Harald Anlauf <anlauf@gmx.de>
2438
2439 * class.c (gfc_find_vtab): Add check on attribute is_class.
2440
2441 2021-01-01 Jakub Jelinek <jakub@redhat.com>
2442
2443 * gfortranspec.c (lang_specific_driver): Update copyright notice
2444 dates.
2445 * gfc-internals.texi: Bump @copying's copyright year.
2446 * gfortran.texi: Ditto.
2447 * intrinsic.texi: Ditto.
2448 * invoke.texi: Ditto.
2449
2450 2021-01-01 Jakub Jelinek <jakub@redhat.com>
2451
2452 * ChangeLog-2020: Rotate ChangeLog. New file.
2453
2454 \f
2455 Copyright (C) 2021 Free Software Foundation, Inc.
2456
2457 Copying and distribution of this file, with or without modification,
2458 are permitted in any medium without royalty provided the copyright
2459 notice and this notice are preserved.