aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/ChangeLog
blob: 3a27c18761762f3756850e7fbae4a1bff91624aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
2024-05-15  Jakub Jelinek  <jakub@redhat.com>

	PR c/115103
	* openmp.cc (resolve_omp_clauses): Diagnose grainsize
	used together with num_tasks or nogroup used together with
	reduction.

2024-05-13  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/113363
	* trans-array.cc (gfc_array_init_size): Use the expr3 dtype so
	that the correct element size is used.
	* trans-expr.cc (gfc_conv_procedure_call): Remove restriction
	that ss and ss->loop be present for the finalization of class
	array function results.
	(trans_class_assignment): Use free and malloc, rather than
	realloc, for character expressions assigned to unlimited poly
	entities.
	* trans-stmt.cc (gfc_trans_allocate): Build a correct rhs for
	the assignment of an unlimited polymorphic 'source'.

2024-05-12  Harald Anlauf  <anlauf@gmx.de>

	* primary.cc (gfc_match_varspec): Replace 'ref' argument to
	is_inquiry_ref() by NULL when the result is not needed to avoid
	a memleak.

2024-05-12  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/84006
	PR fortran/100027
	PR fortran/98534
	* iresolve.cc (gfc_resolve_transfer): Emit a TODO error for
	unlimited polymorphic mold.
	* trans-expr.cc (gfc_resize_class_size_with_len): Use the fold
	even if a block is not available in which to fix the result.
	(trans_class_assignment): Enable correct assignment of
	character expressions to unlimited polymorphic variables using
	lhs _len field and rse string_length.
	* trans-intrinsic.cc (gfc_conv_intrinsic_storage_size): Extract
	the class expression so that the unlimited polymorphic class
	expression can be used in gfc_resize_class_size_with_len to
	obtain the storage size for character payloads. Guard the use
	of GFC_DECL_SAVED_DESCRIPTOR by testing for DECL_LANG_SPECIFIC
	to prevent the ICE. Also, invert the order to use the class
	expression extracted from the argument.
	(gfc_conv_intrinsic_transfer): In same way as 'storage_size',
	use the _len field to obtaining the correct length for arg 1.
	Add a branch for the element size in bytes of class expressions
	with provision to make use of the unlimited polymorphic _len
	field. Again, the class references are explicitly identified.
	'mold_expr' was already declared. Use it instead of 'arg'. Do
	not fix 'dest_word_len' for deferred character sources because
	reallocation on assign makes use of it before it is assigned.

2024-05-11  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/115039
	* expr.cc (gfc_traverse_expr): An inquiry ref does not constitute
	a dependency and cannot collide with a symbol.

2024-05-05  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/114827
	* trans-array.cc (gfc_alloc_allocatable_for_assignment): Take into
	account _len of unlimited polymorphic entities when calculating
	the effective element size for allocation size and array span.
	Set _len of lhs to _len of rhs.
	* trans-expr.cc (trans_class_assignment): Take into account _len
	of unlimited polymorphic entities for allocation size.

2024-04-29  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	* expr.cc (check_transformational): Add SELECTED_LOGICAL_KIND
	to allowed functions for Fortran 2023.
	* gfortran.h (GFC_ISYM_SL_KIND): New.
	* gfortran.texi: Mention SELECTED_LOGICAL_KIND.
	* intrinsic.cc (add_functions): Add SELECTED_LOGICAL_KIND.
	(gfc_intrinsic_func_interface): Allow it in initialization
	expressions.
	* intrinsic.h (gfc_simplify_selected_logical_kind): New proto.
	* intrinsic.texi: Add SELECTED_LOGICAL_KIND.
	* simplify.cc (gfc_simplify_selected_logical_kind): New
	function.
	* trans-decl.cc (gfc_build_intrinsic_function_decls): Initialize
	gfor_fndecl_sl_kind.
	* trans-intrinsic.cc (gfc_conv_intrinsic_sl_kind): New function.
	(gfc_conv_intrinsic_function): Call it for GFC_ISYM_SL_KIND.
	* trans.h (gfor_fndecl_sl_kind): New symbol.

