]> gcc.gnu.org Git - gcc.git/blob - gcc/fortran/ChangeLog
Daily bump.
[gcc.git] / gcc / fortran / ChangeLog
1 2023-03-22 Harald Anlauf <anlauf@gmx.de>
2 Steven G. Kargl <kargl@gcc.gnu.org>
3
4 PR fortran/104572
5 * resolve.cc (gfc_resolve_finalizers): Argument of a FINAL subroutine
6 cannot be an alternate return.
7
8 2023-03-21 Harald Anlauf <anlauf@gmx.de>
9
10 PR fortran/99036
11 * decl.cc (gfc_match_modproc): Reject MODULE PROCEDURE if not in a
12 generic module interface.
13
14 2023-03-21 Arsen Arsenović <arsen@aarsen.me>
15
16 * invoke.texi: Remove usages of @gol.
17 * intrinsic.texi: Ditto.
18
19 2023-03-21 Paul Thomas <pault@gcc.gnu.org>
20
21 PR fortran/109206
22 * trans-array.cc (gfc_trans_array_constructor_value): Correct
23 incorrect setting of typespec.
24
25 2023-03-21 Paul Thomas <pault@gcc.gnu.org>
26
27 PR fortran/109209
28 * resolve.cc (generate_component_assignments): Restore the
29 exclusion of allocatable components from the loop.
30
31 2023-03-20 Harald Anlauf <anlauf@gmx.de>
32
33 PR fortran/109216
34 * invoke.texi: Correct documentation of how underscores are appended
35 to external names.
36
37 2023-03-20 Harald Anlauf <anlauf@gmx.de>
38
39 PR fortran/109186
40 * simplify.cc (gfc_simplify_nearest): Fix off-by-one error in setting
41 up real kind-specific maximum exponent for mpfr.
42
43 2023-03-20 Paul Thomas <pault@gcc.gnu.org>
44
45 PR fortran/87127
46 * resolve.cc (check_host_association): If an external function
47 is typed but not declared explicitly to be external, change the
48 old symbol from a variable to an external function.
49
50 2023-03-19 Harald Anlauf <anlauf@gmx.de>
51
52 PR fortran/85877
53 * resolve.cc (resolve_fl_procedure): Check for an explicit interface
54 of procedures with the BIND(C) attribute (F2018:15.4.2.2).
55
56 2023-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
57
58 * gfortran.texi: Mention behavior on overflow.
59
60 2023-03-18 Paul Thomas <pault@gcc.gnu.org>
61
62 PR fortran/103854
63 PR fortran/96122
64 PR fortran/37336
65 * class.cc (finalize_component): Include the missing arguments
66 in the call to the component's finalizer wrapper.
67 (has_finalizer_component): Do not return true for procedure
68 pointer components.
69 (finalizer_insert_packed_call): Remove the redundant argument
70 in the call to the final subroutine.
71 (generate_finalization_wrapper): Add support for assumed rank
72 finalizers.
73 (gfc_may_be_finalized): New helper function.
74 * dump-parse-tree.cc (write_proc): Whitespace.
75 * gfortran.h : Add prototype for gfc_may_be_finalized.
76 * resolve.cc (resolve_function): Correct derived types that
77 have an incomplete namespace.
78 (resolve_where, gfc_resolve_where_code_in_forall,
79 gfc_resolve_forall_body, gfc_resolve_code): Check that the op
80 code is still EXEC_ASSIGN. If it is set lhs to must finalize.
81 (is_finalizable_type): New function.
82 (generate_component_assignments): Set must_finalize if needed.
83 (gfc_resolve_finalizers): Error if assumed rank finalizer is
84 not the only one. Warning on lack of scalar finalizer modified
85 to account for assumed rank finalizers.
86 (generate_final_call): New function.
87 (generate_component_assignments): Enclose the outermost call in
88 a block to capture automatic deallocation and final calls.
89 Set must_finalize as required to satisfy the standards. Use an
90 explicit pointer assignment for pointer components to capture
91 finalization of the target. Likewise use explicit assignment
92 for allocatable components. Do not use the temporary copy of
93 the lhs in defined assignment if the component is allocatable.
94 Put the temporary in the same namespace as the lhs symbol if
95 the component may be finalized. Remove the leading assignment
96 from the expansion of assignment of components that have their
97 own defined assignment components. Suppress finalization of
98 assignment of temporary components to the lhs. Make an explicit
99 final call for the rhs function temporary if it exists.
100 (gfc_resolve_code): Set must_finalize for assignments with an
101 array constructor on the rhs.
102 (gfc_resolve_finalizers): Ensure that an assumed rank finalizer
103 is the only finalizer for that type and correct the surprising
104 warning for the lack of a scalar finalizer.
105 (check_defined_assignments): Handle allocatable components.
106 (resolve_fl_derived): Set referenced the vtab for use
107 associated symbols.
108 (resolve_symbol): Set referenced an unreferenced symbol that
109 will be finalized.
110 * trans-array.cc (gfc_trans_array_constructor_value): Add code
111 to finalize the constructor result. Warn that this feature was
112 removed in F2018 and that it is suppressed by -std=2018.
113 (trans_array_constructor): Add finalblock, pass to previous
114 and apply to loop->post if filled.
115 (gfc_add_loop_ss_code): Add se finalblock to outer loop post.
116 (gfc_trans_array_cobounds, gfc_trans_array_bounds): Add any
117 generated finalization code to the main block.
118 (structure_alloc_comps): Add boolean argument to suppress
119 finalization and use it for calls from
120 gfc_deallocate_alloc_comp_no_caf. Otherwise it defaults to
121 false.
122 (gfc_copy_alloc_comp_no_fini): New wrapper for
123 structure_alloc_comps.
124 (gfc_alloc_allocatable_for_assignment): Suppress finalization
125 by setting new arg in call to gfc_deallocate_alloc_comp_no_caf.
126 (gfc_trans_deferred_array): Use gfc_may_be_finalized and do not
127 deallocate the components of entities with a leading '_' in the
128 name that are also marked as artificial.
129 * trans-array.h : Add the new boolean argument to the prototype
130 of gfc_deallocate_alloc_comp_no_caf with a default of false.
131 Add prototype for gfc_copy_alloc_comp_no_fini.
132 * trans-decl.cc(init_intent_out_dt): Tidy up the code.
133 * trans-expr.cc (gfc_init_se): Initialize finalblock.
134 (gfc_conv_procedure_call): Use gfc_finalize_tree_expr to
135 finalize function results. Replace in-line block for class
136 results with call to new function.
137 (gfc_conv_expr): Finalize structure constructors for F2003 and
138 F2008. Warn that this feature was deleted in F2018 and, unlike
139 array constructors, is not default. Add array constructor
140 finalblock to the post block.
141 (gfc_trans_scalar_assign): Suppress finalization by setting new
142 argument in call to gfc_deallocate_alloc_comp_no_caf. Add the
143 finalization blocks to the main block.
144 (gfc_trans_arrayfunc_assign): Use gfc_assignment_finalizer_call
145 and ensure that finalization occurs after the evaluation of the
146 rhs but using the initial value for the lhs. Finalize rhs
147 function results using gfc_finalize_tree_expr.
148 (trans_class_assignment, gfc_trans_assignment_1): As previous
149 function, taking care to order evaluation, assignment and
150 finalization correctly.
151 * trans-io.cc (gfc_trans_transfer): Add the final block.
152 * trans-stmt.cc (gfc_trans_call, gfc_trans_allocate): likewise.
153 (trans_associate_var): Nullify derived allocatable components
154 and finalize function targets with defined assignment
155 components on leaving the block scope.
156 (trans_allocate): Finalize source expressions, if required,
157 and set init_expr artificial temporarily to suppress the
158 finalization in gfc_trans_assignment.
159 * trans.cc (gfc_add_finalizer_call): Do not finalize the
160 temporaries generated in type assignment with defined
161 assignment components.
162 (gfc_assignment_finalizer_call): New function.
163 (gfc_finalize_tree_expr): New function.
164 * trans.h: Add finalblock to gfc_se. Add the prototypes for
165 gfc_finalize_tree_expr and gfc_assignment_finalizer_call.
166
167 2023-03-15 Harald Anlauf <anlauf@gmx.de>
168 Tobias Burnus <tobias@codesourcery.com>
169
170 PR fortran/58331
171 * interface.cc (compare_parameter): Adjust check of array dummy
172 arguments to handle the case of CLASS variables.
173
174 2023-03-11 Harald Anlauf <anlauf@gmx.de>
175
176 PR fortran/106945
177 * trans-expr.cc (gfc_copy_class_to_class): Convert element counts in
178 bounds check to common type for comparison.
179
180 2023-03-10 Harald Anlauf <anlauf@gmx.de>
181
182 PR fortran/104332
183 * resolve.cc (resolve_symbol): Avoid NULL pointer dereference while
184 checking a symbol with the BIND(C) attribute.
185
186 2023-03-05 Harald Anlauf <anlauf@gmx.de>
187 Tobias Burnus <tobias@codesourcery.com>
188
189 PR fortran/106856
190 * class.cc (gfc_build_class_symbol): Handle update of attributes of
191 existing class container.
192 (gfc_find_derived_vtab): Fix several memory leaks.
193 (find_intrinsic_vtab): Ditto.
194 * decl.cc (attr_decl1): Manage update of symbol attributes from
195 CLASS attributes.
196 * primary.cc (gfc_variable_attr): OPTIONAL shall not be taken or
197 updated from the class container.
198 * symbol.cc (free_old_symbol): Adjust management of symbol versions
199 to not prematurely free array specs while working on the declation
200 of CLASS variables.
201
202 2023-03-01 Tobias Burnus <tobias@codesourcery.com>
203
204 PR middle-end/108546
205 * trans-openmp.cc (gfc_trans_omp_clauses): Fix mapping of
206 type(C_ptr) variables.
207
208 2023-02-27 Harald Anlauf <anlauf@gmx.de>
209
210 PR fortran/108937
211 * trans-intrinsic.cc (gfc_conv_intrinsic_ibits): Handle corner case
212 LEN argument of IBITS equal to BITSIZE(I).
213
214 2023-02-25 Mikael Morin <mikael@gcc.gnu.org>
215
216 PR fortran/108923
217 * intrinsic.cc (get_intrinsic_dummy_arg,
218 set_intrinsic_dummy_arg): Rename the former to the latter.
219 Remove the return value, add a reference to the lhs as argument,
220 and do the pointer assignment inside the function. Don't do
221 it if the pointer is already non-NULL.
222 (sort_actual): Update caller.
223
224 2023-02-25 Harald Anlauf <anlauf@gmx.de>
225
226 * arith.cc (gfc_real2int): Clear mpfr variable after use.
227
228 2023-02-25 Tobias Burnus <tobias@codesourcery.com>
229
230 PR fortran/108621
231 * trans-expr.cc (gfc_conv_gfc_desc_to_cfi_desc): Skip setting of
232 bounds of CFI desc for 'pointer,intent(out)'.
233
234 2023-02-24 Rimvydas Jasinskas <rimvydas.jas@gmail.com>
235
236 * trans-decl.cc (gfc_finish_var_decl): Apply attribute.
237 (generate_local_decl): Add diagnostic for dummy and local variables.
238
239 2023-02-24 Mikael Morin <mikael@gcc.gnu.org>
240
241 PR fortran/108923
242 * expr.cc (gfc_free_actual_arglist): Free associated_dummy
243 memory.
244 (gfc_copy_actual_arglist): Make a copy of the associated_dummy
245 field if it is set in the original element.
246
247 2023-02-24 Harald Anlauf <anlauf@gmx.de>
248
249 PR fortran/108924
250 * frontend-passes.cc (do_subscript): Clear used gmp variable.
251
252 2023-02-23 Arsen Arsenović <arsen@aarsen.me>
253
254 * invoke.texi: Reorder index entries around @items.
255
256 2023-02-23 Arsen Arsenović <arsen@aarsen.me>
257
258 * invoke.texi: Reorder @opindex commands to precede @items they
259 relate to.
260
261 2023-02-22 Harald Anlauf <anlauf@gmx.de>
262
263 PR fortran/96024
264 * resolve.cc (resolve_component): The type of a CHARACTER length
265 expression must be INTEGER.
266
267 2023-02-21 Harald Anlauf <anlauf@gmx.de>
268
269 PR fortran/96025
270 * parse.cc (check_function_result_typed): Improve type check of
271 specification expression for character length and return status.
272 (parse_spec): Use status from above.
273 * resolve.cc (resolve_fntype): Prevent use of invalid specification
274 expression for character length.
275
276 2023-02-16 Patrick Palka <ppalka@redhat.com>
277
278 * gfortran.h: Mechanically drop static from static inline
279 functions via s/^static inline/inline/g.
280
281 2023-02-15 Steve Kargl <kargl@gcc.gnu.org>
282
283 PR fortran/103608
284 * frontend-passes.cc (do_intent): Catch NULL pointer dereference on
285 reference to invalid formal argument.
286
287 2023-02-15 Steve Kargl <kargl@gcc.gnu.org>
288
289 PR fortran/104554
290 * resolve.cc (check_assumed_size_reference): Avoid NULL pointer
291 dereference.
292
293 2023-02-15 Tobias Burnus <tobias@codesourcery.com>
294
295 PR fortran/108512
296 * openmp.cc (gfc_resolve_omp_parallel_blocks): Handle combined 'loop'
297 directives.
298 (gfc_resolve_do_iterator): Set a source location for added
299 'private'-clause arguments.
300 * resolve.cc (gfc_resolve_code): Call gfc_resolve_omp_do_blocks
301 also for EXEC_OMP_LOOP and gfc_resolve_omp_parallel_blocks for
302 combined directives with loop + '{masked,master} taskloop (simd)'.
303
304 2023-02-13 Harald Anlauf <anlauf@gmx.de>
305
306 PR fortran/103475
307 * primary.cc (gfc_expr_attr): Avoid NULL pointer dereference for
308 invalid use of CLASS variable.
309
310 2023-02-13 Rimvydas Jasinskas <rimvydas.jas@gmail.com>
311
312 * decl.cc: Add EXT_ATTR_NOINLINE, EXT_ATTR_NORETURN, EXT_ATTR_WEAK.
313 * gfortran.h (ext_attr_id_t): Ditto.
314 * gfortran.texi (GCC$ ATTRIBUTES): Document them.
315 * trans-decl.cc (build_function_decl): Apply them.
316
317 2023-02-09 Harald Anlauf <anlauf@gmx.de>
318 Steven G. Kargl <kargl@gcc.gnu.org>
319
320 PR fortran/69636
321 PR fortran/103779
322 * intrinsic.cc (gfc_convert_chartype): Recover on invalid character
323 kind in conversion instead of generating an internal error.
324
325 2023-02-09 Tobias Burnus <tobias@codesourcery.com>
326
327 PR fortran/107424
328 * trans-openmp.cc (struct dovar_init_d): Add 'sym' and
329 'non_unit_incr' members.
330 (gfc_nonrect_loop_expr): New.
331 (gfc_trans_omp_do): Call it; use normal loop bounds
332 for unit stride - and only create local loop var.
333
334 2023-02-09 Tobias Burnus <tobias@codesourcery.com>
335
336 * parse.cc (decode_omp_directive): Really ignore 'assumes' with
337 -fopenmp-simd.
338
339 2023-02-08 Steve Kargl <kargl@gcc.gnu.org>
340
341 PR fortran/103259
342 * resolve.cc (resolve_common_vars): Avoid NULL pointer dereference
343 when a symbol's location is not set.
344
345 2023-02-07 Harald Anlauf <anlauf@gmx.de>
346
347 PR fortran/95107
348 * trans-decl.cc (gfc_finish_var_decl): With -fno-automatic, do not
349 make ASSOCIATE variables TREE_STATIC.
350
351 2023-02-05 Harald Anlauf <anlauf@gmx.de>
352
353 PR fortran/108592
354 * arith.cc (gfc_arith_divide): Emit integer division truncation
355 warnings using gfc_warning instead of gfc_warning_now to prevent
356 redundant messages.
357
358 2023-02-03 Jakub Jelinek <jakub@redhat.com>
359
360 PR fortran/108451
361 * trans-decl.cc (gfc_trans_use_stmts): Call clear_slot before
362 doing continue.
363
364 2023-02-01 Harald Anlauf <anlauf@gmx.de>
365
366 PR fortran/108609
367 * expr.cc (find_array_section): Add check to prevent interpreting an
368 mpz non-integer constant as an integer.
369
370 2023-02-01 Tobias Burnus <tobias@codesourcery.com>
371
372 * openmp.cc (resolve_omp_clauses): Check also for
373 power of two.
374
375 2023-01-29 Mikael Morin <mikael@gcc.gnu.org>
376
377 PR fortran/108450
378 * check.cc (gfc_check_minloc_maxloc): Explicitly set argument name.
379 (gfc_check_findloc): Ditto.
380
381 2023-01-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
382
383 PR fortran/103506
384 * parse.cc (parse_module): Remove use of a bool error value
385 that prevented proper setting of the namespace pointer.
386
387 2023-01-28 Harald Anlauf <anlauf@gmx.de>
388 Steven G. Kargl <kargl@gcc.gnu.org>
389
390 PR fortran/108527
391 * resolve.cc (compare_bound_int): Expression to compare must be of
392 type INTEGER.
393 (compare_bound_mpz_t): Likewise.
394 (check_dimension): Fix comment on checks applied to array section
395 and clean up associated logic.
396
397 2023-01-28 Harald Anlauf <anlauf@gmx.de>
398
399 PR fortran/108453
400 * match.cc (gfc_match_common): A USE associated name shall not appear
401 in a COMMON block (F2018:C8121).
402
403 2023-01-27 Tobias Burnus <tobias@codesourcery.com>
404
405 PR fortran/108558
406 * trans-openmp.cc (gfc_split_omp_clauses): Handle has_device_addr.
407
408 2023-01-26 Harald Anlauf <anlauf@gmx.de>
409
410 PR fortran/108544
411 * resolve.cc (check_host_association): Extend host association check
412 so that it is not restricted to functions. Also prevent NULL pointer
413 dereference.
414
415 2023-01-25 Steve Kargl <kargl@gcc.gnu.org>
416
417 PR fortran/108528
418 * array.cc (compare_bounds): Return false instead of generating an
419 internal error on an invalid argument type.
420
421 2023-01-24 Harald Anlauf <anlauf@gmx.de>
422
423 PR fortran/108529
424 * simplify.cc (simplify_transformation): Do not try to simplify
425 transformational intrinsic when the ARRAY argument has a NULL shape.
426
427 2023-01-23 Harald Anlauf <anlauf@gmx.de>
428
429 PR fortran/108502
430 * dependency.cc (gfc_check_dependency): Prevent NULL pointer
431 dereference while recursively checking expressions.
432
433 2023-01-23 Harald Anlauf <anlauf@gmx.de>
434
435 PR fortran/108501
436 * interface.cc (get_expr_storage_size): Check array subscript triplets
437 that we actually have integer values before trying to extract with
438 mpz_get_si.
439
440 2023-01-23 Harald Anlauf <anlauf@gmx.de>
441
442 PR fortran/108420
443 * iresolve.cc (check_charlen_present): Preserve character length if
444 there is no array constructor.
445
446 2023-01-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
447
448 PR fortran/102595
449 * data.cc (gfc_assign_data_value): Remove check for PARAMETER in DATA.
450 * primary.cc (match_variable): Add check for PARAMETER in DATA.
451
452 2023-01-19 Harald Anlauf <anlauf@gmx.de>
453
454 PR fortran/108434
455 * expr.cc (class_allocatable): Prevent NULL pointer dereference
456 or invalid read.
457 (class_pointer): Likewise.
458
459 2023-01-17 Harald Anlauf <anlauf@gmx.de>
460
461 PR fortran/108421
462 * interface.cc (get_expr_storage_size): Check that we actually have
463 an integer value before trying to extract it with mpz_get_si.
464
465 2023-01-12 Tobias Burnus <tobias@codesourcery.com>
466
467 PR fortran/107706
468 * openmp.cc (gfc_resolve_omp_assumptions): Reject nonscalars.
469
470 2023-01-11 Jakub Jelinek <jakub@redhat.com>
471
472 PR fortran/108349
473 * f95-lang.cc (gfc_init_builtin_function): Fix up function types
474 for BUILT_IN_REALLOC and BUILT_IN_SINCOS{F,,L}. Formatting fixes.
475
476 2023-01-10 Harald Anlauf <anlauf@gmx.de>
477
478 PR fortran/97345
479 * frontend-passes.cc (do_subscript): Clear used gmp variables.
480
481 2023-01-02 Jakub Jelinek <jakub@redhat.com>
482
483 * gfortranspec.cc (lang_specific_driver): Update copyright notice
484 dates.
485 * gfc-internals.texi: Bump @copying's copyright year.
486 * gfortran.texi: Ditto.
487 * intrinsic.texi: Ditto.
488 * invoke.texi: Ditto.
489
490 \f
491 Copyright (C) 2023 Free Software Foundation, Inc.
492
493 Copying and distribution of this file, with or without modification,
494 are permitted in any medium without royalty provided the copyright
495 notice and this notice are preserved.
This page took 0.060387 seconds and 5 git commands to generate.