re PR fortran/90166 (Compiler Fails at Assembler)
[gcc.git] / gcc / fortran / ChangeLog
1 2019-04-19 Steven G. Kargl <kargl@gcc.gnu.org>
2
3 PR fortran/90166
4 * decl.c (in_module_or_interface): New function to check that the
5 current state is in a module, submodule, or interface.
6 (gfc_match_prefix): Use it.
7
8 2019-04-22 Paul Thomas <pault@gcc.gnu.org>
9
10 PR fortran/57284
11 * resolve.c (find_array_spec): If this is a class expression
12 and the symbol and component array specs are the same, this is
13 not an error.
14 *trans-intrinsic.c (gfc_conv_intrinsic_size): If a class symbol
15 argument, has no namespace, it has come from the interface
16 mapping and the _data component must be accessed directly.
17
18 2019-04-17 Thomas Schwinge <thomas@codesourcery.com>
19
20 PR fortran/90048
21 * openmp.c (gfc_resolve_do_iterator): Handle sharing_clauses for
22 OpenACC, too.
23 (gfc_resolve_oacc_blocks): Populate sharing_clauses with private
24 clauses.
25
26 2019-04-14 Paul Thomas <pault@gcc.gnu.org>
27
28 PR fortran/89843
29 * trans-decl.c (gfc_get_symbol_decl): Assumed shape and assumed
30 rank dummies of bind C procs require deferred initialization.
31 (convert_CFI_desc): New procedure to convert incoming CFI
32 descriptors to gfc types and back again.
33 (gfc_trans_deferred_vars): Call it.
34 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Null the CFI
35 descriptor pointer. Free the descriptor in all cases.
36
37 PR fortran/89846
38 * expr.c (is_CFI_desc): New function.
39 (is_subref_array): Tidy up by referencing the symbol directly.
40 * gfortran.h : Prototype for is_CFI_desc.
41 * trans_array.c (get_CFI_desc): New function.
42 (gfc_get_array_span, gfc_conv_scalarized_array_ref,
43 gfc_conv_array_ref): Use it.
44 * trans.c (get_array_span): Extract the span from descriptors
45 that are indirect references.
46
47 PR fortran/90022
48 * trans-decl.c (gfc_get_symbol_decl): Make sure that the se
49 expression is a pointer type before converting it to the symbol
50 backend_decl type.
51 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Eliminate
52 temporary creation for intent(in).
53
54 2019-04-13 Dominique d'Humieres <dominiq@gcc.gnu.org>
55
56 PR fortran/79842
57 * module.c (gfc_use_module): use complete sentences.
58
59 2019-04-11 Thomas Koenig <tkoenig@gcc.gnu.org>
60
61 PR translation/89939
62 * frontend-passes.c (B_ERROR): Delete macro.
63 (C_ERROR): Delete macro.
64 (B_ERROR_1): New macro.
65 (C_ERROR_1): New macro.
66 (C_ERROR_2): New macro.
67 (inline_matmul_assign): Use new macros.
68 (call_external_blas): Likewise.
69
70 2019-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
71
72 PR fortran/87352
73 * gfortran.h (gfc_component): Add finalized field.
74 * class.c (finalize_component): If the component is already
75 finalized, return early. Set component->finalized on exit.
76
77 2019-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
78
79 PR fortran/89981
80 * resolve.c (resolve_global_procedure): If the global symbol is an
81 ENTRY, also look up its name among the entries.
82
83 2019-04-04 Harald Anlauf <anlauf@gmx.de>
84
85 PR fortran/89904
86 * check.c (gfc_check_transfer): Reject procedures as actual
87 arguments for SOURCE and MOLD of TRANSFER intrinsic.
88
89 2019-04-03 Steven G. Kargl <kargl@gcc.gnu.org>
90
91 PR fortran/68567
92 * expr.c (gfc_reduce_init_expr): Add extra check to avoid
93 dereferencing a null pointer.
94
95 2019-04-03 Dominique d'Humieres <dominiq@gcc.gnu.org>
96
97 PR fortran/89375
98 * expr.c (comp_pointer): Remove redundant condition.
99
100 2019-03-31 Harald Anlauf <anlauf@gmx.de>
101
102 PR fortran/83515
103 PR fortran/85797
104 * trans-types.c (gfc_typenode_for_spec): Handle conversion for
105 procedure pointers.
106 * target-memory.c (gfc_element_size): Handle size determination
107 for procedure pointers.
108
109 2019-03-31 Thomas Koenig <tkoenig@gcc.gnu.org>
110
111 * dump-parse-tree.c (debug): Add for symbol_attribute *,
112 symbol_attribute and gfc_ref * arguments.
113
114 2019-03-30 Paul Thomas <pault@gcc.gnu.org>
115
116 PR fortran/89841
117 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Use the formal
118 argument attributes rather than those of the actual argument.
119
120 PR fortran/89842
121 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Call
122 'set_dtype_for_unallocated' for any type of arrayspec.
123
124 2019-03-27 Janus Weil <janus@gcc.gnu.org>
125
126 PR fortran/85537
127 * expr.c (gfc_check_assign_symbol): Reject internal and dummy procedures
128 in procedure pointer initialization.
129
130 2019-03-27 Paul Thomas <pault@gcc.gnu.org>
131
132 PR fortran/88247
133 * expr.c (is_subref_array): Permit substrings to be detected
134 as subref arrays.
135 * trans-array.c (get_array_ctor_var_strlen): Obtain the length
136 of deferred length strings. Handle substrings with a NULL end
137 expression.
138 (trans_array_constructor): Remove an unnecessary blank line.
139 (gfc_conv_scalarized_array_ref): Skip to label 'done' if 'decl'
140 is a pointer array.
141 (get_array_charlen): If the expression is an array, convert the
142 first element of the constructor and use its string length. Get
143 a new charlen if necessary.
144 (gfc_conv_expr_descriptor): Call 'get_array_charlen' for array
145 constructor expressions. If the ss_info string length is
146 available, use that to set the span of character arrays.
147 * trans-expr.c (gfc_get_expr_charlen): Handle substrings
148 * trans-stmt.c (trans_associate_var): Set the pointer array
149 flag for variable targets and constant array constructors. Take
150 care not to reset the string length or the span in the case of
151 expressions that are not converted as direct by reference.
152
153 2019-03-25 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
154
155 * intrinsic.texi (MINLOC): Fix typo in BACK argument documentation.
156 (MAXLOC): Likewise.
157
158 2019-03-24 Thomas Koenig <tkoenig@gcc.gnu.org>
159
160 PR fortran/78865
161 * interface.c (compare_actual_formal): Change errors about
162 missing or extra to gfc_error_now to make sure they are issued.
163 Change "spec" to "specifier" in message.
164 * resolve.c (resolve_global_procedure): Also check for mismatching
165 interface with global symbols if the namespace has already been
166 resolved.
167
168 2019-03-21 Thomas Schwinge <thomas@codesourcery.com>
169
170 PR fortran/72741
171 * openmp.c (gfc_match_oacc_routine): Set the level of parallelism
172 for all variants.
173 (gfc_resolve_oacc_routines): Call gfc_add_omp_declare_target.
174
175 PR fortran/89773
176 * gfortran.h (gfc_oacc_routine_name): Add loc member.
177 (gfc_resolve_oacc_routines): Declare.
178 * openmp.c (gfc_match_oacc_routine): Move some error checking
179 into...
180 (gfc_resolve_oacc_routines): ... this new function.
181 * resolve.c (resolve_codes): Call it.
182
183 PR fortran/72741
184 * openmp.c (gfc_match_oacc_routine): Clarify.
185
186 PR fortran/72741
187 * module.c (verify_OACC_ROUTINE_LOP_NONE): New function.
188 (enum ab_attribute): Add AB_OACC_ROUTINE_LOP_GANG,
189 AB_OACC_ROUTINE_LOP_WORKER, AB_OACC_ROUTINE_LOP_VECTOR,
190 AB_OACC_ROUTINE_LOP_SEQ.
191 (attr_bits): Add these.
192 (mio_symbol_attribute): Handle these.
193
194 2019-03-20 Janus Weil <janus@gcc.gnu.org>
195
196 PR fortran/71861
197 * symbol.c (check_conflict): ABSTRACT attribute conflicts with
198 INTRINSIC attribute.
199
200 2019-03-18 Thomas Koenig <tkoeng@gcc.gnu.org>
201
202 PR fortran/68009
203 * iresolve.c: Include trans.h.
204 (gfc_resolve_fe_runtine_error): Set backend_decl on
205 resolved_sym.
206
207 2019-03-17 Thomas Koenig <tkoenig@gcc.gnu.org>
208
209 PR fortran/88008
210 * gfortran.h (expr_t): Add EXPR_UNKNOWN.
211 * expr.c (gfc_copy_expr): Add EXPR_UNKNOWN to switch statement.
212 (gfc_simplify_expr): Likewise.
213 * module.c (mio_expr): Likewise.
214 * resovle.c (extract_compcall_passed_object): Issue error on
215 unknown type.
216 (check_typebound_baseobject): Issue error on wrong type.
217 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Add
218 EXPR_UNKNOWN to switch statement.
219
220 2019-03-16 Jakub Jelinek <jakub@redhat.com>
221
222 PR fortran/89724
223 * scanner.c (load_line): Remove linenum and current_line static
224 variables, add warned_tabs automatic variable. Use current_file->line
225 instead of current_line and warned_tabs boolean to avoid diagnosing
226 tabs multiple times on the same line.
227
228 2019-03-16 Thomas Koenig <tkoenig@gcc.gnu.org>
229
230 PR fortran/84394
231 * symbol.c (gfc_add_subroutine): If we are encountering a
232 subrtoutine within a BLOCK DATA and the name starts with an
233 underscore, do not check.
234
235 2019-03-15 Harald Anlauf <anlauf@gmx.de>
236
237 PR fortran/60091
238 * expr.c (gfc_check_pointer_assign): Correct and improve error
239 messages for invalid pointer assignments.
240
241 2019-03-14 Thomas Koenig <tkoenig@gcc.gnu.org>
242
243 * gfortran.texi: Document Q edit descriptor under
244 "Extensions not implemented in GNU Fortran".
245
246 2019-03-13 Harald Anlauf <anlauf@gmx.de>
247
248 PR fortran/87045
249 * trans-expr.c (gfc_trans_pointer_assignment): Move check for same
250 string length so that we do not get false errors for deferred
251 length.
252
253 2019-03-13 Janus Weil <janus@gcc.gnu.org>
254
255 PR fortran/89601
256 * decl.c (gfc_match_formal_arglist): Reject empty type parameter lists.
257 (gfc_match_derived_decl): Mark as PDT only if type parameter list was
258 matched successfully.
259
260 2019-03-13 Thomas Koenig <tkoenig@gcc.gnu.org>
261
262 PR fortran/66695
263 PR fortran/77746
264 PR fortran/79485
265 * gfortran.h (gfc_symbol): Add bind_c component.
266 (gfc_get_gsymbol): Add argument bind_c.
267 * decl.c (add_global_entry): Add bind_c argument to
268 gfc_get_symbol.
269 * parse.c (parse_block_data): Likewise.
270 (parse_module): Likewise.
271 (add_global_procedure): Likewise.
272 (add_global_program): Likewise.
273 * resolve.c (resolve_common_blocks): Likewise.
274 (resolve_global_procedure): Likewise.
275 (gfc_verify_binding_labels): Likewise.
276 * symbol.c (gfc_get_gsymbol): Add argument bind_c. Set bind_c
277 in gsym.
278 * trans-decl.c (gfc_get_module_backend_decl): Add bind_c argument
279 to gfc_get_symbol.
280 (gfc_get_extern_function_decl): If the sym has a binding label
281 and it cannot be found in the global symbol tabel, it is the wrong
282 one and vice versa.
283
284 2019-03-12 Thomas Koenig <tkoenig@gcc.gnu.org>
285
286 PR fortran/87673
287 * match.c (gfc_match_type_spec): Remove call to
288 gfc_resolve_expr for character length.
289
290 2019-03-12 Martin Liska <mliska@suse.cz>
291
292 * decl.c (add_init_expr_to_sym): Replace usage of 'can't'
293 with 'cannot'.
294 (variable_decl): Likewise.
295 (cray_pointer_decl): Likewise.
296 (match_binding_attributes): Likewise.
297 * f95-lang.c (gfc_init): Likewise.
298 * interface.c (gfc_check_typebound_override): Likewise.
299 * intrinsic.c (make_generic): Likewise.
300 * module.c (dump_module): Likewise.
301 (gfc_use_module): Likewise.
302 * primary.c (gfc_convert_to_structure_constructor): Likewise.
303 * resolve.c (resolve_entries): Likewise.
304 (check_generic_tbp_ambiguity): Likewise.
305 (get_checked_tb_operator_target): Likewise.
306 * scanner.c (load_file): Likewise.
307 * trans-expr.c (gfc_conv_intrinsic_to_class): Likewise.
308
309 2019-03-12 Paul Thomas <pault@gcc.gnu.org>
310
311 PR fortran/89363
312 PR fortran/89364
313 * trans-expr.c (set_dtype_for_unallocated): New function.
314 (gfc_conv_gfc_desc_to_cfi_desc): Call it for allocatable and
315 pointer arguments.
316 (gfc_conv_procedure_call): Likewise. Also, set the ubound of
317 the final dimension to -1 for assumed rank formal args that are
318 associated with assumed size arrays.
319 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Return -1 for
320 the final dimension of assumed rank entities that are argument
321 associated with assumed size arrays.
322 (gfc_conv_intrinsic_shape): Likewise return -1 for the final
323 dimension of the shape intrinsic.
324
325 2019-03-11 Jakub Jelinek <jakub@redhat.com>
326
327 PR fortran/89651
328 * trans-openmp.c (gfc_omp_clause_default_ctor): Set TREE_NO_WARNING
329 on decl if adding COND_EXPR for allocatable.
330 (gfc_omp_clause_copy_ctor): Set TREE_NO_WARNING on dest.
331
332 2019-03-11 Martin Liska <mliska@suse.cz>
333
334 * decl.c (match_record_decl): Wrap an option name
335 in a string format message and fix GNU coding style.
336 (gfc_match_pointer): Likewise.
337 * expr.c (find_array_section): Likewise.
338 * intrinsic.c (gfc_is_intrinsic): Likewise.
339 * options.c (gfc_post_options): Likewise.
340 * primary.c (match_integer_constant): Likewise.
341 * trans-common.c (translate_common): Likewise.
342
343 2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
344
345 PR fortran/66089
346 * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
347 Return false if a scalar tempoary is needed.
348 (gfc_walk_variable_expr): Fix up class refs.
349
350 2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
351
352 PR fortran/87734
353 * symbol.c (gfc_add_procedure): Only throw an error if the
354 procedure has not been declared either PUBLIC or PRIVATE.
355
356 2019-03-09 Thomas Koenig <tkoenig@gcc.gnu.org>
357
358 PR fortran/71544
359 * trans-types.c (gfc_typenode_for_spec) Set ts->is_c_interop of
360 C_PTR and C_FUNPTR.
361 (create_fn_spec): Mark argument as escaping if ts->is_c_interop is set.
362
363 2019-03-09 Janus Weil <janus@gcc.gnu.org>
364
365 PR fortran/84504
366 * expr.c (gfc_check_assign_symbol): Deal with procedure pointers to
367 pointer-valued functions.
368
369 2019-03-09 Thomas König <tkoenig@gcc.gnu.org>
370
371 PR fortran/71203
372 * decl.c (add_init_expr_to_sym): Add shape if init has none. Add
373 asserts that it has to be an EXPR_ARRAY in this case.
374
375 2019-03-08 Jakub Jelinek <jakub@redhat.com>
376
377 PR other/80058
378 * arith.c (gfc_complex2complex): Avoid two spaces in the middle of
379 diagnostics.
380 * resolve.c (resolve_allocate_expr): Likewise.
381
382 2019-03-06 Harald Anlauf <anlauf@gmx.de>
383
384 PR fortran/71203
385 * expr.c (simplify_const_ref): Avoid null pointer dereference.
386
387 2019-03-03 Harald Anlauf <anlauf@gmx.de>
388 Steven G. Kargl <kargl@gcc.gnu.org>
389
390 PR fortran/77583
391 * symbol.c (check_conflict): Check for valid procedure name
392 passed to error reporting routine.
393
394 2019-03-03 Thomas Koenig <tkoenig@gcc.gnu.org>
395
396 PR fortran/72714
397 * resolve.c (resolve_allocate_expr): Add some tests for coarrays.
398
399 2019-03-02 Harald Anlauf <anlauf@gmx.de>
400
401 PR fortran/89516
402 * check.c (gfc_calculate_transfer_sizes): Correct checks for cases
403 where storage size of elements of MOLD is 0.
404
405 2019-02-28 Thomas Schwinge <thomas@codesourcery.com>
406 Cesar Philippidis <cesar@codesourcery.com>
407
408 PR fortran/72741
409 PR fortran/89433
410 * openmp.c (gfc_match_oacc_routine): Handle repeated use of the
411 Fortran OpenACC 'routine' directive.
412
413 PR fortran/72741
414 * gfortran.h (enum oacc_routine_lop): Add OACC_ROUTINE_LOP_ERROR.
415 * openmp.c (gfc_oacc_routine_lop, gfc_match_oacc_routine): Use it.
416 * trans-decl.c (add_attributes_to_decl): Likewise.
417
418 PR fortran/72741
419 PR fortran/89433
420 * openmp.c (gfc_match_oacc_routine): Accept intrinsic symbols.
421
422 2019-02-26 Harald Anlauf <anlauf@gmx.de>
423
424 PR fortran/89492
425 * check.c (gfc_calculate_transfer_sizes): Handle cases where
426 storage size of elements of MOLD is 0.
427
428 2019-02-26 Thomas Koenig <tkoenig@gcc.gnu.org>
429
430 PR fortran/89496
431 * trans-types.c (get_formal_from_actual_arglist): If
432 the actual arglist has no expression, the corresponding
433 formal arglist is an alternate return.
434
435 2019-02-26 Jakub Jelinek <jakub@redhat.com>
436
437 PR fortran/43210
438 * trans-array.c (gfc_conv_array_initializer): Use RANGE_EXPR instead
439 of duplicating the initializer possibly many times.
440
441 2019-02-24 Thomas Koenig <tkoenig@gcc.gnu.org>
442
443 PR fortran/89174
444 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Add is_mold
445 to arguments. If we are dealing with a MOLD, call
446 gfc_expr_to_initialize().
447 * trans-stmt.c (gfc_trans_allocate): For MOLD, pass is_mold=true
448 to gfc_find_and_cut_at_last_class_ref.
449 * trans.h (gfc_find_and_cut_at_last_class_ref): Add optional
450 argument is_mold with default false.
451
452 2019-02-24 Harald Anlauf <anlauf@gmx.de>
453
454 PR fortran/89266
455 PR fortran/88326
456 * target-memory.c (gfc_element_size): Return false if element size
457 cannot be determined; element size is returned separately.
458 (gfc_target_expr_size): Return false if expression size cannot be
459 determined; expression size is returned separately.
460 * target-memory.h: Adjust prototypes.
461 * check.c (gfc_calculate_transfer_sizes): Adjust references to
462 gfc_target_expr_size, gfc_element_size.
463 * arith.c (hollerith2representation): Likewise.
464 * class.c (find_intrinsic_vtab): Likewise.
465 * simplify.c (gfc_simplify_sizeof): Likewise.
466
467 2019-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
468
469 PR fortran/84387
470 * trans-io.c (transfer_expr): Do not return if there are no
471 components to the derived type or class.
472
473 2019-02-23 Paul Thomas <pault@gcc.gnu.org>
474
475 PR fortran/88117
476 * resolve.c (deferred_op_assign): Return if the lhs expression
477 has the pointer attribute.
478 * trans-expr.c (gfc_trans_assignment_1): Do not fix the string
479 length if the lhs expression has the pointer attribute.
480
481 2019-02-23 Paul Thomas <pault@gcc.gnu.org>
482
483 PR fortran/89385
484 PR fortran/89366
485 * decl.c (gfc_verify_c_interop_param): Restriction on string
486 length being one is lifted for F2018.
487 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): For scalar
488 characters with intent in, make a temporary and copy the result
489 of the expression evaluation into it.
490 (gfc_conv_procedure_call): Set a flag for character formal args
491 having a character length that is not unity. If the procedure
492 is bind C, call gfc_conv_gfc_desc_to_cfi_desc in this case.
493 Also, extend bind C calls to unconditionally convert both
494 pointers and allocatable expressions.
495
496 2019-02-23 David Malcolm <dmalcolm@redhat.com>
497 Jakub Jelinek <jakub@redhat.com>
498
499 PR middle-end/88074
500 * simplify.c (norm2_do_sqrt, gfc_simplify_norm2): Use
501 mpfr_number_p && !mpfr_zero_p instead of mpfr_regular_p.
502 (norm2_add_squared): Likewise. Use mp_exp_t rather than mpfr_exp_t.
503
504 2019-02-22 Harald Anlauf <anlauf@gmx.de>
505
506 PR fortran/83057
507 * io.c (gfc_match_open): Fix logic in checks of OPEN statement
508 when NEWUNIT= is specified.
509
510 2019-02-22 Steven G. Kargl <kargl@gcc.gnu.org>
511
512 PR fortran/89431
513 * gfortran.texi: Fix documentation to match the implementation.
514
515 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
516 Cesar Philippidis <cesar@codesourcery.com>
517
518 PR fortran/72741
519 * gfortran.h (oacc_routine_lop): New enum.
520 (symbol_attribute): Use it.
521 * openmp.c (gfc_oacc_routine_dims): Replace with...
522 (gfc_oacc_routine_lop): ... this new function.
523 (gfc_match_oacc_routine): Adjust.
524 * trans-decl.c (add_attributes_to_decl): Likewise.
525
526 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
527
528 * openmp.c (gfc_match_oacc_declare): Revert earlier changes.
529
530 2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
531
532 * dump-parse-tree.c (debug): Implement for gfc_expr *,
533 gfc_typespec *, gfc_typespec and gfc_symbol *.
534
535 2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
536
537 PR fortran/86119
538 * class.c (gfc_get_len_component): Add argument k for kind.
539 If the kind of the resulting expression is not equal to k,
540 convert it.
541 * gfortran.h (gfc_len_component): Adjust prototype.
542 * simplify.c (gfc_simplify_len): Pass kind to
543 gfc_get_len_component.
544
545 2019-02-20 Martin Liska <mliska@suse.cz>
546
547 * gfortran.texi: Change singular to plural.
548
549 2019-02-20 Martin Liska <mliska@suse.cz>
550
551 * gfortran.texi: Document Fortran header directive.
552
553 2019-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
554
555 PR fortran/89384
556 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): If the dummy
557 argument is contiguous and the actual argument may not be,
558 use gfc_conv_subref_array_arg.
559
560 2019-02-19 Thomas Schwinge <thomas@codesourcery.com>
561
562 PR c/87924
563 * openmp.c (gfc_match_omp_clauses): Add representation of wait clause
564 without argument as 'wait (GOMP_ASYNC_NOVAL)'.
565
566 2019-02-18 Thomas Koenig <tkoenig@gcc.gnu.org>
567
568 PR fortran/87689
569 * trans-decl.c (gfc_get_extern_function_decl): Add argument
570 actual_args and pass it through to gfc_get_function_type.
571 * trans-expr.c (conv_function_val): Add argument actual_args
572 and pass it on to gfc_get_extern_function_decl.
573 (conv_procedure_call): Pass actual arguments to conv_function_val.
574 * trans-types.c (get_formal_from_actual_arglist): New function.
575 (gfc_get_function_type): Add argument actual_args. Generate
576 formal args from actual args if necessary.
577 * trans-types.h (gfc_get_function_type): Add optional argument.
578 * trans.h (gfc_get_extern_function_decl): Add optional argument.
579
580 2019-02-18 Martin Liska <mliska@suse.cz>
581
582 * decl.c (gfc_match_gcc_builtin): Add support for filtering
583 of builtin directive based on multilib ABI name.
584
585 2019-02-17 Harald Anlauf <anlauf@gmx.de>
586
587 PR fortran/88299
588 * resolve.c (resolve_common_blocks,resolve_common_vars): Move
589 check for obsolent COMMON feature in F2018 to better place.
590
591 2019-02-17 Harald Anlauf <anlauf@gmx.de>
592
593 PR fortran/89077
594 * decl.c (gfc_set_constant_character_len): Clear original string
595 representation after padding has been performed to target length.
596
597 2019-02-16 Jakub Jelinek <jakub@redhat.com>
598
599 PR middle-end/88074
600 * simplify.c (simplify_transformation_to_array): Run post_op
601 immediately after processing corresponding row, rather than at the
602 end.
603 (norm2_scale): New variable.
604 (add_squared): Rename to ...
605 (norm2_add_squared): ... this. Scale down operand and/or result
606 if needed.
607 (do_sqrt): Rename to ...
608 (norm2_do_sqrt): ... this. Handle the result == e case. Scale up
609 result and clear norm2_scale.
610 (gfc_simplify_norm2): Clear norm2_scale. Change add_squared to
611 norm2_add_squared and &do_sqrt to norm2_do_sqrt. Scale up result
612 and clear norm2_scale again.
613
614 2019-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
615
616 PR fortran/71066
617 * trans-decl.c (generate_coarray_sym_init): For an array
618 constructor in a DATA statement of a coarray variable, set the
619 rank to 1 to avoid confusion later on. If the constructor
620 contains only one value, use that for initiailizig.
621
622 2019-02-14 Janne Blomqvist <jb@gcc.gnu.org>
623
624 PR fortran/81552
625 * gfortran.h (gfc_option_t): Make flag_init_integer_value a long.
626 * options.c (gfc_handle_option): Use strtol instead of atoi.
627 * invoke.texi: Document -finit-integer behavior in more detail.
628
629 2019-02-14 Harald Anlauf <anlauf@gmx.de>
630
631 PR fortran/88248
632 * symbol.c: Move check for labeled DO statement from
633 gfc_define_st_label to gfc_reference_st_label.
634
635 2019-02-14 Cesar Philippidis <cesar@codesourcery.com>
636
637 PR fortran/72715
638 * openmp.c (resolve_oacc_nested_loops): Error on do concurrent
639 loops.
640
641 2019-02-13 Martin Liska <mliska@suse.cz>
642
643 PR fortran/88649
644 * resolve.c (resolve_operator): Initialize 't' right
645 after function entry. Skip switch (e->value.op.op)
646 for -fdec operands that become function calls.
647
648 2019-02-10 Thomas Koenig <tkoenig@gcc.gnu.org>
649
650 PR fortran/71723
651 * expr.c (gfc_check_assign): Add argument is_init_expr. If we are
652 looking at an init expression, issue error if the target is not a
653 TARGET and we are not looking at a procedure pointer.
654 * gfortran.h (gfc_check_assign): Add optional argument
655 is_init_expr.
656
657 2019-02-09 Harald Anlauf <anlauf@gmx.de>
658
659 PR fortran/89077
660 * resolve.c (gfc_resolve_substring_charlen): Check substring
661 length for constantness prior to general calculation of length.
662
663 2019-02-09 Paul Thomas <pault@gcc.gnu.org>
664
665 PR fortran/89200
666 * trans-array.c (gfc_trans_create_temp_array): Set the 'span'
667 field for derived types.
668
669 2019-02-04 Harald Anlauf <anlauf@gmx.de>
670
671 PR fortran/89077
672 * decl.c (add_init_expr_to_sym): Copy length of string initializer
673 to declared symbol.
674
675 2019-02-04 Martin Liska <mliska@suse.cz>
676
677 PR fortran/89185
678 * resolve.c (resolve_ref): Remove breakout variable as
679 we need to prevent prev = &(*prev)->next to happen
680 with *prev == NULL.
681
682 2019-02-04 Martin Liska <mliska@suse.cz>
683
684 PR fortran/88912
685 * scanner.c (load_file): Report error for -fpre-include
686 file and do not ICE.
687
688 2019-02-02 Dominique d'Humieres <dominiq@gcc.gnu.org>
689
690 PR fortran/81344
691 * invoke.texi: Document the behavior of repeated -ffpe-trap
692 and -ffpe-summary.
693
694 2019-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
695
696 PR fortran/88298
697 * arith.c (gfc_int2int): Do not warn if src->do_not_warn is set.
698 * gfortran.h (gfc_expr): Add flag do_not_warn.
699 * intrinsic.c (gfc_convert_type_warn): Set expr->do_not_warn if
700 no warning is desired.
701
702 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
703
704 PR fortran/88393
705 * trans-expr.c (gfc_conv_procedure_call): For derived entities,
706 passed in parentheses to class formals, invert the order of
707 copying allocatable components to taking the _data of the
708 class expression.
709
710 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
711
712 PR fortran/88980
713 * trans-array.c (gfc_array_init_size): Add element_size to the
714 arguments.
715 (gfc_array_allocate): Remove the recalculation of the size of
716 the element and use element_size from the call to the above.
717 Unconditionally set the span field of the descriptor.
718
719 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
720
721 PR fortran/88685
722 * expr.c (is_subref_array): Move the check for class pointer
723 dummy arrays to after the reference check. If we haven't seen
724 an array reference other than an element and a component is not
725 class or derived, return false.
726
727 2019-02-01 Jakub Jelinek <jakub@redhat.com>
728
729 PR fortran/83246
730 PR fortran/89084
731 * trans-decl.c (generate_local_decl): Add referenced FL_PARAMETERs
732 if sym->ns->construct_entities rather than if
733 sym->ns->parent->code->op == EXEC_BLOCK.
734
735 2019-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
736
737 PR fortran/88669
738 * resolve.c (resolve_component): If the reference is a BT_CLASS,
739 copy the contiguous attribute from the reference and use the
740 correct attributes.
741
742 2019-01-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
743
744 PR fortran/52564
745 * io.c (match_io): Add check for comma after '*' without subsequent
746 IO list.
747
748 2019-01-30 Dominique d'Humieres <dominiq@gcc.gnu.org>
749
750 PR fortran/52884
751 * invoke.texi: Document the promotion of double precision
752 constants.
753
754 2019-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
755
756 PR fortran/57048
757 * interface.c (gfc_compare_types): If a derived type and an
758 integer both have a derived type, and they are identical,
759 this is a C binding type and compares equal.
760
761 2019-01-26 Harald Anlauf <anlauf@gmx.de>
762
763 PR fortran/57553
764 * expr.c (check_inquiry): Add list of inquiry functions allowed in
765 constant expressions for F2008+.
766
767 2019-01-25 Steven G. Kargl <kargl@gcc.gnu.org>
768
769 PR fortran/85780
770 * decl.c (gfc_match_subroutine): Check for conflict between BIND(C)
771 and alternative return.
772
773 2019-01-24 Paul Thomas <pault@gcc.gnu.org>
774
775 PR fortran/88929
776 * trans-array.c (gfc_conv_descriptor_elem_len): New function.
777 * trans-array.h : Add prototype for above.
778 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Take account of
779 assumed rank arrays being flagged by rank = -1 in expressions.
780 Intent in arrays need a pointer to a copy of the data to be
781 assigned to the descriptor passed for conversion. This should
782 then be freed, together with the CFI descriptor on return from
783 the C call.
784
785 2019-01-22 Harald Anlauf <anlauf@gmx.de>
786
787 PR fortran/88579
788 * trans-expr.c (gfc_conv_power_op): Handle cases of (2**e) ** integer
789 and (- 2**e) ** integer.
790
791 2019-01-19 Dominique d'Humieres <dominiq@gcc.gnu.org>
792
793 PR fortran/37835
794 * resolve.c (resolve_types): Add !flag_automatic.
795 * symbol.c (gfc_add_save): Silence warnings.
796
797 2019-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
798
799 PR fortran/77960
800 * io.c (match_io_element): input-item cannot be an external function.
801
802 2018-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
803 Paul Thomas <pault@gcc.gnu.org>
804
805 PR fortran/56789
806 * trans-expr.c (gfc_conv_procedure_call): Call
807 gfc_conv_subref_array_arg if the formal arg is contiguous
808 and the actual arg may not be.
809
810 2019-01-17 Thomas Koenig <tkoenig@gcc.gnu.org>
811
812 PR fortran/88871
813 * resolve.c (resolve_ref): Fix logic for removal of
814 reference.
815
816 2019-01-19 Jakub Jelinek <jakub@redhat.com>
817
818 PR fortran/88902
819 * trans-decl.c (gfc_get_symbol_decl): Don't add length to function
820 or parent function if it has been added there already.
821
822 2019-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
823
824 PR fortran/43136
825 * resolve.c (resolve_array_ref): Add equal_length argument; set it
826 if the length of the substring equals that of the orignal
827 variable.
828 (resolve_ref): Remove the substring if it is equal in length to
829 the original variable, unless it is an EXPR_SUBSTRING).
830
831 2019-01-15 Steven G. Kargl <kargl@gcc.gnu.org>
832
833 PR fortran/81849
834 * resolve.c (resolve_symbol): Host associated varaibles can appear
835 in the specification statement of a RESULT array.
836
837 2019-01-15 Paul Thomas <pault@gcc.gnu.org>
838
839 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Deal with exprs
840 that are indirect references; ie. dummy arguments.
841
842 2019-01-13 Dominique d'Humieres <dominiq@gcc.gnu.org>
843
844 PR fortran/88803
845 * gfortran.texi: Replace @xref with @ref and adjust the sentence.
846
847 2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
848
849 PR fortran/57992
850 * trans-array.c (gfc_conv_array_parameter): Do not pack/unpack
851 functions with contiguous results.
852
853 2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
854
855 PR fortran/59345
856 * trans-array.c (gfc_conv_array_parameter): Remove TODO. Do not
857 pack/unpack results of functions which return an explicit-shaped
858 or allocatable array.
859
860 2019-01-12 Steven G. Kargl <kargl@gcc.gnu.org>
861
862 PR fortran/61765
863 * resolve.c (gfc_verify_binding_labels): Break if-elseif-elseif
864 structure into independent if's with a return to simplify logic.
865 Avoid a check for ENTRY name with bind(c).
866
867 2019-01-12 Paul Thomas <pault@gcc.gnu.org>
868
869 * gfortran.texi: Add description in sections on TS 29113 and
870 further interoperability with C.
871 * trans-array.c (gfc_conv_descriptor_attribute): New function.
872 (gfc_get_dataptr_offset): Remove static function attribute.
873 * trans-array.h: Add prototypes for above functions.
874 * trans-decl.c: Add declarations for the library functions
875 cfi_desc_to_gfc_desc and gfc_desc_to_cfi_desc.
876 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): New function.
877 (gfc_conv_procedure_call): Call it for scalar and array actual
878 arguments, when the formal arguments are bind_c with assumed
879 shape or assumed rank.
880 * trans.h: External declarations for gfor_fndecl_cfi_to_gfc
881 and gfor_fndecl_gfc_to_cfi.
882
883 2019-01-11 Steven G. Kargl <kargl@gcc.gnu.org>
884
885 PR fortran/35031
886 * decl.c (gfc_match_entry): Check for F2018:C1546. Fix nearby
887 mis-indentation.
888
889 2019-01-11 Jakub Jelinek <jakub@redhat.com>
890
891 PR middle-end/85956
892 PR lto/88733
893 * trans-openmp.c: Include attribs.h.
894 (gfc_walk_alloc_comps, gfc_omp_clause_linear_ctor): Handle
895 VAR_DECL max bound with "omp dummy var" attribute like NULL or
896 error_mark_node - recompute number of elts independently.
897
898 2019-01-11 Thomas Koenig <tkoenig@gcc.gnu.org>
899
900 PR fortran/59345
901 * trans-array.c (gfc_conv_parameter_array): Temporary
902 arrays generated for expressions do not need to be repacked.
903
904 2019-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
905
906 PR fortran/86322
907 * decl.c (top_var_list): Set locus of expr.
908 (gfc_match_data): Detect pointer on non-rightmost part-refs.
909
910 2019-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
911
912 PR fortran/88376
913 * resolve.c (is_illegal_recursion): Remove an assert().
914
915 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
916
917 PR other/16615
918 * expr.c: Change "can not" to "cannot".
919
920 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
921
922 PR other/16615
923 * class.c: Mechanically replace "can not" with "cannot".
924 * decl.c: Likewise.
925 * expr.c: Likewise.
926 * gfc-internals.texi: Likewise.
927 * intrinsic.texi: Likewise.
928 * invoke.texi: Likewise.
929 * io.c: Likewise.
930 * match.c: Likewise.
931 * parse.c: Likewise.
932 * primary.c: Likewise.
933 * resolve.c: Likewise.
934 * symbol.c: Likewise.
935 * trans-array.c: Likewise.
936 * trans-decl.c: Likewise.
937 * trans-intrinsic.c: Likewise.
938 * trans-stmt.c: Likewise.
939
940 2019-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
941
942 PR fortran/68426
943 * simplify.c (gfc_simplify_spread): Also simplify if the
944 type of source is an EXPR_STRUCTURE.
945
946 2019-01-08 Janus Weil <janus@gcc.gnu.org>
947
948 PR fortran/88047
949 * class.c (gfc_find_vtab): For polymorphic typespecs, the components of
950 the class container may not be available (in case of invalid code).
951
952 2019-01-08 Richard Biener <rguenther@suse.de>
953
954 PR fortran/88611
955 * trans-expr.c (gfc_conv_initializer): For ISOCBINDING_NULL_*
956 directly build the expected GENERIC tree.
957
958 2019-01-07 Thomas Koenig <tkoenig@gcc.gnu.org>
959 Harald Anlauf <anlauf@gmx.de>
960 Tobias Burnus <burnus@gcc.gnu.org>
961
962 PR fortran/45424
963 * check.c (gfc_check_is_contiguous): New function.
964 * expr.c (gfc_is_not_contiguous): New function.
965 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IS_CONTIGUOUS.
966 Add prototype for gfc_is_not_contiguous.
967 * intrinsic.c (do_ts29113_check): Add GFC_ISYM_IS_CONTIGUOUS.
968 (add_function): Add is_contiguous.
969 * intrinsic.h: Add prototypes for gfc_check_is_contiguous,
970 gfc_simplify_is_contiguous and gfc_resolve_is_contiguous.
971 * intrinsic.texi: Add IS_CONTIGUOUS.
972 * iresolve.c (gfc_resolve_is_contiguous): New function.
973 * simplify.c (gfc_simplify_is_contiguous): New function.
974 * trans-decl.c (gfor_fncecl_is_contiguous0): New variable.
975 (gfc_build_intrinsic_function_decl): Add it.
976 * trans-intrinsic.c (gfc_conv_intrinsic_is_contiguous): New
977 function.
978 (gfc_conv_intrinsic_function): Handle GFC_ISYM_IS_CONTIGUOUS.
979
980 2019-01-06 Thomas Koenig <tkoenig@gcc.gnu.org>
981
982 PR fortran/88658
983 * gfortran.h: Add macro gfc_real_4_kind
984 * simplify.c (simplify_min_max): Special case for the types of
985 AMAX0, AMIN0, MAX1 and MIN1, which actually change the types of
986 their arguments.
987
988 2019-01-05 Janus Weil <janus@gcc.gnu.org>
989
990 PR fortran/88009
991 * class.c (gfc_find_derived_vtab): Mark the _final component as
992 artificial.
993 (find_intrinsic_vtab): Ditto. Also add an extra check to avoid
994 dereferencing a null pointer and adjust indentation.
995 * resolve.c (resolve_fl_variable): Add extra check to avoid
996 dereferencing a null pointer. Move variable declarations to local scope.
997 (resolve_fl_procedure): Add extra check to avoid dereferencing a null
998 pointer.
999 * symbol.c (check_conflict): Suppress errors for artificial symbols.
1000
1001 2019-01-01 Steven G. Kargl <kargl@gcc.gnu.org>
1002
1003 * parse.c (decode_statement): Suppress "Unclassifiable statement"
1004 error if previous error messages were emittes.
1005
1006 2019-01-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1007
1008 PR fortran/82743
1009 * primary.c (gfc_convert_to_structure_constructor): If a character
1010 in a constructor is too long, add a warning with
1011 -Wcharacter-truncation.
1012
1013 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1014
1015 Update copyright years.
1016
1017 * gfortranspec.c (lang_specific_driver): Update copyright notice
1018 dates.
1019 * gfc-internals.texi: Bump @copying's copyright year.
1020 * gfortran.texi: Ditto.
1021 * intrinsic.texi: Ditto.
1022 * invoke.texi: Ditto.
1023 \f
1024 Copyright (C) 2019 Free Software Foundation, Inc.
1025
1026 Copying and distribution of this file, with or without modification,
1027 are permitted in any medium without royalty provided the copyright
1028 notice and this notice are preserved.