]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/fortran/ChangeLog
8e22dd22729d631020939e97c1e9f3acaf19e95c
[thirdparty/gcc.git] / gcc / fortran / ChangeLog
1 2021-09-16 Harald Anlauf <anlauf@gmx.de>
2
3 PR fortran/102287
4 * trans-expr.c (gfc_conv_procedure_call): Wrap deallocation of
5 allocatable components of optional allocatable derived type
6 procedure arguments with INTENT(OUT) into a presence check.
7
8 2021-09-14 Harald Anlauf <anlauf@gmx.de>
9
10 PR fortran/102311
11 * resolve.c (resolve_entries): Attempt to recover cleanly after
12 rejecting mismatched function entries.
13
14 2021-09-14 Tobias Burnus <tobias@codesourcery.com>
15
16 PR fortran/102313
17 * parse.c (gfc_ascii_statement): Add missing ST_OMP_END_SCOPE.
18
19 2021-09-13 Harald Anlauf <anlauf@gmx.de>
20
21 PR fortran/82314
22 * decl.c (add_init_expr_to_sym): For proper initialization of
23 array-valued named constants the array bounds need to be
24 simplified before adding the initializer.
25
26 2021-09-13 Harald Anlauf <anlauf@gmx.de>
27
28 PR fortran/85130
29 * expr.c (find_substring_ref): Handle given substring start and
30 end indices as signed integers, not unsigned.
31
32 2021-09-09 Harald Anlauf <anlauf@gmx.de>
33
34 PR fortran/98490
35 * trans-expr.c (gfc_conv_substring): Do not generate substring
36 bounds check for implied do loop index variable before it actually
37 becomes defined.
38
39 2021-09-08 liuhongt <hongtao.liu@intel.com>
40
41 * options.c (gfc_post_options): Issue an error for
42 -fexcess-precision=16.
43
44 2021-09-07 Harald Anlauf <anlauf@gmx.de>
45
46 PR fortran/101327
47 * expr.c (find_array_element): When bounds cannot be determined as
48 constant, return error instead of aborting.
49
50 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
51
52 * openmp.c (gfc_match_omp_flush): Parse 'seq_cst' clause on 'flush'
53 directive.
54 * trans-openmp.c (gfc_trans_omp_flush): Handle OMP_MEMORDER_SEQ_CST.
55
56 2021-09-03 Tobias Burnus <tobias@codesourcery.com>
57
58 * decl.c (gfc_verify_c_interop_param): Reject pointer with
59 CONTIGUOUS attributes as dummy arg. Reject character len > 1
60 when passed as byte stream.
61
62 2021-09-01 Harald Anlauf <anlauf@gmx.de>
63
64 PR fortran/56985
65 * resolve.c (resolve_common_vars): Fix grammar and improve wording
66 of error message rejecting an unlimited polymorphic in COMMON.
67
68 2021-08-31 Harald Anlauf <anlauf@gmx.de>
69
70 PR fortran/100950
71 * simplify.c (substring_has_constant_len): Minimize checks for
72 substring expressions being allowed.
73
74 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
75
76 * gfortran.h: Add variable for 'ancestor' in struct gfc_omp_clauses.
77 * openmp.c (gfc_match_omp_clauses): Parse device-modifiers 'device_num'
78 and 'ancestor' in 'target device' clauses.
79 * trans-openmp.c (gfc_trans_omp_clauses): Set OMP_CLAUSE_DEVICE_ANCESTOR.
80
81 2021-08-30 Harald Anlauf <anlauf@gmx.de>
82
83 PR fortran/102113
84 * match.c (gfc_match_goto): Allow for whitespace in parsing list
85 of labels.
86
87 2021-08-30 Harald Anlauf <anlauf@gmx.de>
88
89 PR fortran/101349
90 * resolve.c (resolve_allocate_expr): An unlimited polymorphic
91 argument to ALLOCATE must be ALLOCATABLE or a POINTER. Fix the
92 corresponding check.
93
94 2021-08-28 Harald Anlauf <anlauf@gmx.de>
95
96 PR fortran/87737
97 * resolve.c (resolve_entries): For functions of type CHARACTER
98 tighten the checks for matching characteristics.
99
100 2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
101
102 PR other/93067
103 * cpp.c (gfc_cpp_post_options): Call new function
104 diagnostic_initialize_input_context().
105
106 2021-08-24 Harald Anlauf <anlauf@gmx.de>
107
108 PR fortran/98411
109 * trans-decl.c (gfc_finish_var_decl): Adjust check to handle
110 implicit SAVE as well as variables in the main program. Improve
111 warning message text.
112
113 2021-08-23 Tobias Burnus <tobias@codesourcery.com>
114
115 * openmp.c (gfc_match_dupl_check, gfc_match_dupl_memorder,
116 gfc_match_dupl_atomic): New.
117 (gfc_match_omp_clauses): Use them; remove duplicate
118 'release'/'relaxed' clause matching; improve error dignostic
119 for 'default'.
120
121 2021-08-23 Tobias Burnus <tobias@codesourcery.com>
122
123 * dump-parse-tree.c (show_omp_clauses): Handle 'strict' modifier
124 on grainsize/num_tasks
125 * gfortran.h (gfc_omp_clauses): Add grainsize_strict
126 and num_tasks_strict.
127 * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses):
128 Handle 'strict' modifier on grainsize/num_tasks.
129 * openmp.c (gfc_match_omp_clauses): Likewise.
130
131 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
132
133 * error.c
134 (error_uinteger): Take 'long long unsigned' instead
135 of 'long unsigned' as argumpent.
136 (error_integer): Take 'long long' instead of 'long'.
137 (error_hwuint, error_hwint): New.
138 (error_print): Update to handle 'll' and 'w'
139 length modifiers.
140 * simplify.c (substring_has_constant_len): Use '%wd'
141 in gfc_error.
142
143 2021-08-20 Harald Anlauf <anlauf@gmx.de>
144
145 PR fortran/100950
146 * simplify.c (substring_has_constant_len): Fix format string of
147 gfc_error, pass HOST_WIDE_INT bounds values via char buffer.
148
149 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
150
151 * dump-parse-tree.c (show_omp_clauses): Handle 'at', 'severity'
152 and 'message' clauses.
153 (show_omp_node, show_code_node): Handle EXEC_OMP_ERROR.
154 * gfortran.h (gfc_statement): Add ST_OMP_ERROR.
155 (gfc_omp_severity_type, gfc_omp_at_type): New.
156 (gfc_omp_clauses): Add 'at', 'severity' and 'message' clause;
157 use more bitfields + ENUM_BITFIELD.
158 (gfc_exec_op): Add EXEC_OMP_ERROR.
159 * match.h (gfc_match_omp_error): New.
160 * openmp.c (enum omp_mask1): Add OMP_CLAUSE_(AT,SEVERITY,MESSAGE).
161 (gfc_match_omp_clauses): Handle new clauses.
162 (OMP_ERROR_CLAUSES, gfc_match_omp_error): New.
163 (resolve_omp_clauses): Resolve new clauses.
164 (omp_code_to_statement, gfc_resolve_omp_directive): Handle
165 EXEC_OMP_ERROR.
166 * parse.c (decode_omp_directive, next_statement,
167 gfc_ascii_statement): Handle 'omp error'.
168 * resolve.c (gfc_resolve_blocks): Likewise.
169 * st.c (gfc_free_statement): Likewise.
170 * trans-openmp.c (gfc_trans_omp_error): Likewise.
171 (gfc_trans_omp_directive): Likewise.
172 * trans.c (trans_code): Likewise.
173
174 2021-08-20 Jakub Jelinek <jakub@redhat.com>
175
176 * types.def (BT_FN_VOID_CONST_PTR_SIZE): New DEF_FUNCTION_TYPE_2.
177 * f95-lang.c (ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST): Define.
178
179 2021-08-19 Harald Anlauf <anlauf@gmx.de>
180
181 PR fortran/100950
182 * simplify.c (substring_has_constant_len): New.
183 (gfc_simplify_len): Handle case of substrings with constant
184 bounds.
185
186 2021-08-18 Tobias Burnus <tobias@codesourcery.com>
187
188 * match.h (gfc_match_omp_nothing): New.
189 * openmp.c (gfc_match_omp_nothing): New.
190 * parse.c (decode_omp_directive): Match 'nothing' directive.
191
192 2021-08-17 Tobias Burnus <tobias@codesourcery.com>
193
194 * dump-parse-tree.c (show_omp_node, show_code_node): Handle
195 EXEC_OMP_SCOPE.
196 * gfortran.h (enum gfc_statement): Add ST_OMP_(END_)SCOPE.
197 (enum gfc_exec_op): Add EXEC_OMP_SCOPE.
198 * match.h (gfc_match_omp_scope): New.
199 * openmp.c (OMP_SCOPE_CLAUSES): Define
200 (gfc_match_omp_scope): New.
201 (gfc_match_omp_cancellation_point, gfc_match_omp_end_nowait):
202 Improve error diagnostic.
203 (omp_code_to_statement): Handle ST_OMP_SCOPE.
204 (gfc_resolve_omp_directive): Handle EXEC_OMP_SCOPE.
205 * parse.c (decode_omp_directive, next_statement,
206 gfc_ascii_statement, parse_omp_structured_block,
207 parse_executable): Handle OpenMP's scope construct.
208 * resolve.c (gfc_resolve_blocks): Likewise
209 * st.c (gfc_free_statement): Likewise
210 * trans-openmp.c (gfc_trans_omp_scope): New.
211 (gfc_trans_omp_directive): Call it.
212 * trans.c (trans_code): handle EXEC_OMP_SCOPE.
213
214 2021-08-16 Tobias Burnus <tobias@codesourcery.com>
215
216 * dump-parse-tree.c (show_omp_clauses): Handle 'filter' clause.
217 (show_omp_node, show_code_node): Handle (combined) omp masked construct.
218 * frontend-passes.c (gfc_code_walker): Likewise.
219 * gfortran.h (enum gfc_statement): Add ST_OMP_*_MASKED*.
220 (enum gfc_exec_op): Add EXEC_OMP_*_MASKED*.
221 * match.h (gfc_match_omp_masked, gfc_match_omp_masked_taskloop,
222 gfc_match_omp_masked_taskloop_simd, gfc_match_omp_parallel_masked,
223 gfc_match_omp_parallel_masked_taskloop,
224 gfc_match_omp_parallel_masked_taskloop_simd): New prototypes.
225 * openmp.c (enum omp_mask1): Add OMP_CLAUSE_FILTER.
226 (gfc_match_omp_clauses): Match it.
227 (OMP_MASKED_CLAUSES, gfc_match_omp_parallel_masked,
228 gfc_match_omp_parallel_masked_taskloop,
229 gfc_match_omp_parallel_masked_taskloop_simd,
230 gfc_match_omp_masked, gfc_match_omp_masked_taskloop,
231 gfc_match_omp_masked_taskloop_simd): New.
232 (resolve_omp_clauses): Resolve filter clause.
233 (gfc_resolve_omp_parallel_blocks, resolve_omp_do,
234 omp_code_to_statement, gfc_resolve_omp_directive): Handle
235 omp masked constructs.
236 * parse.c (decode_omp_directive, case_exec_markers,
237 gfc_ascii_statement, parse_omp_do, parse_omp_structured_block,
238 parse_executable): Likewise.
239 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
240 * st.c (gfc_free_statement): Likewise.
241 * trans-openmp.c (gfc_trans_omp_clauses): Handle filter clause.
242 (GFC_OMP_SPLIT_MASKED, GFC_OMP_MASK_MASKED): New enum values.
243 (gfc_trans_omp_masked): New.
244 (gfc_split_omp_clauses): Handle combined masked directives.
245 (gfc_trans_omp_master_taskloop): Rename to ...
246 (gfc_trans_omp_master_masked_taskloop): ... this; handle also
247 combined masked directives.
248 (gfc_trans_omp_parallel_master): Rename to ...
249 (gfc_trans_omp_parallel_master_masked): ... this; handle
250 combined masked directives.
251 (gfc_trans_omp_directive): Handle EXEC_OMP_*_MASKED*.
252 * trans.c (trans_code): Likewise.
253
254 2021-08-15 Harald Anlauf <anlauf@gmx.de>
255
256 PR fortran/99351
257 * match.c (sync_statement): Replace %v code by %e in gfc_match to
258 allow for function references as STAT and ERRMSG arguments.
259 * resolve.c (resolve_sync): Adjust checks of STAT= and ERRMSG= to
260 being definable arguments. Function references with a data
261 pointer result are accepted.
262 * trans-stmt.c (gfc_trans_sync): Adjust assertion.
263
264 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
265
266 * gfortran.h (gfc_omp_proc_bind_kind): Add OMP_PROC_BIND_PRIMARY.
267 * dump-parse-tree.c (show_omp_clauses): Add TODO comment to
268 change 'master' to 'primary' in proc_bind for OpenMP 5.1.
269 * intrinsic.texi (OMP_LIB): Mention OpenMP 5.1; add
270 omp_proc_bind_primary.
271 * openmp.c (gfc_match_omp_clauses): Accept
272 'primary' as alias for 'master'.
273 * trans-openmp.c (gfc_trans_omp_clauses): Handle
274 OMP_PROC_BIND_PRIMARY.
275
276 2021-08-11 Sandra Loosemore <sandra@codesourcery.com>
277
278 * iso-c-binding.def (c_float128, c_float128_complex): Check
279 float128_type_node instead of gfc_float128_type_node.
280 * trans-types.c (gfc_init_kinds, gfc_build_real_type):
281 Update comments re supported 128-bit floating-point types.
282
283 2021-08-11 Richard Biener <rguenther@suse.de>
284
285 * trans-common.c (create_common): Set TREE_THIS_VOLATILE on the
286 COMPONENT_REF if the field is volatile.
287
288 2021-08-07 Harald Anlauf <anlauf@gmx.de>
289
290 PR fortran/68568
291 * primary.c (gfc_expr_attr): Variable attribute can only be
292 inquired when symtree is non-NULL.
293
294 2021-07-28 Harald Anlauf <anlauf@gmx.de>
295
296 PR fortran/101564
297 * expr.c (gfc_check_vardef_context): Add check for KIND and LEN
298 parameter inquiries.
299 * match.c (gfc_match): Fix comment for %v code.
300 (gfc_match_allocate, gfc_match_deallocate): Replace use of %v code
301 by %e in gfc_match to allow for function references as STAT and
302 ERRMSG arguments.
303 * resolve.c (resolve_allocate_deallocate): Avoid NULL pointer
304 dereferences and shortcut for bad STAT and ERRMSG argument to
305 (DE)ALLOCATE. Remove bogus parts of checks for STAT and ERRMSG.
306
307 2021-07-26 José Rui Faustino de Sousa <jrfsousa@gmail.com>
308 Tobias Burnus <tobias@codesourcery.com>
309
310 PR fortran/93308
311 PR fortran/93963
312 PR fortran/94327
313 PR fortran/94331
314 PR fortran/97046
315 * trans-decl.c (convert_CFI_desc): Only copy out the descriptor
316 if necessary.
317 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Updated attribute
318 handling which reflect a previous intermediate version of the
319 standard. Only copy out the descriptor if necessary.
320
321 2021-07-23 Harald Anlauf <anlauf@gmx.de>
322
323 PR fortran/101536
324 * check.c (array_check): Adjust check for the case of CLASS
325 arrays.
326
327 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
328 Joseph Myers <joseph@codesourcery.com>
329 Cesar Philippidis <cesar@codesourcery.com>
330
331 * dump-parse-tree.c (show_attr): Update.
332 * gfortran.h (symbol_attribute): Add 'oacc_routine_nohost' member.
333 (gfc_omp_clauses): Add 'nohost' member.
334 * module.c (ab_attribute): Add 'AB_OACC_ROUTINE_NOHOST'.
335 (attr_bits, mio_symbol_attribute): Update.
336 * openmp.c (omp_mask2): Add 'OMP_CLAUSE_NOHOST'.
337 (gfc_match_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
338 (OACC_ROUTINE_CLAUSES): Add 'OMP_CLAUSE_NOHOST'.
339 (gfc_match_oacc_routine): Update.
340 * trans-decl.c (add_attributes_to_decl): Update.
341 * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
342
343 2021-07-21 Harald Anlauf <anlauf@gmx.de>
344
345 PR fortran/101514
346 * target-memory.c (gfc_interpret_derived): Size of array component
347 of derived type can only be computed here for explicit shape.
348 * trans-types.c (gfc_get_nodesc_array_type): Do not dereference
349 NULL pointers.
350
351 2021-07-21 Tobias Burnus <tobias@codesourcery.com>
352
353 * decl.c (gfc_verify_c_interop_param): Update for F2008 + F2018
354 changes; reject unsupported bits with 'Error: Sorry,'.
355 * trans-expr.c (gfc_conv_procedure_call): Fix condition to
356 For using CFI descriptor with characters.
357
358 2021-07-18 Harald Anlauf <anlauf@gmx.de>
359
360 PR fortran/101084
361 * io.c (resolve_tag_format): Extend FORMAT check to unknown type.
362
363 2021-07-14 Harald Anlauf <anlauf@gmx.de>
364
365 PR fortran/100949
366 * trans-expr.c (gfc_trans_class_init_assign): Call
367 gfc_conv_expr_present only for dummy variables.
368
369 2021-07-06 Thomas Koenig <tkoenig@gcc.gnu.org>
370
371 PR fortran/100227
372 * frontend-passes.c (traverse_io_block): Adjust test for
373 when a variable is eligible for the transformation to
374 array slice.
375
376 2021-06-28 Martin Sebor <msebor@redhat.com>
377
378 * trans-array.c (trans_array_constructor): Replace direct uses
379 of TREE_NO_WARNING with warning_suppressed_p, and suppress_warning.
380 * trans-decl.c (gfc_build_qualified_array): Same.
381 (gfc_build_dummy_array_decl): Same.
382 (generate_local_decl): Same.
383 (gfc_generate_function_code): Same.
384 * trans-openmp.c (gfc_omp_clause_default_ctor): Same.
385 (gfc_omp_clause_copy_ctor): Same.
386 * trans-types.c (get_dtype_type_node): Same.
387 (gfc_get_desc_dim_type): Same.
388 (gfc_get_array_descriptor_base): Same.
389 (gfc_get_caf_vector_type): Same.
390 (gfc_get_caf_reference_type): Same.
391 * trans.c (gfc_create_var_np): Same.
392
393 2021-06-23 Tobias Burnus <tobias@codesourcery.com>
394
395 * dump-parse-tree.c (show_omp_clauses): Fix enum type used
396 for dumping gfc_omp_defaultmap_category.
397
398 2021-06-23 Andre Vehreschild <vehre@gcc.gnu.org>
399
400 PR fortran/100337
401 * trans-intrinsic.c (conv_co_collective): Check stat for null ptr
402 before dereferrencing.
403
404 2021-06-18 Harald Anlauf <anlauf@gmx.de>
405
406 PR fortran/100283
407 PR fortran/101123
408 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Unconditionally
409 convert result of min/max to result type.
410
411 2021-06-16 Harald Anlauf <anlauf@gmx.de>
412
413 PR fortran/95501
414 PR fortran/95502
415 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
416 dereference.
417 * match.c (gfc_match_pointer_assignment): Likewise.
418 * parse.c (gfc_check_do_variable): Avoid comparison with NULL
419 symtree.
420
421 2021-06-16 Harald Anlauf <anlauf@gmx.de>
422
423 Revert:
424 2021-06-16 Harald Anlauf <anlauf@gmx.de>
425
426 PR fortran/95501
427 PR fortran/95502
428 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
429 dereference.
430 * match.c (gfc_match_pointer_assignment): Likewise.
431 * parse.c (gfc_check_do_variable): Avoid comparison with NULL
432 symtree.
433
434 2021-06-16 Harald Anlauf <anlauf@gmx.de>
435
436 PR fortran/95501
437 PR fortran/95502
438 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
439 dereference.
440 * match.c (gfc_match_pointer_assignment): Likewise.
441 * parse.c (gfc_check_do_variable): Avoid comparison with NULL
442 symtree.
443
444 2021-06-15 Tobias Burnus <tobias@codesourcery.com>
445
446 PR fortran/92568
447 * dump-parse-tree.c (show_omp_clauses): Update for defaultmap.
448 * f95-lang.c (LANG_HOOKS_OMP_ALLOCATABLE_P,
449 LANG_HOOKS_OMP_SCALAR_TARGET_P): New.
450 * gfortran.h (enum gfc_omp_defaultmap,
451 enum gfc_omp_defaultmap_category): New.
452 * openmp.c (gfc_match_omp_clauses): Update defaultmap matching.
453 * trans-decl.c (gfc_finish_decl_attrs): Set GFC_DECL_SCALAR_TARGET.
454 * trans-openmp.c (gfc_omp_allocatable_p, gfc_omp_scalar_target_p): New.
455 (gfc_omp_scalar_p): Take 'ptr_alloc_ok' argument.
456 (gfc_trans_omp_clauses, gfc_split_omp_clauses): Update for
457 defaultmap changes.
458 * trans.h (gfc_omp_scalar_p): Update prototype.
459 (gfc_omp_allocatable_p, gfc_omp_scalar_target_p): New.
460 (struct lang_decl): Add scalar_target.
461 (GFC_DECL_SCALAR_TARGET, GFC_DECL_GET_SCALAR_TARGET): New.
462
463 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
464
465 * resolve.c (resolve_variable): Remove *XCNEW used to
466 nullify nullified memory.
467
468 2021-06-09 Martin Liska <mliska@suse.cz>
469
470 * intrinsic.texi: Add missing @headitem to tables with a header.
471
472 2021-06-09 Jakub Jelinek <jakub@redhat.com>
473
474 PR fortran/100965
475 * trans-openmp.c (gfc_omp_finish_clause): Gimplify OMP_CLAUSE_SIZE.
476
477 2021-06-08 Tobias Burnus <tobias@codesourcery.com>
478
479 PR middle-end/99928
480 * trans-openmp.c (gfc_add_clause_implicitly): New.
481 (gfc_split_omp_clauses): Use it.
482 (gfc_free_split_omp_clauses): New.
483 (gfc_trans_omp_do_simd, gfc_trans_omp_parallel_do,
484 gfc_trans_omp_parallel_do_simd, gfc_trans_omp_distribute,
485 gfc_trans_omp_teams, gfc_trans_omp_target, gfc_trans_omp_taskloop,
486 gfc_trans_omp_master_taskloop, gfc_trans_omp_parallel_master): Use it.
487
488 2021-06-08 Martin Liska <mliska@suse.cz>
489
490 * intrinsic.texi: Fix typo.
491 * trans-expr.c (gfc_trans_pointer_assignment): Likewise.
492
493 2021-06-05 José Rui Faustino de Sousa <jrfsousa@gmail.com>
494
495 PR fortran/100120
496 PR fortran/100816
497 PR fortran/100818
498 PR fortran/100819
499 PR fortran/100821
500 * trans-array.c (gfc_get_array_span): rework the way character
501 array "span" was calculated.
502 (gfc_conv_expr_descriptor): improve handling of character sections
503 and unlimited polymorphic objects.
504 * trans-expr.c (gfc_get_character_len): new function to calculate
505 character string length.
506 (gfc_get_character_len_in_bytes): new function to calculate
507 character string length in bytes.
508 (gfc_conv_scalar_to_descriptor): add call to set the "span".
509 (gfc_trans_pointer_assignment): set "_len" and antecipate the
510 initialization of the deferred character length hidden argument.
511 * trans-intrinsic.c (gfc_conv_associated): set "force_no_tmp" to
512 avoid the creation of a temporary.
513 * trans-types.c (gfc_get_dtype_rank_type): rework type detection
514 so that unlimited polymorphic objects get proper type infomation,
515 also important for bind(c).
516 (gfc_get_dtype): add argument to pass the rank if necessary.
517 (gfc_get_array_type_bounds): cosmetic change to have character
518 arrays called character instead of unknown.
519 * trans-types.h (gfc_get_dtype): modify prototype.
520 * trans.c (get_array_span): rework the way character array "span"
521 was calculated.
522 * trans.h (gfc_get_character_len): new prototype.
523 (gfc_get_character_len_in_bytes): new prototype.
524 Add "unlimited_polymorphic" flag to "gfc_se" type to signal when
525 expression carries an unlimited polymorphic object.
526
527 2021-06-04 Harald Anlauf <anlauf@gmx.de>
528
529 PR fortran/99839
530 * frontend-passes.c (inline_matmul_assign): Do not inline matmul
531 if the assignment to the resulting array if it is not of canonical
532 type (real/integer/complex/logical).
533
534 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
535
536 * dump-parse-tree.c (show_code_node): Handle
537 EXEC_OMP_(TARGET_)(,PARALLEL_,TEAMS_)LOOP.
538
539 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
540
541 * scanner.c (skip_fixed_omp_sentinel): Set openacc_flag if
542 this is not an (OpenMP) continuation line.
543 (skip_fixed_oacc_sentinel): Likewise for openmp_flag and OpenACC.
544 (gfc_next_char_literal): gfc_error_now to force error for mixed OMP/ACC
545 continuation once per location and return '\n'.
546
547 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
548
549 PR middle-end/99928
550 * openmp.c (gfc_match_omp_clauses): Fix typo in error message.
551
552 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
553
554 PR middle-end/99928
555 * dump-parse-tree.c (show_omp_clauses): Handle bind clause.
556 (show_omp_node): Handle loop directive.
557 * frontend-passes.c (gfc_code_walker): Likewise.
558 * gfortran.h (enum gfc_statement): Add
559 ST_OMP_(END_)(TARGET_)(|PARALLEL_|TEAMS_)LOOP.
560 (enum gfc_omp_bind_type): New.
561 (gfc_omp_clauses): Use it.
562 (enum gfc_exec_op): Add EXEC_OMP_(TARGET_)(|PARALLEL_|TEAMS_)LOOP.
563 * match.h (gfc_match_omp_loop, gfc_match_omp_parallel_loop,
564 gfc_match_omp_target_parallel_loop, gfc_match_omp_target_teams_loop,
565 gfc_match_omp_teams_loop): New.
566 * openmp.c (enum omp_mask1): Add OMP_CLAUSE_BIND.
567 (gfc_match_omp_clauses): Handle it.
568 (OMP_LOOP_CLAUSES, gfc_match_omp_loop, gfc_match_omp_teams_loop,
569 gfc_match_omp_target_teams_loop, gfc_match_omp_parallel_loop,
570 gfc_match_omp_target_parallel_loop): New.
571 (resolve_omp_clauses, resolve_omp_do, omp_code_to_statement,
572 gfc_resolve_omp_directive): Handle omp loop.
573 * parse.c (decode_omp_directive case_exec_markers, gfc_ascii_statement,
574 parse_omp_do, parse_executable): Likewise.
575 (parse_omp_structured_block): Remove ST_ which use parse_omp_do.
576 * resolve.c (gfc_resolve_blocks): Add omp loop.
577 * st.c (gfc_free_statement): Likewise.
578 * trans-openmp.c (gfc_trans_omp_clauses): Handle bind clause.
579 (gfc_trans_omp_do, gfc_trans_omp_parallel_do, gfc_trans_omp_distribute,
580 gfc_trans_omp_teams, gfc_trans_omp_target, gfc_trans_omp_directive):
581 Handle loop directive.
582 (gfc_split_omp_clauses): Likewise; fix firstprivate/lastprivate
583 and (in_)reduction for taskloop.
584 * trans.c (trans_code): Handle omp loop directive.
585
586 2021-06-01 Tobias Burnus <tobias@codesourcery.com>
587
588 PR middle-end/99928
589 * dump-parse-tree.c (show_omp_node, show_code_node): Handle
590 (parallel) master taskloop (simd).
591 * frontend-passes.c (gfc_code_walker): Set in_omp_workshare
592 to false for parallel master taskloop (simd).
593 * gfortran.h (enum gfc_statement):
594 Add ST_OMP_(END_)(PARALLEL_)MASTER_TASKLOOP(_SIMD).
595 (enum gfc_exec_op): EXEC_OMP_(PARALLEL_)MASTER_TASKLOOP(_SIMD).
596 * match.h (gfc_match_omp_master_taskloop,
597 gfc_match_omp_master_taskloop_simd,
598 gfc_match_omp_parallel_master_taskloop,
599 gfc_match_omp_parallel_master_taskloop_simd): New prototype.
600 * openmp.c (gfc_match_omp_parallel_master_taskloop,
601 gfc_match_omp_parallel_master_taskloop_simd,
602 gfc_match_omp_master_taskloop,
603 gfc_match_omp_master_taskloop_simd): New.
604 (gfc_match_omp_taskloop_simd): Permit 'reduction' clause.
605 (resolve_omp_clauses): Handle new combined directives; remove
606 inscan-reduction check to reduce multiple errors; add
607 task-reduction error for 'taskloop simd'.
608 (gfc_resolve_omp_parallel_blocks,
609 resolve_omp_do, omp_code_to_statement,
610 gfc_resolve_omp_directive): Handle new combined constructs.
611 * parse.c (decode_omp_directive, next_statement,
612 gfc_ascii_statement, parse_omp_do, parse_omp_structured_block,
613 parse_executable): Likewise.
614 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
615 * st.c (gfc_free_statement): Likewise.
616 * trans.c (trans_code): Likewise.
617 * trans-openmp.c (gfc_split_omp_clauses,
618 gfc_trans_omp_directive): Likewise.
619 (gfc_trans_omp_parallel_master): Move after gfc_trans_omp_master_taskloop;
620 handle parallel master taskloop (simd) as well.
621 (gfc_trans_omp_taskloop): Take gfc_exec_op as arg.
622 (gfc_trans_omp_master_taskloop): New.
623
624 2021-05-30 Gerald Pfeifer <gerald@pfeifer.com>
625
626 * gfortran.texi (BOZ literal constants): Fix typo.
627
628 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
629
630 * dump-parse-tree.c (show_iterator): New.
631 (show_omp_namelist): Handle iterators.
632 (show_omp_clauses): Handle affinity.
633 * gfortran.h (gfc_free_omp_namelist): New union with 'udr' and new 'ns'.
634 * match.c (gfc_free_omp_namelist): Add are to choose union element.
635 * openmp.c (gfc_free_omp_clauses, gfc_match_omp_detach,
636 gfc_match_omp_clause_reduction, gfc_match_omp_flush): Update
637 call to gfc_free_omp_namelist.
638 (gfc_match_omp_variable_list): Likewise; permit preceeding whitespace.
639 (enum omp_mask1): Add OMP_CLAUSE_AFFINITY.
640 (gfc_match_iterator): New.
641 (gfc_match_omp_clauses): Use it; update call to gfc_free_omp_namelist.
642 (OMP_TASK_CLAUSES): Add OMP_CLAUSE_AFFINITY.
643 (gfc_match_omp_taskwait): Match depend clause.
644 (resolve_omp_clauses): Handle affinity; update for udr/union change.
645 (gfc_resolve_omp_directive): Resolve clauses of taskwait.
646 * st.c (gfc_free_statement): Update gfc_free_omp_namelist call.
647 * trans-openmp.c (gfc_trans_omp_array_reduction_or_udr): Likewise
648 (handle_iterator): New.
649 (gfc_trans_omp_clauses): Handle iterators for depend/affinity clause.
650 (gfc_trans_omp_taskwait): Handle depend clause.
651 (gfc_trans_omp_directive): Update call.
652
653 2021-05-27 Harald Anlauf <anlauf@gmx.de>
654
655 PR fortran/100602
656 * trans-intrinsic.c (gfc_conv_intrinsic_size): Use CLASS data
657 attributes for CLASS arrays for generation of runtime error.
658
659 2021-05-27 Harald Anlauf <anlauf@gmx.de>
660
661 PR fortran/100656
662 * trans-array.c (gfc_conv_ss_startstride): Do not call check for
663 presence of a dummy argument when a symbol actually refers to a
664 non-dummy.
665
666 2021-05-25 Tobias Burnus <tobias@codesourcery.com>
667 Johannes Nendwich <a08727063@unet.univie.ac.at>
668
669 * intrinsic.texi (GERROR, GETARGS, GETLOG, NORM2, PARITY, RANDOM_INIT,
670 RANDOM_NUMBER): Fix typos and copy'n'paste errors.
671
672 2021-05-24 Tobias Burnus <tobias@codesourcery.com>
673
674 PR fortran/86470
675 * trans-expr.c (gfc_copy_class_to_class): Add unshare_expr.
676 * trans-openmp.c (gfc_is_polymorphic_nonptr,
677 gfc_is_unlimited_polymorphic_nonptr): New.
678 (gfc_omp_clause_copy_ctor, gfc_omp_clause_dtor): Handle
679 polymorphic scalars.
680
681 2021-05-23 Harald Anlauf <anlauf@gmx.de>
682
683 PR fortran/100551
684 * trans-expr.c (gfc_conv_procedure_call): Adjust check for
685 implicit conversion of actual argument to an unlimited polymorphic
686 procedure argument.
687
688 2021-05-23 Tobias Burnus <tobias@codesourcery.com>
689
690 * intrinsic.texi (ATOMIC_ADD, ATOMIC_FETCH_ADD): Use the
691 proper variable name in the description.
692
693 2021-05-22 Andre Vehreschild <vehre@gcc.gnu.org>
694 Steve Kargl <kargl@gcc.gnu.org>
695
696 PR fortran/98301
697 * trans-decl.c (gfc_build_builtin_function_decls): Move decl.
698 * trans-intrinsic.c (conv_intrinsic_random_init): Use bool for
699 lib-call of caf_random_init instead of logical (4-byte).
700 * trans.h: Add tree var for random_init.
701
702 2021-05-20 Marcel Vollweiler <marcel@codesourcery.com>
703
704 * openmp.c (gfc_match_omp_clauses): Support map-type-modifier 'close'.
705
706 2021-05-18 Tobias Burnus <tobias@codesourcery.com>
707
708 PR fortran/100642
709 * openmp.c (omp_code_to_statement): Add missing EXEC_OMP_DEPOBJ.
710
711 2021-05-17 Harald Anlauf <anlauf@gmx.de>
712
713 PR fortran/98411
714 * trans-decl.c (gfc_finish_var_decl): Add check for explicit SAVE
715 attribute.
716
717 2021-05-17 Tobias Burnus <tobias@codesourcery.com>
718
719 PR fortran/100633
720 * resolve.c (gfc_resolve_code): Reject nonintrinsic assignments in
721 OMP WORKSHARE.
722
723 2021-05-14 Tobias Burnus <tobias@codesourcery.com>
724
725 * dump-parse-tree.c (show_omp_node, show_code_node): Handle
726 EXEC_OMP_PARALLEL_MASTER.
727 * frontend-passes.c (gfc_code_walker): Likewise.
728 * gfortran.h (enum gfc_statement): Add ST_OMP_PARALLEL_MASTER and
729 ST_OMP_END_PARALLEL_MASTER.
730 (enum gfc_exec_op): Add EXEC_OMP_PARALLEL_MASTER..
731 * match.h (gfc_match_omp_parallel_master): Handle it.
732 * openmp.c (gfc_match_omp_parallel_master, resolve_omp_clauses,
733 omp_code_to_statement, gfc_resolve_omp_directive): Likewise.
734 * parse.c (decode_omp_directive, case_exec_markers,
735 gfc_ascii_statement, parse_omp_structured_block,
736 parse_executable): Likewise.
737 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
738 * st.c (gfc_free_statement): Likewise.
739 * trans-openmp.c (gfc_trans_omp_parallel_master,
740 gfc_trans_omp_workshare, gfc_trans_omp_directive): Likewise.
741 * trans.c (trans_code): Likewise.
742
743 2021-05-14 Tobias Burnus <tobias@codesourcery.com>
744
745 * resolve.c (resolve_symbol): Handle implicit SAVE of main-program
746 for vars in 'omp threadprivate' and 'omp declare target'.
747
748 2021-05-10 Martin Liska <mliska@suse.cz>
749
750 * decl.c (variable_decl): Use startswith
751 function instead of strncmp.
752 (gfc_match_end): Likewise.
753 * gfortran.h (gfc_str_startswith): Likewise.
754 * module.c (load_omp_udrs): Likewise.
755 (read_module): Likewise.
756 * options.c (gfc_handle_runtime_check_option): Likewise.
757 * primary.c (match_arg_list_function): Likewise.
758 * trans-decl.c (gfc_get_symbol_decl): Likewise.
759 * trans-expr.c (gfc_conv_procedure_call): Likewise.
760 * trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Likewise.
761
762 2021-05-06 Paul Thomas <pault@gcc.gnu.org>
763
764 PR fortran/46991
765 PR fortran/99819
766 * class.c (gfc_build_class_symbol): Remove the error that
767 disables assumed size class arrays. Class array types that are
768 not deferred shape or assumed rank are given a unique name and
769 placed in the procedure namespace.
770 * trans-array.c (gfc_trans_g77_array): Obtain the data pointer
771 for class arrays.
772 (gfc_trans_dummy_array_bias): Suppress the runtime error for
773 extent violations in explicit shape class arrays because it
774 always fails.
775 * trans-expr.c (gfc_conv_procedure_call): Handle assumed size
776 class actual arguments passed to non-descriptor formal args by
777 using the data pointer, stored as the symbol's backend decl.
778
779 2021-05-05 Harald Anlauf <anlauf@gmx.de>
780
781 PR fortran/100274
782 * interface.c (gfc_compare_actual_formal): Continue checks after
783 emitting warning for argument length mismatch.
784 * trans-expr.c (gfc_conv_procedure_call): Check for NULL pointer
785 dereference.
786
787 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
788
789 PR testsuite/100397
790 * trans-openmp.c (gfc_trans_omp_depobj): Fix pasto in enum values.
791
792 2021-04-28 Tobias Burnus <tobias@codesourcery.com>
793
794 * openmp.c (gfc_match_omp_variable_list): Gobble whitespace before
795 checking whether a '%' or parenthesis-open follows as next character.
796
797 2021-04-28 José Rui Faustino de Sousa <jrfsousa@gmail.com>
798
799 PR fortran/82376
800 * trans-expr.c (gfc_conv_procedure_call): Evaluate function result
801 and then pass a pointer.
802
803 2021-04-26 Thomas Schwinge <thomas@codesourcery.com>
804 Nathan Sidwell <nathan@codesourcery.com>
805 Tom de Vries <vries@codesourcery.com>
806 Julian Brown <julian@codesourcery.com>
807 Kwok Cheung Yeung <kcy@codesourcery.com>
808
809 * lang.opt (Wopenacc-parallelism): New.
810
811 2021-04-24 Harald Anlauf <anlauf@gmx.de>
812
813 PR fortran/100154
814 * check.c (variable_check): Allow function reference having a data
815 pointer result.
816 (arg_strlen_is_zero): New function.
817 (gfc_check_fgetputc_sub): Add static check of character and status
818 arguments.
819 (gfc_check_fgetput_sub): Likewise.
820 * intrinsic.c (add_subroutines): Fix argument name for the
821 character argument to intrinsic subroutines fget[c], fput[c].
822
823 2021-04-24 Harald Anlauf <anlauf@gmx.de>
824
825 PR fortran/100218
826 * expr.c (gfc_check_vardef_context): Extend check to allow pointer
827 from a function reference.
828
829 2021-04-22 Martin Liska <mliska@suse.cz>
830
831 PR testsuite/100159
832 PR testsuite/100192
833 * frontend-passes.c (optimize_expr): Fix typos and missing comments.
834
835 2021-04-22 Michael Meissner <meissner@linux.ibm.com>
836
837 PR fortran/96983
838 * trans-intrinsic.c (build_round_expr): If int type is larger than
839 long long, do the round and convert to the integer type. Do not
840 try to find a floating point type the exact size of the integer
841 type.
842
843 2021-04-21 Tobias Burnus <tobias@codesourcery.com>
844
845 * dump-parse-tree.c (show_omp_namelist): Handle depobj + mutexinoutset
846 in the depend clause.
847 (show_omp_clauses, show_omp_node, show_code_node): Handle depobj.
848 * gfortran.h (enum gfc_statement): Add ST_OMP_DEPOBJ.
849 (enum gfc_omp_depend_op): Add OMP_DEPEND_UNSET,
850 OMP_DEPEND_MUTEXINOUTSET and OMP_DEPEND_DEPOBJ.
851 (gfc_omp_clauses): Add destroy, depobj_update and depobj.
852 (enum gfc_exec_op): Add EXEC_OMP_DEPOBJ
853 * match.h (gfc_match_omp_depobj): Match 'omp depobj'.
854 * openmp.c (gfc_match_omp_clauses): Add depobj + mutexinoutset
855 to depend clause.
856 (gfc_match_omp_depobj, resolve_omp_clauses, gfc_resolve_omp_directive):
857 Handle 'omp depobj'.
858 * parse.c (decode_omp_directive, next_statement, gfc_ascii_statement):
859 Likewise.
860 * resolve.c (gfc_resolve_code): Likewise.
861 * st.c (gfc_free_statement): Likewise.
862 * trans-openmp.c (gfc_trans_omp_clauses): Handle depobj + mutexinoutset
863 in the depend clause.
864 (gfc_trans_omp_depobj, gfc_trans_omp_directive): Handle EXEC_OMP_DEPOBJ.
865 * trans.c (trans_code): Likewise.
866
867 2021-04-20 Paul Thomas <pault@gcc.gnu.org>
868
869 PR fortran/100110
870 * trans-decl.c (gfc_get_symbol_decl): Replace test for host
871 association with a check that the current and symbol namespaces
872 are the same.
873
874 2021-04-19 Thomas Schwinge <thomas@codesourcery.com>
875
876 * lang.opt (fopenacc-kernels=): Remove.
877
878 2021-04-16 José Rui Faustino de Sousa <jrfsousa@gmail.com>
879
880 PR fortran/100094
881 * trans-array.c (gfc_trans_deferred_array): Add code to initialize
882 pointers and allocatables with correct TKR parameters.
883
884 2021-04-16 José Rui Faustino de Sousa <jrfsousa@gmail.com>
885
886 PR fortran/100018
887 * resolve.c: Add association check before de-referencing pointer.
888
889 2021-04-16 Harald Anlauf <anlauf@gmx.de>
890 Paul Thomas <pault@gcc.gnu.org>
891
892 PR fortran/63797
893 * module.c (write_symtree): Do not write interface of intrinsic
894 procedure to module file for F2003 and newer.
895
896 2021-04-15 Paul Thomas <pault@gcc.gnu.org>
897
898 PR fortran/99307
899 * symbol.c: Remove trailing white space.
900 * trans-array.c (gfc_trans_create_temp_array): Create a class
901 temporary for class expressions and assign the new descriptor
902 to the data field.
903 (build_class_array_ref): If the class expr can be extracted,
904 then use that for 'decl'. Class function results are reliably
905 handled this way. Call gfc_find_and_cut_at_last_class_ref to
906 eliminate largely redundant code. Remove dead code and recast
907 the rest of the code to extract 'decl' for remaining cases.
908 Call gfc_build_spanned_array_ref.
909 (gfc_alloc_allocatable_for_assignment): Use class descriptor
910 element length for 'elemsize1'. Eliminate repeat set of dtype
911 for class expressions.
912 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Include
913 additional code from build_class_array_ref, and use optional
914 gfc_typespec pointer argument.
915 (gfc_trans_scalar_assign): Make use of pre and post blocks for
916 all class expressions.
917 * trans.c (get_array_span): For unlimited polymorphic exprs
918 multiply the span by the value of the _len field.
919 (gfc_build_spanned_array_ref): New function.
920 (gfc_build_array_ref): Call gfc_build_spanned_array_ref and
921 eliminate repeated code.
922 * trans.h: Add arg to gfc_find_and_cut_at_last_class_ref and
923 add prototype for gfc_build_spanned_array_ref.
924
925 2021-04-14 Martin Liska <mliska@suse.cz>
926
927 * intrinsic.texi: The table has first column empty and it makes
928 trouble when processing makeinfo --xml output.
929
930 2021-04-09 Tobias Burnus <tobias@codesourcery.com>
931
932 PR fortran/99817
933 * trans-types.c (gfc_get_function_type): Also generate hidden
934 coarray argument for character arguments.
935
936 2021-04-03 Paul Thomas <pault@gcc.gnu.org>
937
938 PR fortran/99818
939 * interface.c (compare_parameter): The codimension attribute is
940 applied to the _data field of class formal arguments.
941
942 2021-04-01 Harald Anlauf <anlauf@gmx.de>
943
944 PR fortran/99840
945 * simplify.c (gfc_simplify_transpose): Properly initialize
946 resulting shape.
947
948 2021-03-28 Paul Thomas <pault@gcc.gnu.org>
949
950 PR fortran/99602
951 * trans-expr.c (gfc_conv_procedure_call): Use the _data attrs
952 for class expressions and detect proc pointer evaluations by
953 the non-null actual argument list.
954
955 2021-03-27 Steve Kargl <kargl@gcc.gnu.org>
956
957 * misc.c (gfc_typename): Fix off-by-one in buffer sizes.
958
959 2021-03-26 Tobias Burnus <tobias@codesourcery.com>
960
961 PR fortran/99651
962 * intrinsic.c (gfc_intrinsic_func_interface): Set
963 attr.proc = PROC_INTRINSIC if FL_PROCEDURE.
964
965 2021-03-24 Tobias Burnus <tobias@codesourcery.com>
966
967 PR fortran/99369
968 * resolve.c (resolve_operator): Make 'msg' buffer larger
969 and use snprintf.
970
971 2021-03-23 Tobias Burnus <tobias@codesourcery.com>
972
973 PR fortran/93660
974 * trans-decl.c (build_function_decl): Add comment;
975 increment hidden_typelist for caf_token/caf_offset.
976 * trans-types.c (gfc_get_function_type): Add comment;
977 add missing caf_token/caf_offset args.
978
979 2021-03-22 Tobias Burnus <tobias@codesourcery.com>
980
981 PR fortran/99688
982 * match.c (select_type_set_tmp, gfc_match_select_type,
983 gfc_match_select_rank): Fix 'name' buffersize to avoid out of bounds.
984 * resolve.c (resolve_select_type): Likewise.
985
986 2021-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
987
988 * frontend-passes.c (inline_limit_check): Add rank_a
989 argument. If a is rank 1, set the second dimension to 1.
990 (inline_matmul_assign): Pass rank_a argument to inline_limit_check.
991 (call_external_blas): Likewise.
992
993 2021-03-15 Thomas Koenig <tkoenig@gcc.gnu.org>
994
995 PR fortran/99345
996 * frontend-passes.c (doloop_contained_procedure_code):
997 Properly handle EXEC_IOLENGTH.
998
999 2021-03-15 Paul Thomas <pault@gcc.gnu.org>
1000
1001 PR fortran/99545
1002 * trans-stmt.c (gfc_trans_allocate): Mark the initialization
1003 assignment by setting init_flag.
1004
1005 2021-03-14 Harald Anlauf <anlauf@gmx.de>
1006 Paul Thomas <pault@gcc.gnu.org>
1007
1008 * trans-expr.c (gfc_conv_procedure_call): Fix runtime checks for
1009 CLASS arguments.
1010 * trans-intrinsic.c (gfc_conv_intrinsic_size): Likewise.
1011
1012 2021-03-13 Paul Thomas <pault@gcc.gnu.org>
1013
1014 PR fortran/99125
1015 * trans-array.c (gfc_conv_expr_descriptor): For deferred length
1016 length components use the ss_info string length instead of
1017 gfc_get_expr_charlen. Make sure that the deferred string length
1018 is a variable before assigning to it. Otherwise use the expr.
1019 * trans-expr.c (gfc_conv_string_length): Make sure that the
1020 deferred string length is a variable before assigning to it.
1021
1022 2021-03-12 Tobias Burnus <tobias@codesourcery.com>
1023
1024 PR fortran/99514
1025 * resolve.c (resolve_symbol): Accept vars which are in DATA
1026 and hence (either) implicit SAVE (or in common).
1027
1028 2021-03-10 Harald Anlauf <anlauf@gmx.de>
1029
1030 PR fortran/99205
1031 * data.c (gfc_assign_data_value): Reject non-constant character
1032 length for lvalue.
1033 * trans-array.c (gfc_conv_array_initializer): Restrict loop to
1034 elements which are defined to avoid NULL pointer dereference.
1035
1036 2021-03-10 Tobias Burnus <tobias@codesourcery.com>
1037
1038 * intrinsic.texi (MIN): Correct 'maximum' to 'minimum'.
1039
1040 2021-03-10 Eric Botcazou <ebotcazou@adacore.com>
1041
1042 PR fortran/96983
1043 * trans-intrinsic.c (build_round_expr): Do not implicitly assume
1044 that __float128 is the 128-bit floating-point type.
1045
1046 2021-03-08 Harald Anlauf <anlauf@gmx.de>
1047
1048 PR fortran/49278
1049 * data.c (gfc_assign_data_value): Reject variable with PARAMETER
1050 attribute in DATA statement.
1051
1052 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
1053
1054 PR fortran/99355
1055 PR fortran/57871
1056 * invoke.texi (-freal{4,8}-real-*): Extend description.
1057 * primary.c (match_real_constant): Also promote real literals
1058 with '_kind' number.
1059
1060 2021-03-04 Tobias Burnus <tobias@codesourcery.com>
1061
1062 PR fortran/99355
1063 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Avoid
1064 redoing kind conversions.
1065 * primary.c (match_real_constant): Likewise.
1066
1067 2021-02-28 Jakub Jelinek <jakub@redhat.com>
1068
1069 PR fortran/99303
1070 * openmp.c (gfc_omp_requires_add_clause): Fix up diagnostic message
1071 wordings.
1072 (resolve_omp_clauses): Likewise.
1073
1074 2021-02-28 Jakub Jelinek <jakub@redhat.com>
1075
1076 PR fortran/99300
1077 * frontend-passes.c (doloop_code): Replace double space in diagnostics
1078 with a single space.
1079
1080 2021-02-24 Paul Thomas <pault@gcc.gnu.org>
1081
1082 PR fortran/98342
1083 * trans-expr.c (gfc_conv_derived_to_class): Add optional arg.
1084 'derived_array' to hold the fixed, parmse expr in the case of
1085 assumed rank formal arguments. Deal with optional arguments.
1086 (gfc_conv_procedure_call): Null 'derived' array for each actual
1087 argument. Add its address to the call to gfc_conv_derived_to_
1088 class. Access the 'data' field of scalar descriptors before
1089 deallocating allocatable components. Also strip NOPs before the
1090 calls to gfc_deallocate_alloc_comp. Use 'derived' array as the
1091 input to gfc_deallocate_alloc_comp if it is available.
1092 * trans.h : Include the optional argument 'derived_array' to
1093 the prototype of gfc_conv_derived_to_class. The default value
1094 is NULL_TREE.
1095
1096 2021-02-23 Paul Thomas <pault@gcc.gnu.org>
1097
1098 PR fortran/99124
1099 * resolve.c (resolve_fl_procedure): Include class results in
1100 the test for F2018, C15100.
1101 * trans-array.c (get_class_info_from_ss): Do not use the saved
1102 descriptor to obtain the class expression for variables. Use
1103 gfc_get_class_from_expr instead.
1104
1105 2021-02-23 Harald Anlauf <anlauf@gmx.de>
1106
1107 PR fortran/99206
1108 * simplify.c (gfc_simplify_reshape): Set string length for
1109 character arguments.
1110
1111 2021-02-22 Tobias Burnus <tobias@codesourcery.com>
1112
1113 PR fortran/99171
1114 * trans-openmp.c (gfc_omp_is_optional_argument): Regard optional
1115 dummy procs as nonoptional as no special treatment is needed.
1116
1117 2021-02-21 Harald Anlauf <anlauf@gmx.de>
1118
1119 * trans-expr.c (gfc_conv_procedure_call): Do not add clobber to
1120 allocatable intent(out) argument.
1121
1122 2021-02-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1123
1124 PR fortran/98686
1125 * match.c (gfc_match_namelist): If BT_UNKNOWN, check for
1126 IMPLICIT NONE and and issue an error, otherwise set the type
1127 to its IMPLICIT type so that any subsequent use of objects will
1128 will confirm their types.
1129
1130 2021-02-19 Harald Anlauf <anlauf@gmx.de>
1131
1132 * symbol.c (gfc_add_flavor): Reverse order of conditions.
1133
1134 2021-02-19 Tobias Burnus <tobias@codesourcery.com>
1135
1136 PR fortran/99010
1137 * dependency.c (gfc_dep_resolver): Fix coarray handling.
1138
1139 2021-02-19 Tobias Burnus <tobias@codesourcery.com>
1140
1141 PR fortran/99146
1142 * interface.c:
1143
1144 2021-02-19 Tobias Burnus <tobias@codesourcery.com>
1145
1146 PR fortran/99027
1147 * simplify.c (simplify_bound_dim): Honor DIMEN_ELEMENT
1148 when using dim=.
1149
1150 2021-02-17 Julian Brown <julian@codesourcery.com>
1151
1152 * openmp.c (resolve_omp_clauses): Disallow selecting components
1153 of arrays of derived type.
1154
1155 2021-02-17 Julian Brown <julian@codesourcery.com>
1156
1157 * trans-openmp.c (gfc_trans_omp_clauses): Handle element selection
1158 for arrays of derived types.
1159
1160 2021-02-16 Tobias Burnus <tobias@codesourcery.com>
1161
1162 * expr.c (gfc_is_simplify_contiguous): Handle REF_INQUIRY, i.e.
1163 %im and %re which are EXPR_VARIABLE.
1164 * openmp.c (resolve_omp_clauses): Diagnose %re/%im explicitly.
1165
1166 2021-02-16 Tobias Burnus <tobias@codesourcery.com>
1167
1168 PR fortran/99111
1169 * io.c (resolve_tag_format): Reject BT_DERIVED/CLASS/VOID
1170 as (array-valued) FORMAT tag.
1171
1172 2021-02-12 Tobias Burnus <tobias@codesourcery.com>
1173
1174 PR fortran/99043
1175 * trans-expr.c (gfc_conv_procedure_call): Don't reset
1176 rank of assumed-rank array.
1177
1178 2021-02-11 Paul Thomas <pault@gcc.gnu.org>
1179
1180 PR fortran/98897
1181 * match.c (gfc_match_call): Include associate names as possible
1182 entities with typebound subroutines. The target needs to be
1183 resolved for the type.
1184
1185 2021-02-11 Paul Thomas <pault@gcc.gnu.org>
1186
1187 PR fortran/99060
1188 * primary.c (gfc_match_varspec): Test for non-null 'previous'
1189 before using its name in the error message.
1190
1191 2021-02-11 Tobias Burnus <tobias@codesourcery.com>
1192
1193 * intrinsic.texi (FINDLOC): Add 'MASK' to argument table.
1194 (MAXLOC, MAXVAL, MINLOC, MINVAL): For 'MASK', remove 'an
1195 array' as scalars are also permitted.
1196
1197 2021-02-10 Julian Brown <julian@codesourcery.com>
1198
1199 PR fortran/98979
1200 * openmp.c (resolve_omp_clauses): Omit OpenACC update in
1201 contiguity check and stride-specified error.
1202
1203 2021-02-04 Julian Brown <julian@codesourcery.com>
1204
1205 * openmp.c (resolve_omp_clauses): Omit OpenACC update in
1206 contiguity check and stride-specified error.
1207
1208 2021-02-04 Julian Brown <julian@codesourcery.com>
1209
1210 * trans-openmp.c (gfc_trans_omp_clauses): Use class_pointer attribute
1211 for BT_CLASS.
1212
1213 2021-02-04 Julian Brown <julian@codesourcery.com>
1214
1215 * trans-openmp.c (gfc_trans_omp_clauses): Fix dereferencing for
1216 BT_DERIVED members.
1217
1218 2021-02-04 Tobias Burnus <tobias@codesourcery.com>
1219
1220 * openmp.c (resolve_omp_clauses): Explicitly diagnose
1221 substrings as not permitted.
1222
1223 2021-02-03 Jeff Law <law@redhat.com>
1224
1225 * intrinsic.texi (ANINT): Fix typo.
1226
1227 2021-02-03 Tobias Burnus <tobias@codesourcery.com>
1228
1229 PR fortran/98913
1230 * dependency.c (gfc_dep_resolver): Treat local access
1231 to coarrays like any array access in dependency analysis.
1232
1233 2021-01-28 Harald Anlauf <anlauf@gmx.de>
1234
1235 PR fortran/86470
1236 * trans.c (gfc_call_malloc): Allocate area of size 1 if passed
1237 size is NULL (as documented).
1238
1239 2021-01-27 Paul Thomas <pault@gcc.gnu.org>
1240
1241 PR fortran/93924
1242 PR fortran/93925
1243 * trans-expr.c (gfc_conv_procedure_call): Suppress the call to
1244 gfc_conv_intrinsic_to_class for unlimited polymorphic procedure
1245 pointers.
1246 (gfc_trans_assignment_1): Similarly suppress class assignment
1247 for class valued procedure pointers.
1248
1249 2021-01-27 Paul Thomas <pault@gcc.gnu.org>
1250
1251 PR fortran/98472
1252 * trans-array.c (gfc_conv_expr_descriptor): Include elemental
1253 procedure pointers in the assert under the comment 'elemental
1254 function' and eliminate the second, spurious assert.
1255
1256 2021-01-25 Harald Anlauf <anlauf@gmx.de>
1257
1258 PR fortran/70070
1259 * data.c (create_character_initializer): Check substring indices
1260 against bounds.
1261 (gfc_assign_data_value): Catch error returned from
1262 create_character_initializer.
1263
1264 2021-01-25 Tobias Burnus <tobias@codesourcery.com>
1265
1266 * intrinsic.texi (CO_BROADCAST, CO_MIN, CO_REDUCE, CO_SUM): Fix typos.
1267
1268 2021-01-25 Steve Kargl <kargl@gcc.gnu.org>
1269
1270 PR fortran/98517
1271 * resolve.c (resolve_charlen): Check that length expression is
1272 present before testing for scalar/integer..
1273
1274 2021-01-22 Paul Thomas <pault@gcc.gnu.org>
1275
1276 PR fortran/98565
1277 * trans-intrinsic.c (gfc_conv_associated): Do not add a _data
1278 component for scalar class function targets. Instead, fix the
1279 function result and access the _data from that.
1280
1281 2021-01-21 Jorge D'Elia <jdelia@cimec.unl.edu.ar>
1282
1283 * intrinsic.texi (CO_MAX): Fix typo.
1284
1285 2021-01-21 Paul Thomas <pault@gcc.gnu.org>
1286
1287 PR fortran/96320
1288 * decl.c (gfc_match_modproc): It is not an error to find a
1289 module procedure declaration within a contains block.
1290 * expr.c (gfc_check_vardef_context): Pure procedure result is
1291 assignable. Change 'own_scope' accordingly.
1292 * resolve.c (resolve_typebound_procedure): A procedure that
1293 has the module procedure attribute is almost certainly a
1294 module procedure, whatever its interface.
1295
1296 2021-01-19 Tobias Burnus <tobias@codesourcery.com>
1297
1298 PR fortran/98476
1299 * openmp.c (resolve_omp_clauses): Change use_device_ptr
1300 to use_device_addr for unless type(c_ptr); check all
1301 list item for is_device_ptr.
1302
1303 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1304
1305 * dump-parse-tree.c (show_omp_clauses): Handle detach clause.
1306 * frontend-passes.c (gfc_code_walker): Walk detach expression.
1307 * gfortran.h (struct gfc_omp_clauses): Add detach field.
1308 (gfc_c_intptr_kind): New.
1309 * openmp.c (gfc_free_omp_clauses): Free detach clause.
1310 (gfc_match_omp_detach): New.
1311 (enum omp_mask1): Add OMP_CLAUSE_DETACH.
1312 (enum omp_mask2): Remove OMP_CLAUSE_DETACH.
1313 (gfc_match_omp_clauses): Handle OMP_CLAUSE_DETACH for OpenMP.
1314 (OMP_TASK_CLAUSES): Add OMP_CLAUSE_DETACH.
1315 (resolve_omp_clauses): Prevent use of detach with mergeable and
1316 overriding the data sharing mode of the event handle.
1317 * trans-openmp.c (gfc_trans_omp_clauses): Handle detach clause.
1318 * trans-types.c (gfc_c_intptr_kind): New.
1319 (gfc_init_kinds): Initialize gfc_c_intptr_kind.
1320 * types.def
1321 (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT): Rename
1322 to...
1323 (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT_PTR):
1324 ...this. Add extra argument.
1325
1326 2021-01-14 Harald Anlauf <anlauf@gmx.de>
1327
1328 * gfortran.h (gfc_resolve_substring): Add prototype.
1329 * primary.c (match_string_constant): Simplify substrings with
1330 constant starting and ending points.
1331 * resolve.c: Rename resolve_substring to gfc_resolve_substring.
1332 (gfc_resolve_ref): Use renamed function gfc_resolve_substring.
1333
1334 2021-01-14 Harald Anlauf <anlauf@gmx.de>
1335
1336 PR fortran/98661
1337 * resolve.c (resolve_component): Derived type components with
1338 ALLOCATABLE or POINTER attribute shall have a deferred shape.
1339
1340 2021-01-14 Harald Anlauf <anlauf@gmx.de>
1341
1342 Revert:
1343 2021-01-14 Harald Anlauf <anlauf@gmx.de>
1344
1345 PR fortran/98661
1346 * resolve.c (resolve_component): Derived type components with
1347 ALLOCATABLE or POINTER attribute shall have a deferred shape.
1348
1349 2021-01-14 Harald Anlauf <anlauf@gmx.de>
1350
1351 PR fortran/98661
1352 * resolve.c (resolve_component): Derived type components with
1353 ALLOCATABLE or POINTER attribute shall have a deferred shape.
1354
1355 2021-01-08 Paul Thomas <pault@gcc.gnu.org>
1356
1357 PR fortran/93794
1358 * trans-expr.c (gfc_conv_component_ref): Remove the condition
1359 that deferred character length components only be allocatable.
1360
1361 2021-01-08 Paul Thomas <pault@gcc.gnu.org>
1362
1363 PR fortran/98458
1364 * simplify.c (is_constant_array_expr): If an array constructor
1365 expression has elements other than constants or structures, try
1366 fixing the expression with gfc_reduce_init_expr. Also, if shape
1367 is NULL, obtain the array size and set it.
1368
1369 2021-01-07 Paul Thomas <pault@gcc.gnu.org>
1370
1371 PR fortran/93701
1372 * resolve.c (find_array_spec): Put static prototype for
1373 resolve_assoc_var before this function and call for associate
1374 variables.
1375
1376 2021-01-06 Harald Anlauf <anlauf@gmx.de>
1377
1378 * resolve.c (resolve_component): Add check for valid CLASS
1379 reference before trying to access CLASS data.
1380
1381 2021-01-04 Martin Liska <mliska@suse.cz>
1382
1383 * ChangeLog-2018: Remove duplicate ChangeLog entries.
1384
1385 2021-01-01 Harald Anlauf <anlauf@gmx.de>
1386
1387 * class.c (gfc_find_vtab): Add check on attribute is_class.
1388
1389 2021-01-01 Jakub Jelinek <jakub@redhat.com>
1390
1391 * gfortranspec.c (lang_specific_driver): Update copyright notice
1392 dates.
1393 * gfc-internals.texi: Bump @copying's copyright year.
1394 * gfortran.texi: Ditto.
1395 * intrinsic.texi: Ditto.
1396 * invoke.texi: Ditto.
1397
1398 2021-01-01 Jakub Jelinek <jakub@redhat.com>
1399
1400 * ChangeLog-2020: Rotate ChangeLog. New file.
1401
1402 \f
1403 Copyright (C) 2021 Free Software Foundation, Inc.
1404
1405 Copying and distribution of this file, with or without modification,
1406 are permitted in any medium without royalty provided the copyright
1407 notice and this notice are preserved.