2024-04-29  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	* iso-fortran-env.def: Add logical{8,16,32,64} and
	real16 named constants.

2024-04-29  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/114959
	* trans-expr.cc (gfc_trans_class_init_assign): Return NULL_TREE
	if the default initializer has all NULL fields. Guard this
	by a requirement that the code not be EXEC_INIT_ASSIGN and that
	the object be an INTENT_OUT dummy.
	* trans-stmt.cc (gfc_trans_allocate): Change the initializer
	code for allocate with mold to EXEC_ALLOCATE to allow an
	initializer with all NULL fields.

2024-04-25  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/93678
	* trans-expr.cc (gfc_conv_procedure_call): Use the interface,
	where possible, to obtain the type of character procedure
	pointers of class entities.

2024-04-25  Paul Thomas  <pault@gcc.gnu.org>
	    Jakub Jelinek  <jakub@gcc.gnu.org>

	PR fortran/89462
	* decl.cc (build_sym): Add an extra argument 'elem'. If 'elem'
	is greater than 1, gfc_new_charlen is called to generate a new
	charlen, registered in the symbol namespace.
	(variable_decl, enumerator_decl): Set the new argument in the
	calls to build_sym.

2024-04-21  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/103471
	* resolve.cc (resolve_actual_arglist): Catch variables silently
	set as untyped, resetting the flag so that gfc_resolve_expr can
	generate the no implicit type error.
	(gfc_resolve_index_1): Block index expressions of unknown type
	from being converted to default integer, avoiding the fatal
	error in trans-decl.cc.
	* symbol.cc (gfc_set_default_type): Remove '(symbol)' from the
	'no IMPLICIT type' error message.
	* trans-decl.cc (gfc_get_symbol_decl): Change fatal error locus
	to that of the symbol declaration.
	(gfc_trans_deferred_vars): Remove two trailing tabs.

2024-04-18  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/114739
	* primary.cc (gfc_match_varspec): Check for default type before
	checking for derived types with the right component name.

2024-04-16  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/113793
	* resolve.cc (resolve_allocate_expr): Reject ALLOCATE with SOURCE=
	or MOLD= specifier for unequal length.
	* trans-stmt.cc (gfc_trans_allocate): If an allocatable character
	variable has fixed length, use it and do not use the source length.
	With bounds-checking enabled, add a runtime check for same length.

2024-04-10  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/106500
	* check.cc (is_c_interoperable): Fix checks for C_SIZEOF.
	(gfc_check_c_f_pointer): Reject function returning a pointer as FPTR,
	and improve an error message.

2024-04-09  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/114535
	* resolve.cc (resolve_symbol): Remove last chunk that checked
	for finalization of unreferenced symbols.

2024-04-09  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/113956
	* trans-expr.cc (gfc_trans_pointer_assignment): Remove assert
	causing the ICE since it was unnecesary.

2024-04-02  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/106999
	* interface.cc (gfc_compare_interfaces): Add error for a
	subroutine proc pointer passed to a variable formal.
	(compare_parameter): If a procedure pointer is being passed to
	a non-procedure formal arg, and there is an an interface, use
	gfc_compare_interfaces to check and provide a more useful error
	message.

2024-04-02  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/112407
	* resolve.cc (resolve_procedure_expression): Change the test for
	for recursion in the case of hidden procedures from modules.
	(resolve_typebound_static): Add warning for possible recursive
	calls to typebound procedures.
	* trans-expr.cc (gfc_trans_class_init_assign): Do not apply
	default initializer to class dummy where component initializers
	are all null.

2024-03-29  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/50410
	* trans-expr.cc (gfc_conv_structure): Check for NULL pointer.

2024-03-29  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/36337
	PR fortran/110987
	PR fortran/113885
	* trans-expr.cc (gfc_trans_assignment_1): Place finalization
	block before rhs post block for elemental rhs.
	* trans.cc (gfc_finalize_tree_expr): Check directly if a type
	has no components, rather than the zero components attribute.
	Treat elemental zero component expressions in the same way as
	scalars.

