1 2024-09-13 Tobias Burnus <tburnus@baylibre.com>
4 * gfortran.h (gfc_omp_namelist): Rename 'init' members for clarity.
5 * match.cc (gfc_free_omp_namelist): Handle renaming.
6 * dump-parse-tree.cc (show_omp_namelist): Update for new format
8 * openmp.cc (gfc_match_omp_prefer_type): Parse list to 'fr' and 'attr';
9 store 'fr' values as integer.
10 (gfc_match_omp_init): Rename variable names.
12 2024-09-12 Steven G. Kargl <kargl@gcc.gnu.org>
14 * module.cc (bt_types): Add BT_UNSIGNED.
16 2024-09-11 Tobias Burnus <tburnus@baylibre.com>
19 * openmp.cc (gfc_match_omp_prefer_type): NULL init a gfc_expr
20 variable and use right locus in gfc_error.
22 2024-09-09 David Malcolm <dmalcolm@redhat.com>
24 * cpp.cc (cb_cpp_diagnostic_cpp_option): Convert return type from
25 "int" to "diagnostic_option_id".
26 (cb_cpp_diagnostic): Update for renaming of
27 diagnostic_override_option_index to diagnostic_set_option_id.
28 * error.cc (gfc_warning): Update for renaming of diagnostic_info
30 (gfc_warning_now_at): Likewise.
31 (gfc_warning_now): Likewise.
32 (gfc_warning_internal): Likewise.
34 2024-09-09 David Malcolm <dmalcolm@redhat.com>
37 * error.cc (gfc_clear_pp_buffer): Rename diagnostic_context's
38 "printer" field to "m_printer".
39 (gfc_warning): Likewise.
40 (gfc_diagnostic_build_kind_prefix): Likewise.
41 (gfc_diagnostic_build_locus_prefix): Likewise.
42 (gfc_diagnostic_starter): Likewise.
43 (gfc_diagnostic_starter): Likewise.
44 (gfc_diagnostic_start_span): Likewise.
45 (gfc_diagnostic_finalizer): Likewise.
46 (gfc_warning_check): Likewise.
47 (gfc_error_opt): Likewise.
48 (gfc_error_check): Likewise.
50 2024-09-07 Thomas Koenig <tkoenig@gcc.gnu.org>
52 * arith.cc (gfc_reduce_unsigned): New function.
53 (gfc_arith_error): Add ARITH_UNSIGNED_TRUNCATED and
54 ARITH_UNSIGNED_NEGATIVE.
55 (gfc_arith_init_1): Initialize unsigned types.
56 (gfc_check_unsigned_range): New function.
57 (gfc_range_check): Handle unsigned types.
58 (gfc_arith_uminus): Likewise.
59 (gfc_arith_plus): Likewise.
60 (gfc_arith_minus): Likewise.
61 (gfc_arith_times): Likewise.
62 (gfc_arith_divide): Likewise.
63 (gfc_compare_expr): Likewise.
64 (eval_intrinsic): Likewise.
65 (gfc_int2int): Also convert unsigned.
66 (gfc_uint2uint): New function.
67 (gfc_int2uint): New function.
68 (gfc_uint2int): New function.
69 (gfc_uint2real): New function.
70 (gfc_uint2complex): New function.
71 (gfc_real2uint): New function.
72 (gfc_complex2uint): New function.
73 (gfc_log2uint): New function.
74 (gfc_uint2log): New function.
75 * arith.h (gfc_int2uint, gfc_uint2uint, gfc_uint2int, gfc_uint2real):
77 (gfc_uint2complex, gfc_real2uint, gfc_complex2uint, gfc_log2uint):
79 (gfc_uint2log): Likewise.
80 * check.cc (gfc_boz2uint): New function
81 (type_check2): New function.
82 (int_or_real_or_unsigned_check): New function.
83 (less_than_bitsizekind): Adjust for unsingeds.
84 (less_than_bitsize2): Likewise.
85 (gfc_check_allocated): Likewise.
86 (gfc_check_mod): Likewise.
87 (gfc_check_bge_bgt_ble_blt): Likewise.
88 (gfc_check_bitfcn): Likewise.
89 (gfc_check_digits): Likewise.
90 (gfc_check_dshift): Likewise.
91 (gfc_check_huge): Likewise.
92 (gfc_check_iu): New function.
93 (gfc_check_iand_ieor_ior): Adjust for unsigneds.
94 (gfc_check_ibits): Likewise.
95 (gfc_check_uint): New function.
96 (gfc_check_ishft): Adjust for unsigneds.
97 (gfc_check_ishftc): Likewise.
98 (gfc_check_min_max): Likewise.
99 (gfc_check_merge_bits): Likewise.
100 (gfc_check_selected_int_kind): Likewise.
101 (gfc_check_shift): Likewise.
102 (gfc_check_mvbits): Likewise.
103 (gfc_invalid_unsigned_ops): Likewise.
104 * decl.cc (gfc_match_decl_type_spec): Likewise.
105 * dump-parse-tree.cc (show_expr): Likewise.
106 * expr.cc (gfc_get_constant_expr): Likewise.
107 (gfc_copy_expr): Likewise.
108 (gfc_extract_int): Likewise.
109 (numeric_type): Likewise.
110 * gfortran.h (enum arith): Extend with ARITH_UNSIGNED_TRUNCATED
111 and ARITH_UNSIGNED_NEGATIVE.
112 (enum gfc_isym_id): Extend with GFC_ISYM_SU_KIND and GFC_ISYM_UINT.
113 (gfc_check_unsigned_range): New prototype-
114 (gfc_arith_error): Likewise.
115 (gfc_reduce_unsigned): Likewise.
116 (gfc_boz2uint): Likewise.
117 (gfc_invalid_unsigned_ops): Likewise.
118 (gfc_convert_mpz_to_unsigned): Likewise.
119 * gfortran.texi: Add some rudimentary documentation.
120 * intrinsic.cc (gfc_type_letter): Adjust for unsigneds.
121 (add_functions): Add uint and adjust functions to be called.
122 (add_conversions): Add unsigned conversions.
123 (gfc_convert_type_warn): Adjust for unsigned.
124 * intrinsic.h (gfc_check_iu, gfc_check_uint, gfc_check_mod, gfc_simplify_uint,
125 gfc_simplify_selected_unsigned_kind, gfc_resolve_uint): New prototypes.
126 * invoke.texi: Add -funsigned.
127 * iresolve.cc (gfc_resolve_dshift): Handle unsigneds.
128 (gfc_resolve_iand): Handle unsigneds.
129 (gfc_resolve_ibclr): Handle unsigneds.
130 (gfc_resolve_ibits): Handle unsigneds.
131 (gfc_resolve_ibset): Handle unsigneds.
132 (gfc_resolve_ieor): Handle unsigneds.
133 (gfc_resolve_ior): Handle unsigneds.
134 (gfc_resolve_uint): Handle unsigneds.
135 (gfc_resolve_merge_bits): Handle unsigneds.
136 (gfc_resolve_not): Handle unsigneds.
137 * lang.opt: Add -funsigned.
138 * libgfortran.h: Add BT_UNSIGNED.
139 * match.cc (gfc_match_type_spec): Match UNSIGNED.
140 * misc.cc (gfc_basic_typename): Add UNSIGNED.
141 (gfc_typename): Likewise.
142 * primary.cc (convert_unsigned): New function.
143 (match_unsigned_constant): New function.
144 (gfc_match_literal_constant): Handle unsigned.
145 * resolve.cc (resolve_operator): Handle unsigned.
146 (resolve_ordinary_assign): Likewise.
147 * simplify.cc (convert_mpz_to_unsigned): Renamed to...
148 (gfc_convert_mpz_to_unsigned): and adjusted.
149 (gfc_simplify_bit_size): Adjusted for unsigned.
150 (compare_bitwise): Likewise.
151 (gfc_simplify_bge): Likewise.
152 (gfc_simplify_bgt): Likewise.
153 (gfc_simplify_ble): Likewise.
154 (gfc_simplify_blt): Likewise.
155 (simplify_cmplx): Likewise.
156 (gfc_simplify_digits): Likewise.
157 (simplify_dshift): Likewise.
158 (gfc_simplify_huge): Likewise.
159 (gfc_simplify_iand): Likewise.
160 (gfc_simplify_ibclr): Likewise.
161 (gfc_simplify_ibits): Likewise.
162 (gfc_simplify_ibset): Likewise.
163 (gfc_simplify_ieor): Likewise.
164 (gfc_simplify_uint): Likewise.
165 (gfc_simplify_ior): Likewise.
166 (simplify_shift): Likewise.
167 (gfc_simplify_ishftc): Likewise.
168 (gfc_simplify_merge_bits): Likewise.
169 (min_max_choose): Likewise.
170 (gfc_simplify_mod): Likewise.
171 (gfc_simplify_modulo): Likewise.
172 (gfc_simplify_popcnt): Likewise.
173 (gfc_simplify_range): Likewise.
174 (gfc_simplify_selected_unsigned_kind): Likewise.
175 (gfc_convert_constant): Likewise.
176 * target-memory.cc (size_unsigned): New function.
177 (gfc_element_size): Adjust for unsigned.
178 * trans-const.h (gfc_conv_mpz_unsigned_to_tree): Add prototype.
179 * trans-const.cc (gfc_conv_mpz_unsigned_to_tree): Handle unsigneds.
180 (gfc_conv_constant_to_tree): Likewise.
181 * trans-decl.cc (gfc_conv_cfi_to_gfc): Put in "not yet implemented".
182 * trans-expr.cc (gfc_conv_gfc_desc_to_cfi_desc): Likewise.
183 * trans-stmt.cc (gfc_trans_integer_select): Handle unsigned.
184 (gfc_trans_select): Likewise.
185 * trans-intrinsic.cc (gfc_conv_intrinsic_mod): Handle unsigned.
186 (gfc_conv_intrinsic_shift): Likewise.
187 (gfc_conv_intrinsic_function): Add GFC_ISYM_UINT.
188 * trans-io.cc (enum iocall): Add IOCALL_X_UNSIGNED and IOCALL_X_UNSIGNED_WRITE.
189 (gfc_build_io_library_fndecls): Add transfer_unsigned and transfer_unsigned_write.
190 (transfer_expr): Handle unsigneds.
191 * trans-types.cc (gfc_unsinged_kinds): New array.
192 (gfc_unsigned_types): Likewise.
193 (gfc_init_kinds): Handle them.
194 (validate_unsigned): New function.
195 (gfc_validate_kind): Use it.
196 (gfc_build_unsigned_type): New function.
197 (gfc_init_types): Use it.
198 (gfc_get_unsigned_type): New function.
199 (gfc_typenode_for_spec): Handle unsigned.
200 * trans-types.h (gfc_get_unsigned_type): New prototype.
202 2024-09-06 Tobias Burnus <tburnus@baylibre.com>
204 * dump-parse-tree.cc (show_omp_namelist): Handle OMP_LIST_INIT.
205 (show_omp_clauses): Handle OMP_LIST_{INIT,USE,DESTORY}; move 'nowait'
206 from end-directive to the directive dump.
207 (show_omp_node, show_code_node): Handle EXEC_OMP_INTEROP.
208 * gfortran.h (enum gfc_statement): Add ST_OMP_INTEROP.
209 (OMP_LIST_INIT, OMP_LIST_USE, OMP_LIST_DESTROY): Add.
210 (enum gfc_exec_op): Add EXEC_OMP_INTEROP.
211 (struct gfc_omp_namelist): Add interop items to union.
212 (gfc_free_omp_namelist): Add boolean arg.
213 * match.cc (gfc_free_omp_namelist): Update to free
214 interop union members.
215 * match.h (gfc_match_omp_interop): New.
216 * openmp.cc (gfc_omp_directives): Uncomment 'interop' entry.
217 (gfc_free_omp_clauses, gfc_match_omp_allocate,
218 gfc_match_omp_flush, gfc_match_omp_clause_reduction): Update
220 (enum omp_mask2): Add OMP_CLAUSE_{INIT,USE,DESTROY}.
221 (OMP_INTEROP_CLAUSES): Use it.
222 (gfc_match_omp_clauses): Match those clauses.
223 (gfc_match_omp_prefer_type, gfc_match_omp_init,
224 gfc_match_omp_interop): New.
225 (resolve_omp_clauses): Handle interop clauses.
226 (omp_code_to_statement): Add ST_OMP_INTEROP.
227 (gfc_resolve_omp_directive): Add EXEC_OMP_INTEROP.
228 * parse.cc (decode_omp_directive): Parse 'interop' directive.
229 (next_statement, gfc_ascii_statement): Handle ST_OMP_INTEROP.
230 * st.cc (gfc_free_statement): Likewise
231 * resolve.cc (gfc_resolve_code): Handle EXEC_OMP_INTEROP.
232 * trans.cc (trans_code): Likewise.
233 * trans-openmp.cc (gfc_trans_omp_directive): Print 'sorry'
234 for EXEC_OMP_INTEROP.
236 2024-09-05 Harald Anlauf <anlauf@gmx.de>
239 * trans-decl.cc (gfc_create_module_variable): Handle module
240 variable also when it is needed for the result specification
241 of a contained function.
243 2024-09-03 David Malcolm <dmalcolm@redhat.com>
245 * error.cc (gfc_move_error_buffer_from_to): Prefix all
246 output_buffer fields with "m_".
247 (gfc_diagnostics_init): Likewise.
249 2024-08-31 Harald Anlauf <anlauf@gmx.de>
251 * match.cc (gfc_match_namelist): Downgrade feature from GNU to
254 2024-08-30 Harald Anlauf <anlauf@gmx.de>
257 * resolve.cc (resolve_symbol): Add default-initialization of
258 non-allocatable, non-pointer derived-type function results.
260 2024-08-29 David Malcolm <dmalcolm@redhat.com>
262 * error.cc (gfc_format_decoder): Convert final param from
263 const char **buffer_ptr to pp_token_list &formatted_token_list,
264 and update call to default_tree_printer accordingly.
266 2024-08-29 Harald Anlauf <anlauf@gmx.de>
269 * trans-io.cc (transfer_namelist_element): Prevent NULL pointer
272 2024-08-23 Paul Thomas <pault@gcc.gnu.org>
275 2024-08-06 Paul Thomas <pault@gcc.gnu.org>
278 * trans-array.cc (get_array_ref_dim_for_loop_dim): Use the arg1
279 class container carried in ss->info as the seed for a lhs in
280 class valued transformational intrinsic calls that are not the
281 rhs of an assignment. Otherwise, the lhs variable expression is
282 taken from the loop chain. For this latter case, the _vptr and
284 (gfc_trans_create_temp_array): Use either the lhs expression
285 seeds to build a class variable that will take the returned
286 descriptor as its _data field. In the case that the arg1 expr.
287 is used, a class typespec must be built with the correct rank
288 and the _vptr and _len fields set. The element size is provided
289 for the temporary allocation and to set the descriptor span.
290 (gfc_array_init_size): When an intrinsic type scalar expr3 is
291 used in allocation of a class array, use its element size in
292 the descriptor dtype.
293 * trans-expr.cc (gfc_conv_class_to_class): Class valued
294 transformational intrinsics return the pointer to the array
295 descriptor as the _data field of a class temporary. Extract
296 directly and return the address of the class temporary.
297 (gfc_conv_procedure_call): store the expression for the first
298 argument of a class valued transformational intrinsic function
299 in the ss info class_container field. Later, use its type as
300 the element type in the call to gfc_trans_create_temp_array.
301 (fcncall_realloc_result): Add a dtype argument and use it in
302 the descriptor, when available.
303 (gfc_trans_arrayfunc_assign): For class lhs, build a dtype with
304 the lhs rank and the rhs element size and use it in the call to
305 fcncall_realloc_result.
307 2024-08-23 Gerald Pfeifer <gerald@pfeifer.com>
309 * invoke.texi (Code Gen Options): Add a missing word.
311 2024-08-23 Andre Vehreschild <vehre@gcc.gnu.org>
314 * trans-stmt.cc (trans_associate_var): Remove superfluous
317 2024-08-21 Andre Vehreschild <vehre@gcc.gnu.org>
320 * trans-intrinsic.cc (conv_intrinsic_move_alloc): Correct
322 * trans-types.cc (gfc_sym_type): Pass coarray rank, not false.
323 (gfc_get_derived_type): Only propagate codimension for coarrays
324 and pointers to array components in derived typed coarrays.
326 2024-08-21 Andre Vehreschild <vehre@gcc.gnu.org>
329 * trans-intrinsic.cc (gfc_conv_intrinsic_sizeof): Use
330 class_container of se when set.
332 2024-08-20 Andre Vehreschild <vehre@gcc.gnu.org>
335 * resolve.cc (caf_possible_reallocate): Detect arrays that may
336 be reallocated by caf_send.
337 (resolve_ordinary_assign): More reliably detect assignments
338 where a rewrite to caf_send is needed.
339 * trans-expr.cc (gfc_trans_assignment_1): Remove rewrite to
340 caf_send, because this is done by resolve now.
341 * trans-intrinsic.cc (conv_caf_send): Prevent unneeded temporary
344 2024-08-19 Andre Vehreschild <vehre@gcc.gnu.org>
348 * expr.cc (gfc_is_coindexed): Detect is coindexed also when
349 rewritten to caf_get.
350 * trans-stmt.cc (trans_associate_var): Always accept a
351 descriptor for coarrays.
353 2024-08-19 Andre Vehreschild <vehre@gcc.gnu.org>
356 * trans-types.cc (gfc_get_derived_type): When a caf_sub_token is
357 generated for a component, link it to the component it is
358 generated for (the previous one).
360 2024-08-16 Harald Anlauf <anlauf@gmx.de>
363 * intrinsic.texi: Fix documentation of arguments of RANDOM_INIT,
364 which is conforming to the F2018 standard.
366 2024-08-15 Jakub Jelinek <jakub@redhat.com>
369 * resolve.cc (resolve_operator): Use %L rather than %%L in format
372 2024-08-15 Andre Vehreschild <vehre@gcc.gnu.org>
375 * class.cc (gfc_is_class_scalar_expr): Coarray refs that ref
376 only self, aka this image, are regarded as scalar, too.
377 * resolve.cc (resolve_assoc_var): Ignore this image coarray refs
378 and do not build a new class type.
379 * trans-expr.cc (gfc_get_caf_token_offset): Get the caf token
380 from the descriptor for associated variables.
381 (gfc_conv_variable): Same.
382 (gfc_trans_pointer_assignment): Assign token to temporary
383 associate variable, too.
384 (gfc_trans_scalar_assign): Add flag that assign is for associate
385 and use it to assign the token.
386 (is_assoc_assign): Detect that expressions are for associate
388 (gfc_trans_assignment_1): Treat associate assigns like pointer
389 assignments where possible.
390 * trans-stmt.cc (trans_associate_var): Set same_class only for
392 * trans.h (gfc_trans_scalar_assign): Add flag to
393 trans_scalar_assign for marking associate assignments.
395 2024-08-15 Andre Vehreschild <vehre@gcc.gnu.org>
397 * arith.cc (reduce_unary): Use expr.corank.
398 (reduce_binary_ac): Same.
399 (reduce_binary_ca): Same.
400 (reduce_binary_aa): Same.
401 * array.cc (gfc_match_array_ref): Same.
402 * check.cc (dim_corank_check): Same.
403 (gfc_check_move_alloc): Same.
404 (gfc_check_image_index): Same.
405 * class.cc (gfc_add_class_array_ref): Same.
406 (finalize_component): Same.
407 * data.cc (gfc_assign_data_value): Same.
408 * decl.cc (match_clist_expr): Same.
409 (add_init_expr_to_sym): Same.
410 * expr.cc (simplify_intrinsic_op): Same.
411 (simplify_parameter_variable): Same.
412 (gfc_check_assign_symbol): Same.
413 (gfc_get_variable_expr): Same.
414 (gfc_add_full_array_ref): Same.
415 (gfc_lval_expr_from_sym): Same.
416 (gfc_get_corank): Removed.
417 * frontend-passes.cc (callback_reduction): Use expr.corank.
419 (combine_array_constructor): Same.
420 (optimize_minmaxloc): Same.
421 * gfortran.h (gfc_get_corank): Add corank to gfc_expr.
422 * intrinsic.cc (gfc_get_intrinsic_function_symbol): Use
424 (gfc_convert_type_warn): Same.
425 (gfc_convert_chartype): Same.
426 * iresolve.cc (resolve_bound): Same.
427 (gfc_resolve_cshift): Same.
428 (gfc_resolve_eoshift): Same.
429 (gfc_resolve_logical): Same.
430 (gfc_resolve_matmul): Same.
431 * match.cc (copy_ts_from_selector_to_associate): Same.
432 * matchexp.cc (gfc_get_parentheses): Same.
433 * parse.cc (parse_associate): Same.
434 * primary.cc (gfc_match_rvalue): Same.
435 * resolve.cc (resolve_structure_cons): Same.
436 (resolve_actual_arglist): Same.
437 (resolve_elemental_actual): Same.
438 (resolve_generic_f0): Same.
439 (resolve_unknown_f): Same.
440 (resolve_operator): Same.
441 (gfc_expression_rank): Same and set dimen_type for coarray to
443 (gfc_op_rank_conformable): Use expr.corank.
444 (add_caf_get_intrinsic): Same.
445 (resolve_variable): Same.
446 (gfc_fixup_inferred_type_refs): Same.
447 (check_host_association): Same.
448 (resolve_compcall): Same.
449 (resolve_expr_ppc): Same.
450 (resolve_assoc_var): Same.
451 (fixup_array_ref): Same.
452 (resolve_select_type): Same.
453 (add_comp_ref): Same.
454 (get_temp_from_expr): Same.
455 (resolve_fl_var_and_proc): Same.
456 (resolve_symbol): Same.
457 * symbol.cc (gfc_is_associate_pointer): Same.
458 * trans-array.cc (walk_coarray): Same.
459 (gfc_conv_expr_descriptor): Same.
460 (gfc_walk_array_ref): Same.
461 * trans-array.h (gfc_walk_array_ref): Same.
462 * trans-expr.cc (gfc_get_ultimate_alloc_ptr_comps_caf_token):
464 * trans-intrinsic.cc (trans_this_image): Same.
465 (trans_image_index): Same.
466 (conv_intrinsic_cobound): Same.
467 (gfc_walk_intrinsic_function): Same.
468 (conv_intrinsic_move_alloc): Same.
469 * trans-stmt.cc (gfc_trans_lock_unlock): Same.
470 (trans_associate_var): Same and adapt to slightly different
471 behaviour of expr.corank and gfc_get_corank.
472 (gfc_trans_allocate): Same.
473 * trans.cc (gfc_add_finalizer_call): Same.
475 2024-08-14 Harald Anlauf <anlauf@gmx.de>
477 * simplify.cc (gfc_simplify_sizeof): Clear used gmp variable.
478 * target-memory.cc (gfc_target_expr_size): Likewise.
480 2024-08-14 Andre Vehreschild <vehre@gcc.gnu.org>
483 * match.cc (gfc_match_associate): Reset proc_ptr parsing flag on
486 2024-08-14 Andre Vehreschild <vehre@gcc.gnu.org>
489 * trans-intrinsic.cc (conv_intrinsic_move_alloc): Get the vtab
490 only for derived types and classes and adjust _len for class
493 2024-08-13 Harald Anlauf <anlauf@gmx.de>
494 Steven G. Kargl <kargl@gcc.gnu.org>
497 * array.cc (resolve_array_list): Reject array constructor value if
498 its declared type is abstract (F2018:C7114).
500 2024-08-12 Andre Vehreschild <vehre@gcc.gnu.org>
503 * resolve.cc (resolve_variable): Mark the variable as host
504 associated only, when it is not in an associate block.
505 * trans-decl.cc (generate_coarray_init): Remove incorrect unused
508 2024-08-11 Harald Anlauf <anlauf@gmx.de>
511 * intrinsic.cc (gfc_get_intrinsic_sub_symbol): Initialize variable.
512 * symbol.cc (gfc_get_ha_symbol): Likewise.
514 2024-08-07 Julian Brown <julian@codesourcery.com>
515 Tobias Burnus <tobias@baylibre.com>
517 * gfortran.h (gfc_option_t): Add disable_omp_is_initial_device.
518 * lang.opt (fbuiltin-): Add.
519 * options.cc (gfc_handle_option): Handle
520 -fno-builtin-omp_is_initial_device.
521 * f95-lang.cc (gfc_init_builtin_functions): Handle
522 DEF_GOMP_BUILTIN_COMPILER.
523 * trans-decl.cc (gfc_get_extern_function_decl): Add code to use
524 DEF_GOMP_BUILTIN_COMPILER for 'omp_is_initial_device'.
526 2024-08-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
529 * resolve.cc (CHECK_INTERFACES): New helper macro.
530 (resolve_operator): Replace use of snprintf with
533 2024-08-06 Paul Thomas <pault@gcc.gnu.org>
536 * trans-array.cc (get_array_ref_dim_for_loop_dim): Use the arg1
537 class container carried in ss->info as the seed for a lhs in
538 class valued transformational intrinsic calls that are not the
539 rhs of an assignment. Otherwise, the lhs variable expression is
540 taken from the loop chain. For this latter case, the _vptr and
542 (gfc_trans_create_temp_array): Use either the lhs expression
543 seeds to build a class variable that will take the returned
544 descriptor as its _data field. In the case that the arg1 expr.
545 is used, a class typespec must be built with the correct rank
546 and the _vptr and _len fields set. The element size is provided
547 for the temporary allocation and to set the descriptor span.
548 (gfc_array_init_size): When an intrinsic type scalar expr3 is
549 used in allocation of a class array, use its element size in
550 the descriptor dtype.
551 * trans-expr.cc (gfc_conv_class_to_class): Class valued
552 transformational intrinsics return the pointer to the array
553 descriptor as the _data field of a class temporary. Extract
554 directly and return the address of the class temporary.
555 (gfc_conv_procedure_call): store the expression for the first
556 argument of a class valued transformational intrinsic function
557 in the ss info class_container field. Later, use its type as
558 the element type in the call to gfc_trans_create_temp_array.
559 (fcncall_realloc_result): Add a dtype argument and use it in
560 the descriptor, when available.
561 (gfc_trans_arrayfunc_assign): For class lhs, build a dtype with
562 the lhs rank and the rhs element size and use it in the call to
563 fcncall_realloc_result.
565 2024-08-03 Steve Kargl <kargls@comcast.net>
568 * symbol.cc (gfc_add_save): Add checks for SAVE attribute
569 conflicts and duplicate SAVE attribute.
571 2024-08-02 Mikael Morin <mikael@gcc.gnu.org>
573 * trans-intrinsic.cc (maybe_absent_optional_variable): New function.
574 (gfc_conv_intrinsic_minmaxloc): Remove BACK from scalarization and
575 evaluate it before. Add a check that BACK is not null if the
576 expression is an optional dummy. Save the resulting expression to a
577 variable. Use the variable in the generated inline code.
579 2024-08-01 Jakub Jelinek <jakub@redhat.com>
581 * trans-types.cc (gfc_get_array_descr_info): Don't test if
582 !integer_zerop (dtype_off), use fold_build_pointer_plus
585 2024-07-29 Tobias Burnus <tburnus@baylibre.com>
588 * trans-common.cc (build_common_decl): Add 'omp declare target' and
589 'omp declare target link' variables to offload_vars.
590 * trans-decl.cc (add_attributes_to_decl): Likewise; update args and
591 call decl_attributes.
592 (get_proc_pointer_decl, gfc_get_extern_function_decl,
593 build_function_decl): Update calls.
594 (gfc_get_symbol_decl): Likewise; move after 'DECL_STATIC (t)=1'
595 to avoid errors with symtab_node::get_create.
597 2024-07-22 Andre Vehreschild <vehre@gcc.gnu.org>
600 * trans-expr.cc (gfc_conv_procedure_call): Treat
601 pointers/references (e.g. from parameters) correctly by derefing
604 2024-07-21 Paul Thomas <pault@gcc.gnu.org>
607 * gfortran.h : Add decl_order to gfc_symbol.
608 * symbol.cc : Add static next_decl_order..
609 (gfc_set_sym_referenced): Set symbol decl_order.
610 * trans-decl.cc : Include dependency.h.
611 (decl_order): Replace symbol declared_at.lb->location with
614 2024-07-19 Harald Anlauf <anlauf@gmx.de>
617 * trans-array.cc (gfc_trans_array_constructor_value): If the first
618 element of an array constructor is deferred-length character and
619 therefore does not have an element size known at compile time, do
620 not try to collect subsequent constant elements into a constructor
623 2024-07-18 Andre Vehreschild <vehre@gcc.gnu.org>
627 * array.cc (gfc_compare_array_spec): Take cotype into account.
628 * class.cc (gfc_build_class_symbol): Coarrays are also arrays.
629 * gfortran.h (IS_CLASS_COARRAY_OR_ARRAY): New macro to detect
630 regular and coarray class arrays.
631 * interface.cc (compare_components): Take codimension into
633 * resolve.cc (resolve_symbol): Improve error message.
634 * simplify.cc (simplify_bound_dim): Remove duplicate.
635 * trans-array.cc (gfc_trans_array_cobounds): Coarrays are also
637 (gfc_trans_array_bounds): Same.
638 (gfc_trans_dummy_array_bias): Same.
639 (get_coarray_as): Get the as having a non-zero codim.
640 (is_explicit_coarray): Detect explicit coarrays.
641 (gfc_conv_expr_descriptor): Create a new descriptor for explicit
643 * trans-decl.cc (gfc_build_qualified_array): Coarrays are also
645 (gfc_build_dummy_array_decl): Same.
646 (gfc_get_symbol_decl): Same.
647 (gfc_trans_deferred_vars): Same.
648 * trans-expr.cc (class_scalar_coarray_to_class): Get the
649 descriptor from the correct location.
650 (gfc_conv_variable): Pick up the descriptor when needed.
651 * trans-types.cc (gfc_is_nodesc_array): Coarrays are also
653 (gfc_get_nodesc_array_type): Indentation fix only.
654 (cobounds_match_decl): Match a tree's bounds to the expr's
655 bounds and return true, when they match.
656 (gfc_get_derived_type): Create a new type tree/descriptor, when
657 the cobounds of the existing declaration and expr to not
658 match. This happends for class arrays in parameter list, when
659 there are different cobound declarations.
661 2024-07-18 Paul Thomas <pault@gcc.gnu.org>
664 * gfortran.h: Add bit field 'allocated_in_scope' to gfc_symbol.
665 * trans-array.cc (gfc_array_allocate): Set 'allocated_in_scope'
666 after allocation if not a component reference.
667 (gfc_alloc_allocatable_for_assignment): If 'allocated_in_scope'
668 not set, not a component ref and not allocated, set the array
669 bounds and offset to give zero length in all dimensions. Then
670 set allocated_in_scope.
672 2024-07-18 Andre Vehreschild <vehre@gcc.gnu.org>
675 * trans-types.cc (gfc_sym_type): Use type `char*` for saved
676 deferred length char arrays.
677 * trans.cc (get_array_span): Get `.span` also for `char*` typed
678 arrays, i.e. for those that have INTEGER_TYPE instead of
681 2024-07-17 Kewen Lin <linkw@linux.ibm.com>
684 * trans-types.cc (get_real_kind_from_node): Consider the case where
685 more than one modes have the same precision.
687 2024-07-16 Paul Thomas <pault@gcc.gnu.org>
690 * simplify.cc (gfc_simplify_len_trim): If the argument is an
691 element of a parameter array, simplify all the elements and
692 build a new parameter array to hold the result, after checking
693 that it doesn't already exist.
694 * trans-expr.cc (gfc_get_interface_mapping_array) if a string
695 length is available, use it for the typespec.
696 (gfc_add_interface_mapping): Supply the se string length.
698 2024-07-16 Prathamesh Kulkarni <prathameshk@nvidia.com>
700 * trans-expr.cc (gfc_trans_zero_assign): Handle allocatable arrays.
702 2024-07-13 Mikael Morin <mikael@gcc.gnu.org>
704 * trans-intrinsic.cc (gfc_conv_intrinsic_minmaxloc): Add the
705 preliminary code generated for MASK to the preliminary code of
708 2024-07-12 Mikael Morin <morin-mikael@orange.fr>
710 * trans-intrinsic.cc (gfc_conv_intrinsic_minmaxloc): Create a new
711 scalar scalarization chain element if BACK is present. Add it to
712 the loop. Set the scalarization chain before evaluating the
715 2024-07-11 Andre Vehreschild <vehre@gcc.gnu.org>
717 * trans-array.cc (gfc_conv_array_parameter): Init variable to
718 NULL_TREE to fix bootstrap.
720 2024-07-11 Andre Vehreschild <vehre@gcc.gnu.org>
723 * trans-array.cc (gfc_trans_array_bounds): Set a starting
724 stride, when descriptor expects a variable for the stride.
725 (gfc_trans_dummy_array_bias): Allow storage association for
726 dummy class arrays, when they are not elemental.
727 (gfc_conv_array_parameter): Add more general class support
728 and packing for classes, too.
729 * trans-array.h (gfc_conv_array_parameter): Add lbound shift
731 * trans-decl.cc (gfc_build_builtin_function_decls): Add decls
732 for internal_un-/pack_class.
733 * trans-expr.cc (gfc_reset_vptr): Allow supplying a type-tree
734 to generate the vtab from.
735 (gfc_class_set_vptr): Allow supplying a class-tree to take the
737 (class_array_data_assign): Rename to gfc_class_array_data_assign
738 and make usable from other compile units.
739 (gfc_class_array_data_assign): Renamed from class_array_data_
741 (gfc_conv_derived_to_class): Remove assert to
742 allow converting derived to class type arrays with assumed
743 rank. Reduce code base and use gfc_conv_array_parameter also
745 (gfc_conv_class_to_class): Use gfc_class_data_assign.
746 (gfc_conv_procedure_call): Adapt to new signature of
747 gfc_conv_derived_to_class.
748 * trans-io.cc (transfer_expr): Same.
749 * trans-stmt.cc (trans_associate_var): Same.
750 * trans.h (gfc_conv_derived_to_class): Signature changed.
751 (gfc_class_array_data_assign): Made public.
752 (gfor_fndecl_in_pack_class): Added declaration.
753 (gfor_fndecl_in_unpack_class): Same.
755 2024-07-08 Mikael Morin <mikael@gcc.gnu.org>
757 * trans-array.cc (gfc_trans_preloop_setup): Use a separate variable
758 for iteration. Use directly the value of variable I if it is known.
759 Move the definition of the variable to the branch where the
762 2024-07-03 Harald Anlauf <anlauf@gmx.de>
765 * trans-stmt.cc (trans_associate_var): When the associate target
766 is an array-valued character variable, the length is known at entry
767 of the associate block. Move setting of string length of the
768 selector to the initialization part of the block.
770 2024-07-01 Andrew Stubbs <ams@baylibre.com>
771 Thomas Schwinge <thomas@codesourcery.com>
773 * openmp.cc (is_predefined_allocator): Update valid ranges to
774 incorporate ompx_gnu_pinned_mem_alloc.
776 2024-06-29 Harald Anlauf <anlauf@gmx.de>
779 * trans-stmt.cc (gfc_trans_allocate): Fix handling of case of
780 scalar character expression being used for SOURCE.
782 2024-06-28 Andre Vehreschild <vehre@gcc.gnu.org>
784 * trans-expr.cc (gfc_class_set_vptr): Add setting of _vptr
786 * trans-intrinsic.cc (conv_intrinsic_move_alloc): First use
787 of gfc_class_set_vptr and refactor very similar code.
788 * trans.h (gfc_class_set_vptr): Declare the new function.
790 2024-06-28 Andre Vehreschild <vehre@gcc.gnu.org>
792 * trans-array.cc (structure_alloc_comps): Use reset_vptr.
793 * trans-decl.cc (gfc_trans_deferred_vars): Same.
794 (gfc_generate_function_code): Same.
795 * trans-expr.cc (gfc_reset_vptr): Allow supplying the class
797 (gfc_conv_procedure_call): Use reset_vptr.
798 * trans-intrinsic.cc (gfc_conv_intrinsic_transfer): Same.
800 2024-06-24 Harald Anlauf <anlauf@gmx.de>
803 * trans-array.cc (gfc_conv_array_parameter): Do not dereference
804 data component of a missing allocatable dummy array argument for
805 passing as actual to optional dummy. Harden logic of presence
806 check for optional pointer dummy by using TRUTH_ANDIF_EXPR instead
809 2024-06-20 Paul Thomas <pault@gcc.gnu.org>
812 * dependency.cc (dependency_fcn, gfc_function_dependency): New
813 functions to detect dependency in array bounds and character
814 lengths on old style function results.
815 * dependency.h : Add prototype for gfc_function_dependency.
816 * error.cc (error_print): Remove trailing space.
817 * gfortran.h : Remove dummy_order and add fn_result_spec.
818 * symbol.cc : Remove declaration of next_dummy_order..
819 (gfc_set_sym_referenced): remove setting of symbol dummy order.
820 * trans-array.cc (gfc_trans_auto_array_allocation): Detect
821 non-dummy symbols with function dependencies and put the
822 allocation at the end of the initialization code.
823 * trans-decl.cc : Include dependency.h.
824 (decl_order): New function that determines uses the location
825 field of the symbol 'declared_at' to determine the order of two
827 (gfc_defer_symbol_init): Call gfc_function_dependency to put
828 dependent symbols in the right part of the tlink chain. Use
829 the location field of the symbol declared_at to determine the
830 order of declarations.
831 (gfc_trans_auto_character_variable): Put character length
832 initialization of dependent symbols at the end of the chain.
833 * trans.cc (gfc_add_init_cleanup): Add boolean argument with
834 default false that determines whther an expression is placed at
835 the back or the front of the initialization chain.
836 * trans.h : Update the prototype for gfc_add_init_cleanup.
838 2024-06-19 Harald Anlauf <anlauf@gmx.de>
841 * trans-decl.cc (gfc_conv_cfi_to_gfc): Move derivation of type sizes
842 for character via gfc_trans_vla_type_sizes to after character length
845 2024-06-19 Andre Vehreschild <vehre@gcc.gnu.org>
848 * trans-decl.cc (gfc_generate_function_code): Set vptr for
849 results to declared class type.
850 * trans-expr.cc (gfc_reset_vptr): Allow to provide the typespec
851 instead of the expression.
852 * trans.h (gfc_reset_vptr): Same.
854 2024-06-17 Andre Vehreschild <vehre@gcc.gnu.org>
856 * trans.cc (gfc_deallocate_with_status): Check that object to deref
857 is an array, before applying array deref.
859 2024-06-12 David Malcolm <dmalcolm@redhat.com>
861 * error.cc (gfc_clear_pp_buffer): Likewise.
862 (gfc_warning): Likewise.
863 (gfc_warning_check): Likewise.
864 (gfc_error_opt): Likewise.
865 (gfc_error_check): Likewise.
867 2024-06-07 Andre Vehreschild <vehre@gcc.gnu.org>
870 * trans-array.cc (gfc_trans_array_ctor_element): Eval non-
871 variable expressions once only.
872 (gfc_trans_array_constructor_value): Add statements of
874 (trans_array_constructor): Detect when final block is required.
876 2024-06-07 Andre Vehreschild <vehre@gcc.gnu.org>
879 * expr.cc (gfc_is_alloc_class_scalar_function): Detect
880 allocatable class return types also for user-defined
882 * trans-expr.cc (gfc_conv_procedure_call): Same.
883 (trans_class_vptr_len_assignment): Compute vptr len
884 assignment correctly for user-defined functions.
886 2024-06-05 Jakub Jelinek <jakub@redhat.com>
887 Frederik Harwath <frederik@codesourcery.com>
888 Sandra Loosemore <sandra@codesourcery.com>
890 * gfortran.h (enum gfc_statement): Add ST_OMP_UNROLL,
891 ST_OMP_END_UNROLL, ST_OMP_TILE and ST_OMP_END_TILE.
892 (struct gfc_omp_clauses): Add sizes_list, partial, full and erroneous
894 (enum gfc_exec_op): Add EXEC_OMP_UNROLL and EXEC_OMP_TILE.
895 (gfc_expr_list_len): Declare.
896 * match.h (gfc_match_omp_tile, gfc_match_omp_unroll): Declare.
897 * openmp.cc (gfc_get_location): Declare.
898 (gfc_free_omp_clauses): Free sizes_list.
899 (match_oacc_expr_list): Rename to ...
900 (match_omp_oacc_expr_list): ... this. Add is_omp argument and
901 change diagnostic wording if it is true.
902 (enum omp_mask2): Add OMP_CLAUSE_{FULL,PARTIAL,SIZES}.
903 (gfc_match_omp_clauses): Parse full, partial and sizes clauses.
904 (gfc_match_oacc_wait): Use match_omp_oacc_expr_list instead of
905 match_oacc_expr_list.
906 (OMP_UNROLL_CLAUSES, OMP_TILE_CLAUSES): Define.
907 (gfc_match_omp_tile, gfc_match_omp_unroll): New functions.
908 (resolve_omp_clauses): Diagnose full vs. partial clause conflict.
909 Resolve sizes clause arguments.
910 (find_nested_loop_in_chain): Use switch instead of series of ifs.
911 Handle EXEC_OMP_TILE and EXEC_OMP_UNROLL.
912 (gfc_resolve_omp_do_blocks): Set omp_current_do_collapse to
913 list length of sizes_list if present.
914 (gfc_resolve_do_iterator): Return for EXEC_OMP_TILE or
916 (restructure_intervening_code): Remove spurious ()s around & operands.
917 (is_outer_iteration_variable): Handle EXEC_OMP_TILE and
919 (check_nested_loop_in_chain): Likewise.
920 (expr_is_invariant): Likewise.
921 (resolve_omp_do): Handle EXEC_OMP_TILE and EXEC_OMP_UNROLL. Diagnose
922 tile without sizes clause. Use sizes_list length for count if
923 non-NULL. Set code->ext.omp_clauses->erroneous on loops where we've
924 reported diagnostics. Sorry for mixing non-rectangular loops with
926 (omp_code_to_statement): Handle EXEC_OMP_TILE and EXEC_OMP_UNROLL.
927 (gfc_resolve_omp_directive): Likewise.
928 * parse.cc (decode_omp_directive): Parse end tile, end unroll, tile
929 and unroll. Move nothing entry alphabetically.
930 (case_exec_markers): Add ST_OMP_TILE and ST_OMP_UNROLL.
931 (gfc_ascii_statement): Handle ST_OMP_END_TILE, ST_OMP_END_UNROLL,
932 ST_OMP_TILE and ST_OMP_UNROLL.
933 (parse_omp_do): Add nested argument. Handle ST_OMP_TILE and
935 (parse_omp_structured_block): Adjust parse_omp_do caller.
936 (parse_executable): Likewise. Handle ST_OMP_TILE and ST_OMP_UNROLL.
937 * resolve.cc (gfc_resolve_blocks): Handle EXEC_OMP_TILE and
939 (gfc_resolve_code): Likewise.
940 * st.cc (gfc_free_statement): Likewise.
941 * trans.cc (trans_code): Likewise.
942 * trans-openmp.cc (gfc_trans_omp_clauses): Handle full, partial and
943 sizes clauses. Use tree_cons + nreverse instead of
944 temporary vector and build_tree_list_vec for tile_list handling.
945 (gfc_expr_list_len): New function.
946 (gfc_trans_omp_do): Rename tile to oacc_tile. Handle sizes clause.
947 Don't assert code->op is EXEC_DO. Handle EXEC_OMP_TILE and
949 (gfc_trans_omp_directive): Handle EXEC_OMP_TILE and EXEC_OMP_UNROLL.
950 * dump-parse-tree.cc (show_omp_clauses): Dump full, partial and
952 (show_omp_node): Handle EXEC_OMP_TILE and EXEC_OMP_UNROLL.
953 (show_code_node): Likewise.
955 2024-06-05 Kewen Lin <linkw@linux.ibm.com>
957 * trans-intrinsic.cc (build_round_expr): Use TYPE_PRECISION of
958 long_double_type_node to replace LONG_DOUBLE_TYPE_SIZE.
959 * trans-types.cc (gfc_build_real_type): Use TYPE_PRECISION of
960 {float,double,long_double}_type_node to replace
961 {FLOAT,DOUBLE,LONG_DOUBLE}_TYPE_SIZE.
963 2024-06-04 Harald Anlauf <anlauf@gmx.de>
966 * trans-stmt.cc (gfc_trans_allocate): Restrict special case for
967 source-expression with zero-length character to rank 0, so that
968 the array shape is not discarded.
970 2024-05-29 Andre Vehreschild <vehre@gcc.gnu.org>
973 * trans-expr.cc (gfc_conv_procedure_call): Evaluate
974 expressions with side-effects only ones and ensure
977 2024-05-24 Harald Anlauf <anlauf@gmx.de>
978 Steven G. Kargl <kargl@gcc.gnu.org>
981 * symbol.cc (conflict_std): Helper function for reporting attribute
982 conflicts depending on the Fortran standard version.
983 (conf_std): Helper macro for checking standard-dependent conflicts.
984 (gfc_check_conflict): Use it.
986 2024-05-24 Harald Anlauf <anlauf@gmx.de>
989 * trans-array.cc (gfc_conv_ss_startstride): Use abridged_ref_name
990 to generate a more user-friendly name for bounds-check messages.
991 * trans-expr.cc (gfc_copy_class_to_class): Fix bounds check for
992 rank>1 by looping over the dimensions.
994 2024-05-23 Paul Thomas <pault@gcc.gnu.org>
997 * dependency.cc (gfc_dep_compare_expr): Handle component call
998 expressions. Return -2 as default and return 0 if compared with
999 a function expression that is from an interface body and has
1001 * expr.cc (gfc_reduce_init_expr): If the expression is a comp
1002 call do not attempt to reduce, defer to resolution and return
1004 * trans-types.cc (gfc_get_dtype_rank_type,
1005 gfc_get_nodesc_array_type): Fix whitespace.
1007 2024-05-20 Mikael Morin <mikael@gcc.gnu.org>
1010 * symbol.cc (gfc_release_symbol): Move the condition guarding
1011 the handling cyclic references...
1012 (cyclic_reference_break_needed): ... here as a new predicate.
1013 Remove superfluous parts. Add a condition preventing any premature
1014 release with submodule symbols.
1016 2024-05-20 Tobias Burnus <tburnus@baylibre.com>
1019 * trans-intrinsic.cc (gfc_conv_intrinsic_bound): Fix SHAPE
1020 for zero-size arrays
1022 2024-05-20 Tobias Burnus <tburnus@baylibre.com>
1024 * invoke.texi (fcoarray): Link to OpenCoarrays.org;
1025 mention libcaf_single.
1027 2024-05-17 Paul Thomas <pault@gcc.gnu.org>
1030 * gfortran.h: Add 'assoc_name_inferred' to gfc_namespace.
1031 * match.cc (gfc_match_select_type): Set 'assoc_name_inferred'
1032 in select type namespace if the selector has inferred type.
1033 * primary.cc (gfc_match_varspec): If a select type temporary
1034 is apparently scalar and a left parenthesis has been detected,
1035 check the current namespace has 'assoc_name_inferred' set. If
1036 so, set inferred_type.
1037 * resolve.cc (resolve_variable): If the namespace of a select
1038 type temporary is marked with 'assoc_name_inferred' call
1039 gfc_fixup_inferred_type_refs to ensure references are OK.
1040 (gfc_fixup_inferred_type_refs): Catch invalid array refs..
1042 2024-05-15 Jakub Jelinek <jakub@redhat.com>
1045 * openmp.cc (resolve_omp_clauses): Diagnose grainsize
1046 used together with num_tasks or nogroup used together with
1049 2024-05-13 Paul Thomas <pault@gcc.gnu.org>
1052 * trans-array.cc (gfc_array_init_size): Use the expr3 dtype so
1053 that the correct element size is used.
1054 * trans-expr.cc (gfc_conv_procedure_call): Remove restriction
1055 that ss and ss->loop be present for the finalization of class
1056 array function results.
1057 (trans_class_assignment): Use free and malloc, rather than
1058 realloc, for character expressions assigned to unlimited poly
1060 * trans-stmt.cc (gfc_trans_allocate): Build a correct rhs for
1061 the assignment of an unlimited polymorphic 'source'.
1063 2024-05-12 Harald Anlauf <anlauf@gmx.de>
1065 * primary.cc (gfc_match_varspec): Replace 'ref' argument to
1066 is_inquiry_ref() by NULL when the result is not needed to avoid
1069 2024-05-12 Paul Thomas <pault@gcc.gnu.org>
1074 * iresolve.cc (gfc_resolve_transfer): Emit a TODO error for
1075 unlimited polymorphic mold.
1076 * trans-expr.cc (gfc_resize_class_size_with_len): Use the fold
1077 even if a block is not available in which to fix the result.
1078 (trans_class_assignment): Enable correct assignment of
1079 character expressions to unlimited polymorphic variables using
1080 lhs _len field and rse string_length.
1081 * trans-intrinsic.cc (gfc_conv_intrinsic_storage_size): Extract
1082 the class expression so that the unlimited polymorphic class
1083 expression can be used in gfc_resize_class_size_with_len to
1084 obtain the storage size for character payloads. Guard the use
1085 of GFC_DECL_SAVED_DESCRIPTOR by testing for DECL_LANG_SPECIFIC
1086 to prevent the ICE. Also, invert the order to use the class
1087 expression extracted from the argument.
1088 (gfc_conv_intrinsic_transfer): In same way as 'storage_size',
1089 use the _len field to obtaining the correct length for arg 1.
1090 Add a branch for the element size in bytes of class expressions
1091 with provision to make use of the unlimited polymorphic _len
1092 field. Again, the class references are explicitly identified.
1093 'mold_expr' was already declared. Use it instead of 'arg'. Do
1094 not fix 'dest_word_len' for deferred character sources because
1095 reallocation on assign makes use of it before it is assigned.
1097 2024-05-11 Harald Anlauf <anlauf@gmx.de>
1100 * expr.cc (gfc_traverse_expr): An inquiry ref does not constitute
1101 a dependency and cannot collide with a symbol.
1103 2024-05-05 Harald Anlauf <anlauf@gmx.de>
1106 * trans-array.cc (gfc_alloc_allocatable_for_assignment): Take into
1107 account _len of unlimited polymorphic entities when calculating
1108 the effective element size for allocation size and array span.
1109 Set _len of lhs to _len of rhs.
1110 * trans-expr.cc (trans_class_assignment): Take into account _len
1111 of unlimited polymorphic entities for allocation size.
1113 2024-04-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1115 * expr.cc (check_transformational): Add SELECTED_LOGICAL_KIND
1116 to allowed functions for Fortran 2023.
1117 * gfortran.h (GFC_ISYM_SL_KIND): New.
1118 * gfortran.texi: Mention SELECTED_LOGICAL_KIND.
1119 * intrinsic.cc (add_functions): Add SELECTED_LOGICAL_KIND.
1120 (gfc_intrinsic_func_interface): Allow it in initialization
1122 * intrinsic.h (gfc_simplify_selected_logical_kind): New proto.
1123 * intrinsic.texi: Add SELECTED_LOGICAL_KIND.
1124 * simplify.cc (gfc_simplify_selected_logical_kind): New
1126 * trans-decl.cc (gfc_build_intrinsic_function_decls): Initialize
1127 gfor_fndecl_sl_kind.
1128 * trans-intrinsic.cc (gfc_conv_intrinsic_sl_kind): New function.
1129 (gfc_conv_intrinsic_function): Call it for GFC_ISYM_SL_KIND.
1130 * trans.h (gfor_fndecl_sl_kind): New symbol.
1132 2024-04-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1134 * iso-fortran-env.def: Add logical{8,16,32,64} and
1135 real16 named constants.
1137 2024-04-29 Paul Thomas <pault@gcc.gnu.org>
1140 * trans-expr.cc (gfc_trans_class_init_assign): Return NULL_TREE
1141 if the default initializer has all NULL fields. Guard this
1142 by a requirement that the code not be EXEC_INIT_ASSIGN and that
1143 the object be an INTENT_OUT dummy.
1144 * trans-stmt.cc (gfc_trans_allocate): Change the initializer
1145 code for allocate with mold to EXEC_ALLOCATE to allow an
1146 initializer with all NULL fields.
1148 2024-04-25 Paul Thomas <pault@gcc.gnu.org>
1151 * trans-expr.cc (gfc_conv_procedure_call): Use the interface,
1152 where possible, to obtain the type of character procedure
1153 pointers of class entities.
1155 2024-04-25 Paul Thomas <pault@gcc.gnu.org>
1156 Jakub Jelinek <jakub@gcc.gnu.org>
1159 * decl.cc (build_sym): Add an extra argument 'elem'. If 'elem'
1160 is greater than 1, gfc_new_charlen is called to generate a new
1161 charlen, registered in the symbol namespace.
1162 (variable_decl, enumerator_decl): Set the new argument in the
1165 2024-04-21 Paul Thomas <pault@gcc.gnu.org>
1168 * resolve.cc (resolve_actual_arglist): Catch variables silently
1169 set as untyped, resetting the flag so that gfc_resolve_expr can
1170 generate the no implicit type error.
1171 (gfc_resolve_index_1): Block index expressions of unknown type
1172 from being converted to default integer, avoiding the fatal
1173 error in trans-decl.cc.
1174 * symbol.cc (gfc_set_default_type): Remove '(symbol)' from the
1175 'no IMPLICIT type' error message.
1176 * trans-decl.cc (gfc_get_symbol_decl): Change fatal error locus
1177 to that of the symbol declaration.
1178 (gfc_trans_deferred_vars): Remove two trailing tabs.
1180 2024-04-18 Paul Thomas <pault@gcc.gnu.org>
1183 * primary.cc (gfc_match_varspec): Check for default type before
1184 checking for derived types with the right component name.
1186 2024-04-16 Harald Anlauf <anlauf@gmx.de>
1189 * resolve.cc (resolve_allocate_expr): Reject ALLOCATE with SOURCE=
1190 or MOLD= specifier for unequal length.
1191 * trans-stmt.cc (gfc_trans_allocate): If an allocatable character
1192 variable has fixed length, use it and do not use the source length.
1193 With bounds-checking enabled, add a runtime check for same length.
1195 2024-04-10 Harald Anlauf <anlauf@gmx.de>
1198 * check.cc (is_c_interoperable): Fix checks for C_SIZEOF.
1199 (gfc_check_c_f_pointer): Reject function returning a pointer as FPTR,
1200 and improve an error message.
1202 2024-04-09 Paul Thomas <pault@gcc.gnu.org>
1205 * resolve.cc (resolve_symbol): Remove last chunk that checked
1206 for finalization of unreferenced symbols.
1208 2024-04-09 Paul Thomas <pault@gcc.gnu.org>
1211 * trans-expr.cc (gfc_trans_pointer_assignment): Remove assert
1212 causing the ICE since it was unnecesary.
1214 2024-04-02 Paul Thomas <pault@gcc.gnu.org>
1217 * interface.cc (gfc_compare_interfaces): Add error for a
1218 subroutine proc pointer passed to a variable formal.
1219 (compare_parameter): If a procedure pointer is being passed to
1220 a non-procedure formal arg, and there is an an interface, use
1221 gfc_compare_interfaces to check and provide a more useful error
1224 2024-04-02 Paul Thomas <pault@gcc.gnu.org>
1227 * resolve.cc (resolve_procedure_expression): Change the test for
1228 for recursion in the case of hidden procedures from modules.
1229 (resolve_typebound_static): Add warning for possible recursive
1230 calls to typebound procedures.
1231 * trans-expr.cc (gfc_trans_class_init_assign): Do not apply
1232 default initializer to class dummy where component initializers
1235 2024-03-29 Harald Anlauf <anlauf@gmx.de>
1238 * trans-expr.cc (gfc_conv_structure): Check for NULL pointer.
1240 2024-03-29 Paul Thomas <pault@gcc.gnu.org>
1245 * trans-expr.cc (gfc_trans_assignment_1): Place finalization
1246 block before rhs post block for elemental rhs.
1247 * trans.cc (gfc_finalize_tree_expr): Check directly if a type
1248 has no components, rather than the zero components attribute.
1249 Treat elemental zero component expressions in the same way as
1252 2024-03-28 Harald Anlauf <anlauf@gmx.de>
1255 * primary.cc (gfc_variable_attr): Catch variables used in structure
1256 constructors within DATA statements that are still tagged with a
1257 temporary type BT_PROCEDURE from match_actual_arg and which have the
1258 target attribute, and fix their typespec.
1260 2024-03-28 Mikael Morin <mikael@gcc.gnu.org>
1261 Harald Anlauf <anlauf@gmx.de>
1265 * expr.cc (check_restricted): In submodules, allow variables host-
1266 associated from the parent module.
1268 2024-03-22 Harald Anlauf <anlauf@gmx.de>
1271 * interface.cc (gfc_compare_actual_formal): Skip size check for
1272 NULL() actual without MOLD argument.
1274 2024-03-22 Mikael Morin <mikael@gcc.gnu.org>
1277 * gfortran.h (gfc_save_module_list, gfc_restore_old_module_list):
1279 * module.cc (old_module_list_tail): New global variable.
1280 (gfc_save_module_list, gfc_restore_old_module_list): New functions.
1281 (gfc_use_modules): Set module_list and old_module_list_tail.
1282 * parse.cc (next_statement): Save module_list before doing any work.
1283 (reject_statement): Restore module_list to its saved value.
1285 2024-03-22 Mikael Morin <mikael@gcc.gnu.org>
1288 * symbol.cc (gfc_get_procedure_ns, gfc_get_spec_ns): New functions.
1289 * gfortran.h (gfc_get_procedure_ns, gfc_get_spec ns): Declare them.
1290 (gfc_is_formal_arg): Remove.
1291 * expr.cc (check_restricted): Remove special case allowing local
1292 variable in dummy argument bound expressions. Use gfc_get_spec_ns
1293 to get the right namespace.
1294 * resolve.cc (gfc_is_formal_arg, formal_arg_flag): Remove.
1295 (gfc_resolve_formal_arglist): Set gfc_current_ns. Quit loop and
1296 restore gfc_current_ns instead of early returning.
1297 (resolve_symbol): Factor common array spec resolution code to...
1298 (resolve_symbol_array_spec): ... this new function. Additionnally
1299 set and restore gfc_current_ns.
1301 2024-03-21 Harald Anlauf <anlauf@gmx.de>
1304 * trans-array.cc (abridged_ref_name): New helper function.
1305 (trans_array_bound_check): Use it.
1306 (array_bound_check_elemental): Likewise.
1307 (gfc_conv_array_ref): Likewise.
1309 2024-03-20 Jakub Jelinek <jakub@redhat.com>
1311 * trans-array.cc (structure_alloc_comps): Use integer_zero_node
1312 instead of build_zero_cst (integer_type_node) or
1313 build_int_cst (integer_type_node, 0) and integer_one_node instead of
1314 build_int_cst (integer_type_node, 1).
1315 * trans-expr.cc (conv_scalar_char_value): Likewise.
1316 * trans-stmt.cc (gfc_trans_form_team, gfc_trans_change_team,
1317 gfc_trans_sync_team, gfc_trans_sync): Likewise.
1318 * trans-decl.cc (create_main_function): Likewise.
1319 * trans-intrinsic.cc (trans_this_image, conv_intrinsic_move_alloc):
1321 * trans.cc (gfc_allocate_using_caf_lib, gfc_deallocate_with_status):
1324 2024-03-18 Harald Anlauf <anlauf@gmx.de>
1327 * frontend-passes.cc (check_externals_expr): Prevent invalid read
1328 in case of mismatch of external subroutine with function.
1330 2024-03-17 Harald Anlauf <anlauf@gmx.de>
1333 * trans-array.cc (gfc_get_dataptr_offset): Check for optional
1334 arguments being present before dereferencing data pointer.
1336 2024-03-15 Paul Thomas <pault@gcc.gnu.org>
1343 * class.cc (gfc_change_class): New function needed for
1344 associate names, when rank changes or a derived type is
1345 produced by resolution
1346 * dump-parse-tree.cc (show_code_node): Make output for SELECT
1347 TYPE more comprehensible.
1348 * expr.cc (find_inquiry_ref): Do not simplify expressions of
1350 * gfortran.h : Add 'gfc_association_list' to structure
1351 'gfc_association_list'. Add prototypes for
1352 'gfc_find_derived_types', 'gfc_fixup_inferred_type_refs' and
1353 'gfc_change_class'. Add macro IS_INFERRED_TYPE.
1354 * match.cc (copy_ts_from_selector_to_associate): Add bolean arg
1355 'select_type' with default false. If this is a select type name
1356 and the selector is a inferred type, build the class type and
1357 apply it to the associate name.
1358 (build_associate_name): Pass true to 'select_type' in call to
1360 * parse.cc (parse_associate): If the selector is inferred type
1361 the associate name is too. Make sure that function selector
1362 class and rank, if known, are passed to the associate name. If
1363 a function result exists, pass its typespec to the associate
1365 * primary.cc (resolvable_fcns): New function to check that all
1366 the function references are resolvable.
1367 (gfc_match_varspec): If a scalar derived type select type
1368 temporary has an array reference, match the array reference,
1369 treating this in the same way as an equivalence member. Do not
1370 set 'inquiry' if applied to an unknown type the inquiry name
1371 is ambiguous with the component of an accessible derived type.
1372 Check that resolution of the target expression is OK by testing
1373 if the symbol is declared or is an operator expression, then
1374 using 'resolvable_fcns' recursively. If all is well, resolve
1375 the expression. If this is an inferred type with a component
1376 reference, call 'gfc_find_derived_types' to find a suitable
1377 derived type. If there is an inquiry ref and the symbol either
1378 is of unknown type or is inferred to be a derived type, set the
1379 primary and symbol TKR appropriately.
1380 * resolve.cc (resolve_variable): Call new function below.
1381 (gfc_fixup_inferred_type_refs): New function to ensure that the
1382 expression references for a inferred type are consistent with
1383 the now fixed up selector.
1384 (resolve_assoc_var): Ensure that derived type or class function
1385 selectors transmit the correct arrayspec to the associate name.
1386 (resolve_select_type): If the selector is an associate name of
1387 inferred type and has no component references, the associate
1388 name should have its typespec. Simplify the conversion of a
1389 class array to class scalar by calling 'gfc_change_class'.
1390 Make sure that a class, inferred type selector with an array
1391 ref transfers the typespec from the symbol to the expression.
1392 * symbol.cc (gfc_set_default_type): If an associate name with
1393 unknown type has a selector expression, try resolving the expr.
1394 (find_derived_types, gfc_find_derived_types): New functions
1395 that search for a derived type with a given name.
1396 * trans-expr.cc (gfc_conv_variable): Some inferred type exprs
1397 escape resolution so call 'gfc_fixup_inferred_type_refs'.
1398 * trans-stmt.cc (trans_associate_var): Tidy up expression for
1399 'class_target'. Finalize and free class function results.
1400 Correctly handle selectors that are class functions and class
1401 array references, passed as derived types.
1403 2024-03-14 Thomas Schwinge <thomas@codesourcery.com>
1405 * dump-parse-tree.cc (show_omp_clauses): Handle 'self_expr'.
1406 * openmp.cc (gfc_free_omp_clauses): Likewise.
1407 * trans-openmp.cc (gfc_split_omp_clauses): Don't handle 'self_expr'.
1409 2024-03-14 Chung-Lin Tang <cltang@baylibre.com>
1411 * dump-parse-tree.cc (show_omp_namelist): Print "readonly," for
1412 OMP_LIST_MAP and OMP_LIST_CACHE if n->u.map.readonly is set.
1413 Adjust 'n->u.map_op' to 'n->u.map.op'.
1414 * gfortran.h (typedef struct gfc_omp_namelist): Adjust map_op as
1415 'ENUM_BITFIELD (gfc_omp_map_op) op:8', add 'bool readonly' field,
1416 change to named struct field 'map'.
1417 * openmp.cc (gfc_match_omp_map_clause): Adjust 'n->u.map_op' to
1419 (gfc_match_omp_clause_reduction): Likewise.
1420 (gfc_match_omp_clauses): Add readonly modifier parsing for OpenACC
1421 copyin clause, set 'n->u.map.op' and 'n->u.map.readonly' for parsed
1422 clause. Adjust 'n->u.map_op' to 'n->u.map.op'.
1423 (gfc_match_oacc_declare): Adjust 'n->u.map_op' to 'n->u.map.op'.
1424 (gfc_match_oacc_cache): Add readonly modifier parsing for OpenACC
1426 (resolve_omp_clauses): Adjust 'n->u.map_op' to 'n->u.map.op'.
1427 * trans-decl.cc (add_clause): Adjust 'n->u.map_op' to 'n->u.map.op'.
1428 (finish_oacc_declare): Likewise.
1429 * trans-openmp.cc (gfc_trans_omp_clauses): Set OMP_CLAUSE_MAP_READONLY,
1430 OMP_CLAUSE__CACHE__READONLY to 1 when readonly is set. Adjust
1431 'n->u.map_op' to 'n->u.map.op'.
1432 (gfc_add_clause_implicitly): Adjust 'n->u.map_op' to 'n->u.map.op'.
1434 2024-03-13 Harald Anlauf <anlauf@gmx.de>
1437 * expr.cc (gfc_is_simply_contiguous): Adjust logic so that CLASS
1438 symbols are also handled.
1440 2024-03-13 Tobias Burnus <tburnus@baylibre.com>
1443 * trans-openmp.cc (gfc_omp_predetermined_mapping): Map dummy
1444 procedures as firstprivate.
1446 2024-03-12 Harald Anlauf <anlauf@gmx.de>
1449 * array.cc (gfc_array_dimen_size): When walking the ref chain of an
1450 array and the ultimate component is a procedure pointer, do not try
1451 to figure out its dimension even if it is a array-valued function.
1453 2024-03-06 Harald Anlauf <anlauf@gmx.de>
1457 * arith.cc (is_hard_arith_error): New helper function to determine
1458 whether an arithmetic error is "hard" or not.
1459 (check_result): Use it.
1460 (gfc_arith_divide): Set "Division by zero" only for regular
1461 numerators of real and complex divisions.
1462 (reduce_unary): Use is_hard_arith_error to determine whether a hard
1463 or (recoverable) soft error was encountered. Terminate immediately
1464 on hard error, otherwise remember code of first soft error.
1465 (reduce_binary_ac): Likewise.
1466 (reduce_binary_ca): Likewise.
1467 (reduce_binary_aa): Likewise.
1469 2024-03-01 Harald Anlauf <anlauf@gmx.de>
1472 * check.cc (gfc_check_null): Handle nested NULL()s.
1473 (is_c_interoperable): Check for MOLD argument of NULL() as part of
1474 the interoperability check.
1475 * interface.cc (gfc_compare_actual_formal): Extend checks for NULL()
1476 actual arguments for presence of MOLD argument when required by
1479 2024-02-29 Alexander Westbrooks <alexanderw@gcc.gnu.org>
1484 * decl.cc (gfc_get_pdt_instance): Set the PDT instance field
1485 'f2k_derived', if not set already, to point to the given
1486 PDT template 'f2k_derived' namespace in order to give the
1487 PDT instance referential access to the typebound procedures
1489 * gfortran.h (gfc_pdt_is_instance_of): Add prototype.
1490 * resolve.cc (resolve_typebound_procedure): If the derived type
1491 does not have the attribute 'pdt_template' set, compare the
1492 dummy argument to the 'resolve_bindings_derived' type like usual.
1493 If the derived type is a 'pdt_template', then check if the
1494 dummy argument is an instance of the PDT template. If the derived
1495 type is a PDT template, and the dummy argument is an instance of
1496 that template, but the dummy argument 'param_list' is not
1497 SPEC_ASSUMED, check if there are any LEN parameters in the
1498 dummy argument. If there are no LEN parameters, then this implies
1499 that there are only KIND parameters in the dummy argument.
1500 If there are LEN parameters, this would be an error, for all
1501 LEN parameters for the dummy argument MUST be assumed for
1502 typebound procedures of PDTs.
1503 (resolve_pdt): Add a check for ALLOCATABLE and POINTER attributes for
1504 SPEC_DEFERRED parameters of PDT class symbols. ALLOCATABLE and
1505 POINTER attributes for a PDT class symbol are stored in the
1506 'class_pointer' and 'allocatable' attributes of the '_data'
1507 component respectively.
1508 * symbol.cc (gfc_pdt_is_instance_of): New function.
1510 2024-02-26 Harald Anlauf <anlauf@gmx.de>
1513 * trans-expr.cc (gfc_conv_procedure_call): Evaluate non-trivial
1514 arguments just once before assigning to an unlimited polymorphic
1517 2024-02-23 Steve Kargl <kargl@gcc.gnu.org>
1518 Harald Anlauf <anlauf@gmx.de>
1521 * trans-stmt.cc (gfc_trans_allocate): When a source expression has
1522 substring references, part-refs, or %re/%im inquiries, wrap the
1523 entity in parentheses to force evaluation of the expression.
1525 2024-02-23 Tobias Burnus <tburnus@baylibre.com>
1527 * openmp.cc (gfc_match_omp_depobj): Use OPT_Wopenmp
1528 as warning category in gfc_warning.
1530 2024-02-20 Peter Hill <peter.hill@york.ac.uk>
1533 * trans-expr.cc (gfc_conv_intrinsic_to_class): When passing an
1534 array component reference of intrinsic type to a procedure
1535 with an unlimited polymorphic dummy argument, a temporary
1538 2024-02-17 Jakub Jelinek <jakub@redhat.com>
1541 * trans-expr.cc (alloc_scalar_allocatable_subcomponent): Don't
1542 overwrite expr2->ts.u.cl->backend_decl, instead set size to
1543 expr2->ts.u.cl->backend_decl first and use size instead of
1544 expr2->ts.u.cl->backend_decl.
1545 (gfc_trans_subcomponent_assign): Emit se.pre into block
1546 before calling alloc_scalar_allocatable_subcomponent instead of
1549 2024-02-17 Harald Anlauf <anlauf@gmx.de>
1552 * trans-array.cc (gfc_trans_deferred_array): Do not clobber
1553 deferred length for a character variable passed as dummy argument.
1555 2024-02-15 Kwok Cheung Yeung <kcyeung@baylibre.com>
1557 * dump-parse-tree.cc (show_attr): Handle omp_declare_target_indirect
1559 * f95-lang.cc (gfc_gnu_attributes): Add entry for 'omp declare
1561 * gfortran.h (symbol_attribute): Add omp_declare_target_indirect
1563 (struct gfc_omp_clauses): Add indirect field.
1564 * openmp.cc (omp_mask2): Add OMP_CLAUSE_INDIRECT.
1565 (gfc_match_omp_clauses): Match indirect clause.
1566 (OMP_DECLARE_TARGET_CLAUSES): Add OMP_CLAUSE_INDIRECT.
1567 (gfc_match_omp_declare_target): Check omp_device_type and apply
1568 omp_declare_target_indirect attribute to symbol if indirect clause
1569 active. Show warning if there are only device_type and/or indirect
1570 clauses on the directive.
1571 * trans-decl.cc (add_attributes_to_decl): Add 'omp declare target
1572 indirect' attribute if symbol has indirect attribute set.
1574 2024-02-14 Steve Kargl <kargl@gcc.gnu.org>
1577 * trans-io.cc (transfer_namelist_element): When building the
1578 namelist object name, if the use rename attribute is set, use
1579 the local name specified in the use statement.
1581 2024-02-14 Jakub Jelinek <jakub@redhat.com>
1583 * error.cc (error_print): For u printing of ptrdiff_t,
1584 print ptrdiff_t argument converted to unsigned long long and
1585 masked with 2ULL * PTRDIFF_MAX + 1.
1587 2024-02-13 Tobias Burnus <tburnus@baylibre.com>
1589 PR middle-end/113904
1590 * trans-openmp.cc (gfc_trans_omp_declare_variant): Handle splitting of
1591 OMP_TRAIT_PROPERTY_EXPR into OMP_TRAIT_PROPERTY_{DEV_NUM,BOOL}_EXPR.
1592 * openmp.cc (gfc_match_omp_context_selector): Likewise; rejects
1593 non-const device_num/condition; improve diagnostic.
1595 2024-02-13 Harald Anlauf <anlauf@gmx.de>
1598 * trans-expr.cc (gfc_conv_procedure_call): When passing an optional
1599 dummy argument to an optional dummy argument of a bind(c) procedure
1600 and the dummy argument is passed via a CFI descriptor, no special
1601 presence check and passing of a default NULL pointer is needed.
1603 2024-02-13 Steve Kargl <kargl@gcc.gnu.org>
1606 * trans-array.cc (gfc_trans_deferred_array): Set length to zero,
1607 avoiding extraneous diagnostics.
1609 2024-02-10 Jakub Jelinek <jakub@redhat.com>
1611 * error.cc (error_print): Handle z and t modifiers on d, i and u.
1612 * check.cc (gfc_check_transfer): Use %zd instead of %ld and casts to
1614 * primary.cc (gfc_convert_to_structure_constructor): Use %td instead
1615 of %ld and casts to long.
1617 2024-02-10 Jakub Jelinek <jakub@redhat.com>
1619 * trans-common.cc (build_common_decl): Use %wu instead of %lu and
1620 casts to unsigned long.
1621 * resolve.cc (resolve_ordinary_assign): Use %wd instead of %ld and
1623 * array.cc (gfc_resolve_character_array_constructor): Likewise.
1624 * data.cc (create_character_initializer): Likewise.
1626 2024-02-09 Harald Anlauf <anlauf@gmx.de>
1629 * arith.cc (reduce_unary): Remember any overflow encountered during
1630 reduction of unary arithmetic operations on array constructors and
1631 continue, and return error status, but terminate on serious errors.
1633 2024-01-28 Harald Anlauf <anlauf@gmx.de>
1636 * trans-expr.cc (conv_dummy_value): Treat NULL actual argument to
1637 optional dummy with the VALUE attribute as not present.
1638 (gfc_conv_procedure_call): Likewise.
1640 2024-01-27 Harald Anlauf <anlauf@gmx.de>
1643 * trans-array.cc (gfc_conv_array_ref): Restrict use of transformed
1644 descriptor (sym->backend_decl) to the unlimited polymorphic case.
1646 2024-01-24 Harald Anlauf <anlauf@gmx.de>
1649 * trans-expr.cc (conv_dummy_value): New.
1650 (gfc_conv_procedure_call): Factor code for handling dummy arguments
1651 with the VALUE attribute in the scalar case into conv_dummy_value().
1652 Reuse and adjust for calling elemental procedures.
1654 2024-01-21 Harald Anlauf <anlauf@gmx.de>
1657 * trans-expr.cc (gfc_conv_procedure_call): Fix handling of optional
1658 scalar arguments of intrinsic type with the VALUE attribute.
1660 2024-01-20 Mikael Morin <mikael@gcc.gnu.org>
1664 * parse.cc: Restore current interface to its previous value on error.
1666 2024-01-19 Harald Anlauf <anlauf@gmx.de>
1669 * trans-array.cc (array_bound_check_elemental): Array bounds check
1670 shall apply here to elemental dimensions of an array section only.
1672 2024-01-13 Harald Anlauf <anlauf@gmx.de>
1675 * trans-intrinsic.cc (gfc_conv_intrinsic_ishftc): Handle optional
1676 dummy argument for SIZE passed to ISHFTC. Set default value to
1677 BIT_SIZE(I) when missing.
1679 2024-01-13 Harald Anlauf <anlauf@gmx.de>
1682 * gfortran.h (gfc_loop_annot): New.
1683 (gfc_iterator, gfc_forall_iterator): Use for annotation control.
1684 * array.cc (gfc_copy_iterator): Adjust.
1685 * gfortran.texi: Document annotations IVDEP, UNROLL n, VECTOR,
1686 NOVECTOR as applied to DO CONCURRENT.
1687 * parse.cc (parse_do_block): Parse annotations IVDEP, UNROLL n,
1688 VECTOR, NOVECTOR as applied to DO CONCURRENT. Apply UNROLL only to
1689 first loop control variable.
1690 * trans-stmt.cc (iter_info): Use gfc_loop_annot.
1691 (gfc_trans_simple_do): Adjust.
1692 (gfc_trans_forall_loop): Annotate loops with IVDEP, UNROLL n,
1693 VECTOR, NOVECTOR as needed for DO CONCURRENT.
1694 (gfc_trans_forall_1): Handle loop annotations.
1696 2024-01-08 Harald Anlauf <anlauf@gmx.de>
1699 * trans-intrinsic.cc (gfc_conv_intrinsic_size): Use
1700 gfc_conv_expr_present() for proper check of optional DIM argument.
1702 2024-01-06 Harald Anlauf <anlauf@gmx.de>
1703 José Rui Faustino de Sousa <jrfsousa@gmail.com>
1706 * iresolve.cc (gfc_resolve_repeat): Force conversion to
1707 gfc_charlen_int_kind before call to gfc_multiply.
1709 2024-01-04 David Malcolm <dmalcolm@redhat.com>
1711 * lang.opt.urls: New file, autogenerated by
1712 regenerate-opt-urls.py.
1714 2024-01-03 Harald Anlauf <anlauf@gmx.de>
1716 * trans-types.cc (gfc_get_nodesc_array_type): Clear used gmp
1719 2024-01-03 Jakub Jelinek <jakub@redhat.com>
1721 * gfortranspec.cc (lang_specific_driver): Update copyright notice
1723 * gfc-internals.texi: Bump @copying's copyright year.
1724 * gfortran.texi: Ditto.
1725 * intrinsic.texi: Ditto.
1726 * invoke.texi: Ditto.
1729 Copyright (C) 2024 Free Software Foundation, Inc.
1731 Copying and distribution of this file, with or without modification,
1732 are permitted in any medium without royalty provided the copyright
1733 notice and this notice are preserved.