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