2024-03-28  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/114474
	* primary.cc (gfc_variable_attr): Catch variables used in structure
	constructors within DATA statements that are still tagged with a
	temporary type BT_PROCEDURE from match_actual_arg and which have the
	target attribute, and fix their typespec.

2024-03-28  Mikael Morin  <mikael@gcc.gnu.org>
	    Harald Anlauf  <anlauf@gmx.de>

	PR fortran/111781
	PR fortran/114475
	* expr.cc (check_restricted): In submodules, allow variables host-
	associated from the parent module.

2024-03-22  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/55978
	* interface.cc (gfc_compare_actual_formal): Skip size check for
	NULL() actual without MOLD argument.

2024-03-22  Mikael Morin  <mikael@gcc.gnu.org>

	PR fortran/107426
	* gfortran.h (gfc_save_module_list, gfc_restore_old_module_list):
	New declarations.
	* module.cc (old_module_list_tail): New global variable.
	(gfc_save_module_list, gfc_restore_old_module_list): New functions.
	(gfc_use_modules): Set module_list and old_module_list_tail.
	* parse.cc (next_statement): Save module_list before doing any work.
	(reject_statement): Restore module_list to its saved value.

2024-03-22  Mikael Morin  <mikael@gcc.gnu.org>

	PR fortran/111781
	* symbol.cc (gfc_get_procedure_ns, gfc_get_spec_ns): New functions.
	* gfortran.h (gfc_get_procedure_ns, gfc_get_spec ns): Declare them.
	(gfc_is_formal_arg): Remove.
	* expr.cc (check_restricted): Remove special case allowing local
	variable in dummy argument bound expressions.  Use gfc_get_spec_ns
	to get the right namespace.
	* resolve.cc (gfc_is_formal_arg, formal_arg_flag): Remove.
	(gfc_resolve_formal_arglist): Set gfc_current_ns.  Quit loop and
	restore gfc_current_ns instead of early returning.
	(resolve_symbol): Factor common array spec resolution code to...
	(resolve_symbol_array_spec): ... this new function.  Additionnally
	set and restore gfc_current_ns.

2024-03-21  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/30802
	* trans-array.cc (abridged_ref_name): New helper function.
	(trans_array_bound_check): Use it.
	(array_bound_check_elemental): Likewise.
	(gfc_conv_array_ref): Likewise.

2024-03-20  Jakub Jelinek  <jakub@redhat.com>

	* trans-array.cc (structure_alloc_comps): Use integer_zero_node
	instead of build_zero_cst (integer_type_node) or
	build_int_cst (integer_type_node, 0) and integer_one_node instead of
	build_int_cst (integer_type_node, 1).
	* trans-expr.cc (conv_scalar_char_value): Likewise.
	* trans-stmt.cc (gfc_trans_form_team, gfc_trans_change_team,
	gfc_trans_sync_team, gfc_trans_sync): Likewise.
	* trans-decl.cc (create_main_function): Likewise.
	* trans-intrinsic.cc (trans_this_image, conv_intrinsic_move_alloc):
	Likewise.
	* trans.cc (gfc_allocate_using_caf_lib, gfc_deallocate_with_status):
	Likewise.

2024-03-18  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/103715
	* frontend-passes.cc (check_externals_expr): Prevent invalid read
	in case of mismatch of external subroutine with function.

2024-03-17  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/101135
	* trans-array.cc (gfc_get_dataptr_offset): Check for optional
	arguments being present before dereferencing data pointer.

