]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/fortran/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / fortran / ChangeLog
1 2020-06-23 Thomas Koenig <tkoenig@gcc.gnu.org>
2
3 PR fortran/95812
4 * dependency.c (ref_same_as_full_array): Handle case of AR_FULL
5 vs. AR_FULL.
6
7 2020-06-23 Steven G. Kargl <kargl@gcc.gnu.org>
8 Mark Eggleston <markeggleston@gcc.gnu.org>
9
10 PR fortran/95586
11 * decl.c (gfc_match_implicit): Only perform else branch if
12 the type spect is not BT_DERIVED.
13
14 2020-06-22 Steven G. Kargl <kargl@gcc.gnu.org>
15 Mark Eggleston <markeggleston@gcc.gnu.org>
16
17 PR fortran/95708
18 * intrinsic.c (add_functions): Replace CLASS_INQUIRY with
19 CLASS_TRANSFORMATIONAL for intrinsic num_images.
20 (make_generic): Replace ACTUAL_NO with ACTUAL_YES for
21 intrinsic team_number.
22 * resolve.c (resolve_fl_procedure): Check pointer ts.u.derived
23 exists before using it.
24
25 2020-06-22 Steven G. Kargl <kargl@gcc.gnu.org>
26 Mark Eggleston <markeggleston@gcc.gnu.org>
27
28 PR fortran/95585
29 * check.c (gfc_check_reshape): Add check for a value when
30 the symbol has an attribute flavor FL_PARAMETER.
31
32 2020-06-22 Mark Eggleston <markeggleston@gcc.gnu.org>
33
34 PR fortran/42693
35 * arith.c (gfc_arith_error): Enclose strings in G_() instead
36 of _().
37
38 2020-06-20 Harald Anlauf <anlauf@gmx.de>
39
40 PR fortran/95707
41 * gfortran.h (gfc_common_head): Enlarge buffer.
42 * trans-common.c (gfc_sym_mangled_common_id): Enlarge temporary
43 buffers, and add check on length on mangled name to prevent
44 overflow.
45
46 2020-06-20 Harald Anlauf <anlauf@gmx.de>
47
48 PR fortran/95688
49 * iresolve.c (gfc_get_string): Enlarge static buffer size.
50
51 2020-06-20 Harald Anlauf <anlauf@gmx.de>
52
53 PR fortran/95687
54 * class.c (get_unique_type_string): Return a string with dynamic
55 length.
56 (get_unique_hashed_string, gfc_hash_value): Use dynamic result
57 from get_unique_type_string instead of static buffer.
58
59 2020-06-20 Harald Anlauf <anlauf@gmx.de>
60
61 PR fortran/95689
62 * interface.c (check_sym_interfaces): Enlarge temporary buffer,
63 and add check on length on mangled name to prevent overflow.
64
65 2020-06-20 Harald Anlauf <anlauf@gmx.de>
66
67 PR fortran/95587
68 * match.c (gfc_match_equivalence): Check constraints on
69 EQUIVALENCE objects also for CLASS variables.
70
71 2020-06-18 Tobias Burnus <tobias@codesourcery.com>
72
73 * openmp.c (resolve_omp_clauses): Reject vars with
74 allocatable components in OpenMP map clauses.
75
76 2020-06-16 Tobias Burnus <tobias@codesourcery.com>
77
78 * parse.c (decode_oacc_directive): Permit 'acc routine' also
79 inside pure procedures.
80 * openmp.c (gfc_match_oacc_routine): Inside pure procedures
81 do not permit gang, worker or vector clauses.
82
83 2020-06-16 Tobias Burnus <tobias@codesourcery.com>
84
85 * parse.c (decode_omp_directive): Remove "or ELEMENTAL"
86 from "in PURE" error message also for -fopenmp-simd.
87
88 2020-06-16 Tobias Burnus <tobias@codesourcery.com>
89
90 * parse.c (decode_omp_directive): Remove "or ELEMENTAL"
91 from "in PURE" error message.
92
93 2020-06-14 Thomas Koenig <tkoenig@gcc.gnu.org>
94
95 PR fortran/42122
96 * dump-parse-tree.c (gfc_dump_global_symbols): If the symroot is
97 empty, just output "empty".
98
99 2020-06-14 Harald Anlauf <anlauf@gmx.de>
100
101 PR fortran/95088
102 * class.c (get_unique_type_string): Replace use of fixed size
103 buffer by internally passing a pointer to strings.
104
105 2020-06-14 Thomas Koenig <tkoenig@gcc.gnu.org>
106
107 * check.c (gfc_check_random_seed): Always use locations
108 from get and put arguments for error messages.
109
110 2020-06-14 Thomas Koenig <tkoenig@gcc.gnu.org>
111
112 PR fortran/94109
113 * class.c (finalize_component): Return early if finalization has
114 already happened for expression and component within namespace.
115 * gfortran.h (gfc_was_finalized): New type.
116 (gfc_namespace): Add member was_finalzed.
117 (gfc_expr): Remove finalized.
118 * symbol.c (gfc_free_namespace): Free was_finalized.
119
120 2020-06-11 Harald Anlauf <anlauf@gmx.de>
121 Steven G. Kargl <kargl@gcc.gnu.org>
122
123 PR fortran/95611
124 * decl.c (access_attr_decl): Use correct symbol in error message.
125
126 2020-06-11 Steven G. Kargl <kargl@gcc.gnu.org>
127 Harald Anlauf <anlauf@gmx.de>
128
129 PR fortran/95544
130 * check.c (invalid_null_arg): Rename to gfc_invalid_null_arg.
131 (gfc_check_associated, gfc_check_kind, gfc_check_merge)
132 (gfc_check_shape, gfc_check_size, gfc_check_spread)
133 (gfc_check_transfer): Adjust.
134 (gfc_check_len_lentrim, gfc_check_trim): Check for NULL() argument.
135 * gfortran.h: Declare gfc_invalid_null_arg ().
136 * intrinsic.c (check_arglist): Check for NULL() argument.
137
138 2020-06-11 Harald Anlauf <anlauf@gmx.de>
139
140 PR fortran/95503
141 * expr.c (gfc_check_pointer_assign): Skip contiguity check of rhs
142 of pointer assignment if lhs cannot be simply contiguous.
143
144 2020-06-11 José Rui Faustino de Sousa <jrfsousa@gmail.com>
145
146 PR fortran/95331
147 * trans-array.c (gfc_conv_array_ref): For class array dummy
148 arguments use the transformed descriptor in sym->backend_decl
149 instead of the original descriptor.
150
151 2020-06-11 José Rui Faustino de Sousa <jrfsousa@gmail.com>
152
153 PR fortran/52351
154 PR fortran/85868
155 * trans-array.c (gfc_conv_expr_descriptor): Enable the
156 creation of a new descriptor with the correct one based
157 indexing for array sections. Rework array descriptor
158 indexing offset calculation.
159
160 2020-06-11 José Rui Faustino de Sousa <jrfsousa@gmail.com>
161
162 PR fortran/94022
163 * trans-expr.c (gfc_conv_procedure_call): In the case of
164 assumed-size arrays ensure that the reference is to a full array.
165
166 2020-06-07 Harald Anlauf <anlauf@gmx.de>
167
168 PR fortran/95091
169 * class.c (gfc_hash_value): Add cast.
170
171 2020-06-07 Harald Anlauf <anlauf@gmx.de>
172
173 PR fortran/95091
174 * class.c (get_unique_type_string, gfc_hash_value): Enlarge
175 buffers, and check whether the strings returned by
176 get_unique_type_string() fit.
177
178 2020-06-05 Harald Anlauf <anlauf@gmx.de>
179
180 PR fortran/95530
181 PR fortran/95537
182 * decl.c (gfc_match_decl_type_spec): Enlarge buffer, and enhance
183 string copy to detect buffer overflow.
184 * gfortran.h (gfc_common_head): Enlarge buffer.
185 * trans-common.c (finish_equivalences): Enhance string copy to
186 detect buffer overflow.
187
188 2020-06-05 Tom Tromey <tromey@adacore.com>
189
190 PR fortran/95509
191 * misc.c (gfc_closest_fuzzy_match): Update cutoff value
192 computation.
193
194 2020-06-04 Steven G. Kargl <kargl@gcc.gnu.org>
195 Harald Anlauf <anlauf@gmx.de>
196
197 PR fortran/95500
198 * trans-expr.c (gfc_conv_expr_reference): Do not dereference NULL
199 pointer.
200
201 2020-06-03 José Rui Faustino de Sousa <jrfsousa@gmail.com>
202
203 PR fortran/95214
204 PR fortran/66833
205 PR fortran/67938
206 * trans-expr.c (gfc_maybe_dereference_var): Add assumed-rank to
207 character dummy arguments list of possible attributes.
208
209 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
210
211 * f95-lang.c (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
212 * trans-openmp.c (gfc_omp_predetermined_mapping): New.
213 * trans.h (gfc_omp_predetermined_mapping): Declare.
214
215 2020-05-31 Thomas Koenig <tkoenig@gcc.gnu.org>
216
217 PR fortran/94361
218 * class.c (finalize_component): Use expr->finalized instead of
219 comp->finalized.
220 * gfortran.h (gfc_component): Remove finalized member.
221 (gfc_expr): Add it here instead.
222
223 2020-05-30 Harald Anlauf <anlauf@gmx.de>
224
225 PR fortran/95373
226 * primary.c (is_inquiry_ref): Move validity check of inquiry
227 references against selected Fortran standard from here...
228 (gfc_match_varspec) ...to here.
229
230 2020-05-30 Harald Anlauf <anlauf@gmx.de>
231
232 PR fortran/95090
233 * class.c (get_unique_type_string): Use buffer overrun check.
234
235 2020-05-29 Harald Anlauf <anlauf@gmx.de>
236
237 PR fortran/95090
238 * class.c (get_unique_type_string): Enlarge temporary for
239 name-mangling. Use strncpy to prevent buffer overrun.
240 (get_unique_hashed_string): Enlarge temporary.
241 (gfc_hash_value): Enlarge temporary for name-mangling.
242
243 2020-05-28 Harald Anlauf <anlauf@gmx.de>
244
245 PR fortran/95373
246 * primary.c (is_inquiry_ref): Check validity of inquiry
247 references against selected Fortran standard.
248
249 2020-05-28 Steven G. Kargl <kargl@gcc.gnu.org>
250 Mark Eggleston <markeggleston@gcc.gnu.org>
251 Mark Eggleston <markeggleston@gcc.gnu.org>
252
253 PR fortran/94397
254 * match.c (gfc_match_type_spec): New variable ok initialised
255 to true. Set ok with the return value of gfc_reduce_init_expr
256 called only if the expression is not EXPR_CONSTANT and is not
257 EXPR_VARIABLE. Add !ok to the check for type not being integer
258 or the rank being greater than zero.
259
260 2020-05-27 Harald Anlauf <anlauf@gmx.de>
261
262 PR fortran/95090
263 * iresolve.c (gfc_get_string): Enlarge temporary for
264 name-mangling.
265
266 2020-05-27 Tobias Burnus <tobias@codesourcery.com>
267 Mark Eggleston <markeggleston@gnu.gcc.org>
268
269 PR fortran/50392
270 * trans-decl.c (gfc_get_symbol_decl): Remove unnecessary block
271 delimiters. Add auxiliary variables if a label is assigned to
272 a return variable. (gfc_gat_fake_result): If the symbol has an
273 assign attribute set declaration from the symbol's backend
274 declaration.
275
276 2020-05-26 Harald Anlauf <anlauf@gmx.de>
277
278 PR fortran/95089
279 * trans-types.c (gfc_get_derived_type): Enlarge temporary to hold
280 mangled name "_caf_symbol".
281
282 2020-05-26 Alexandre Oliva <oliva@adacore.com>
283
284 * options.c (gfc_get_option_string): Drop auxbase, add
285 dumpbase_ext.
286
287 2020-05-24 Harald Anlauf <anlauf@gmx.de>
288
289 PR fortran/95106
290 * trans-common.c (gfc_sym_mangled_common_id): Enlarge temporaries
291 for name-mangling.
292
293 2020-05-23 Thomas Koenig <tkoenig@gcc.gnu.org>
294
295 PR libfortran/95191
296 * libgfortran.h (libgfortran_error_codes): Add
297 LIBERROR_BAD_WAIT_ID.
298
299 2020-05-20 Mark Eggleston <markeggleston@gcc.gnu.org>
300
301 PR fortran/39695
302 * resolve.c (resolve_fl_procedure): Set name depending on
303 whether the result attribute is set. For PROCEDURE/RESULT
304 conflict use the name in sym->ns->proc_name->name.
305 * symbol.c (gfc_add_type): Add check for function and result
306 attributes use sym->ns->proc_name->name if both are set.
307 Where the symbol cannot have a type use the name in
308 sym->ns->proc_name->name.
309
310 2020-05-18 Harald Anlauf <anlauf@gmx.de>
311
312 PR fortran/95053
313 * arith.c (gfc_divide): Revert hunk introduced by patch for
314 PR93499.
315 * decl.c (variable_decl): Generate error for array shape not being
316 an INTEGER constant.
317 (gfc_get_pdt_instance): Generate error if KIND or LEN expressions
318 in declaration of a PDT instance do not simplify to INTEGER
319 constants.
320
321 2020-05-15 Tobias Burnus <tobias@codesourcery.com>
322
323 PR fortran/94690
324 * openmp.c (resolve_omp_do): Permit more clauses for SIMD
325 iteration variables.
326
327 2020-05-14 Jakub Jelinek <jakub@redhat.com>
328
329 * trans-openmp.c: Include function.h.
330 (gfc_trans_omp_target): Set cfun->has_omp_target.
331
332 2020-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
333
334 PR fortran/93497
335 * decl.c (char_len_param_value): Check whether character
336 length expression is of type EXPR_OP and if so simplify it.
337 * resolve.c (resolve_charlen): Reject length if it has a
338 rank.
339
340 2020-05-13 Tobias Burnus <tobias@codesourcery.com>
341
342 PR fortran/94690
343 * openmp.c (OMP_DISTRIBUTE_CLAUSES): Add OMP_CLAUSE_LASTPRIVATE.
344 (gfc_resolve_do_iterator): Skip the private handling for SIMD as
345 that is handled by ME code.
346 * trans-openmp.c (gfc_trans_omp_do): Don't add private/lastprivate
347 for dovar_found == 0, unless !simple.
348
349 2020-05-11 Harald Anlauf <anlauf@gmx.de>
350
351 PR fortran/95053
352 * arith.c (gfc_divide): Do not error out if operand 2 is
353 non-numeric. Defer checks to later stage.
354
355 2020-05-11 Tobias Burnus <tobias@codesourcery.com>
356
357 PR fortran/94672
358 * trans.h (gfc_conv_expr_present): Add use_saved_decl=false argument.
359 * trans-expr.c (gfc_conv_expr_present): Likewise; use DECL directly
360 and only if use_saved_decl is true, use the actual PARAM_DECL arg (saved
361 descriptor).
362 * trans-array.c (gfc_trans_dummy_array_bias): Set local 'arg.0'
363 variable to NULL if 'arg' is not present.
364 * trans-openmp.c (gfc_omp_check_optional_argument): Simplify by checking
365 'arg.0' instead of the true PARM_DECL.
366 (gfc_omp_finish_clause): Remove setting 'arg.0' to NULL.
367
368 2020-05-11 Janus Weil <janus@gcc.gnu.org>
369 Dominique d'Humieres <dominiq@lps.ens.fr>
370
371 PR fortran/59107
372 * gfortran.h: Rename field resolved as resolve_symbol_called
373 and assign two 2 bits instead of 1.
374 * interface.c (check_dtio_interface1): Use new field name.
375 (gfc_find_typebound_dtio_proc): Use new field name.
376 * resolve.c (gfc_resolve_intrinsic): Replace check of the formal
377 field with resolve_symbol_called is at least 2, if it is not
378 set the field to 2. (resolve_typebound_procedure): Use new field
379 name. (resolve_symbol): Use new field name and check whether it
380 is at least 1, if it is not set the field to 1.
381
382 2020-05-10 Harald Anlauf <anlauf@gmx.de>
383
384 PR fortran/93499
385 * arith.c (gfc_divide): Catch division by zero.
386 (eval_intrinsic_f3): Safeguard for NULL operands.
387
388 2020-05-05 Steve Kargl <kargl@gcc.gnu.org>
389 Harald Anlauf <anlauf@gmx.de>
390
391 PR fortran/93366
392 * check.c (gfc_check_associated, invalid_null_arg): Factorize
393 check for presence of invalid NULL() argument.
394 (gfc_check_kind, gfc_check_merge, gfc_check_shape)
395 (gfc_check_sizeof, gfc_check_spread, gfc_check_transfer): Use this
396 check for presence of invalid NULL() arguments.
397
398 2020-04-29 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
399
400 PR fortran/94769
401 * io.c (check_io_constraints): Initialize local variable num to
402 -1 and assert that it receives a meaningful value by function
403 compare_to_allowed_values.
404
405 2020-04-27 Thomas Koenig <tkoenig@gcc.gnu.org>
406
407 PR fortran/93956
408 PR fortran/94788
409 * expr.c (gfc_check_pointer_assign): Revert patch for PR 93956.
410 * interface.c: Likewise.
411
412 2020-04-25 Thomas Koenig <tkoenig@gcc.gnu.org>
413
414 PR fortran/94578
415 * trans-expr.c (arrayfunc_assign_needs_temporary): If the
416 LHS is a subref pointer, we also need a temporary.
417
418 2020-04-23 Thomas Koenig <tkoenig@gcc.gnu.org>
419
420 PR fortran/93956
421 * expr.c (gfc_check_pointer_assign): Also set subref_array_pointer
422 when a function returns a pointer.
423 * interface.c (gfc_set_subref_array_pointer_arg): New function.
424 (gfc_procedure_use): Call it.
425
426 2020-04-22 Fritz Reese <foreese@gcc.gnu.org>
427
428 * trigd_fe.inc: Use mpfr to compute cosd(30) rather than a host-
429 precision floating point literal based on an invalid macro.
430
431 2020-04-22 José Rui Faustino de Sousa <jrfsousa@gmail.com>
432
433 PR fortran/90350
434 * simplify.c (simplify_bound): In the case of assumed-size arrays
435 check if the reference is to a full array.
436
437 2020-04-22 Tobias Burnus <tobias@codesourcery.com>
438
439 PR fortran/94709
440 * scanner.c (load_line): In fixed form, also treat 'C' as comment and
441 'D'/'d' only with -fd-lines-as-comments. Treat '!$' with -fopenmp,
442 '!$acc' with -fopenacc and '!GCC$' as non-comment to permit <tab>
443 and truncation warnings.
444
445 2020-04-20 Thomas Koenig <tkoenig@gcc.gnu.org>
446
447 * dump-parse-tree.c (show_attr): Add numerous flags, some cleanup.
448
449 2020-04-20 Harald Anlauf <anlauf@gmx.de>
450
451 PR fortran/93364
452 * array.c (gfc_set_array_spec): Check for sum of rank and corank
453 not exceeding GFC_MAX_DIMENSIONS.
454
455 2020-04-20 Steve Kargl <kargl@gcc.gnu.org>
456 Thomas Koenig <tkoenig@gcc.gnu.org>
457
458 PR fortran/91800
459 * decl.c (variable_decl): Reject Hollerith constants as type
460 initializer.
461
462 2020-04-19 Thomas Koenig <tkoenig@gcc.gnu.org>
463
464 PR fortran/93500
465 * resolve.c (resolve_operator): If both operands are
466 NULL, return false.
467 * simplify.c (simplify_bound): If a division by zero
468 was seen during bound simplification, free the
469 corresponcing expression and return &gfc_bad_expr.
470
471 2020-04-17 Thomas Koenig <tkoenig@gcc.gnu.org>
472
473 PR fortran/94090
474 * gfortran.dg (gfc_compare_interfaces): Add
475 optional argument bad_result_characteristics.
476 * interface.c (gfc_check_result_characteristics): Fix
477 whitespace.
478 (gfc_compare_interfaces): Handle new argument; return
479 true if function return values are wrong.
480 * resolve.c (resolve_global_procedure): Hard error if
481 the return value of a function is wrong.
482
483 2020-04-15 Fritz Reese <foreese@gcc.gnu.org>
484 Linus Koenig <link@sig-st.de>
485
486 PR fortran/94192
487 * simplify.c (simplify_bound): Simplify condition for error check.
488
489 2020-04-14 Tobias Burnus <tobias@codesourcery.com>
490
491 * module.c (gfc_match_use): Fix name-conflict check for use-associating
492 the same symbol again in a submodule.
493
494 2020-04-13 Linus Koenig <link@sig-st.de>
495
496 PR fortran/94192
497 * resolve.c (resolve_fl_var_and_proc): Set flag "error" to 1 if
498 pointer is found to not have an assumed rank or a deferred shape.
499 * simplify.c (simplify_bound): If an error has been issued for a
500 given pointer, one should not attempt to find its bounds.
501
502 2020-04-09 Fritz Reese <foreese@gcc.gnu.org>
503
504 PR fortran/87923
505 * gfortran.h (gfc_resolve_open, gfc_resolve_close): Add
506 locus parameter.
507 (gfc_resolve_dt): Add code parameter.
508 * io.c (async_io_dt, check_char_variable, is_char_type): Removed.
509 (resolve_tag_format): Add locus to error message regarding
510 zero-sized array in FORMAT tag.
511 (check_open_constraints, check_close_constraints): New functions
512 called at resolution time.
513 (gfc_match_open, gfc_match_close, match_io): Move checks which don't
514 affect the match result to new functions check_open_constraints,
515 check_close_constraints, check_io_constraints.
516 (gfc_resolve_open, gfc_resolve_close): Call new functions
517 check_open_constraints, check_close_constraints after all tags have
518 been independently resolved. Remove duplicate constraints which are
519 already verified by resolve_tag. Explicitly pass locus to all error
520 reports.
521 (compare_to_allowed_values): Add locus parameter and provide
522 explicit locus all error reports.
523 (match_open_element, match_close_element, match_file_element,
524 match_dt_element, match_inquire_element): Remove redundant special
525 cases for ASYNCHRONOUS and IOMSG tags.
526 (gfc_resolve_dt): Remove redundant special case for format
527 expression. Call check_io_constraints, forwarding an I/O list as
528 the io_code parameter if present.
529 (check_io_constraints): Change return type to bool. Pass explicit
530 locus to error reports. Move generic checks after tag-specific
531 checks, since errors are no longer buffered. Move simplification of
532 format string to match_io. Remove redundant checks which are
533 verified by resolve_tag. Remove usage of async_io_dt flag and
534 explicitly mark symbols used in asynchronous I/O with the
535 asynchronous attribute.
536 * resolve.c (resolve_transfer, resolve_fl_namelist): Remove checks
537 for async_io_dt flag. This is now done in io.c.
538 (check_io_constraints).
539 (gfc_resolve_code): Pass code locus to gfc_resolve_open,
540 gfc_resolve_close, gfc_resolve_dt.
541
542 2020-04-07 Fritz Reese <foreese@gcc.gnu.org>
543 Steven G. Kargl <kargl@gcc.gnu.org>
544
545 PR fortran/93871
546 * gfortran.h (GFC_ISYM_ACOSD, GFC_ISYM_ASIND, GFC_ISYM_ATAN2D,
547 GFC_ISYM_ATAND, GFC_ISYM_COSD, GFC_ISYM_COTAND, GFC_ISYM_SIND,
548 GFC_ISYM_TAND): New.
549 * intrinsic.c (add_functions): Remove check for flag_dec_math.
550 Give degree trig functions simplification and name resolution
551 functions (e.g, gfc_simplify_atrigd () and gfc_resolve_atrigd ()).
552 (do_simplify): Remove special casing of degree trig functions.
553 * intrinsic.h (gfc_simplify_acosd, gfc_simplify_asind,
554 gfc_simplify_atand, gfc_simplify_cosd, gfc_simplify_cotand,
555 gfc_simplify_sind, gfc_simplify_tand, gfc_resolve_trigd2): Add new
556 prototypes.
557 (gfc_simplify_atrigd, gfc_simplify_trigd, gfc_resolve_cotan,
558 resolve_atrigd): Remove prototypes of deleted functions.
559 * iresolve.c (is_trig_resolved, copy_replace_function_shallow,
560 gfc_resolve_cotan, get_radians, get_degrees, resolve_trig_call,
561 gfc_resolve_atrigd, gfc_resolve_atan2d): Delete functions.
562 (gfc_resolve_trigd, gfc_resolve_trigd2): Resolve to library functions.
563 * simplify.c (rad2deg, deg2rad, gfc_simplify_acosd, gfc_simplify_asind,
564 gfc_simplify_atand, gfc_simplify_atan2d, gfc_simplify_cosd,
565 gfc_simplify_sind, gfc_simplify_tand, gfc_simplify_cotand): New
566 functions.
567 (gfc_simplify_atan2): Fix error message.
568 (simplify_trig_call, gfc_simplify_trigd, gfc_simplify_atrigd,
569 radians_f): Delete functions.
570 * trans-intrinsic.c: Add LIB_FUNCTION decls for sind, cosd, tand.
571 (rad2deg, gfc_conv_intrinsic_atrigd, gfc_conv_intrinsic_cotan,
572 gfc_conv_intrinsic_cotand, gfc_conv_intrinsic_atan2d): New functions.
573 (gfc_conv_intrinsic_function): Handle ACOSD, ASIND, ATAND, COTAN,
574 COTAND, ATAN2D.
575 * trigd_fe.inc: New file. Included by simplify.c to implement
576 simplify_sind, simplify_cosd, simplify_tand with code common to the
577 libgfortran implementation.
578
579 2020-04-06 Steven G. Kargl <kargl@gcc.gnu.org>
580
581 PR fortran/93686
582 * decl.c (gfc_match_data): Handle data matching for derived type
583 pointers.
584
585 2020-04-02 Tobias Burnus <tobias@codesourcery.com>
586
587 * gfortran.h (gfc_resolve_formal_arglist): Add prototype.
588 * interface.c (check_dtio_interface1): Call it.
589 * resolve.c (gfc_resolve_formal_arglist): Renamed from
590 resolve_formal_arglist, removed static.
591 (find_arglists, resolve_types): Update calls.
592
593 2020-04-02 Tobias Burnus <tobias@codesourcery.com>
594
595 PR fortran/93522
596 * match.c (gfc_match_select_rank): Fix error cleanup.
597
598 2020-04-02 Steven G. Kargl <kargl@gcc.gnu.org>
599
600 PR fortran/93498
601 * check.c (gfc_check_findloc): If the kinds of the arguments
602 differ goto label "incompat".
603
604 2020-04-02 Steven G. Kargl <kargl@gcc.gnu.org>
605
606 PR fortran/94030
607 * resolve.c (resolve_equivalence): Correct formatting
608 around the label "identical_types". Instead of using
609 gfc_resolve_array_spec use is_non_constants_shape_array
610 to determine whether the array can be used in a in an
611 equivalence statement.
612
613 2020-04-01 Mark Eggleston <mark.eggleston@codethink.com>
614
615 PR fortran/94386
616 expr.c (simplify_parameter_variable): Restore code deleted
617 in PR94246.
618
619 2020-03-28 Paul Thomas <pault@gcc.gnu.org>
620
621 PR fortran/94246
622 * arith.c : Remove trailing white space.
623 * expr.c (scalarize_intrinsic_call): Remove the error checking.
624 Make a copy of the expression to be simplified and only replace
625 the original if the simplification succeeds.
626
627 2020-03-28 Tobias Burnus <tobias@codesourcery.com>
628
629 PR fortran/94348
630 * decl.c (gfc_match_submod_proc): Add result var to the
631 proc's namespace.
632
633 2020-03-27 Tobias Burnus <tobias@codesourcery.com>
634
635 PR fortran/93957
636 * trans-array.c (gfc_alloc_allocatable_for_assignment): Accept
637 nonallocatable, nonpointer deferred-rank arrays.
638
639 2020-03-27 Tobias Burnus <tobias@codesourcery.com>
640
641 PR fortran/93363
642 * resolve.c (resolve_assoc_var): Reject association to DT and
643 function name.
644
645 2020-03-25 Steven G. Kargl <kargl@gcc.gnu.org>
646
647 PR fortran/93484
648 * match.c (gfc_match_type_spec): Replace gfc_match_init_expr with
649 gfc_match_expr. Return m if m is MATCH_NO or MATCH_ERROR.
650
651 2020-03-23 Mark Eggleston <mark.eggleston@codethink.com>
652 Steven G. Kargl <kargl@gcc.gnu.org>
653
654 PR fortran/93600
655 * expr.c (simplify_parameter_variable): Check whether the ref
656 chain contains INQUIRY_LEN or INQUIRY_KIND and set inquiry
657 boolean. When an empty array has been identified and a new
658 new EXPR_ARRAY expression has been created only return that
659 expression if inquiry is not set. This allows the new
660 expression to drop through to be simplified into a
661 EXPR_CONSTANT representing %kind or %len.
662 * matc.c (gfc_match_assignment): If lvalue doesn't have a
663 symtree free both lvalue and rvalue expressions and return
664 an error.
665 * resolv.c (gfc_resolve_ref): Ensure that code to handle
666 INQUIRY_LEN is only performed for arrays with deferred types.
667
668 2020-03-18 Jakub Jelinek <jakub@redhat.com>
669
670 * class.c (generate_finalization_wrapper): Fix up duplicated word
671 issue in a comment.
672 * trans-types.c (gfc_get_nodesc_array_type): Likewise.
673
674 2020-03-17 Jakub Jelinek <jakub@redhat.com>
675
676 * array.c (gfc_check_iter_variable): Fix up duplicated word issue
677 in a comment.
678 * arith.c (gfc_arith_concat): Likewise.
679 * resolve.c (gfc_resolve_ref): Likewise.
680 * frontend-passes.c (matmul_lhs_realloc): Likewise.
681 * module.c (gfc_match_submodule, load_needed): Likewise.
682 * trans-expr.c (gfc_init_se): Likewise.
683
684 2020-03-15 Lewis Hyatt <lhyatt@gmail.com>
685
686 * lang.opt: Avoid redundancy in the help text.
687
688 2020-03-12 Tobias Burnus <tobias@codesourcery.com>
689
690 PR middle-end/94120
691 * openmp.c (gfc_match_oacc_declare): Accept function-result
692 variables; reject variables declared in a different scoping unit.
693
694 2020-03-08 Paul Thomas <pault@gcc.gnu.org>
695
696 PR fortran/93581
697 * resolve.c (gfc_resolve_ref): Modify array refs to be elements
698 if the ref chain ends in INQUIRY_LEN.
699 * trans-array.c (gfc_get_dataptr_offset): Provide the offsets
700 for INQUIRY_RE and INQUIRY_IM.
701
702 2020-03-05 Steven G. Kargl <kargl@gcc.gnu.org>
703
704 PR fortran/93792
705 * decl.c (variable_decl): If param and initializer check
706 for BOZ, if found, output an error, set m to MATCH_ERROR
707 and goto cleanup.
708
709 2020-03-02 Andrew Benson <abensonca@gmail.com>
710
711 PR fortran/93486
712 * module.c: Increase size of variables used to read module names
713 when loading interfaces from module files to permit cases where
714 the name is the concatenation of a module and submodule name.
715 * gfortran.dg/pr93486.f90: New test.
716
717 2020-03-01 Paul Thomas <pault@gcc.gnu.org>
718
719 PR fortran/92976
720 * match.c (select_type_set_tmp): If the selector array spec has
721 explicit bounds, make the temporary's bounds deferred.
722
723 2020-03-01 Paul Thomas <pault@gcc.gnu.org>
724
725 PR fortran/92959
726 * trans-intrinsic.c (gfc_conv_associated): Eliminate
727 'nonzero_charlen' and move the chunk to evaluate zero character
728 length until after the argument evaluation so that the string
729 length can be used.
730
731 2020-02-28 Paul Thomas <pault@gcc.gnu.org>
732
733 PR fortran/92785
734 * trans-expr.c (gfc_conv_intrinsic_to_class): Renormalise non-
735 variable expressions to be unity lbound based.
736
737 2020-02-25 Steven G. Kargl <kargl@gcc.gnu.org>
738
739 * simplify.c (degrees_f): Remove unused code.
740
741 2020-02-25 Jakub Jelinek <jakub@redhat.com>
742
743 PR translation/93864
744 * intrinsic.texi (CO_BROADCAST): Fix typo, paramter -> parameter.
745 * trans-array.c (gfc_allocate_pdt_comp, gfc_deallocate_pdt_comp,
746 gfc_check_pdt_dummy): Fix comment typo paramter -> parameter.
747
748 2020-02-24 Mark Eggleston <mark.eggleston@codethink.com>
749 Steven G. Kargl <kargl@gcc.gnu.org>
750
751 PR fortran/93835
752 * decl.c (gfc_match_data) : Check whether the data expression
753 is a derived type and is a constructor. If a BOZ constant
754 is encountered in the constructor output an error and return
755 MATCH_ERROR.
756
757 2020-02-24 Steven G. Kargl <kargl@gcc.gnu.org>
758
759 PR fortran/93604
760 * decl.c (gfc_match_data) : Check whether the data expression
761 is a derived type and is a constructor. If a BOZ constant
762 is encountered in the constructor output an error and return
763 MATCH_ERROR.
764
765 2020-02-24 Tobias Burnus <tobias@codesourcery.com>
766
767 PR fortran/93552
768 * match.c (match_exit_cycle): With OpenACC, check the kernels loop
769 directive and tile clause as well.
770
771 2020-02-23 Thomas Koenig <tkoenig@gcc.gnu.org>
772
773 PR fortran/93889
774 * interface.c (compare_parameter): Fix error message.
775
776 2020-02-23 Thomas Koenig <tkoenig@gcc.gnu.org>
777
778 PR fortran/93890
779 * interface.c: Replace "can not" by "cannot" and remove trailing
780 space.
781
782 2020-02-20 Tobias Burnus <tobias@codesourcery.com>
783
784 PR fortran/93825
785 * openmp.c (resolve_oacc_loop_blocks): Move call to
786 resolve_oacc_nested_loops from here ...
787 (resolve_oacc_loop): ... to here.
788
789 2020-02-18 Mark Eggleston <markeggleston@gcc.gnu.org>
790
791 PR fortran/93714
792 * expr.c (gfc_check_pointer_assign): Move check for
793 matching character length to after checking the lvalue
794 attributes for target or pointer.
795
796 2020-02-18 Steven G. Kargl <kargl@gcc.gnu.org>
797
798 PR fortran/93601
799 * match.c (gfc_match_assignment) : Reject assignment if
800 the lhs stype is BT_CLASS and the rhs type is BT_BOZ.
801
802 2020-02-18 Steven G. Kargl <kargl@gcc.gnu.org>
803
804 PR fortran/93603
805 * match.c (gfc_match_associate) : If target expression
806 has the type BT_BOZ output an error and goto
807 assocListError.
808
809 2020-02-18 Steven G. Kargl <kargl@gcc.gnu.org>
810 Mark Eggleston <markeggleston@gcc.gnu.org>
811
812 PR fortran/93580
813 * primary.c (gfc_match_varspec): If the symbol following %
814 is re or im and the primary expression type is not BT_COMPLEX
815 issue an error. If the symbol is len and the primary
816 expression type is not BT_CHARACTER is an error.
817
818 2020-02-10 Andrew Benson <abensonca@gmail.com>
819
820 PR fortran/83113
821 * array.c: Do not attempt to set the array spec for a submodule
822 function symbol (as it has already been set in the corresponding
823 module procedure interface).
824 * symbol.c: Do not reject duplicate POINTER, ALLOCATABLE, or
825 DIMENSION attributes in declarations of a submodule function.
826 * gfortran.h: Add a macro that tests for a module procedure in a
827 submodule.
828 * gfortran.dg/pr83113.f90: New test.
829
830 2020-02-03 Julian Brown <julian@codesourcery.com>
831 Tobias Burnus <tobias@codesourcery.com>
832
833 * cpp.c (cpp_define_builtins): Update _OPENACC define to 201711.
834 * intrinsic.texi: Update mentions of OpenACC version to 2.6.
835 * gfortran.texi: Likewise. Remove experimental disclamer for OpenACC.
836 * invoke.texi: Remove experimental disclamer for OpenACC.
837
838 2020-02-03 Tobias Burnus <tobias@codesourcery.com>
839
840 PR fortran/93541
841 * intrinisic.texi (OpenMP Modules OMP_LIB and OMP_LIB_KINDS):
842 Add undocumented parameters from omp_lib.f90.in.
843
844 2020-02-03 Tobias Burnus <tobias@codesourcery.com>
845
846 PR fortran/93427
847 * resolve.c (resolve_assoc_var): Remove too strict check.
848 * gfortran.dg/associate_51.f90: Update test case.
849
850 2020-02-01 Jakub Jelinek <jakub@redhat.com>
851
852 PR fortran/92305
853 * trans-types.c (gfc_get_function_type): Also push boolean_type_node
854 types for non-character scalar VALUE optional dummy arguments.
855 * trans-decl.c (create_function_arglist): Skip those in
856 hidden_typelist. Formatting fix.
857
858 2020-01-31 Tobias Burnus <tobias@codesourcery.com>
859
860 PR fortran/93462
861 * frontend-passes.c (gfc_code_walker): For EXEC_OACC_ATOMIC, set
862 in_omp_atomic to true prevent front-end optimization.
863
864 2020-01-30 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
865
866 PR fortran/87103
867 * expr.c (gfc_check_conformance): Check vsnprintf for truncation.
868 * iresolve.c (gfc_get_string): Likewise.
869 * symbol.c (gfc_new_symbol): Remove check for maximum symbol
870 name length. Remove redundant 0 setting of new calloc()ed
871 gfc_symbol.
872
873 2020-01-30 Paul Thomas  <pault@gcc.gnu.org>
874 Jakub Jelinek <jakub@redhat.com>
875
876 PR fortran/92123
877 * trans-decl.c (gfc_get_symbol_decl): Call gfc_defer_symbol_init for
878 CFI descs.
879 (gfc_build_builtin_function_decls): Use ".w." instead of ".ww" or ".wR"
880 for gfor_fndecl_{cfi_to_gfc,gfc_to_cfi}.
881 (convert_CFI_desc): Handle references to CFI descriptors.
882
883 2020-01-29 Jakub Jelinek <jakub@redhat.com>
884
885 PR fortran/93463
886 * openmp.c (oacc_code_to_statement): Handle
887 EXEC_OACC_{ROUTINE,UPDATE,WAIT,CACHE,{ENTER,EXIT}_DATA,DECLARE}.
888
889 2020-01-28 Andrew Benson <abensonca@gmail.com>
890
891 PR fortran/93461
892 * trans.h: Increase GFC_MAX_MANGLED_SYMBOL_LEN to
893 GFC_MAX_SYMBOL_LEN*3+5 to allow for inclusion of submodule name,
894 plus the "." between module and submodule names.
895 * gfortran.dg/pr93461.f90: New test.
896
897 2020-01-28 Andrew Benson <abensonca@gmail.com>
898
899 PR fortran/93473
900 * parse.c: Increase length of char variables to allow them to hold
901 a concatenated module + submodule name.
902 * gfortran.dg/pr93473.f90: New test.
903
904 2020-01-28 Julian Brown <julian@codesourcery.com>
905
906 PR fortran/93025
907 * openmp.c (resolve_omp_clauses): Check array references for contiguity.
908
909 2020-01-28 Julian Brown <julian@codesourcery.com>
910
911 * gfortran.h (gfc_symbol): Add comp_mark bitfield.
912 * openmp.c (resolve_omp_clauses): Disallow mixed component and
913 full-derived-type accesses to the same variable within a single
914 directive.
915
916 2020-01-28 Tobias Burnus <tobias@codesourcery.com>
917
918 PR fortran/93464
919 * openmp.c (gfc_omp_check_optional_argument): Avoid ICE when
920 DECL_LANG_SPECIFIC and GFC_DESCRIPTOR_TYPE_P but not
921 GFC_DECL_SAVED_DESCRIPTOR as for local allocatable character vars.
922
923 2020-01-28 Tobias Burnus <tobias@codesourcery.com>
924
925 * gfortran.texi (Runtime): Remove tailing '.' in @menu.
926
927 2020-01-27 Tobias Burnus <tobias@codesourcery.com>
928
929 PR fortran/85781
930 * trans-expr.c (gfc_conv_substring): Handle non-ARRAY_TYPE strings
931 of Bind(C) procedures.
932
933 2020-01-22 Jakub Jelinek <jakub@redhat.com>
934
935 * parse.c (parse_omp_structured_block): Handle ST_OMP_TARGET_PARALLEL.
936 * trans-openmp.c (gfc_trans_omp_target)
937 <case EXEC_OMP_TARGET_PARALLEL>: Call pushlevel first.
938
939 PR fortran/93329
940 * openmp.c (omp_code_to_statement): Handle remaining EXEC_OMP_*
941 cases.
942
943 2020-01-21 Tobias Burnus <tobias@codesourcery.com>
944
945 PR fortran/93309
946 * interface.c (gfc_procedure_use): Also check parent namespace for
947 'implict none (external)'.
948 * symbol.c (gfc_get_namespace): Don't set has_implicit_none_export
949 to parent namespace's setting.
950
951 2020-01-19 Thomas König <tkoenig@gcc.gnu.org>
952
953 PR fortran/44960
954 * primary.c (gfc_match_rvalue): Break after setting MATCH_ERROR.
955 * resolve.c (resolve_function): Issue error when a
956 function call contains a reference.
957
958 2020-01-17 Mark Eggleston <mark.eggleston@codethink.com>
959
960 PR fortran/93236
961 * resolve.c (resolve_types): Declare boolean recursive and set with the
962 value of the recursive attribute of namespace proc_name symbol
963 structure if it exists. Call gfc_save_all if both flag_automatic and
964 recursive are false or ns->save_all is true.
965
966 2020-01-16 Tobias Burnus <tobias@codesourcery.com>
967
968 PR fortran/93253
969 * check.c (gfc_invalid_boz): Mention -fallow-invalid-boz
970 in the error message.
971 * gfortran.texi (BOZ literal constants): List another missing
972 extension and refer to -fallow-invalid-boz.
973 * lang.opt (fallow-invalid-boz): Also mention 'X' in the help text
974 as it is not covered by the previous wording.
975 * primary.c (match_boz_constant): Tweak wording such that it is
976 clear how to fix the nonstandard use.
977
978 2020-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
979
980 PR fortran/65428
981 * array.c (empty_constructor): New variable.
982 (empty_ts): New variable.
983 (expand_constructor): Save typespec in empty_ts.
984 Unset empty_constructor if there is an element.
985 (gfc_expand_constructor): Initialize empty_constructor
986 and empty_ts. If there was no explicit constructor
987 type and the constructor is empty, take the type from
988 empty_ts.
989
990 2020-01-09 Tobias Burnus <tobias@codesourcery.com>
991
992 PR fortran/84135
993 * array.c (gfc_set_array_spec): Fix shifting of codimensions
994 when adding a dimension.
995 * decl.c (merge_array_spec): Ditto. Fix using correct codimensions.
996
997 2020-01-07 Jakub Jelinek <jakub@redhat.com>
998
999 PR fortran/93162
1000 * trans-openmp.c (gfc_trans_omp_clauses): Check for REF_ARRAY type
1001 before testing u.ar.type == AR_FULL.
1002
1003 2020-01-04 Tobias Burnus <tobias@codesourcery.com>
1004
1005 PR fortran/91640
1006 * trans-expr.c (gfc_conv_procedure_call): Avoid copy-out for nonvariable
1007 arguments to contiguous dummy args. Avoid re-checking whether fsym is
1008 NULL.
1009
1010 2020-01-03 Tobias Burnus <tobias@codesourcery.com>
1011
1012 * trans-openmp.c (gfc_omp_check_optional_argument): Always return a
1013 Boolean expression; handle unallocated/disassociated actual arguments
1014 as absent if passed to nonallocatable/nonpointer dummy array arguments.
1015 (gfc_build_cond_assign): Change to assume a Boolean expr not a pointer.
1016 (gfc_omp_finish_clause, gfc_trans_omp_clauses): Assign NULL to generated
1017 array-data variable if the argument is absent. Simplify code as
1018 'present' is now a Boolean expression.
1019
1020 2020-01-03 Tobias Burnus <tobias@codesourcery.com>
1021
1022 PR fortran/92994
1023 * primary.c (gfc_match_rvalue): Add some flavor checks
1024 gfc_matching_procptr_assignment.
1025 * resolve.c (resolve_assoc_var): Add more checks for invalid targets.
1026
1027 2020-01-02 Tobias Burnus <tobias@codesourcery.com>
1028
1029 PR fortran/68020
1030 * array.c (gfc_match_array_spec): Fix implied-type matching
1031 for rank > 2.
1032
1033 2020-01-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1034
1035 PR fortran/93113
1036 * dependency.c (gfc_dep_resolver): Handle REF_INQUIRY in switch
1037 for ref types.
1038
1039 2020-01-01 Jakub Jelinek <jakub@redhat.com>
1040
1041 Update copyright years.
1042
1043 * gfortranspec.c (lang_specific_driver): Update copyright notice
1044 dates.
1045 * gfc-internals.texi: Bump @copying's copyright year.
1046 * gfortran.texi: Ditto.
1047 * intrinsic.texi: Ditto.
1048 * invoke.texi: Ditto.
1049 \f
1050 Copyright (C) 2020 Free Software Foundation, Inc.
1051
1052 Copying and distribution of this file, with or without modification,
1053 are permitted in any medium without royalty provided the copyright
1054 notice and this notice are preserved.