]> gcc.gnu.org Git - gcc.git/blob - gcc/fortran/ChangeLog
Daily bump.
[gcc.git] / gcc / fortran / ChangeLog
1 2021-03-15 Paul Thomas <pault@gcc.gnu.org>
2
3 Backported from master:
4 2021-03-15 Paul Thomas <pault@gcc.gnu.org>
5
6 PR fortran/99545
7 * trans-stmt.c (gfc_trans_allocate): Mark the initialization
8 assignment by setting init_flag.
9
10 2021-02-26 Harald Anlauf <anlauf@gmx.de>
11
12 Backported from master:
13 2021-01-14 Harald Anlauf <anlauf@gmx.de>
14
15 * gfortran.h (gfc_resolve_substring): Add prototype.
16 * primary.c (match_string_constant): Simplify substrings with
17 constant starting and ending points.
18 * resolve.c: Rename resolve_substring to gfc_resolve_substring.
19 (gfc_resolve_ref): Use renamed function gfc_resolve_substring.
20
21 2021-02-24 Paul Thomas <pault@gcc.gnu.org>
22
23 Backported from master:
24 2021-02-23 Paul Thomas <pault@gcc.gnu.org>
25
26 PR fortran/99124
27 * resolve.c (resolve_fl_procedure): Include class results in
28 the test for F2018, C15100.
29 * trans-array.c (get_class_info_from_ss): Do not use the saved
30 descriptor to obtain the class expression for variables. Use
31 gfc_get_class_from_expr instead.
32
33 2021-02-23 Harald Anlauf <anlauf@gmx.de>
34
35 Backported from master:
36 2021-02-21 Harald Anlauf <anlauf@gmx.de>
37
38 * trans-expr.c (gfc_conv_procedure_call): Do not add clobber to
39 allocatable intent(out) argument.
40
41 2021-02-11 Paul Thomas <pault@gcc.gnu.org>
42
43 Backported from master:
44 2021-02-11 Paul Thomas <pault@gcc.gnu.org>
45
46 PR fortran/99060
47 * primary.c (gfc_match_varspec): Test for non-null 'previous'
48 before using its name in the error message.
49
50 2021-01-28 Harald Anlauf <anlauf@gmx.de>
51
52 Backported from master:
53 2021-01-28 Harald Anlauf <anlauf@gmx.de>
54
55 PR fortran/86470
56 * trans.c (gfc_call_malloc): Allocate area of size 1 if passed
57 size is NULL (as documented).
58
59 2021-01-25 Paul Thomas <pault@gcc.gnu.org>
60
61 Backported from master:
62 2021-01-25 Steve Kargl <kargl@gcc.gnu.org>
63
64 PR fortran/98517
65 * resolve.c (resolve_charlen): Check that length expression is
66 present before testing for scalar/integer..
67
68 2021-01-25 Paul Thomas <pault@gcc.gnu.org>
69
70 Backported from master:
71 2020-12-29 Paul Thomas <pault@gcc.gnu.org>
72
73 PR fortran/93833
74 * trans-array.c (get_array_ctor_var_strlen): If the character
75 length backend_decl cannot be found, convert the expression and
76 use the string length. Clear up some minor white space issues
77 in the rest of the file.
78
79 2021-01-23 Paul Thomas <pault@gcc.gnu.org>
80
81 Backported from master:
82 2020-12-26 Paul Thomas <pault@gcc.gnu.org>
83
84 PR fortran/98022
85 * data.c (gfc_assign_data_value): Throw an error for inquiry
86 references. Follow with corrected code that would provide the
87 expected result and provides clean error recovery.
88
89 2021-01-23 Paul Thomas <pault@gcc.gnu.org>
90
91 Backported from master:
92 2020-12-12 Paul Thomas <pault@gcc.gnu.org>
93
94 PR fortran/98022
95 * data.c (gfc_assign_data_value): Handle inquiry references in
96 the data statement object list.
97
98 2021-01-19 Tobias Burnus <tobias@codesourcery.com>
99
100 Backported from master:
101 2020-01-04 Tobias Burnus <tobias@codesourcery.com>
102
103 PR fortran/91640
104 * trans-expr.c (gfc_conv_procedure_call): Avoid copy-out for nonvariable
105 arguments to contiguous dummy args. Avoid re-checking whether fsym is
106 NULL.
107
108 2021-01-07 Harald Anlauf <anlauf@gmx.de>
109
110 Backported from master:
111 2021-01-06 Harald Anlauf <anlauf@gmx.de>
112
113 * resolve.c (resolve_component): Add check for valid CLASS
114 reference before trying to access CLASS data.
115
116 2021-01-07 Paul Thomas <pault@gcc.gnu.org>
117
118 Backported from master:
119 2020-08-02 Paul Thomas <pault@gcc.gnu.org>
120
121 PR fortran/96325
122 * primary.c (gfc_match_varspec): In the case that a component
123 reference is added to an intrinsic type component, emit the
124 error message in this function.
125
126 2021-01-07 Paul Thomas <pault@gcc.gnu.org>
127
128 Backported from master:
129 2020-12-26 Paul Thomas <pault@gcc.gnu.org>
130
131 PR fortran/83118
132 * trans-array.c (gfc_alloc_allocatable_for_assignment): Make
133 sure that class expressions are captured for dummy arguments by
134 use of gfc_get_class_from_gfc_expr otherwise the wrong vptr is
135 used.
136 * trans-expr.c (gfc_get_class_from_gfc_expr): New function.
137 (gfc_get_class_from_expr): If a constant expression is
138 encountered, return NULL_TREE;
139 (gfc_trans_assignment_1): Deallocate rhs allocatable components
140 after passing derived type function results to class lhs.
141 * trans.h : Add prototype for gfc_get_class_from_gfc_expr.
142
143 2021-01-07 Paul Thomas <pault@gcc.gnu.org>
144
145 Backported from master:
146 2020-12-18 Paul Thomas <pault@gcc.gnu.org>
147
148 PR fortran/83118
149 PR fortran/96012
150 * resolve.c (resolve_ordinary_assign): Generate a vtable if
151 necessary for scalar non-polymorphic rhs's to unlimited lhs's.
152 * trans-array.c (get_class_info_from_ss): New function.
153 (gfc_trans_allocate_array_storage): Defer obtaining class
154 element type until all sources of class exprs are tried. Use
155 class API rather than TREE_OPERAND. Look for class expressions
156 in ss->info by calling get_class_info_from_ss. After, obtain
157 the element size for class descriptors. Where the element type
158 is unknown, cast the data as character(len=size) to overcome
159 unlimited polymorphic problems.
160 (gfc_conv_ss_descriptor): Do not fix class variable refs.
161 (build_class_array_ref, structure_alloc_comps): Replace code
162 replicating the new function gfc_resize_class_size_with_len.
163 (gfc_alloc_allocatable_for_assignment): Obtain element size
164 for lhs in cases of deferred characters and class enitities.
165 Move code for the element size of rhs to start of block. Clean
166 up extraction of class parameters throughout this function.
167 After the shape check test whether or not the lhs and rhs
168 element sizes are the same. Use earlier evaluation of
169 'cond_null'. Reallocation of lhs only to happen if size changes
170 or element size changes.
171 * trans-expr.c (gfc_resize_class_size_with_len): New function.
172 (gfc_get_class_from_expr): If a constant expression is
173 encountered, return NULL_TREE;
174 (trans_scalar_class_assign): New function.
175 (gfc_conv_procedure_call): Ensure the vtable is present for
176 passing a non-class actual to an unlimited formal.
177 (trans_class_vptr_len_assignment): For expressions of type
178 BT_CLASS, extract the class expression if necessary. Use a
179 statement block outside the loop body. Ensure that 'rhs' is
180 of the correct type. Obtain rhs vptr in all circumstances.
181 (gfc_trans_scalar_assign): Call trans_scalar_class_assign to
182 make maximum use of the vptr copy in place of assignment.
183 (trans_class_assignment): Actually do reallocation if needed.
184 (gfc_trans_assignment_1): Simplify some of the logic with
185 'realloc_flag'. Set 'vptr_copy' for all array assignments to
186 unlimited polymorphic lhs.
187 * trans.c (gfc_build_array_ref): Call gfc_resize_class_size_
188 with_len to correct span for unlimited polymorphic decls.
189 * trans.h : Add prototype for gfc_resize_class_size_with_len.
190
191 2021-01-06 Tobias Burnus <tobias@codesourcery.com>
192
193 Backported from master:
194 2020-04-14 Tobias Burnus <tobias@codesourcery.com>
195
196 * module.c (gfc_match_use): Fix name-conflict check for use-associating
197 the same symbol again in a submodule.
198
199 2021-01-04 Harald Anlauf <anlauf@gmx.de>
200
201 Backported from master:
202 2021-01-01 Harald Anlauf <anlauf@gmx.de>
203
204 * class.c (gfc_find_vtab): Add check on attribute is_class.
205
206 2021-01-04 Tobias Burnus <tobias@codesourcery.com>
207
208 Backported from master:
209 2020-12-17 Tobias Burnus <tobias@codesourcery.com>
210
211 PR fortran/92587
212 * match.c (gfc_match_assignment): Move gfc_find_vtab call from here ...
213 * resolve.c (gfc_resolve_code): ... to here.
214
215 2021-01-04 Paul Thomas <pault@gcc.gnu.org>
216
217 PR fortran/96320
218 * interface.c (gfc_check_dummy_characteristics): If a module
219 procedure arrives with assumed shape in the interface and
220 deferred shape in the procedure itself, update the latter and
221 copy the lower bounds.
222
223 2021-01-04 Paul Thomas <pault@gcc.gnu.org>
224
225 PR fortran/94246
226 * expr.c (scalarize_intrinsic_call): Remove the error checking.
227 Make a copy of the expression to be simplified and only replace
228 the original if the simplification succeeds.
229
230 2020-12-29 Harald Anlauf <anlauf@gmx.de>
231
232 Backported from master:
233 2020-12-25 Harald Anlauf <anlauf@gmx.de>
234
235 * data.c (gfc_assign_data_value): Restrict use of
236 create_character_initializer to constant initializers.
237 * trans-expr.c (gfc_conv_initializer): Ensure that character
238 initializer is constant, otherwise fall through to get the same
239 error handling as for non-character cases.
240
241 2020-12-28 Paul Thomas <pault@gcc.gnu.org>
242
243 Backported from master:
244 2020-08-20 Paul Thomas <pault@gcc.gnu.org>
245
246 PR fortran/96100
247 PR fortran/96101
248 * trans-array.c (get_array_charlen): Tidy up the evaluation of
249 the string length for array constructors. Avoid trailing array
250 references. Ensure string lengths of deferred length components
251 are set. For parentheses operator apply string length to both
252 the primary expression and the enclosed expression.
253
254 2020-12-23 Harald Anlauf <anlauf@gmx.de>
255
256 Backported from master:
257 2020-12-17 Harald Anlauf <anlauf@gmx.de>
258
259 PR fortran/98307
260 * trans-stmt.c (check_forall_dependencies): Extend dependency
261 check to allocatable components of derived types.
262
263 2020-12-11 Harald Anlauf <anlauf@gmx.de>
264
265 Backported from master:
266 2020-11-29 Harald Anlauf <anlauf@gmx.de>
267
268 * expr.c (simplify_parameter_variable): Fix up character length
269 after copying an array-valued expression.
270
271 2020-12-04 Harald Anlauf <anlauf@gmx.de>
272
273 Backported from master:
274 2020-12-03 Harald Anlauf <anlauf@gmx.de>
275
276 PR fortran/95342
277 * decl.c (gfc_match_function_decl): Avoid NULL pointer dereference.
278 (gfc_match_subroutine): Likewise.
279
280 2020-11-12 Tobias Burnus <tobias@codesourcery.com>
281
282 Backported from master:
283 2020-11-10 Tobias Burnus <tobias@codesourcery.com>
284
285 PR fortran/95847
286 * trans-decl.c (gfc_get_symbol_decl): Do not (re)set the location
287 of an external procedure.
288 (build_entry_thunks, generate_coarray_init, create_main_function,
289 gfc_generate_function_code): Use fndecl's location in BIND_EXPR.
290
291 2020-11-06 Tobias Burnus <tobias@codesourcery.com>
292
293 Backported from master:
294 2020-11-06 Tobias Burnus <tobias@codesourcery.com>
295
296 PR fortran/97652
297 * module.c (mio_symbol): Fix symbol name for pdt_type.
298
299 2020-10-08 Harald Anlauf <anlauf@gmx.de>
300
301 Backported from master:
302 2020-10-04 Harald Anlauf <anlauf@gmx.de>
303
304 PR fortran/97272
305 * trans-intrinsic.c (strip_kind_from_actual): Helper function for
306 removal of KIND argument.
307 (gfc_conv_intrinsic_minmaxloc): Ignore KIND argument here, as it
308 is treated elsewhere.
309
310 2020-09-28 Mark Eggleston <markeggleston@gcc.gnu.org>
311
312 Revert:
313 2020-09-27 Steven G. Kargl <kargl@gcc.gnu.org>
314 Mark Eggleston <markeggleston@gcc.gnu.org>
315
316 PR fortran/95614
317 * decl.c (gfc_get_common): Use gfc_match_common_name instead
318 of match_common_name.
319 * decl.c (gfc_bind_idents): Use gfc_match_common_name instead
320 of match_common_name.
321 * match.c : Rename match_common_name to gfc_match_common_name.
322 * match.c (gfc_match_common): Use gfc_match_common_name instead
323 of match_common_name.
324 * match.h : Rename match_common_name to gfc_match_common_name.
325 * resolve.c (resolve_common_vars): Check each symbol in a
326 common block has a global symbol. If there is a global symbol
327 issue an error if the symbol type is known as is not a common
328 block name.
329
330 2020-09-27 Mark Eggleston <markeggleston@gcc.gnu.org>
331
332 Backported from master:
333 2020-09-27 Steven G. Kargl <kargl@gcc.gnu.org>
334 Mark Eggleston <markeggleston@gcc.gnu.org>
335
336 PR fortran/95614
337 * decl.c (gfc_get_common): Use gfc_match_common_name instead
338 of match_common_name.
339 * decl.c (gfc_bind_idents): Use gfc_match_common_name instead
340 of match_common_name.
341 * match.c : Rename match_common_name to gfc_match_common_name.
342 * match.c (gfc_match_common): Use gfc_match_common_name instead
343 of match_common_name.
344 * match.h : Rename match_common_name to gfc_match_common_name.
345 * resolve.c (resolve_common_vars): Check each symbol in a
346 common block has a global symbol. If there is a global symbol
347 issue an error if the symbol type is known as is not a common
348 block name.
349
350 2020-09-19 Tobias Burnus <tobias@codesourcery.com>
351
352 Backported from master:
353 2020-09-17 Tobias Burnus <tobias@codesourcery.com>
354
355 PR fortran/96041
356 PR fortran/93423
357 * decl.c (gfc_match_submod_proc): Avoid later double-free
358 in the error case.
359
360 2020-09-19 Harald Anlauf <anlauf@gmx.de>
361
362 Backported from master:
363 2020-07-02 Harald Anlauf <anlauf@gmx.de>
364
365 PR fortran/93423
366 * resolve.c (resolve_symbol): Avoid NULL pointer dereference.
367
368 2020-09-08 Thomas Koenig <tkoenig@gcc.gnu.org>
369
370 Backported from master:
371 2020-09-08 Thomas Koenig <tkoenig@gcc.gnu.org>
372
373 * intrinsic.texi: Fix description of FINDLOC result.
374
375 2020-08-27 Mark Eggleston <markeggleston@gcc.gnu.org>
376
377 Backported from master:
378 2020-08-27 Mark Eggleston <markeggleston@gcc.gnu.org>
379
380 PR fortran/95882
381 * decl.c (char_len_param_value): Check gfc_seen_div0 and
382 if it is set return MATCH_ERROR.
383
384 2020-07-27 Mark Eggleston <markeggleston@gcc.gnu.org>
385
386 Backported from master:
387 2020-07-14 Steven G. Kargl <kargl@gcc.gnu.org>
388 Mark Eggleston <markeggleston@gcc.gnu.org>
389
390 PR fortran/95612
391 * expr.c (gfc_check_pointer_assigb): Output an error if
392 rvalue is a zero sized array or output an error if rvalue
393 doesn't have a symbol tree.
394
395 2020-07-26 Mark Eggleston <markeggleston@gcc.gnu.org>
396
397 Backported from master:
398 2020-06-22 Steven G. Kargl <kargl@gcc.gnu.org>
399 Mark Eggleston <markeggleston@gcc.gnu.org>
400
401 PR fortran/95585
402 * check.c (gfc_check_reshape): Add check for a value when
403 the symbol has an attribute flavor FL_PARAMETER.
404
405 2020-07-23 Harald Anlauf <anlauf@gmx.de>
406
407 Backported from master:
408 2020-07-21 Harald Anlauf <anlauf@gmx.de>
409
410 PR fortran/89574
411 * trans-decl.c (gfc_get_extern_function_decl): Check whether a
412 symbol belongs to a different module.
413
414 2020-07-23 Thomas Koenig <tkoenig@gcc.gnu.org>
415
416 PR fortran/96018
417 * frontend-passes.c (gfc_check_externals): Adjust formatting.
418 (implicit_pure_call): New function.
419 (implicit_pure_expr): New function.
420 (gfc_fix_implicit_pure): New function.
421 * gfortran.h (gfc_fix_implicit_pure): New prototype.
422 * parse.c (translate_all_program_units): Call gfc_fix_implicit_pure.
423
424 2020-07-23 Thomas Koenig <tkoenig@gcc.gnu.org>
425
426 Backported from master:
427 2020-07-19 Thomas Koenig <tkoenig@gcc.gnu.org>
428
429 PR fortran/96220
430 * dump-parse-tree.c (get_c_type_name): Always use the entries from
431 c_interop_kinds_table to find the correct C type.
432
433 2020-07-08 Harald Anlauf <anlauf@gmx.de>
434
435 Backported from master:
436 2020-07-06 Harald Anlauf <anlauf@gmx.de>
437
438 PR fortran/95709
439 * resolve.c (gfc_resolve_code): Check for valid arguments to
440 assigned GOTO.
441
442 2020-07-07 Harald Anlauf <anlauf@gmx.de>
443
444 Backported from master:
445 2020-07-02 Harald Anlauf <anlauf@gmx.de>
446
447 PR fortran/93337
448 * class.c (gfc_find_derived_vtab): Punt if name is not set.
449
450 2020-07-05 Harald Anlauf <anlauf@gmx.de>
451
452 Backported from master:
453 2020-06-30 Harald Anlauf <anlauf@gmx.de>
454
455 PR fortran/88379
456 * resolve.c (resolve_assoc_var): Avoid NULL pointer dereference.
457
458 2020-07-01 Harald Anlauf <anlauf@gmx.de>
459
460 Backported from master:
461 2020-06-29 Harald Anlauf <anlauf@gmx.de>
462
463 PR fortran/71706
464 * trans-stmt.c (gfc_trans_sync): Do proper kind conversion in
465 bounds-checking code.
466
467 2020-07-01 Harald Anlauf <anlauf@gmx.de>
468
469 Backported from master:
470 2020-06-28 Harald Anlauf <anlauf@gmx.de>
471
472 PR fortran/95880
473 * symbol.c (gfc_add_type): If sym->ns->proc_name is set, use it,
474 otherwise fall back to sym->name.
475
476 2020-07-01 Mark Eggleston <markeggleston@gcc.gnu.org>
477
478 Backported from master:
479 2020-07-01 Steven G. Kargl <kargl@gcc.gnu.org>
480 Mark Eggleston <markeggleston@gcc.gnu.org>
481
482 PR fortran/95829
483 * decl.c (gfc_match_decl_type_spec): Compare with "* ) " instead
484 of "*)".
485
486 2020-06-30 Thomas Koenig <tkoenig@gcc.gnu.org>
487
488 Backported from master:
489 2020-06-29 Thomas Koenig <tkoenig@gcc.gnu.org>
490
491 PR fortran/95743
492 * trans-decl.c (gfc_generate_function_code): Do not generate
493 recursion check for compiler-generated procedures.
494
495 2020-06-27 Harald Anlauf <anlauf@gmx.de>
496
497 Backported from master:
498 2020-06-27 Harald Anlauf <anlauf@gmx.de>
499
500 PR fortran/95881
501 * resolve.c (resolve_symbol): Avoid NULL pointer dereference.
502
503 2020-06-24 Harald Anlauf <anlauf@gmx.de>
504
505 PR fortran/95689
506 * interface.c (check_sym_interfaces): Enlarge temporary buffer,
507 and add check on length on mangled name to prevent overflow.
508
509 2020-06-23 Harald Anlauf <anlauf@gmx.de>
510
511 Backported from master:
512 2020-06-20 Harald Anlauf <anlauf@gmx.de>
513
514 PR fortran/95689
515 * interface.c (check_sym_interfaces): Enlarge temporary buffer,
516 and add check on length on mangled name to prevent overflow.
517
518 2020-06-23 Harald Anlauf <anlauf@gmx.de>
519
520 Backported from master:
521 2020-06-20 Harald Anlauf <anlauf@gmx.de>
522
523 PR fortran/95587
524 * match.c (gfc_match_equivalence): Check constraints on
525 EQUIVALENCE objects also for CLASS variables.
526
527 2020-06-23 Mark Eggleston <markeggleston@gcc.gnu.org>
528
529 Backported from master:
530 2020-06-22 Steven G. Kargl <kargl@gcc.gnu.org>
531 Mark Eggleston <markeggleston@gcc.gnu.org>
532
533 PR fortran/95708
534 * intrinsic.c (add_functions): Replace CLASS_INQUIRY with
535 CLASS_TRANSFORMATIONAL for intrinsic num_images.
536 (make_generic): Replace ACTUAL_NO with ACTUAL_YES for
537 intrinsic team_number.
538 * resolve.c (resolve_fl_procedure): Check pointer ts.u.derived
539 exists before using it.
540
541 2020-06-14 Harald Anlauf <anlauf@gmx.de>
542
543 PR fortran/95503
544 * expr.c (gfc_check_pointer_assign): Skip contiguity check of rhs
545 of pointer assignment if lhs cannot be simply contiguous.
546
547 2020-06-14 Thomas Koenig <tkoenig@gcc.gnu.org>
548
549 PR fortran/94109
550 * class.c (finalize_component): Return early if finalization has
551 already happened for expression and component within namespace.
552 * gfortran.h (gfc_was_finalized): New type.
553 (gfc_namespace): Add member was_finalzed.
554 (gfc_expr): Remove finalized.
555 * symbol.c (gfc_free_namespace): Free was_finalized.
556
557 2020-06-11 Harald Anlauf <anlauf@gmx.de>
558 Steven G. Kargl <kargl@gcc.gnu.org>
559
560 PR fortran/95611
561 * decl.c (access_attr_decl): Use correct symbol in error message.
562
563 2020-06-11 Harald Anlauf <anlauf@gmx.de>
564
565 PR fortran/95091
566 * class.c (gfc_hash_value): Add cast.
567
568 2020-06-11 Harald Anlauf <anlauf@gmx.de>
569
570 PR fortran/95091
571 * class.c (get_unique_type_string, gfc_hash_value): Enlarge
572 buffers, and check whether the strings returned by
573 get_unique_type_string() fit.
574
575 2020-06-05 Harald Anlauf <anlauf@gmx.de>
576
577 PR fortran/95373
578 * primary.c (is_inquiry_ref): Move validity check of inquiry
579 references against selected Fortran standard from here...
580 (gfc_match_varspec) ...to here.
581
582 2020-06-05 Harald Anlauf <anlauf@gmx.de>
583
584 PR fortran/95373
585 * primary.c (is_inquiry_ref): Check validity of inquiry
586 references against selected Fortran standard.
587
588 2020-06-05 Harald Anlauf <anlauf@gmx.de>
589
590 PR fortran/95106
591 * trans-common.c (gfc_sym_mangled_common_id): Enlarge temporaries
592 for name-mangling.
593
594 2020-06-05 Harald Anlauf <anlauf@gmx.de>
595
596 PR fortran/95530
597 PR fortran/95537
598 * decl.c (gfc_match_decl_type_spec): Enlarge buffer, and enhance
599 string copy to detect buffer overflow.
600 * gfortran.h (gfc_common_head): Enlarge buffer.
601 * trans-common.c (finish_equivalences): Enhance string copy to
602 detect buffer overflow.
603
604 2020-06-05 Steven G. Kargl <kargl@gcc.gnu.org>
605 Harald Anlauf <anlauf@gmx.de>
606
607 PR fortran/95500
608 * trans-expr.c (gfc_conv_expr_reference): Do not dereference NULL
609 pointer.
610
611 2020-06-01 Thomas Koenig <tkoenig@gcc.gnu.org>
612
613 PR fortran/94361
614 * class.c (finalize_component): Use expr->finalized instead of
615 comp->finalized.
616 * gfortran.h (gfc_component): Remove finalized member.
617 (gfc_expr): Add it here instead.
618
619 2020-05-28 Steven G. Kargl <kargl@gcc.gnu.org>
620 Mark Eggleston <markeggleston@gcc.gnu.org>
621 Mark Eggleston <markeggleston@gcc.gnu.org>
622
623 PR fortran/94397
624 * match.c (gfc_match_type_spec): New variable ok initialised
625 to true. Set ok with the return value of gfc_reduce_init_expr
626 called only if the expression is not EXPR_CONSTANT and is not
627 EXPR_VARIABLE. Add !ok to the check for type not being integer
628 or the rank being greater than zero.
629
630 2020-05-28 Tobias Burnus <tobias@codesourcery.com>
631 Mark Eggleston <markeggleston@gnu.gcc.org>
632
633 PR fortran/50392
634 * trans-decl.c (gfc_get_symbol_decl): Remove unnecessary block
635 delimiters. Add auxiliary variables if a label is assigned to
636 a return variable. (gfc_gat_fake_result): If the symbol has an
637 assign attribute set declaration from the symbol's backend
638 declaration.
639
640 2020-05-27 Thomas Koenig <tkoenig@gcc.gnu.org>
641
642 PR libfortran/95191
643 * libgfortran.h (libgfortran_error_codes): Add
644 LIBERROR_BAD_WAIT_ID.
645
646 2020-05-20 Mark Eggleston <markeggleston@gcc.gnu.org>
647
648 PR fortran/39695
649 * resolve.c (resolve_fl_procedure): Set name depending on
650 whether the result attribute is set. For PROCEDURE/RESULT
651 conflict use the name in sym->ns->proc_name->name.
652 * symbol.c (gfc_add_type): Add check for function and result
653 attributes use sym->ns->proc_name->name if both are set.
654 Where the symbol cannot have a type use the name in
655 sym->ns->proc_name->name.
656
657 2020-05-13 Mark Eggleston <markeggleston@gcc.gnu.org>
658
659 Backported from master
660 2020-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
661
662 PR fortran/93497
663 * decl.c (char_len_param_value): Check whether character
664 length expression is of type EXPR_OP and if so simplify it.
665 * resolve.c (resolve_charlen): Reject length if it has a
666 rank.
667
668 2020-05-11 Mark Eggleston <markeggleston@gcc.gnu.org>
669
670 Backported from mainline
671 2020-05-11 Janus Weil <janus@gcc.gnu.org>
672 Dominique d'Humieres <dominiq@lps.ens.fr>
673
674 PR fortran/59107
675 * gfortran.h: Rename field resolved as resolve_symbol_called
676 and assign two 2 bits instead of 1.
677 * interface.c (gfc_find_typebound_dtio_proc): Use new field name.
678 * resolve.c (gfc_resolve_intrinsic): Replace check of the formal
679 field with resolve_symbol_called is at least 2, if it is not
680 set the field to 2. (resolve_typebound_procedure): Use new field
681 name. (resolve_symbol): Use new field name and check whether it
682 is at least 1, if it is not set the field to 1.
683
684 2020-05-04 Tobias Burnus <tobias@codesourcery.com>
685
686 Backport from mainline.
687 2020-03-08 Paul Thomas <pault@gcc.gnu.org>
688
689 PR fortran/93581
690 * resolve.c (gfc_resolve_ref): Modify array refs to be elements
691 if the ref chain ends in INQUIRY_LEN.
692 * trans-array.c (gfc_get_dataptr_offset): Provide the offsets
693 for INQUIRY_RE and INQUIRY_IM.
694
695 2020-04-27 Thomas Koenig <tkoenig@gcc.gnu.org>
696
697 PR fortran/93956
698 PR fortran/94788
699 * expr.c (gfc_check_pointer_assign): Revert patch for PR 93956.
700 * interface.c: Likewise.
701
702 2020-04-24 Thomas Koenig <tkoenig@gcc.gnu.org>
703
704 Backport from trunk
705 PR fortran/93956
706 * expr.c (gfc_check_pointer_assign): Also set subref_array_pointer
707 when a function returns a pointer.
708 * interface.c (gfc_set_subref_array_pointer_arg): New function.
709 (gfc_procedure_use): Call it.
710
711 2020-04-20 Harald Anlauf <anlauf@gmx.de>
712
713 Backport from mainline.
714 PR fortran/93364
715 * array.c (gfc_set_array_spec): Check for sum of rank and corank
716 not exceeding GFC_MAX_DIMENSIONS.
717
718 2020-04-14 Thomas Koenig <tkoenig@gcc.gnu.org>
719
720 Backport from trunk.
721 PR fortran/94270
722 * trans-decl.c (generate_local_decl): Do not warn if the
723 symbol is artifical.
724
725 2020-04-06 Fritz Reese <foreese@gcc.gnu.org>
726
727 Backport from master
728 Steven G. Kargl <kargl@gcc.gnu.org>
729
730 PR fortran/93686
731 * decl.c (gfc_match_data): Handle data matching for derived type
732 pointers.
733
734 2020-04-02 Mark Eggleston <markeggleston@gcc.gnu.org>
735
736 Backport from master
737 Steven G. Kargl <kargl@gcc.gnu.org>
738
739 PR fortran/93498
740 * check.c (gfc_check_findloc): If the kinds of the arguments
741 differ goto label "incompat".
742
743 2020-04-02 Mark Eggleston <markeggleston@gcc.gnu.org>
744
745 Backport from master
746 2020-04-02 Steven G. Kargl <kargl@gcc.gnu.org>
747
748 PR fortran/94030
749 * resolve.c (resolve_equivalence): Correct formatting
750 around the label "identical_types". Instead of using
751 gfc_resolve_array_spec use is_non_constants_shape_array
752 to determine whether the array can be used in a in an
753 equivalence statement.
754
755 2020-03-28 Tobias Burnus <tobias@codesourcery.com>
756
757 Backport from mainline
758 2020-03-28 Tobias Burnus <tobias@codesourcery.com>
759
760 PR fortran/94348
761 * decl.c (gfc_match_submod_proc): Add result var to the
762 proc's namespace.
763
764 2020-03-25 Mark Eggleston <markeggleston@gcc.gnu.org>
765
766 Backport from master
767 2020-03-25 Mark Eggleston <markeggleston@gcc.gnu.org>
768
769 PR fortran/93484
770 * match.c (gfc_match_type_spec): Replace gfc_match_init_expr with
771 gfc_match_expr. Return m if m is MATCH_NO or MATCH_ERROR.
772
773 2020-03-12 Release Manager
774
775 * GCC 9.3.0 released.
776
777 2020-03-05 Paul Thomas <pault@gcc.gnu.org>
778
779 Backport from trunk
780 PR fortran/92976
781 * match.c (select_type_set_tmp): Variable 'selector' to replace
782 select_type_stack->selector. If the selector array spec has
783 explicit bounds, make the temporary's bounds deferred.
784
785 2020-02-19 Mark Eggleston <markeggleston@gcc.gnu.org>
786
787 Backported from mainline
788 2020-02-18 Mark Eggleston <markeggleston@gcc.gnu.org>
789
790 PR fortran/93714
791 * expr.c (gfc_check_pointer_assign): Move check for
792 matching character length to after checking the lvalue
793 attributes for target or pointer.
794
795 2020-02-18 Mark Eggleston <markeggleston@gcc.gnu.org>
796
797 Backported from mainline
798 2020-02-18 Steven G. Kargl <kargl@gcc.gnu.org>
799 Mark Eggleston <markeggleston@gcc.gnu.org>
800
801 PR fortran/93580
802 * primary.c (gfc_match_varspec): If the symbol following %
803 is re or im and the primary expression type is not BT_COMPLEX
804 issue an error. If the symbol is len and the primary
805 expression type is not BT_CHARACTER is an error.
806
807 2020-02-13 Jakub Jelinek <jakub@redhat.com>
808
809 Backported from mainline
810 2020-01-29 Jakub Jelinek <jakub@redhat.com>
811
812 PR fortran/93463
813 * openmp.c (oacc_code_to_statement): Handle
814 EXEC_OACC_{ROUTINE,UPDATE,WAIT,CACHE,{ENTER,EXIT}_DATA,DECLARE}.
815
816 2020-02-03 Tobias Burnus <tobias@codesourcery.com>
817
818 Backported from mainline
819 2020-02-03 Tobias Burnus <tobias@codesourcery.com>
820
821 PR fortran/93541
822 * intrinisic.texi (OpenMP Modules OMP_LIB and OMP_LIB_KINDS):
823 Add undocumented parameters from omp_lib.f90.in.
824
825 2020-02-03 Tobias Burnus <tobias@codesourcery.com>
826
827 Backported from mainline
828 2020-01-31 Tobias Burnus <tobias@codesourcery.com>
829
830 PR fortran/93462
831 * frontend-passes.c (gfc_code_walker): For EXEC_OACC_ATOMIC, set
832 in_omp_atomic to true prevent front-end optimization.
833
834 2020-02-03 Tobias Burnus <tobias@codesourcery.com>
835
836 Backported from mainline
837 2020-01-21 Tobias Burnus <tobias@codesourcery.com>
838
839 PR fortran/93309
840 * interface.c (gfc_procedure_use): Also check parent namespace for
841 'implict none (external)'.
842 * symbol.c (gfc_get_namespace): Don't set has_implicit_none_export
843 to parent namespace's setting.
844
845 2020-01-22 Jakub Jelinek <jakub@redhat.com>
846
847 * parse.c (parse_omp_structured_block): Handle ST_OMP_TARGET_PARALLEL.
848 * trans-openmp.c (gfc_trans_omp_target)
849 <case EXEC_OMP_TARGET_PARALLEL>: Call pushlevel first.
850
851 PR fortran/93329
852 * openmp.c (omp_code_to_statement): Handle remaining EXEC_OMP_*
853 cases.
854
855 2020-01-17 Mark Eggleston <mark.eggleston@codethink.com>
856
857 Backport from mainline
858 Mark Eggleston <mark.eggleston@codethink.com>
859
860 PR fortran/93236
861 * resolve.c (resolve_types): Declare boolean recursive and set with the
862 value of the recursive attribute of namespace proc_name symbol
863 structure if it exists. Call gfc_save_all if both flag_automatic and
864 recursive are false or ns->save_all is true.
865
866 2020-01-10 Tobias Burnus <tobias@codesourcery.com>
867
868 Backported from mainline
869 2020-01-09 Tobias Burnus <tobias@codesourcery.com>
870
871 PR fortran/84135
872 * array.c (gfc_set_array_spec): Fix shifting of codimensions
873 when adding a dimension.
874 * decl.c (merge_array_spec): Ditto. Fix using correct codimensions.
875
876 2019-12-30 Thomas Koenig <tkoenig@gcc.gnu.org>
877
878 Backport from trunk
879 PR fortran/92961
880 * gfortran.h (gfc_seen_div0): Add declaration.
881 * arith.h (gfc_seen_div0): Add definition.
882 (eval_intrinsic): For integer division by zero, set gfc_seen_div0.
883 * decl.c (variable_decl): If resolution resp. simplification
884 fails for array spec and a division of zero error has been
885 seen, return MATCH_ERROR.
886
887 2019-12-21  Paul Thomas  <pault@gcc.gnu.org>
888
889 Backported from mainline
890 PR fortran/92753
891 * expr.c (find_inquiry_ref): Catch INQUIRY_LEN case, where the
892 temporary expression has been converted to a constant and make
893 the new expression accordingly. Correct the error in INQUIRY_RE
894 and INQUIRY_IM cases. The original rather than the resolved
895 expression was being used as the source in mpfr_set.
896
897 2019-12-20 Jakub Jelinek <jakub@redhat.com>
898
899 Backported from mainline
900 2019-12-19 Jakub Jelinek <jakub@redhat.com>
901
902 PR fortran/92977
903 * frontend-passes.c (call_external_blas): Use || instead of |.
904
905 PR fortran/92977
906 * frontend-passes.c (in_omp_atomic): New variable.
907 (cfe_expr_0, matmul_to_var_expr, matmul_temp_args,
908 inline_matmul_assign, call_external_blas): Don't optimize in
909 EXEC_OMP_ATOMIC.
910 (optimize_namespace): Clear in_omp_atomic.
911 (gfc_code_walker): Set in_omp_atomic for EXEC_OMP_ATOMIC, save/restore
912 it around.
913
914 2019-12-11 Jakub Jelinek <jakub@redhat.com>
915
916 PR fortran/92899
917 * trans-openmp.c (gfc_trans_omp_atomic): For GFC_OMP_ATOMIC_SWAP,
918 do look through conversion on expr2 if any.
919
920 2019-12-06 Jakub Jelinek <jakub@redhat.com>
921
922 PR fortran/92775
923 * trans.h (struct lang_type, struct lang_decl): Remove span member.
924 (GFC_DECL_SPAN, GFC_TYPE_ARRAY_SPAN): Remove macros.
925 * trans-array.h (gfc_get_descriptor_offsets_for_info): Add another
926 argument.
927 * trans-array.c (gfc_get_descriptor_offsets_for_info): Add SPAN_OFF
928 argument and initialize *SPAN_OFF to the offset of span field.
929 * trans-types.c (gfc_get_array_descr_info): Adjust
930 gfc_get_descriptor_offsets_for_info caller. Compute elem_size
931 as base->span instead of TYPE_SIZE_UNIT (etype) constant.
932
933 2019-12-05 Jakub Jelinek <jakub@redhat.com>
934
935 PR fortran/92781
936 * trans-decl.c (gfc_get_symbol_decl): If sym->backend_decl is
937 current_function_decl, add length to current rather than parent
938 function and expect DECL_CONTEXT (length) to be current_function_decl.
939
940 2019-11-27 Jakub Jelinek <jakub@redhat.com>
941
942 PR fortran/91944
943 * simplify.c (gfc_simplify_spread): Check gfc_init_expr_flag instead
944 of gfc_current_ns->sym_root->n.sym->attr.flavor == FL_PARAMETER.
945
946 2019-12-12 Harald Anlauf <anlauf@gmx.de>
947
948 Backport from mainline
949 PR fortran/92898
950 * check.c (gfc_check_is_contiguous): Simplify check to handle
951 arbitrary NULL() argument.
952
953 2019-12-11 Steven G. Kargl <kargl@gcc.gnu.org>
954
955 PR fortran/92897
956 * array.c (gfc_set_array_spec): Remove invalid assert() triggered
957 by invalid Fortran code.
958
959 2019-11-29 Harald Anlauf <anlauf@gmx.de>
960
961 Backport from mainline
962 PR fortran/92629
963 * simplify.c (convert_mpz_to_unsigned): Skip assert for argument
964 range when -fno-range-check is specified.
965
966 2019-11-25 Tobias Burnus <tobias@codesourcery.com
967
968 Backport from mainline
969 2019-10-11 Tobias Burnus <tobias@codesourcery.com>
970
971 PR fortran/92050
972 * trans-expr.c (gfc_conv_procedure_call): Handle code generated
973 by -fcheck=all.
974
975 2019-11-10 Thomas Koenig <tkoenig@gcc.gnu.org>
976
977 Backport from trunk
978 PR fortran/92113
979 * trans-decl.c (gfc_get_symbol_decl): If __def_init actually
980 contains a value, put it into the read-only section.
981
982 2019-11-10 Thomas Koenig <tkoenig@gcc.gnu.org>
983
984 Backport from trunk
985 PR fortran/92321
986 * frontend-passes.c (call_external_blas): Commit symbol for
987 external BLAS routine.
988
989 2019-11-08 Tobias Burnus <tobias@codesourcery.com
990
991 Backport from mainline
992 2019-11-08 Tobias Burnus <tobias@codesourcery.com
993
994 PR fortran/91253
995 * scanner.c (skip_fixed_comments): Move comment
996 lines to next if block.
997 (gfc_next_char_literal): Fix continue_line setting.
998 (get_file): Remove bogus ATTRIBUTE_UNUSED.
999
1000 2019-11-05 Tobias Burnus <tobias@codesourcery.com>
1001
1002 PR fortran/92208
1003 Backport from mainline
1004 2019-10-31 Tobias Burnus <tobias@codesourcery.com>
1005
1006 PR fortran/92277
1007 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Fix DECL_ARTIFICIAL
1008 checking.
1009
1010 2019-11-04 Tobias Burnus <tobias@codesourcery.com>
1011
1012 Backport from mainline
1013 2019-10-30 Tobias Burnus <tobias@codesourcery.com>
1014
1015 PR fortran/92208
1016 * trans-array.c (gfc_conv_array_parameter): Only copy
1017 string-length backend_decl if expression is not a function.
1018
1019 2019-11-04 Tobias Burnus <tobias@codesourcery.com>
1020
1021 Backport from mainline
1022 2019-10-31 Tobias Burnus <tobias@codesourcery.com>
1023
1024 PR fortran/92284.
1025 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Free CFI descriptor
1026 at the end; partial revised revert of Rev. 277502.
1027
1028 2019-10-28  Paul Thomas  <pault@gcc.gnu.org>
1029
1030 Backport from trunk
1031 PR fortran/91926
1032 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Correct the
1033 assignment of the attribute field to account correctly for an
1034 assumed shape dummy. Assign separately to the gfc and cfi
1035 descriptors since the atribute can be different. Add branch to
1036 correctly handle missing optional dummies.
1037
1038 2019-10-28 Tobias Burnus <tobias@codesourcery.com>
1039
1040 Backport from mainline
1041 2019-10-28 Tobias Burnus <tobias@codesourcery.com>
1042
1043 PR fortran/91863
1044 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Don't free data
1045 memory as that's done on the Fortran side.
1046 (gfc_conv_procedure_call): Handle void* pointers from
1047 gfc_conv_gfc_desc_to_cfi_desc.
1048
1049 2019-10-27 Paul Thomas <pault@gcc.gnu.org>
1050
1051 Backport from mainline
1052 PR fortran/86248
1053 * resolve.c (flag_fn_result_spec): Correct a typo before the
1054 function declaration.
1055 * trans-decl.c (gfc_sym_identifier): Boost the length of 'name'
1056 to allow for all variants. Simplify the code by using a pointer
1057 to the symbol's proc_name and taking the return out of each of
1058 the conditional branches. Allow symbols with fn_result_spec set
1059 that do not come from a procedure namespace and have a module
1060 name to go through the non-fn_result_spec branch.
1061
1062 2019-10-22 Steven G. Kargl <kargl@gcc.gnu.org>
1063
1064 PR fortran/92174
1065 * decl.c (attr_decl1): Move check for F2018:C822 from here ...
1066 * array.c (gfc_set_array_spec): ... to here.
1067
1068 2019-10-18 Steven G. Kargl <kargl@gcc.gnu.org>
1069
1070 PR fortran/69455
1071 * trans-decl.c (generate_local_decl): Avoid misconstructed
1072 intrinsic modules in a BLOCK construct.
1073
1074 2019-10-18 Tobias Burnus <tobias@codesourcery.com>
1075
1076 Backport from mainline
1077 2019-10-18 Tobias Burnus <tobias@codesourcery.com>
1078
1079 PR fortran/91586
1080 * class.c (gfc_find_derived_vtab): Return NULL
1081 instead of deref'ing NULL pointer.
1082
1083 2019-10-17 Steven G. Kargl <kargl@gcc.gnu.org>
1084
1085 PR fortran/83113
1086 PR fortran/89943
1087 decl.c (gfc_match_function_decl): Ignore duplicate BIND(C) for function
1088 declaration in submodule. Implement at check for F2018 C1550.
1089 (gfc_match_entry): Use temporary for locus, which allows removal of
1090 one gfc_error_now().
1091 (gfc_match_subroutine): Ignore duplicate BIND(C) for subroutine
1092 declaration in submodule. Implement at check for F2018 C1550.
1093
1094 2019-10-11 Steven G. Kargl <kargl@gcc.gnu.org>
1095
1096 PR fortran/91715
1097 * decl.c (gfc_match_prefix): If matching a type-spec returns an error,
1098 it's an error so re-act correctly.
1099
1100 2019-10-11 Steven G. Kargl <kargl@gcc.gnu.org>
1101
1102 PR fortran/91649
1103 check.c (gfc_check_findloc): Additional checking for valid arguments
1104
1105 2019-10-10 Steven G. Kargl <kargl@gcc.gnu.org>
1106
1107 PR fortran/91801
1108 * simplify.c (gfc_simplify_reshape): Convert a gcc_assert into a
1109 gfc_error as a user can easily hit the condition.
1110
1111 2019-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1112
1113 Backport from trunk
1114 PR fortran/84487
1115 * trans-decl.c (gfc_get_symbol_decl): For __def_init, set
1116 DECL_ARTIFICAL and do not set TREE_READONLY.
1117
1118 2019-10-05 Steven G. Kargl <kargl@gcc.gnu.org>
1119
1120 PR fortran/47054
1121 * decl.c (variable_decl): Do not search parent namespace for symbol.
1122
1123 2019-10-04 Steven G. Kargl <kargl@gcc.gnu.org>
1124
1125 PR fortran/91942
1126 * io.c (match_vtag): Check for non-NULL result->symtree.
1127 (match_out_tag): Check for invalid constant due to inquiry parameter.
1128 (match_filepos): Instead of a syntax error, go to cleanup to get better
1129 error messages.
1130
1131 2019-10-04 Steven G. Kargl <kargl@gcc.gnu.org>
1132
1133 PR fortran/91785
1134 * primary.c (gfc_match_varspec): Ensure an inquiry parameter has
1135 it locus set.
1136
1137 2019-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
1138
1139 PR fortran/91864
1140 * gcc/fortran/io.c (match_io_element): An inquiry parameter cannot be
1141 read into.
1142 * gcc/fortran/match.c (gfc_match_allocate): An inquiry parameter
1143 can be neither an allocate-object nor stat variable.
1144 (gfc_match_deallocate): An inquiry parameter cannot be deallocated.
1145
1146 2019-10-01 Steven G. Kargl <kargl@gcc.ngu.org>
1147
1148 Backport of r276254+276265
1149 PR fortran/91802
1150 * decl.c (attr_decl1): Check if rank+corank > 15.
1151
1152 2019-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
1153
1154 PR fortran/91714
1155 * decl.c (gfc_match_decl_type_spec): Issue errors for a few
1156 mangled types.
1157
1158 2019-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
1159
1160 PR fortran/91641
1161 * check.c (gfc_check_is_contiguous): null() cannot be an actual
1162 argument to is_contiguous().
1163
1164 2019-09-21 Paul Thomas <pault@gcc.gnu.org>
1165
1166 Backport from mainline
1167 PR fortran/91588
1168 * expr.c (check_inquiry): Remove extended component refs by
1169 using symbol pointers. If a function argument is an associate
1170 variable with a constant target, copy the target expression in
1171 place of the argument expression. Check that the charlen is not
1172 NULL before using the string length.
1173
1174 2019-09-19 Steven G. Kargl <kargl@gcc.gnu.org>
1175
1176 PR fortran/91727
1177 * resolve.c (conformable_arrays): If array-spec is NULL, then
1178 allocate-object is a scalar. a conformability check only occurs
1179 for an array source-expr.
1180
1181 2019-09-18 Thomas Koenig <tkoenig@gcc.gnu.org>
1182
1183 Backport from trunk
1184 PR fortran/91550
1185 * frontend-passes.c (do_subscript): If step equals
1186 zero, a previuos error has been reported; do nothing
1187 in this case.
1188 * resolve.c (gfc_resolve_iterator): Move error checking
1189 after type conversion.
1190
1191 2019-09-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1192
1193 Backport from trunk
1194 PR fortran/91557
1195 * trans-decl.c (generate_local_decl): Do not warn if the symbol
1196 is artificial.
1197 * trans-types.c (get_formal_from_actual_arglist): Set artificial
1198 attribute on dummy arguments.
1199
1200 2019-09-14 Steven G. Kargl <kargl@gcc.gnu.org>
1201
1202 PR fortran/91553
1203 * simplify.c (gfc_convert_constant): During conversion check if the
1204 constant is enclosed in parenthesis, and simplify expression.
1205
1206 2019-09-14 Steven G. Kargl <kargl@gcc.gnu.org>
1207
1208 PR fortran/91566
1209 * simplify.c (gfc_simplify_merge): Need to simplify expression
1210 after insertation of parenthesis.
1211
1212 2019-09-14 Steven G. Kargl <kargl@gcc.gnu.org>
1213
1214 PR fortran/91642
1215 * io.c (gfc_match_inquire): null() cannot be in an iolength inquire
1216 list.
1217
1218 2019-09-07 Paul Thomas <pault@gcc.gnu.org>
1219
1220 Backport from mainline
1221 PR fortran/91589
1222 * primary.c (gfc_match_varspec): Return MATCH_NO on an apparent
1223 component ref, when the primary type is intrinsic.
1224
1225 2019-09-05 Harald Anlauf <anlauf@gmx.de>
1226
1227 Backport from mainline
1228 PR fortran/91496
1229 * gfortran.h: Extend struct gfc_iterator for loop annotations.
1230 * array.c (gfc_copy_iterator): Copy loop annotations by IVDEP,
1231 VECTOR, and NOVECTOR pragmas.
1232 * decl.c (gfc_match_gcc_ivdep, gfc_match_gcc_vector)
1233 (gfc_match_gcc_novector): New matcher functions handling IVDEP,
1234 VECTOR, and NOVECTOR pragmas.
1235 * match.h: Declare prototypes of matcher functions handling IVDEP,
1236 VECTOR, and NOVECTOR pragmas.
1237 * parse.c (decode_gcc_attribute, parse_do_block)
1238 (parse_executable): Decode IVDEP, VECTOR, and NOVECTOR pragmas;
1239 emit warning for unrecognized pragmas instead of error.
1240 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do): Add code to
1241 emit annotations for IVDEP, VECTOR, and NOVECTOR pragmas.
1242 * gfortran.texi: Document IVDEP, VECTOR, and NOVECTOR pragmas.
1243
1244 PR fortran/91496
1245 * parse.c (parse_executable): Improve error messages for
1246 improperly placed pragmas not preceeding a loop.
1247
1248 2019-09-05 Steven G. Kargl <kargl@gcc.gnu.org>
1249
1250 PR fortran/91660
1251 * decl.c (gfc_match_decl_type_spec): Improve and restore error
1252 message for malformed types-spec.
1253
1254 2019-09-02 Steven G. Kargl <kargl@gc.gnu.org>
1255
1256 PR fortran/91552
1257 * array.c (walk_array_constructor): New function.
1258 (gfc_match_array_constructor): Use it.
1259
1260 2019-08-30 Steven G. Kargl <kargl@gcc.gnu.org>
1261
1262 PR fortran/91587
1263 * io.c (match_filepos): MATCH_ERROR should branch to a syntax error.
1264
1265 2019-08-30 Steven G. Kargl <kargl@gcc.gnu.org>
1266
1267 PR fortran/91565
1268 * simplify.c (gfc_simplify_reshape): Add additional checks of the
1269 ORDER dummy argument.
1270
1271 2019-08-30 Steven G. Kargl <kargl@gcc.gnu.org>
1272
1273 PR fortran/91564
1274 * check.c (gfc_check_kill_sub): Additional checks on status dummy
1275 argument.
1276
1277 2019-08-30 Steven G. Kargl <kargl@gcc.gnu.org>
1278
1279 PR fortran/91551
1280 * intrinsic.c (sort_actual): ALLOCATED has one argument. Check for
1281 no argument case.
1282
1283 2019-08-30 Steven G. Kargl <kargl@gcc.gnu.org>
1284
1285 PR fortran/91485
1286 module.c (gfc_match_use): User defined operator cannot conflict with
1287 a rename symbol.
1288
1289 2019-08-17 Steven G. Kargl <kargl@gcc.gnu.org>
1290
1291 PR fortran/91471
1292 * primary.c (gfc_variable_attr): Remove a gfc_internal_error(),
1293 which cannot be reached by conforming Fortran code, but seems to
1294 be reachable from nonconforming Fortran code. Treat the AR_UNKNOWN
1295 case as a no-op.
1296
1297 2019-08-17 Steven G. Kargl <kargl@gcc.gnu.org>
1298
1299 PR fortran/78739
1300 * match.c (gfc_match_st_function): When matching a statement function,
1301 need to check if the statement function name shadows the function
1302 name.
1303
1304 2019-08-17 Steven G. Kargl <kargl@gcc.gnu.org>
1305
1306 PR fortran/78719
1307 * decl.c (get_proc_name): Check for a CLASS entity when trying to
1308 add attributes to an entity that already has an explicit interface.
1309
1310 2019-08-17 Steven G. Kargl <kargl@gcc.gnu.org>
1311
1312 PR fortran/82992
1313 * module.c (gfc_match_use): When renaming a module entity, search
1314 current namespace for conflicting symbol.
1315
1316 2019-08-13 Steven G. Kargl <kargl@gcc.gnu.org>
1317
1318 PR fortran/87991
1319 * resolve.c (check_data_variable): data-stmt-object with pointer
1320 attribute requires a data-stmt-value with the target attribute.
1321
1322 2013-08-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1323
1324 Backport from trunk
1325 PR fortran/90563
1326 * frontend-passes.c (insert_index): Suppress errors while
1327 simplifying the resulting expression.
1328
1329 2019-08-13 Steven G. Kargl <kargl@gcc.gnu.org>
1330
1331 PR fortran/88072
1332 * misc.c (gfc_typename): Do not point to something that ought not to
1333 be pointed at.
1334
1335 2019-08-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1336
1337 Backport from trunk
1338 PR fortran/90561
1339 * trans.h (gfc_evaluate_now_function_scope): New function.
1340 * trans.c (gfc_evaluate_now_function_scope): New function.
1341 * trans-expr.c (gfc_trans_assignment): Use it.
1342
1343 2019-08-13 Steven G. Kargl <kargl@gcc.gnu.org>
1344
1345 PR fortran/89647
1346 resolve.c (resolve_typebound_procedure): Allow host associated
1347 procedure to be a binding target. While here, wrap long line.
1348
1349 2019-08-13 Steven G. Kargl <kargl@gcc.gnu.org>
1350
1351 PR fortran/87993
1352 * expr.c (gfc_simplify_expr): Simplifcation of an array with a kind
1353 type inquiry suffix yields a constant expression.
1354
1355 2019-08-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1356
1357 Backport from trunk
1358 PR fortran/91424
1359 * frontend-passes.c (do_subscript): Do not warn for an
1360 expression a second time. Do not warn about a zero-trip loop.
1361 (doloop_warn): Also look at contained namespaces.
1362
1363 2019-08-12 Steven G. Kargl <kargl@gcc.gnu.org>
1364
1365 PR fortran/91359
1366 * trans-decl.c (gfc_generate_return): Ensure something is returned
1367 from a function.
1368
1369 2019-08-12 Steven G. Kargl <kargl@gcc.gnu.org>
1370
1371 PR fortran/42546
1372 * check.c(gfc_check_allocated): Add comment pointing to ...
1373 * intrinsic.c(sort_actual): ... the checking done here.
1374
1375 2019-08-12 Release Manager
1376
1377 * GCC 9.2.0 released.
1378
1379 2019-08-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1380
1381 Backport from trunk
1382 PR fortran/87233
1383 * expr.c (check_restricted): Relax constraint C1279 which was
1384 removed from F2008 and above.
1385
1386 2019-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1387
1388 PR fortran/91296
1389 * interface.c (compare_actual_expr): When checking for aliasing, add
1390 a case to handle REF_INQUIRY (e.g., foo(x%re, x%im) do not alias).
1391
1392 2019-07-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1393 Paul Thomas <pault@gcc.gnu.org>
1394
1395 Backport from trunk
1396 PR fortran/90786
1397 PR fortran/90813
1398 * trans-expr.c (pointer_assignment_is_proc_pointer) Remove as
1399 it is very simple and only called from one place.
1400 (gfc_trans_pointer_assignment): Rename non_proc_pointer_assign
1401 as non_proc_ptr_assign. Assign to it directly, rather than call
1402 to above, deleted function and use gfc_expr_attr instead of
1403 only checking the reference chain.
1404 * dump-parse-tree.c (show_global_symbol): New function.
1405 (gfc_dump_global_symbols): New function.
1406 * gfortran.h (gfc_traverse_gsymbol): Add prototype.
1407 (gfc_dump_global_symbols): Likewise.
1408 * invoke.texi: Document -fdump-fortran-global.
1409 * lang.opt: Add -fdump-fortran-global.
1410 * parse.c (gfc_parse_file): Handle flag_dump_fortran_global.
1411 * symbol.c (gfc_traverse_gsymbol): New function.
1412 * trans-decl.c (sym_identifier): New function.
1413 (mangled_identifier): New function, doing most of the work
1414 of gfc_sym_mangled_identifier.
1415 (gfc_sym_mangled_identifier): Use mangled_identifier. Add mangled
1416 identifier to global symbol table.
1417 (get_proc_pointer_decl): Use backend decl from global identifier
1418 if present.
1419
1420 2019-07-23 Thomas König <tkoenig@gcc.gnu.org>
1421
1422 Backport from trunk
1423 PR libfortran/91030
1424 * gfortran.texi (GFORTRAN_FORMATTED_BUFFER_SIZE): Document.
1425 (GFORTRAN_UNFORMATTED_BUFFER_SIZE): Likewise.
1426
1427 2019-07-07 Paul Thomas <pault@gcc.gnu.org>
1428
1429 Backport from mainline
1430 PR fortran/91077
1431 * trans-array.c (gfc_conv_scalarized_array_ref) Delete code
1432 that gave symbol backend decl for subref arrays and deferred
1433 length variables.
1434
1435 2019-06-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1436
1437 Backport from trunk
1438 PR fortran/90937
1439 * trans-types.c (get_formal_from_actual_arglist): Get symbol from
1440 current namespace so it will be freed later. If symbol is of type
1441 character, get an empty character length.
1442
1443 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
1444
1445 Backport from mainline
1446 PR fortran/90290
1447 * match.c (gfc_match_stopcode): Check F2008 condition on stop code.
1448
1449 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
1450
1451 Backport from mainline
1452 PR fortran/90002
1453 * array.c (gfc_free_array_spec): When freeing an array-spec, avoid
1454 an ICE for assumed-shape coarrays.
1455
1456 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
1457
1458 Backport from mainline
1459 PR fortran/89344
1460 * expr.c (gfc_check_vardef_context): Check for INTENT(IN) variable
1461 in SELECT TYPE construct.
1462
1463 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
1464
1465 Backport from mainline
1466 PR fortran/87907
1467 * resolve.c (resolve_contained_fntype): Do not dereference a NULL
1468 pointer.
1469
1470 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
1471
1472 Backport from mainline
1473 PR fortran/86587
1474 * symbol.c (verify_bind_c_derived_type): Remove erroneous error
1475 checking for BIND(C) and PRIVATE attributes.
1476
1477 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
1478
1479 Backport from mainline
1480 PR fortran/77632
1481 * /decl.c (variable_decl): Mark a variable that is a target in pointer
1482 initialization when in PROGRAM, MODULE, or SUBMODULE scope with an
1483 implicit save.
1484
1485 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
1486
1487 Backport from mainline
1488 PR fortran/69499
1489 * match.c (gfc_match_select_type): SELECT TYPE is an executable
1490 statement, and cannot appear in MODULE or SUBMODULE scope.
1491
1492 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
1493
1494 Backport from mainline
1495 PR fortran/69398
1496 * decl.c (attr_decl): Check for duplicate DIMENSION attribute for a
1497 CLASS entity.
1498
1499 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
1500
1501 Backport from mainline
1502 PR fortran/68544
1503 * resolve.c (is_dt_name): New function to compare symbol name against
1504 list of derived types.
1505 (resolve_actual_arglist): Use it to find wrong code.
1506
1507 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
1508
1509 Backport from mainline
1510 * arith.c (arith_power): Rework overflow of an integer to an integer
1511 exponent.
1512
1513 2019-06-18 Harald Anlauf <anlauf@gmx.de>
1514
1515 Backport from mainline
1516 2019-06-14 Harald Anlauf <anlauf@gmx.de>
1517
1518 PR fortran/90577
1519 PR fortran/90578
1520 * trans-intrinsic.c (gfc_conv_intrinsic_shift): Properly
1521 distinguish logical/arithmetic shifts.
1522 * intrinsic.texi: Update documentation for SHIFTR/SHIFTL/SHIFTA
1523 (Fortran 2008) and LSHIFT/RSHIFT (GNU extensions).
1524
1525 2019-06-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1526 Tomáš Trnka <trnka@scm.com>
1527
1528 Backport from trunk
1529 PR fortran/90744
1530 * trans-types.c (get_formal_from_actual_arglist): Unset typespec
1531 flags which make no sense for procedures without explicit
1532 interface.
1533
1534 2019-05-30 Marek Polacek <polacek@redhat.com>
1535
1536 * lang.opt (ftail-call-workaround): Fix a typo.
1537
1538 2019-05-30 Jakub Jelinek <jakub@redhat.com>
1539
1540 * lang.opt (ftail-call-workaround=): Fix a typo - lenghts to lengths.
1541
1542 2019-05-29 Jakub Jelinek <jakub@redhat.com>
1543
1544 PR fortran/90329
1545 Backported from mainline
1546 2019-05-29 Jakub Jelinek <jakub@redhat.com>
1547
1548 PR fortran/90329
1549 * lang.opt (fbroken-callers): Remove.
1550 (ftail-call-workaround, ftail-call-workaround=): New options.
1551 * gfortran.h (struct gfc_namespace): Add implicit_interface_calls.
1552 * interface.c (gfc_procedure_use): Set implicit_interface_calls
1553 for calls to implicit interface procedures.
1554 * trans-decl.c (create_function_arglist): Use flag_tail_call_workaround
1555 instead of flag_broken_callers. If it is not 2, also require
1556 sym->ns->implicit_interface_calls.
1557 * invoke.texi (fbroken-callers): Remove documentation.
1558 (ftail-call-workaround, ftail-call-workaround=): Document.
1559
1560 2019-05-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1561
1562 PR fortran/90329
1563 * invoke.texi: Document -fbroken-callers.
1564 * lang.opt: Add -fbroken-callers.
1565 * trans-decl.c (create_function_arglist): Only set
1566 DECL_HIDDEN_STRING_LENGTH if flag_broken_callers is set.
1567
1568 2019-05-16 Jakub Jelinek <jakub@redhat.com>
1569
1570 PR fortran/90329
1571 * trans-decl.c (create_function_arglist): Set
1572 DECL_HIDDEN_STRING_LENGTH on hidden string length PARM_DECLs if
1573 len is constant.
1574
1575 2019-05-21 Janne Blomqvist <jb@gcc.gnu.org>
1576
1577 Backport from trunk
1578 PR libfortran/90038
1579 * intrinsic.texi (EXECUTE_COMMAND_LINE): Explain new
1580 wait=.false. implementation.
1581
1582 2019-05-19 Paul Thomas <pault@gcc.gnu.org>
1583
1584 Backport from trunk
1585 PR fortran/90498
1586 * trans-stmt.c (trans_associate_var) Do not use the saved
1587 descriptor if the expression is a COMPONENT_REF.
1588
1589 2019-05-15 Janne Blomqvist <jb@gcc.gnu.org>
1590
1591 Backport from trunk
1592 * parse.c (gfc_parse_file): Remove translation string markers.
1593
1594 2019-05-12 Janne Blomqvist <jb@gcc.gnu.org>
1595
1596 Backport from trunk
1597 * dump-parse-tree.c (get_c_type_name): Use macros for complex type
1598 names.
1599 * parse.c (gfc_parse_file): Define complex macros, add CPP support
1600 when printing C prototypes.
1601
1602 2019-05-11 Paul Thomas <pault@gcc.gnu.org>
1603
1604 Backport from trunk
1605 PR fortran/90093
1606 * trans-decl.c (convert_CFI_desc): Test that the dummy is
1607 present before doing any of the conversions.
1608
1609 PR fortran/90352
1610 * decl.c (gfc_verify_c_interop_param): Restore the error for
1611 charlen > 1 actual arguments passed to bind(C) procs.
1612 Clean up trailing white space.
1613
1614 PR fortran/90355
1615 * trans-array.c (gfc_trans_create_temp_array): Set the 'span'
1616 field to the element length for all types.
1617 (gfc_conv_expr_descriptor): The force_no_tmp flag is used to
1618 prevent temporary creation, especially for substrings.
1619 * trans-decl.c (gfc_trans_deferred_vars): Rather than assert
1620 that the backend decl for the string length is non-null, use it
1621 as a condition before calling gfc_trans_vla_type_sizes.
1622 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): 'force_no_tmp'
1623 is set before calling gfc_conv_expr_descriptor.
1624 * trans.c (get_array_span): Move the code for extracting 'span'
1625 from gfc_build_array_ref to this function. This is specific to
1626 descriptors that are component and indirect references.
1627 * trans.h : Add the force_no_tmp flag bitfield to gfc_se.
1628
1629 2019-05-09 Thomas Koenig <tkoenig@gcc.gnu.org>
1630
1631 Backport from trunk
1632 PR fortran/90351
1633 PR fortran/90329
1634 * gfortran.dg/dump-parse-tree.c: Include version.h.
1635 (gfc_dump_external_c_prototypes): New function.
1636 (get_c_type_name): Select "char" as a name for a simple char.
1637 Adjust to handling external functions. Also handle complex.
1638 (write_decl): Add argument bind_c. Adjust for dumping of external
1639 procedures.
1640 (write_proc): Likewise.
1641 (write_interop_decl): Add bind_c argument to call of write_proc.
1642 * gfortran.h: Add prototype for gfc_dump_external_c_prototypes.
1643 * lang.opt: Add -fc-prototypes-external flag.
1644 * parse.c (gfc_parse_file): Move dumping of BIND(C) prototypes.
1645 Call gfc_dump_external_c_prototypes if option is set.
1646 * invoke.texi: Document -fc-prototypes-external.
1647
1648 2019-05-03 Release Manager
1649
1650 * GCC 9.1.0 released.
1651
1652 2019-04-19 Steven G. Kargl <kargl@gcc.gnu.org>
1653
1654 PR fortran/90166
1655 * decl.c (in_module_or_interface): New function to check that the
1656 current state is in a module, submodule, or interface.
1657 (gfc_match_prefix): Use it.
1658
1659 2019-04-22 Paul Thomas <pault@gcc.gnu.org>
1660
1661 PR fortran/57284
1662 * resolve.c (find_array_spec): If this is a class expression
1663 and the symbol and component array specs are the same, this is
1664 not an error.
1665 *trans-intrinsic.c (gfc_conv_intrinsic_size): If a class symbol
1666 argument, has no namespace, it has come from the interface
1667 mapping and the _data component must be accessed directly.
1668
1669 2019-04-17 Thomas Schwinge <thomas@codesourcery.com>
1670
1671 PR fortran/90048
1672 * openmp.c (gfc_resolve_do_iterator): Handle sharing_clauses for
1673 OpenACC, too.
1674 (gfc_resolve_oacc_blocks): Populate sharing_clauses with private
1675 clauses.
1676
1677 2019-04-14 Paul Thomas <pault@gcc.gnu.org>
1678
1679 PR fortran/89843
1680 * trans-decl.c (gfc_get_symbol_decl): Assumed shape and assumed
1681 rank dummies of bind C procs require deferred initialization.
1682 (convert_CFI_desc): New procedure to convert incoming CFI
1683 descriptors to gfc types and back again.
1684 (gfc_trans_deferred_vars): Call it.
1685 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Null the CFI
1686 descriptor pointer. Free the descriptor in all cases.
1687
1688 PR fortran/89846
1689 * expr.c (is_CFI_desc): New function.
1690 (is_subref_array): Tidy up by referencing the symbol directly.
1691 * gfortran.h : Prototype for is_CFI_desc.
1692 * trans_array.c (get_CFI_desc): New function.
1693 (gfc_get_array_span, gfc_conv_scalarized_array_ref,
1694 gfc_conv_array_ref): Use it.
1695 * trans.c (get_array_span): Extract the span from descriptors
1696 that are indirect references.
1697
1698 PR fortran/90022
1699 * trans-decl.c (gfc_get_symbol_decl): Make sure that the se
1700 expression is a pointer type before converting it to the symbol
1701 backend_decl type.
1702 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Eliminate
1703 temporary creation for intent(in).
1704
1705 2019-04-13 Dominique d'Humieres <dominiq@gcc.gnu.org>
1706
1707 PR fortran/79842
1708 * module.c (gfc_use_module): use complete sentences.
1709
1710 2019-04-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1711
1712 PR translation/89939
1713 * frontend-passes.c (B_ERROR): Delete macro.
1714 (C_ERROR): Delete macro.
1715 (B_ERROR_1): New macro.
1716 (C_ERROR_1): New macro.
1717 (C_ERROR_2): New macro.
1718 (inline_matmul_assign): Use new macros.
1719 (call_external_blas): Likewise.
1720
1721 2019-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1722
1723 PR fortran/87352
1724 * gfortran.h (gfc_component): Add finalized field.
1725 * class.c (finalize_component): If the component is already
1726 finalized, return early. Set component->finalized on exit.
1727
1728 2019-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1729
1730 PR fortran/89981
1731 * resolve.c (resolve_global_procedure): If the global symbol is an
1732 ENTRY, also look up its name among the entries.
1733
1734 2019-04-04 Harald Anlauf <anlauf@gmx.de>
1735
1736 PR fortran/89904
1737 * check.c (gfc_check_transfer): Reject procedures as actual
1738 arguments for SOURCE and MOLD of TRANSFER intrinsic.
1739
1740 2019-04-03 Steven G. Kargl <kargl@gcc.gnu.org>
1741
1742 PR fortran/68567
1743 * expr.c (gfc_reduce_init_expr): Add extra check to avoid
1744 dereferencing a null pointer.
1745
1746 2019-04-03 Dominique d'Humieres <dominiq@gcc.gnu.org>
1747
1748 PR fortran/89375
1749 * expr.c (comp_pointer): Remove redundant condition.
1750
1751 2019-03-31 Harald Anlauf <anlauf@gmx.de>
1752
1753 PR fortran/83515
1754 PR fortran/85797
1755 * trans-types.c (gfc_typenode_for_spec): Handle conversion for
1756 procedure pointers.
1757 * target-memory.c (gfc_element_size): Handle size determination
1758 for procedure pointers.
1759
1760 2019-03-31 Thomas Koenig <tkoenig@gcc.gnu.org>
1761
1762 * dump-parse-tree.c (debug): Add for symbol_attribute *,
1763 symbol_attribute and gfc_ref * arguments.
1764
1765 2019-03-30 Paul Thomas <pault@gcc.gnu.org>
1766
1767 PR fortran/89841
1768 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Use the formal
1769 argument attributes rather than those of the actual argument.
1770
1771 PR fortran/89842
1772 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Call
1773 'set_dtype_for_unallocated' for any type of arrayspec.
1774
1775 2019-03-27 Janus Weil <janus@gcc.gnu.org>
1776
1777 PR fortran/85537
1778 * expr.c (gfc_check_assign_symbol): Reject internal and dummy procedures
1779 in procedure pointer initialization.
1780
1781 2019-03-27 Paul Thomas <pault@gcc.gnu.org>
1782
1783 PR fortran/88247
1784 * expr.c (is_subref_array): Permit substrings to be detected
1785 as subref arrays.
1786 * trans-array.c (get_array_ctor_var_strlen): Obtain the length
1787 of deferred length strings. Handle substrings with a NULL end
1788 expression.
1789 (trans_array_constructor): Remove an unnecessary blank line.
1790 (gfc_conv_scalarized_array_ref): Skip to label 'done' if 'decl'
1791 is a pointer array.
1792 (get_array_charlen): If the expression is an array, convert the
1793 first element of the constructor and use its string length. Get
1794 a new charlen if necessary.
1795 (gfc_conv_expr_descriptor): Call 'get_array_charlen' for array
1796 constructor expressions. If the ss_info string length is
1797 available, use that to set the span of character arrays.
1798 * trans-expr.c (gfc_get_expr_charlen): Handle substrings
1799 * trans-stmt.c (trans_associate_var): Set the pointer array
1800 flag for variable targets and constant array constructors. Take
1801 care not to reset the string length or the span in the case of
1802 expressions that are not converted as direct by reference.
1803
1804 2019-03-25 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1805
1806 * intrinsic.texi (MINLOC): Fix typo in BACK argument documentation.
1807 (MAXLOC): Likewise.
1808
1809 2019-03-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1810
1811 PR fortran/78865
1812 * interface.c (compare_actual_formal): Change errors about
1813 missing or extra to gfc_error_now to make sure they are issued.
1814 Change "spec" to "specifier" in message.
1815 * resolve.c (resolve_global_procedure): Also check for mismatching
1816 interface with global symbols if the namespace has already been
1817 resolved.
1818
1819 2019-03-21 Thomas Schwinge <thomas@codesourcery.com>
1820
1821 PR fortran/72741
1822 * openmp.c (gfc_match_oacc_routine): Set the level of parallelism
1823 for all variants.
1824 (gfc_resolve_oacc_routines): Call gfc_add_omp_declare_target.
1825
1826 PR fortran/89773
1827 * gfortran.h (gfc_oacc_routine_name): Add loc member.
1828 (gfc_resolve_oacc_routines): Declare.
1829 * openmp.c (gfc_match_oacc_routine): Move some error checking
1830 into...
1831 (gfc_resolve_oacc_routines): ... this new function.
1832 * resolve.c (resolve_codes): Call it.
1833
1834 PR fortran/72741
1835 * openmp.c (gfc_match_oacc_routine): Clarify.
1836
1837 PR fortran/72741
1838 * module.c (verify_OACC_ROUTINE_LOP_NONE): New function.
1839 (enum ab_attribute): Add AB_OACC_ROUTINE_LOP_GANG,
1840 AB_OACC_ROUTINE_LOP_WORKER, AB_OACC_ROUTINE_LOP_VECTOR,
1841 AB_OACC_ROUTINE_LOP_SEQ.
1842 (attr_bits): Add these.
1843 (mio_symbol_attribute): Handle these.
1844
1845 2019-03-20 Janus Weil <janus@gcc.gnu.org>
1846
1847 PR fortran/71861
1848 * symbol.c (check_conflict): ABSTRACT attribute conflicts with
1849 INTRINSIC attribute.
1850
1851 2019-03-18 Thomas Koenig <tkoeng@gcc.gnu.org>
1852
1853 PR fortran/68009
1854 * iresolve.c: Include trans.h.
1855 (gfc_resolve_fe_runtine_error): Set backend_decl on
1856 resolved_sym.
1857
1858 2019-03-17 Thomas Koenig <tkoenig@gcc.gnu.org>
1859
1860 PR fortran/88008
1861 * gfortran.h (expr_t): Add EXPR_UNKNOWN.
1862 * expr.c (gfc_copy_expr): Add EXPR_UNKNOWN to switch statement.
1863 (gfc_simplify_expr): Likewise.
1864 * module.c (mio_expr): Likewise.
1865 * resovle.c (extract_compcall_passed_object): Issue error on
1866 unknown type.
1867 (check_typebound_baseobject): Issue error on wrong type.
1868 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Add
1869 EXPR_UNKNOWN to switch statement.
1870
1871 2019-03-16 Jakub Jelinek <jakub@redhat.com>
1872
1873 PR fortran/89724
1874 * scanner.c (load_line): Remove linenum and current_line static
1875 variables, add warned_tabs automatic variable. Use current_file->line
1876 instead of current_line and warned_tabs boolean to avoid diagnosing
1877 tabs multiple times on the same line.
1878
1879 2019-03-16 Thomas Koenig <tkoenig@gcc.gnu.org>
1880
1881 PR fortran/84394
1882 * symbol.c (gfc_add_subroutine): If we are encountering a
1883 subrtoutine within a BLOCK DATA and the name starts with an
1884 underscore, do not check.
1885
1886 2019-03-15 Harald Anlauf <anlauf@gmx.de>
1887
1888 PR fortran/60091
1889 * expr.c (gfc_check_pointer_assign): Correct and improve error
1890 messages for invalid pointer assignments.
1891
1892 2019-03-14 Thomas Koenig <tkoenig@gcc.gnu.org>
1893
1894 * gfortran.texi: Document Q edit descriptor under
1895 "Extensions not implemented in GNU Fortran".
1896
1897 2019-03-13 Harald Anlauf <anlauf@gmx.de>
1898
1899 PR fortran/87045
1900 * trans-expr.c (gfc_trans_pointer_assignment): Move check for same
1901 string length so that we do not get false errors for deferred
1902 length.
1903
1904 2019-03-13 Janus Weil <janus@gcc.gnu.org>
1905
1906 PR fortran/89601
1907 * decl.c (gfc_match_formal_arglist): Reject empty type parameter lists.
1908 (gfc_match_derived_decl): Mark as PDT only if type parameter list was
1909 matched successfully.
1910
1911 2019-03-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1912
1913 PR fortran/66695
1914 PR fortran/77746
1915 PR fortran/79485
1916 * gfortran.h (gfc_symbol): Add bind_c component.
1917 (gfc_get_gsymbol): Add argument bind_c.
1918 * decl.c (add_global_entry): Add bind_c argument to
1919 gfc_get_symbol.
1920 * parse.c (parse_block_data): Likewise.
1921 (parse_module): Likewise.
1922 (add_global_procedure): Likewise.
1923 (add_global_program): Likewise.
1924 * resolve.c (resolve_common_blocks): Likewise.
1925 (resolve_global_procedure): Likewise.
1926 (gfc_verify_binding_labels): Likewise.
1927 * symbol.c (gfc_get_gsymbol): Add argument bind_c. Set bind_c
1928 in gsym.
1929 * trans-decl.c (gfc_get_module_backend_decl): Add bind_c argument
1930 to gfc_get_symbol.
1931 (gfc_get_extern_function_decl): If the sym has a binding label
1932 and it cannot be found in the global symbol tabel, it is the wrong
1933 one and vice versa.
1934
1935 2019-03-12 Thomas Koenig <tkoenig@gcc.gnu.org>
1936
1937 PR fortran/87673
1938 * match.c (gfc_match_type_spec): Remove call to
1939 gfc_resolve_expr for character length.
1940
1941 2019-03-12 Martin Liska <mliska@suse.cz>
1942
1943 * decl.c (add_init_expr_to_sym): Replace usage of 'can't'
1944 with 'cannot'.
1945 (variable_decl): Likewise.
1946 (cray_pointer_decl): Likewise.
1947 (match_binding_attributes): Likewise.
1948 * f95-lang.c (gfc_init): Likewise.
1949 * interface.c (gfc_check_typebound_override): Likewise.
1950 * intrinsic.c (make_generic): Likewise.
1951 * module.c (dump_module): Likewise.
1952 (gfc_use_module): Likewise.
1953 * primary.c (gfc_convert_to_structure_constructor): Likewise.
1954 * resolve.c (resolve_entries): Likewise.
1955 (check_generic_tbp_ambiguity): Likewise.
1956 (get_checked_tb_operator_target): Likewise.
1957 * scanner.c (load_file): Likewise.
1958 * trans-expr.c (gfc_conv_intrinsic_to_class): Likewise.
1959
1960 2019-03-12 Paul Thomas <pault@gcc.gnu.org>
1961
1962 PR fortran/89363
1963 PR fortran/89364
1964 * trans-expr.c (set_dtype_for_unallocated): New function.
1965 (gfc_conv_gfc_desc_to_cfi_desc): Call it for allocatable and
1966 pointer arguments.
1967 (gfc_conv_procedure_call): Likewise. Also, set the ubound of
1968 the final dimension to -1 for assumed rank formal args that are
1969 associated with assumed size arrays.
1970 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Return -1 for
1971 the final dimension of assumed rank entities that are argument
1972 associated with assumed size arrays.
1973 (gfc_conv_intrinsic_shape): Likewise return -1 for the final
1974 dimension of the shape intrinsic.
1975
1976 2019-03-11 Jakub Jelinek <jakub@redhat.com>
1977
1978 PR fortran/89651
1979 * trans-openmp.c (gfc_omp_clause_default_ctor): Set TREE_NO_WARNING
1980 on decl if adding COND_EXPR for allocatable.
1981 (gfc_omp_clause_copy_ctor): Set TREE_NO_WARNING on dest.
1982
1983 2019-03-11 Martin Liska <mliska@suse.cz>
1984
1985 * decl.c (match_record_decl): Wrap an option name
1986 in a string format message and fix GNU coding style.
1987 (gfc_match_pointer): Likewise.
1988 * expr.c (find_array_section): Likewise.
1989 * intrinsic.c (gfc_is_intrinsic): Likewise.
1990 * options.c (gfc_post_options): Likewise.
1991 * primary.c (match_integer_constant): Likewise.
1992 * trans-common.c (translate_common): Likewise.
1993
1994 2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1995
1996 PR fortran/66089
1997 * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
1998 Return false if a scalar tempoary is needed.
1999 (gfc_walk_variable_expr): Fix up class refs.
2000
2001 2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
2002
2003 PR fortran/87734
2004 * symbol.c (gfc_add_procedure): Only throw an error if the
2005 procedure has not been declared either PUBLIC or PRIVATE.
2006
2007 2019-03-09 Thomas Koenig <tkoenig@gcc.gnu.org>
2008
2009 PR fortran/71544
2010 * trans-types.c (gfc_typenode_for_spec) Set ts->is_c_interop of
2011 C_PTR and C_FUNPTR.
2012 (create_fn_spec): Mark argument as escaping if ts->is_c_interop is set.
2013
2014 2019-03-09 Janus Weil <janus@gcc.gnu.org>
2015
2016 PR fortran/84504
2017 * expr.c (gfc_check_assign_symbol): Deal with procedure pointers to
2018 pointer-valued functions.
2019
2020 2019-03-09 Thomas König <tkoenig@gcc.gnu.org>
2021
2022 PR fortran/71203
2023 * decl.c (add_init_expr_to_sym): Add shape if init has none. Add
2024 asserts that it has to be an EXPR_ARRAY in this case.
2025
2026 2019-03-08 Jakub Jelinek <jakub@redhat.com>
2027
2028 PR other/80058
2029 * arith.c (gfc_complex2complex): Avoid two spaces in the middle of
2030 diagnostics.
2031 * resolve.c (resolve_allocate_expr): Likewise.
2032
2033 2019-03-06 Harald Anlauf <anlauf@gmx.de>
2034
2035 PR fortran/71203
2036 * expr.c (simplify_const_ref): Avoid null pointer dereference.
2037
2038 2019-03-03 Harald Anlauf <anlauf@gmx.de>
2039 Steven G. Kargl <kargl@gcc.gnu.org>
2040
2041 PR fortran/77583
2042 * symbol.c (check_conflict): Check for valid procedure name
2043 passed to error reporting routine.
2044
2045 2019-03-03 Thomas Koenig <tkoenig@gcc.gnu.org>
2046
2047 PR fortran/72714
2048 * resolve.c (resolve_allocate_expr): Add some tests for coarrays.
2049
2050 2019-03-02 Harald Anlauf <anlauf@gmx.de>
2051
2052 PR fortran/89516
2053 * check.c (gfc_calculate_transfer_sizes): Correct checks for cases
2054 where storage size of elements of MOLD is 0.
2055
2056 2019-02-28 Thomas Schwinge <thomas@codesourcery.com>
2057 Cesar Philippidis <cesar@codesourcery.com>
2058
2059 PR fortran/72741
2060 PR fortran/89433
2061 * openmp.c (gfc_match_oacc_routine): Handle repeated use of the
2062 Fortran OpenACC 'routine' directive.
2063
2064 PR fortran/72741
2065 * gfortran.h (enum oacc_routine_lop): Add OACC_ROUTINE_LOP_ERROR.
2066 * openmp.c (gfc_oacc_routine_lop, gfc_match_oacc_routine): Use it.
2067 * trans-decl.c (add_attributes_to_decl): Likewise.
2068
2069 PR fortran/72741
2070 PR fortran/89433
2071 * openmp.c (gfc_match_oacc_routine): Accept intrinsic symbols.
2072
2073 2019-02-26 Harald Anlauf <anlauf@gmx.de>
2074
2075 PR fortran/89492
2076 * check.c (gfc_calculate_transfer_sizes): Handle cases where
2077 storage size of elements of MOLD is 0.
2078
2079 2019-02-26 Thomas Koenig <tkoenig@gcc.gnu.org>
2080
2081 PR fortran/89496
2082 * trans-types.c (get_formal_from_actual_arglist): If
2083 the actual arglist has no expression, the corresponding
2084 formal arglist is an alternate return.
2085
2086 2019-02-26 Jakub Jelinek <jakub@redhat.com>
2087
2088 PR fortran/43210
2089 * trans-array.c (gfc_conv_array_initializer): Use RANGE_EXPR instead
2090 of duplicating the initializer possibly many times.
2091
2092 2019-02-24 Thomas Koenig <tkoenig@gcc.gnu.org>
2093
2094 PR fortran/89174
2095 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Add is_mold
2096 to arguments. If we are dealing with a MOLD, call
2097 gfc_expr_to_initialize().
2098 * trans-stmt.c (gfc_trans_allocate): For MOLD, pass is_mold=true
2099 to gfc_find_and_cut_at_last_class_ref.
2100 * trans.h (gfc_find_and_cut_at_last_class_ref): Add optional
2101 argument is_mold with default false.
2102
2103 2019-02-24 Harald Anlauf <anlauf@gmx.de>
2104
2105 PR fortran/89266
2106 PR fortran/88326
2107 * target-memory.c (gfc_element_size): Return false if element size
2108 cannot be determined; element size is returned separately.
2109 (gfc_target_expr_size): Return false if expression size cannot be
2110 determined; expression size is returned separately.
2111 * target-memory.h: Adjust prototypes.
2112 * check.c (gfc_calculate_transfer_sizes): Adjust references to
2113 gfc_target_expr_size, gfc_element_size.
2114 * arith.c (hollerith2representation): Likewise.
2115 * class.c (find_intrinsic_vtab): Likewise.
2116 * simplify.c (gfc_simplify_sizeof): Likewise.
2117
2118 2019-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2119
2120 PR fortran/84387
2121 * trans-io.c (transfer_expr): Do not return if there are no
2122 components to the derived type or class.
2123
2124 2019-02-23 Paul Thomas <pault@gcc.gnu.org>
2125
2126 PR fortran/88117
2127 * resolve.c (deferred_op_assign): Return if the lhs expression
2128 has the pointer attribute.
2129 * trans-expr.c (gfc_trans_assignment_1): Do not fix the string
2130 length if the lhs expression has the pointer attribute.
2131
2132 2019-02-23 Paul Thomas <pault@gcc.gnu.org>
2133
2134 PR fortran/89385
2135 PR fortran/89366
2136 * decl.c (gfc_verify_c_interop_param): Restriction on string
2137 length being one is lifted for F2018.
2138 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): For scalar
2139 characters with intent in, make a temporary and copy the result
2140 of the expression evaluation into it.
2141 (gfc_conv_procedure_call): Set a flag for character formal args
2142 having a character length that is not unity. If the procedure
2143 is bind C, call gfc_conv_gfc_desc_to_cfi_desc in this case.
2144 Also, extend bind C calls to unconditionally convert both
2145 pointers and allocatable expressions.
2146
2147 2019-02-23 David Malcolm <dmalcolm@redhat.com>
2148 Jakub Jelinek <jakub@redhat.com>
2149
2150 PR middle-end/88074
2151 * simplify.c (norm2_do_sqrt, gfc_simplify_norm2): Use
2152 mpfr_number_p && !mpfr_zero_p instead of mpfr_regular_p.
2153 (norm2_add_squared): Likewise. Use mp_exp_t rather than mpfr_exp_t.
2154
2155 2019-02-22 Harald Anlauf <anlauf@gmx.de>
2156
2157 PR fortran/83057
2158 * io.c (gfc_match_open): Fix logic in checks of OPEN statement
2159 when NEWUNIT= is specified.
2160
2161 2019-02-22 Steven G. Kargl <kargl@gcc.gnu.org>
2162
2163 PR fortran/89431
2164 * gfortran.texi: Fix documentation to match the implementation.
2165
2166 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2167 Cesar Philippidis <cesar@codesourcery.com>
2168
2169 PR fortran/72741
2170 * gfortran.h (oacc_routine_lop): New enum.
2171 (symbol_attribute): Use it.
2172 * openmp.c (gfc_oacc_routine_dims): Replace with...
2173 (gfc_oacc_routine_lop): ... this new function.
2174 (gfc_match_oacc_routine): Adjust.
2175 * trans-decl.c (add_attributes_to_decl): Likewise.
2176
2177 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2178
2179 * openmp.c (gfc_match_oacc_declare): Revert earlier changes.
2180
2181 2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
2182
2183 * dump-parse-tree.c (debug): Implement for gfc_expr *,
2184 gfc_typespec *, gfc_typespec and gfc_symbol *.
2185
2186 2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
2187
2188 PR fortran/86119
2189 * class.c (gfc_get_len_component): Add argument k for kind.
2190 If the kind of the resulting expression is not equal to k,
2191 convert it.
2192 * gfortran.h (gfc_len_component): Adjust prototype.
2193 * simplify.c (gfc_simplify_len): Pass kind to
2194 gfc_get_len_component.
2195
2196 2019-02-20 Martin Liska <mliska@suse.cz>
2197
2198 * gfortran.texi: Change singular to plural.
2199
2200 2019-02-20 Martin Liska <mliska@suse.cz>
2201
2202 * gfortran.texi: Document Fortran header directive.
2203
2204 2019-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
2205
2206 PR fortran/89384
2207 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): If the dummy
2208 argument is contiguous and the actual argument may not be,
2209 use gfc_conv_subref_array_arg.
2210
2211 2019-02-19 Thomas Schwinge <thomas@codesourcery.com>
2212
2213 PR c/87924
2214 * openmp.c (gfc_match_omp_clauses): Add representation of wait clause
2215 without argument as 'wait (GOMP_ASYNC_NOVAL)'.
2216
2217 2019-02-18 Thomas Koenig <tkoenig@gcc.gnu.org>
2218
2219 PR fortran/87689
2220 * trans-decl.c (gfc_get_extern_function_decl): Add argument
2221 actual_args and pass it through to gfc_get_function_type.
2222 * trans-expr.c (conv_function_val): Add argument actual_args
2223 and pass it on to gfc_get_extern_function_decl.
2224 (conv_procedure_call): Pass actual arguments to conv_function_val.
2225 * trans-types.c (get_formal_from_actual_arglist): New function.
2226 (gfc_get_function_type): Add argument actual_args. Generate
2227 formal args from actual args if necessary.
2228 * trans-types.h (gfc_get_function_type): Add optional argument.
2229 * trans.h (gfc_get_extern_function_decl): Add optional argument.
2230
2231 2019-02-18 Martin Liska <mliska@suse.cz>
2232
2233 * decl.c (gfc_match_gcc_builtin): Add support for filtering
2234 of builtin directive based on multilib ABI name.
2235
2236 2019-02-17 Harald Anlauf <anlauf@gmx.de>
2237
2238 PR fortran/88299
2239 * resolve.c (resolve_common_blocks,resolve_common_vars): Move
2240 check for obsolent COMMON feature in F2018 to better place.
2241
2242 2019-02-17 Harald Anlauf <anlauf@gmx.de>
2243
2244 PR fortran/89077
2245 * decl.c (gfc_set_constant_character_len): Clear original string
2246 representation after padding has been performed to target length.
2247
2248 2019-02-16 Jakub Jelinek <jakub@redhat.com>
2249
2250 PR middle-end/88074
2251 * simplify.c (simplify_transformation_to_array): Run post_op
2252 immediately after processing corresponding row, rather than at the
2253 end.
2254 (norm2_scale): New variable.
2255 (add_squared): Rename to ...
2256 (norm2_add_squared): ... this. Scale down operand and/or result
2257 if needed.
2258 (do_sqrt): Rename to ...
2259 (norm2_do_sqrt): ... this. Handle the result == e case. Scale up
2260 result and clear norm2_scale.
2261 (gfc_simplify_norm2): Clear norm2_scale. Change add_squared to
2262 norm2_add_squared and &do_sqrt to norm2_do_sqrt. Scale up result
2263 and clear norm2_scale again.
2264
2265 2019-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
2266
2267 PR fortran/71066
2268 * trans-decl.c (generate_coarray_sym_init): For an array
2269 constructor in a DATA statement of a coarray variable, set the
2270 rank to 1 to avoid confusion later on. If the constructor
2271 contains only one value, use that for initiailizig.
2272
2273 2019-02-14 Janne Blomqvist <jb@gcc.gnu.org>
2274
2275 PR fortran/81552
2276 * gfortran.h (gfc_option_t): Make flag_init_integer_value a long.
2277 * options.c (gfc_handle_option): Use strtol instead of atoi.
2278 * invoke.texi: Document -finit-integer behavior in more detail.
2279
2280 2019-02-14 Harald Anlauf <anlauf@gmx.de>
2281
2282 PR fortran/88248
2283 * symbol.c: Move check for labeled DO statement from
2284 gfc_define_st_label to gfc_reference_st_label.
2285
2286 2019-02-14 Cesar Philippidis <cesar@codesourcery.com>
2287
2288 PR fortran/72715
2289 * openmp.c (resolve_oacc_nested_loops): Error on do concurrent
2290 loops.
2291
2292 2019-02-13 Martin Liska <mliska@suse.cz>
2293
2294 PR fortran/88649
2295 * resolve.c (resolve_operator): Initialize 't' right
2296 after function entry. Skip switch (e->value.op.op)
2297 for -fdec operands that become function calls.
2298
2299 2019-02-10 Thomas Koenig <tkoenig@gcc.gnu.org>
2300
2301 PR fortran/71723
2302 * expr.c (gfc_check_assign): Add argument is_init_expr. If we are
2303 looking at an init expression, issue error if the target is not a
2304 TARGET and we are not looking at a procedure pointer.
2305 * gfortran.h (gfc_check_assign): Add optional argument
2306 is_init_expr.
2307
2308 2019-02-09 Harald Anlauf <anlauf@gmx.de>
2309
2310 PR fortran/89077
2311 * resolve.c (gfc_resolve_substring_charlen): Check substring
2312 length for constantness prior to general calculation of length.
2313
2314 2019-02-09 Paul Thomas <pault@gcc.gnu.org>
2315
2316 PR fortran/89200
2317 * trans-array.c (gfc_trans_create_temp_array): Set the 'span'
2318 field for derived types.
2319
2320 2019-02-04 Harald Anlauf <anlauf@gmx.de>
2321
2322 PR fortran/89077
2323 * decl.c (add_init_expr_to_sym): Copy length of string initializer
2324 to declared symbol.
2325
2326 2019-02-04 Martin Liska <mliska@suse.cz>
2327
2328 PR fortran/89185
2329 * resolve.c (resolve_ref): Remove breakout variable as
2330 we need to prevent prev = &(*prev)->next to happen
2331 with *prev == NULL.
2332
2333 2019-02-04 Martin Liska <mliska@suse.cz>
2334
2335 PR fortran/88912
2336 * scanner.c (load_file): Report error for -fpre-include
2337 file and do not ICE.
2338
2339 2019-02-02 Dominique d'Humieres <dominiq@gcc.gnu.org>
2340
2341 PR fortran/81344
2342 * invoke.texi: Document the behavior of repeated -ffpe-trap
2343 and -ffpe-summary.
2344
2345 2019-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
2346
2347 PR fortran/88298
2348 * arith.c (gfc_int2int): Do not warn if src->do_not_warn is set.
2349 * gfortran.h (gfc_expr): Add flag do_not_warn.
2350 * intrinsic.c (gfc_convert_type_warn): Set expr->do_not_warn if
2351 no warning is desired.
2352
2353 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
2354
2355 PR fortran/88393
2356 * trans-expr.c (gfc_conv_procedure_call): For derived entities,
2357 passed in parentheses to class formals, invert the order of
2358 copying allocatable components to taking the _data of the
2359 class expression.
2360
2361 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
2362
2363 PR fortran/88980
2364 * trans-array.c (gfc_array_init_size): Add element_size to the
2365 arguments.
2366 (gfc_array_allocate): Remove the recalculation of the size of
2367 the element and use element_size from the call to the above.
2368 Unconditionally set the span field of the descriptor.
2369
2370 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
2371
2372 PR fortran/88685
2373 * expr.c (is_subref_array): Move the check for class pointer
2374 dummy arrays to after the reference check. If we haven't seen
2375 an array reference other than an element and a component is not
2376 class or derived, return false.
2377
2378 2019-02-01 Jakub Jelinek <jakub@redhat.com>
2379
2380 PR fortran/83246
2381 PR fortran/89084
2382 * trans-decl.c (generate_local_decl): Add referenced FL_PARAMETERs
2383 if sym->ns->construct_entities rather than if
2384 sym->ns->parent->code->op == EXEC_BLOCK.
2385
2386 2019-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
2387
2388 PR fortran/88669
2389 * resolve.c (resolve_component): If the reference is a BT_CLASS,
2390 copy the contiguous attribute from the reference and use the
2391 correct attributes.
2392
2393 2019-01-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2394
2395 PR fortran/52564
2396 * io.c (match_io): Add check for comma after '*' without subsequent
2397 IO list.
2398
2399 2019-01-30 Dominique d'Humieres <dominiq@gcc.gnu.org>
2400
2401 PR fortran/52884
2402 * invoke.texi: Document the promotion of double precision
2403 constants.
2404
2405 2019-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
2406
2407 PR fortran/57048
2408 * interface.c (gfc_compare_types): If a derived type and an
2409 integer both have a derived type, and they are identical,
2410 this is a C binding type and compares equal.
2411
2412 2019-01-26 Harald Anlauf <anlauf@gmx.de>
2413
2414 PR fortran/57553
2415 * expr.c (check_inquiry): Add list of inquiry functions allowed in
2416 constant expressions for F2008+.
2417
2418 2019-01-25 Steven G. Kargl <kargl@gcc.gnu.org>
2419
2420 PR fortran/85780
2421 * decl.c (gfc_match_subroutine): Check for conflict between BIND(C)
2422 and alternative return.
2423
2424 2019-01-24 Paul Thomas <pault@gcc.gnu.org>
2425
2426 PR fortran/88929
2427 * trans-array.c (gfc_conv_descriptor_elem_len): New function.
2428 * trans-array.h : Add prototype for above.
2429 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Take account of
2430 assumed rank arrays being flagged by rank = -1 in expressions.
2431 Intent in arrays need a pointer to a copy of the data to be
2432 assigned to the descriptor passed for conversion. This should
2433 then be freed, together with the CFI descriptor on return from
2434 the C call.
2435
2436 2019-01-22 Harald Anlauf <anlauf@gmx.de>
2437
2438 PR fortran/88579
2439 * trans-expr.c (gfc_conv_power_op): Handle cases of (2**e) ** integer
2440 and (- 2**e) ** integer.
2441
2442 2019-01-19 Dominique d'Humieres <dominiq@gcc.gnu.org>
2443
2444 PR fortran/37835
2445 * resolve.c (resolve_types): Add !flag_automatic.
2446 * symbol.c (gfc_add_save): Silence warnings.
2447
2448 2019-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
2449
2450 PR fortran/77960
2451 * io.c (match_io_element): input-item cannot be an external function.
2452
2453 2018-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
2454 Paul Thomas <pault@gcc.gnu.org>
2455
2456 PR fortran/56789
2457 * trans-expr.c (gfc_conv_procedure_call): Call
2458 gfc_conv_subref_array_arg if the formal arg is contiguous
2459 and the actual arg may not be.
2460
2461 2019-01-17 Thomas Koenig <tkoenig@gcc.gnu.org>
2462
2463 PR fortran/88871
2464 * resolve.c (resolve_ref): Fix logic for removal of
2465 reference.
2466
2467 2019-01-19 Jakub Jelinek <jakub@redhat.com>
2468
2469 PR fortran/88902
2470 * trans-decl.c (gfc_get_symbol_decl): Don't add length to function
2471 or parent function if it has been added there already.
2472
2473 2019-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
2474
2475 PR fortran/43136
2476 * resolve.c (resolve_array_ref): Add equal_length argument; set it
2477 if the length of the substring equals that of the orignal
2478 variable.
2479 (resolve_ref): Remove the substring if it is equal in length to
2480 the original variable, unless it is an EXPR_SUBSTRING).
2481
2482 2019-01-15 Steven G. Kargl <kargl@gcc.gnu.org>
2483
2484 PR fortran/81849
2485 * resolve.c (resolve_symbol): Host associated varaibles can appear
2486 in the specification statement of a RESULT array.
2487
2488 2019-01-15 Paul Thomas <pault@gcc.gnu.org>
2489
2490 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Deal with exprs
2491 that are indirect references; ie. dummy arguments.
2492
2493 2019-01-13 Dominique d'Humieres <dominiq@gcc.gnu.org>
2494
2495 PR fortran/88803
2496 * gfortran.texi: Replace @xref with @ref and adjust the sentence.
2497
2498 2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
2499
2500 PR fortran/57992
2501 * trans-array.c (gfc_conv_array_parameter): Do not pack/unpack
2502 functions with contiguous results.
2503
2504 2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
2505
2506 PR fortran/59345
2507 * trans-array.c (gfc_conv_array_parameter): Remove TODO. Do not
2508 pack/unpack results of functions which return an explicit-shaped
2509 or allocatable array.
2510
2511 2019-01-12 Steven G. Kargl <kargl@gcc.gnu.org>
2512
2513 PR fortran/61765
2514 * resolve.c (gfc_verify_binding_labels): Break if-elseif-elseif
2515 structure into independent if's with a return to simplify logic.
2516 Avoid a check for ENTRY name with bind(c).
2517
2518 2019-01-12 Paul Thomas <pault@gcc.gnu.org>
2519
2520 * gfortran.texi: Add description in sections on TS 29113 and
2521 further interoperability with C.
2522 * trans-array.c (gfc_conv_descriptor_attribute): New function.
2523 (gfc_get_dataptr_offset): Remove static function attribute.
2524 * trans-array.h: Add prototypes for above functions.
2525 * trans-decl.c: Add declarations for the library functions
2526 cfi_desc_to_gfc_desc and gfc_desc_to_cfi_desc.
2527 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): New function.
2528 (gfc_conv_procedure_call): Call it for scalar and array actual
2529 arguments, when the formal arguments are bind_c with assumed
2530 shape or assumed rank.
2531 * trans.h: External declarations for gfor_fndecl_cfi_to_gfc
2532 and gfor_fndecl_gfc_to_cfi.
2533
2534 2019-01-11 Steven G. Kargl <kargl@gcc.gnu.org>
2535
2536 PR fortran/35031
2537 * decl.c (gfc_match_entry): Check for F2018:C1546. Fix nearby
2538 mis-indentation.
2539
2540 2019-01-11 Jakub Jelinek <jakub@redhat.com>
2541
2542 PR middle-end/85956
2543 PR lto/88733
2544 * trans-openmp.c: Include attribs.h.
2545 (gfc_walk_alloc_comps, gfc_omp_clause_linear_ctor): Handle
2546 VAR_DECL max bound with "omp dummy var" attribute like NULL or
2547 error_mark_node - recompute number of elts independently.
2548
2549 2019-01-11 Thomas Koenig <tkoenig@gcc.gnu.org>
2550
2551 PR fortran/59345
2552 * trans-array.c (gfc_conv_parameter_array): Temporary
2553 arrays generated for expressions do not need to be repacked.
2554
2555 2019-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
2556
2557 PR fortran/86322
2558 * decl.c (top_var_list): Set locus of expr.
2559 (gfc_match_data): Detect pointer on non-rightmost part-refs.
2560
2561 2019-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
2562
2563 PR fortran/88376
2564 * resolve.c (is_illegal_recursion): Remove an assert().
2565
2566 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
2567
2568 PR other/16615
2569 * expr.c: Change "can not" to "cannot".
2570
2571 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
2572
2573 PR other/16615
2574 * class.c: Mechanically replace "can not" with "cannot".
2575 * decl.c: Likewise.
2576 * expr.c: Likewise.
2577 * gfc-internals.texi: Likewise.
2578 * intrinsic.texi: Likewise.
2579 * invoke.texi: Likewise.
2580 * io.c: Likewise.
2581 * match.c: Likewise.
2582 * parse.c: Likewise.
2583 * primary.c: Likewise.
2584 * resolve.c: Likewise.
2585 * symbol.c: Likewise.
2586 * trans-array.c: Likewise.
2587 * trans-decl.c: Likewise.
2588 * trans-intrinsic.c: Likewise.
2589 * trans-stmt.c: Likewise.
2590
2591 2019-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
2592
2593 PR fortran/68426
2594 * simplify.c (gfc_simplify_spread): Also simplify if the
2595 type of source is an EXPR_STRUCTURE.
2596
2597 2019-01-08 Janus Weil <janus@gcc.gnu.org>
2598
2599 PR fortran/88047
2600 * class.c (gfc_find_vtab): For polymorphic typespecs, the components of
2601 the class container may not be available (in case of invalid code).
2602
2603 2019-01-08 Richard Biener <rguenther@suse.de>
2604
2605 PR fortran/88611
2606 * trans-expr.c (gfc_conv_initializer): For ISOCBINDING_NULL_*
2607 directly build the expected GENERIC tree.
2608
2609 2019-01-07 Thomas Koenig <tkoenig@gcc.gnu.org>
2610 Harald Anlauf <anlauf@gmx.de>
2611 Tobias Burnus <burnus@gcc.gnu.org>
2612
2613 PR fortran/45424
2614 * check.c (gfc_check_is_contiguous): New function.
2615 * expr.c (gfc_is_not_contiguous): New function.
2616 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IS_CONTIGUOUS.
2617 Add prototype for gfc_is_not_contiguous.
2618 * intrinsic.c (do_ts29113_check): Add GFC_ISYM_IS_CONTIGUOUS.
2619 (add_function): Add is_contiguous.
2620 * intrinsic.h: Add prototypes for gfc_check_is_contiguous,
2621 gfc_simplify_is_contiguous and gfc_resolve_is_contiguous.
2622 * intrinsic.texi: Add IS_CONTIGUOUS.
2623 * iresolve.c (gfc_resolve_is_contiguous): New function.
2624 * simplify.c (gfc_simplify_is_contiguous): New function.
2625 * trans-decl.c (gfor_fncecl_is_contiguous0): New variable.
2626 (gfc_build_intrinsic_function_decl): Add it.
2627 * trans-intrinsic.c (gfc_conv_intrinsic_is_contiguous): New
2628 function.
2629 (gfc_conv_intrinsic_function): Handle GFC_ISYM_IS_CONTIGUOUS.
2630
2631 2019-01-06 Thomas Koenig <tkoenig@gcc.gnu.org>
2632
2633 PR fortran/88658
2634 * gfortran.h: Add macro gfc_real_4_kind
2635 * simplify.c (simplify_min_max): Special case for the types of
2636 AMAX0, AMIN0, MAX1 and MIN1, which actually change the types of
2637 their arguments.
2638
2639 2019-01-05 Janus Weil <janus@gcc.gnu.org>
2640
2641 PR fortran/88009
2642 * class.c (gfc_find_derived_vtab): Mark the _final component as
2643 artificial.
2644 (find_intrinsic_vtab): Ditto. Also add an extra check to avoid
2645 dereferencing a null pointer and adjust indentation.
2646 * resolve.c (resolve_fl_variable): Add extra check to avoid
2647 dereferencing a null pointer. Move variable declarations to local scope.
2648 (resolve_fl_procedure): Add extra check to avoid dereferencing a null
2649 pointer.
2650 * symbol.c (check_conflict): Suppress errors for artificial symbols.
2651
2652 2019-01-01 Steven G. Kargl <kargl@gcc.gnu.org>
2653
2654 * parse.c (decode_statement): Suppress "Unclassifiable statement"
2655 error if previous error messages were emittes.
2656
2657 2019-01-01 Thomas Koenig <tkoenig@gcc.gnu.org>
2658
2659 PR fortran/82743
2660 * primary.c (gfc_convert_to_structure_constructor): If a character
2661 in a constructor is too long, add a warning with
2662 -Wcharacter-truncation.
2663
2664 2019-01-01 Jakub Jelinek <jakub@redhat.com>
2665
2666 Update copyright years.
2667
2668 * gfortranspec.c (lang_specific_driver): Update copyright notice
2669 dates.
2670 * gfc-internals.texi: Bump @copying's copyright year.
2671 * gfortran.texi: Ditto.
2672 * intrinsic.texi: Ditto.
2673 * invoke.texi: Ditto.
2674 \f
2675 Copyright (C) 2019 Free Software Foundation, Inc.
2676
2677 Copying and distribution of this file, with or without modification,
2678 are permitted in any medium without royalty provided the copyright
2679 notice and this notice are preserved.
This page took 0.160187 seconds and 5 git commands to generate.