2024-03-15  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/87477
	PR fortran/89645
	PR fortran/99065
	PR fortran/114141
	PR fortran/114280
	* class.cc (gfc_change_class): New function needed for
	associate names, when rank changes or a derived type is
	produced by resolution
	* dump-parse-tree.cc (show_code_node): Make output for SELECT
	TYPE more comprehensible.
	* expr.cc (find_inquiry_ref): Do not simplify expressions of
	an inferred type.
	* gfortran.h : Add 'gfc_association_list' to structure
	'gfc_association_list'. Add prototypes for
	'gfc_find_derived_types', 'gfc_fixup_inferred_type_refs' and
	'gfc_change_class'. Add macro IS_INFERRED_TYPE.
	* match.cc (copy_ts_from_selector_to_associate): Add bolean arg
	'select_type' with default false. If this is a select type name
	and the selector is a inferred type, build the class type and
	apply it to the associate name.
	(build_associate_name): Pass true to 'select_type' in call to
	previous.
	* parse.cc (parse_associate): If the selector is inferred type
	the associate name is too. Make sure that function selector
	class and rank, if known, are passed to the associate name. If
	a function result exists, pass its typespec to the associate
	name.
	* primary.cc (resolvable_fcns): New function to check that all
	the function references are resolvable.
	(gfc_match_varspec): If a scalar derived type select type
	temporary has an array reference, match the array reference,
	treating this in the same way as an equivalence member. Do not
	set 'inquiry' if applied to an unknown type the inquiry name
	is ambiguous with the component of an accessible derived type.
	Check that resolution of the target expression is OK by testing
	if the symbol is declared or is an operator expression, then
	using 'resolvable_fcns' recursively. If all is well, resolve
	the expression. If this is an inferred type with a component
	reference, call 'gfc_find_derived_types' to find a suitable
	derived type. If there is an inquiry ref and the symbol either
	is of unknown type or is inferred to be a derived type, set the
	primary and symbol TKR appropriately.
	* resolve.cc (resolve_variable): Call new function below.
	(gfc_fixup_inferred_type_refs): New function to ensure that the
	expression references for a inferred type are consistent with
	the now fixed up selector.
	(resolve_assoc_var): Ensure that derived type or class function
	selectors transmit the correct arrayspec to the associate name.
	(resolve_select_type): If the selector is an associate name of
	inferred type and has no component references, the associate
	name should have its typespec. Simplify the conversion of a
	class array to class scalar by calling 'gfc_change_class'.
	Make sure that a class, inferred type selector with an array
	ref transfers the typespec from the symbol to the expression.
	* symbol.cc (gfc_set_default_type): If an associate name with
	unknown type has a selector expression, try resolving the expr.
	(find_derived_types, gfc_find_derived_types): New functions
	that search for a derived type with a given name.
	* trans-expr.cc (gfc_conv_variable): Some inferred type exprs
	escape resolution so call 'gfc_fixup_inferred_type_refs'.
	* trans-stmt.cc (trans_associate_var): Tidy up expression for
	'class_target'. Finalize and free class function results.
	Correctly handle selectors that are class functions and class
	array references, passed as derived types.

2024-03-14  Thomas Schwinge  <thomas@codesourcery.com>

	* dump-parse-tree.cc (show_omp_clauses): Handle 'self_expr'.
	* openmp.cc (gfc_free_omp_clauses): Likewise.
	* trans-openmp.cc (gfc_split_omp_clauses): Don't handle 'self_expr'.

2024-03-14  Chung-Lin Tang  <cltang@baylibre.com>

	* dump-parse-tree.cc (show_omp_namelist): Print "readonly," for
	OMP_LIST_MAP and OMP_LIST_CACHE if n->u.map.readonly is set.
	Adjust 'n->u.map_op' to 'n->u.map.op'.
	* gfortran.h (typedef struct gfc_omp_namelist): Adjust map_op as
	'ENUM_BITFIELD (gfc_omp_map_op) op:8', add 'bool readonly' field,
	change to named struct field 'map'.
	* openmp.cc (gfc_match_omp_map_clause): Adjust 'n->u.map_op' to
	'n->u.map.op'.
	(gfc_match_omp_clause_reduction): Likewise.
	(gfc_match_omp_clauses): Add readonly modifier parsing for OpenACC
	copyin clause, set 'n->u.map.op' and 'n->u.map.readonly' for parsed
	clause. Adjust 'n->u.map_op' to 'n->u.map.op'.
	(gfc_match_oacc_declare): Adjust 'n->u.map_op' to 'n->u.map.op'.
	(gfc_match_oacc_cache): Add readonly modifier parsing for OpenACC
	cache directive.
	(resolve_omp_clauses): Adjust 'n->u.map_op' to 'n->u.map.op'.
	* trans-decl.cc (add_clause): Adjust 'n->u.map_op' to 'n->u.map.op'.
	(finish_oacc_declare): Likewise.
	* trans-openmp.cc (gfc_trans_omp_clauses): Set OMP_CLAUSE_MAP_READONLY,
	OMP_CLAUSE__CACHE__READONLY to 1 when readonly is set. Adjust
	'n->u.map_op' to 'n->u.map.op'.
	(gfc_add_clause_implicitly): Adjust 'n->u.map_op' to 'n->u.map.op'.

2024-03-13  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/114001
	* expr.cc (gfc_is_simply_contiguous): Adjust logic so that CLASS
	symbols are also handled.

2024-03-13  Tobias Burnus  <tburnus@baylibre.com>

	PR fortran/114283
	* trans-openmp.cc (gfc_omp_predetermined_mapping): Map dummy
	procedures as firstprivate.

2024-03-12  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/110826
	* array.cc (gfc_array_dimen_size): When walking the ref chain of an
	array and the ultimate component is a procedure pointer, do not try
	to figure out its dimension even if it is a array-valued function.

2024-03-06  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/103707
	PR fortran/106987
	* arith.cc (is_hard_arith_error): New helper function to determine
	whether an arithmetic error is "hard" or not.
	(check_result): Use it.
	(gfc_arith_divide): Set "Division by zero" only for regular
	numerators of real and complex divisions.
	(reduce_unary): Use is_hard_arith_error to determine whether a hard
	or (recoverable) soft error was encountered.  Terminate immediately
	on hard error, otherwise remember code of first soft error.
	(reduce_binary_ac): Likewise.
	(reduce_binary_ca): Likewise.
	(reduce_binary_aa): Likewise.

2024-03-01  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/104819
	* check.cc (gfc_check_null): Handle nested NULL()s.
	(is_c_interoperable): Check for MOLD argument of NULL() as part of
	the interoperability check.
	* interface.cc (gfc_compare_actual_formal): Extend checks for NULL()
	actual arguments for presence of MOLD argument when required by
	Interp J3/22-146.

2024-02-29  Alexander Westbrooks  <alexanderw@gcc.gnu.org>

	PR fortran/82943
	PR fortran/86148
	PR fortran/86268
	* decl.cc (gfc_get_pdt_instance): Set the PDT instance field
	'f2k_derived', if not set already, to point to the given
	PDT template 'f2k_derived' namespace in order to give the
	PDT instance referential access to the typebound procedures
	of the template.
	* gfortran.h (gfc_pdt_is_instance_of): Add prototype.
	* resolve.cc (resolve_typebound_procedure): If the derived type
	does not have the attribute 'pdt_template' set, compare the
	dummy argument to the 'resolve_bindings_derived' type like usual.
	If the derived type is a 'pdt_template', then check if the
	dummy argument is an instance of the PDT template. If the derived
	type is a PDT template, and the dummy argument is an instance of
	that template, but the dummy argument 'param_list' is not
	SPEC_ASSUMED, check if there are any LEN parameters in the
	dummy argument. If there are no LEN parameters, then this implies
	that there are only KIND parameters in the dummy argument.
	If there are LEN parameters, this would be an error, for all
	LEN parameters for the dummy argument MUST be assumed for
	typebound procedures of PDTs.
	(resolve_pdt): Add a check for ALLOCATABLE and POINTER attributes for
	SPEC_DEFERRED parameters of PDT class symbols.  ALLOCATABLE and
	POINTER attributes for a PDT class symbol are stored in the
	'class_pointer' and 'allocatable' attributes of the '_data'
	component respectively.
	* symbol.cc (gfc_pdt_is_instance_of): New function.

2024-02-26  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/114012
	* trans-expr.cc (gfc_conv_procedure_call): Evaluate non-trivial
	arguments just once before assigning to an unlimited polymorphic
	dummy variable.

2024-02-23  Steve Kargl  <kargl@gcc.gnu.org>
	    Harald Anlauf  <anlauf@gmx.de>

	PR fortran/114024
	* trans-stmt.cc (gfc_trans_allocate): When a source expression has
	substring references, part-refs, or %re/%im inquiries, wrap the
	entity in parentheses to force evaluation of the expression.

2024-02-23  Tobias Burnus  <tburnus@baylibre.com>

	* openmp.cc (gfc_match_omp_depobj): Use OPT_Wopenmp
	as warning category in gfc_warning.

2024-02-20  Peter Hill  <peter.hill@york.ac.uk>

	PR fortran/105658
	* trans-expr.cc (gfc_conv_intrinsic_to_class): When passing an
	array component reference of intrinsic type to a procedure
	with an unlimited polymorphic dummy argument, a temporary
	should be created.

2024-02-17  Jakub Jelinek  <jakub@redhat.com>

	PR fortran/113503
	* trans-expr.cc (alloc_scalar_allocatable_subcomponent): Don't
	overwrite expr2->ts.u.cl->backend_decl, instead set size to
	expr2->ts.u.cl->backend_decl first and use size instead of
	expr2->ts.u.cl->backend_decl.
	(gfc_trans_subcomponent_assign): Emit se.pre into block
	before calling alloc_scalar_allocatable_subcomponent instead of
	after it.

2024-02-17  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/113911
	* trans-array.cc (gfc_trans_deferred_array): Do not clobber
	deferred length for a character variable passed as dummy argument.

2024-02-15  Kwok Cheung Yeung  <kcyeung@baylibre.com>

	* dump-parse-tree.cc (show_attr): Handle omp_declare_target_indirect
	attribute.
	* f95-lang.cc (gfc_gnu_attributes): Add entry for 'omp declare
	target indirect'.
	* gfortran.h (symbol_attribute): Add omp_declare_target_indirect
	field.
	(struct gfc_omp_clauses): Add indirect field.
	* openmp.cc (omp_mask2): Add OMP_CLAUSE_INDIRECT.
	(gfc_match_omp_clauses): Match indirect clause.
	(OMP_DECLARE_TARGET_CLAUSES): Add OMP_CLAUSE_INDIRECT.
	(gfc_match_omp_declare_target): Check omp_device_type and apply
	omp_declare_target_indirect attribute to symbol if indirect clause
	active.  Show warning if there are only device_type and/or indirect
	clauses on the directive.
	* trans-decl.cc (add_attributes_to_decl): Add 'omp declare target
	indirect' attribute if symbol has indirect attribute set.

2024-02-14  Steve Kargl  <kargl@gcc.gnu.org>

	PR fortran/105847
	* trans-io.cc (transfer_namelist_element): When building the
	namelist object name, if the use rename attribute is set, use
	the local name specified in the use statement.

2024-02-14  Jakub Jelinek  <jakub@redhat.com>

	* error.cc (error_print): For u printing of ptrdiff_t,
	print ptrdiff_t argument converted to unsigned long long and
	masked with 2ULL * PTRDIFF_MAX + 1.

2024-02-13  Tobias Burnus  <tburnus@baylibre.com>

	PR middle-end/113904
	* trans-openmp.cc (gfc_trans_omp_declare_variant): Handle splitting of
	OMP_TRAIT_PROPERTY_EXPR into OMP_TRAIT_PROPERTY_{DEV_NUM,BOOL}_EXPR.
	* openmp.cc (gfc_match_omp_context_selector): Likewise; rejects
	non-const device_num/condition; improve diagnostic.

2024-02-13  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/113866
	* trans-expr.cc (gfc_conv_procedure_call): When passing an optional
	dummy argument to an optional dummy argument of a bind(c) procedure
	and the dummy argument is passed via a CFI descriptor, no special
	presence check and passing of a default NULL pointer is needed.

2024-02-13  Steve Kargl  <kargl@gcc.gnu.org>

	PR fortran/113883
	* trans-array.cc (gfc_trans_deferred_array): Set length to zero,
	avoiding extraneous diagnostics.

2024-02-10  Jakub Jelinek  <jakub@redhat.com>

	* error.cc (error_print): Handle z and t modifiers on d, i and u.
	* check.cc (gfc_check_transfer): Use %zd instead of %ld and casts to
	long.
	* primary.cc (gfc_convert_to_structure_constructor): Use %td instead
	of %ld and casts to long.

2024-02-10  Jakub Jelinek  <jakub@redhat.com>

	* trans-common.cc (build_common_decl): Use %wu instead of %lu and
	casts to unsigned long.
	* resolve.cc (resolve_ordinary_assign): Use %wd instead of %ld and
	casts to long.
	* array.cc (gfc_resolve_character_array_constructor): Likewise.
	* data.cc (create_character_initializer): Likewise.

2024-02-09  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/113799
	* arith.cc (reduce_unary): Remember any overflow encountered during
	reduction of unary arithmetic operations on array constructors and
	continue, and return error status, but terminate on serious errors.

2024-01-28  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/113377
	* trans-expr.cc (conv_dummy_value): Treat NULL actual argument to
	optional dummy with the VALUE attribute as not present.
	(gfc_conv_procedure_call): Likewise.

2024-01-27  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/104908
	* trans-array.cc (gfc_conv_array_ref): Restrict use of transformed
	descriptor (sym->backend_decl) to the unlimited polymorphic case.

2024-01-24  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/113377
	* trans-expr.cc (conv_dummy_value): New.
	(gfc_conv_procedure_call): Factor code for handling dummy arguments
	with the VALUE attribute in the scalar case into conv_dummy_value().
	Reuse and adjust for calling elemental procedures.

2024-01-21  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/113377
	* trans-expr.cc (gfc_conv_procedure_call): Fix handling of optional
	scalar arguments of intrinsic type with the VALUE attribute.

2024-01-20  Mikael Morin  <mikael@gcc.gnu.org>

	PR fortran/48776
	PR fortran/111291
	* parse.cc: Restore current interface to its previous value on error.

2024-01-19  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/113471
	* trans-array.cc (array_bound_check_elemental): Array bounds check
	shall apply here to elemental dimensions of an array section only.

2024-01-13  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/67277
	* trans-intrinsic.cc (gfc_conv_intrinsic_ishftc): Handle optional
	dummy argument for SIZE passed to ISHFTC.  Set default value to
	BIT_SIZE(I) when missing.

2024-01-13  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/113305
	* gfortran.h (gfc_loop_annot): New.
	(gfc_iterator, gfc_forall_iterator): Use for annotation control.
	* array.cc (gfc_copy_iterator): Adjust.
	* gfortran.texi: Document annotations IVDEP, UNROLL n, VECTOR,
	NOVECTOR as applied to DO CONCURRENT.
	* parse.cc (parse_do_block): Parse annotations IVDEP, UNROLL n,
	VECTOR, NOVECTOR as applied to DO CONCURRENT.  Apply UNROLL only to
	first loop control variable.
	* trans-stmt.cc (iter_info): Use gfc_loop_annot.
	(gfc_trans_simple_do): Adjust.
	(gfc_trans_forall_loop): Annotate loops with IVDEP, UNROLL n,
	VECTOR, NOVECTOR as needed for DO CONCURRENT.
	(gfc_trans_forall_1): Handle loop annotations.

2024-01-08  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/113245
	* trans-intrinsic.cc (gfc_conv_intrinsic_size): Use
	gfc_conv_expr_present() for proper check of optional DIM argument.

2024-01-06  Harald Anlauf  <anlauf@gmx.de>
	    José Rui Faustino de Sousa  <jrfsousa@gmail.com>

	PR fortran/96724
	* iresolve.cc (gfc_resolve_repeat): Force conversion to
	gfc_charlen_int_kind before call to gfc_multiply.

2024-01-04  David Malcolm  <dmalcolm@redhat.com>

	* lang.opt.urls: New file, autogenerated by
	regenerate-opt-urls.py.

2024-01-03  Harald Anlauf  <anlauf@gmx.de>

	* trans-types.cc (gfc_get_nodesc_array_type): Clear used gmp
	variables.

2024-01-03  Jakub Jelinek  <jakub@redhat.com>

	* gfortranspec.cc (lang_specific_driver): Update copyright notice
	dates.
	* gfc-internals.texi: Bump @copying's copyright year.
	* gfortran.texi: Ditto.
	* intrinsic.texi: Ditto.
	* invoke.texi: Ditto.


Copyright (C) 2024 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.