Correction of ChangeLog entry, Thomas provided the code for this change.
[gcc.git] / gcc / fortran / ChangeLog
1 2019-02-20 Martin Liska <mliska@suse.cz>
2
3 * gfortran.texi: Document Fortran header directive.
4
5 2019-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
6
7 PR fortran/89384
8 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): If the dummy
9 argument is contiguous and the actual argument may not be,
10 use gfc_conv_subref_array_arg.
11
12 2019-02-19 Thomas Schwinge <thomas@codesourcery.com>
13
14 PR c/87924
15 * openmp.c (gfc_match_omp_clauses): Add representation of wait clause
16 without argument as 'wait (GOMP_ASYNC_NOVAL)'.
17
18 2019-02-18 Thomas Koenig <tkoenig@gcc.gnu.org>
19
20 PR fortran/87689
21 * trans-decl.c (gfc_get_extern_function_decl): Add argument
22 actual_args and pass it through to gfc_get_function_type.
23 * trans-expr.c (conv_function_val): Add argument actual_args
24 and pass it on to gfc_get_extern_function_decl.
25 (conv_procedure_call): Pass actual arguments to conv_function_val.
26 * trans-types.c (get_formal_from_actual_arglist): New function.
27 (gfc_get_function_type): Add argument actual_args. Generate
28 formal args from actual args if necessary.
29 * trans-types.h (gfc_get_function_type): Add optional argument.
30 * trans.h (gfc_get_extern_function_decl): Add optional argument.
31
32 2019-02-18 Martin Liska <mliska@suse.cz>
33
34 * decl.c (gfc_match_gcc_builtin): Add support for filtering
35 of builtin directive based on multilib ABI name.
36
37 2019-02-17 Harald Anlauf <anlauf@gmx.de>
38
39 PR fortran/88299
40 * resolve.c (resolve_common_blocks,resolve_common_vars): Move
41 check for obsolent COMMON feature in F2018 to better place.
42
43 2019-02-17 Harald Anlauf <anlauf@gmx.de>
44
45 PR fortran/89077
46 * decl.c (gfc_set_constant_character_len): Clear original string
47 representation after padding has been performed to target length.
48
49 2019-02-16 Jakub Jelinek <jakub@redhat.com>
50
51 PR middle-end/88074
52 * simplify.c (simplify_transformation_to_array): Run post_op
53 immediately after processing corresponding row, rather than at the
54 end.
55 (norm2_scale): New variable.
56 (add_squared): Rename to ...
57 (norm2_add_squared): ... this. Scale down operand and/or result
58 if needed.
59 (do_sqrt): Rename to ...
60 (norm2_do_sqrt): ... this. Handle the result == e case. Scale up
61 result and clear norm2_scale.
62 (gfc_simplify_norm2): Clear norm2_scale. Change add_squared to
63 norm2_add_squared and &do_sqrt to norm2_do_sqrt. Scale up result
64 and clear norm2_scale again.
65
66 2019-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
67
68 PR fortran/71066
69 * trans-decl.c (generate_coarray_sym_init): For an array
70 constructor in a DATA statement of a coarray variable, set the
71 rank to 1 to avoid confusion later on. If the constructor
72 contains only one value, use that for initiailizig.
73
74 2019-02-14 Janne Blomqvist <jb@gcc.gnu.org>
75
76 PR fortran/81552
77 * gfortran.h (gfc_option_t): Make flag_init_integer_value a long.
78 * options.c (gfc_handle_option): Use strtol instead of atoi.
79 * invoke.texi: Document -finit-integer behavior in more detail.
80
81 2019-02-14 Harald Anlauf <anlauf@gmx.de>
82
83 PR fortran/88248
84 * symbol.c: Move check for labeled DO statement from
85 gfc_define_st_label to gfc_reference_st_label.
86
87 2019-02-14 Cesar Philippidis <cesar@codesourcery.com>
88
89 PR fortran/72715
90 * openmp.c (resolve_oacc_nested_loops): Error on do concurrent
91 loops.
92
93 2019-02-13 Martin Liska <mliska@suse.cz>
94
95 PR fortran/88649
96 * resolve.c (resolve_operator): Initialize 't' right
97 after function entry. Skip switch (e->value.op.op)
98 for -fdec operands that become function calls.
99
100 2019-02-10 Thomas Koenig <tkoenig@gcc.gnu.org>
101
102 PR fortran/71723
103 * expr.c (gfc_check_assign): Add argument is_init_expr. If we are
104 looking at an init expression, issue error if the target is not a
105 TARGET and we are not looking at a procedure pointer.
106 * gfortran.h (gfc_check_assign): Add optional argument
107 is_init_expr.
108
109 2019-02-09 Harald Anlauf <anlauf@gmx.de>
110
111 PR fortran/89077
112 * resolve.c (gfc_resolve_substring_charlen): Check substring
113 length for constantness prior to general calculation of length.
114
115 2019-02-09 Paul Thomas <pault@gcc.gnu.org>
116
117 PR fortran/89200
118 * trans-array.c (gfc_trans_create_temp_array): Set the 'span'
119 field for derived types.
120
121 2019-02-04 Harald Anlauf <anlauf@gmx.de>
122
123 PR fortran/89077
124 * decl.c (add_init_expr_to_sym): Copy length of string initializer
125 to declared symbol.
126
127 2019-02-04 Martin Liska <mliska@suse.cz>
128
129 PR fortran/89185
130 * resolve.c (resolve_ref): Remove breakout variable as
131 we need to prevent prev = &(*prev)->next to happen
132 with *prev == NULL.
133
134 2019-02-04 Martin Liska <mliska@suse.cz>
135
136 PR fortran/88912
137 * scanner.c (load_file): Report error for -fpre-include
138 file and do not ICE.
139
140 2019-02-02 Dominique d'Humieres <dominiq@gcc.gnu.org>
141
142 PR fortran/81344
143 * invoke.texi: Document the behavior of repeated -ffpe-trap
144 and -ffpe-summary.
145
146 2019-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
147
148 PR fortran/88298
149 * arith.c (gfc_int2int): Do not warn if src->do_not_warn is set.
150 * gfortran.h (gfc_expr): Add flag do_not_warn.
151 * intrinsic.c (gfc_convert_type_warn): Set expr->do_not_warn if
152 no warning is desired.
153
154 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
155
156 PR fortran/88393
157 * trans-expr.c (gfc_conv_procedure_call): For derived entities,
158 passed in parentheses to class formals, invert the order of
159 copying allocatable components to taking the _data of the
160 class expression.
161
162 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
163
164 PR fortran/88980
165 * trans-array.c (gfc_array_init_size): Add element_size to the
166 arguments.
167 (gfc_array_allocate): Remove the recalculation of the size of
168 the element and use element_size from the call to the above.
169 Unconditionally set the span field of the descriptor.
170
171 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
172
173 PR fortran/88685
174 * expr.c (is_subref_array): Move the check for class pointer
175 dummy arrays to after the reference check. If we haven't seen
176 an array reference other than an element and a component is not
177 class or derived, return false.
178
179 2019-02-01 Jakub Jelinek <jakub@redhat.com>
180
181 PR fortran/83246
182 PR fortran/89084
183 * trans-decl.c (generate_local_decl): Add referenced FL_PARAMETERs
184 if sym->ns->construct_entities rather than if
185 sym->ns->parent->code->op == EXEC_BLOCK.
186
187 2019-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
188
189 PR fortran/88669
190 * resolve.c (resolve_component): If the reference is a BT_CLASS,
191 copy the contiguous attribute from the reference and use the
192 correct attributes.
193
194 2019-01-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
195
196 PR fortran/52564
197 * io.c (match_io): Add check for comma after '*' without subsequent
198 IO list.
199
200 2019-01-30 Dominique d'Humieres <dominiq@gcc.gnu.org>
201
202 PR fortran/52884
203 * invoke.texi: Document the promotion of double precision
204 constants.
205
206 2019-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
207
208 PR fortran/57048
209 * interface.c (gfc_compare_types): If a derived type and an
210 integer both have a derived type, and they are identical,
211 this is a C binding type and compares equal.
212
213 2019-01-26 Harald Anlauf <anlauf@gmx.de>
214
215 PR fortran/57553
216 * expr.c (check_inquiry): Add list of inquiry functions allowed in
217 constant expressions for F2008+.
218
219 2019-01-25 Steven G. Kargl <kargl@gcc.gnu.org>
220
221 PR fortran/85780
222 * decl.c (gfc_match_subroutine): Check for conflict between BIND(C)
223 and alternative return.
224
225 2019-01-24 Paul Thomas <pault@gcc.gnu.org>
226
227 PR fortran/88929
228 * trans-array.c (gfc_conv_descriptor_elem_len): New function.
229 * trans-array.h : Add prototype for above.
230 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Take account of
231 assumed rank arrays being flagged by rank = -1 in expressions.
232 Intent in arrays need a pointer to a copy of the data to be
233 assigned to the descriptor passed for conversion. This should
234 then be freed, together with the CFI descriptor on return from
235 the C call.
236
237 2019-01-22 Harald Anlauf <anlauf@gmx.de>
238
239 PR fortran/88579
240 * trans-expr.c (gfc_conv_power_op): Handle cases of (2**e) ** integer
241 and (- 2**e) ** integer.
242
243 2019-01-19 Dominique d'Humieres <dominiq@gcc.gnu.org>
244
245 PR fortran/37835
246 * resolve.c (resolve_types): Add !flag_automatic.
247 * symbol.c (gfc_add_save): Silence warnings.
248
249 2019-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
250
251 PR fortran/77960
252 * io.c (match_io_element): input-item cannot be an external function.
253
254 2018-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
255 Paul Thomas <pault@gcc.gnu.org>
256
257 PR fortran/56789
258 * trans-expr.c (gfc_conv_procedure_call): Call
259 gfc_conv_subref_array_arg if the formal arg is contiguous
260 and the actual arg may not be.
261
262 2019-01-17 Thomas Koenig <tkoenig@gcc.gnu.org>
263
264 PR fortran/88871
265 * resolve.c (resolve_ref): Fix logic for removal of
266 reference.
267
268 2019-01-19 Jakub Jelinek <jakub@redhat.com>
269
270 PR fortran/88902
271 * trans-decl.c (gfc_get_symbol_decl): Don't add length to function
272 or parent function if it has been added there already.
273
274 2019-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
275
276 PR fortran/43136
277 * resolve.c (resolve_array_ref): Add equal_length argument; set it
278 if the length of the substring equals that of the orignal
279 variable.
280 (resolve_ref): Remove the substring if it is equal in length to
281 the original variable, unless it is an EXPR_SUBSTRING).
282
283 2019-01-15 Steven G. Kargl <kargl@gcc.gnu.org>
284
285 PR fortran/81849
286 * resolve.c (resolve_symbol): Host associated varaibles can appear
287 in the specification statement of a RESULT array.
288
289 2019-01-15 Paul Thomas <pault@gcc.gnu.org>
290
291 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Deal with exprs
292 that are indirect references; ie. dummy arguments.
293
294 2019-01-13 Dominique d'Humieres <dominiq@gcc.gnu.org>
295
296 PR fortran/88803
297 * gfortran.texi: Replace @xref with @ref and adjust the sentence.
298
299 2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
300
301 PR fortran/57992
302 * trans-array.c (gfc_conv_array_parameter): Do not pack/unpack
303 functions with contiguous results.
304
305 2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
306
307 PR fortran/59345
308 * trans-array.c (gfc_conv_array_parameter): Remove TODO. Do not
309 pack/unpack results of functions which return an explicit-shaped
310 or allocatable array.
311
312 2019-01-12 Steven G. Kargl <kargl@gcc.gnu.org>
313
314 PR fortran/61765
315 * resolve.c (gfc_verify_binding_labels): Break if-elseif-elseif
316 structure into independent if's with a return to simplify logic.
317 Avoid a check for ENTRY name with bind(c).
318
319 2019-01-12 Paul Thomas <pault@gcc.gnu.org>
320
321 * gfortran.texi: Add description in sections on TS 29113 and
322 further interoperability with C.
323 * trans-array.c (gfc_conv_descriptor_attribute): New function.
324 (gfc_get_dataptr_offset): Remove static function attribute.
325 * trans-array.h: Add prototypes for above functions.
326 * trans-decl.c: Add declarations for the library functions
327 cfi_desc_to_gfc_desc and gfc_desc_to_cfi_desc.
328 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): New function.
329 (gfc_conv_procedure_call): Call it for scalar and array actual
330 arguments, when the formal arguments are bind_c with assumed
331 shape or assumed rank.
332 * trans.h: External declarations for gfor_fndecl_cfi_to_gfc
333 and gfor_fndecl_gfc_to_cfi.
334
335 2019-01-11 Steven G. Kargl <kargl@gcc.gnu.org>
336
337 PR fortran/35031
338 * decl.c (gfc_match_entry): Check for F2018:C1546. Fix nearby
339 mis-indentation.
340
341 2019-01-11 Jakub Jelinek <jakub@redhat.com>
342
343 PR middle-end/85956
344 PR lto/88733
345 * trans-openmp.c: Include attribs.h.
346 (gfc_walk_alloc_comps, gfc_omp_clause_linear_ctor): Handle
347 VAR_DECL max bound with "omp dummy var" attribute like NULL or
348 error_mark_node - recompute number of elts independently.
349
350 2019-01-11 Thomas Koenig <tkoenig@gcc.gnu.org>
351
352 PR fortran/59345
353 * trans-array.c (gfc_conv_parameter_array): Temporary
354 arrays generated for expressions do not need to be repacked.
355
356 2019-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
357
358 PR fortran/86322
359 * decl.c (top_var_list): Set locus of expr.
360 (gfc_match_data): Detect pointer on non-rightmost part-refs.
361
362 2019-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
363
364 PR fortran/88376
365 * resolve.c (is_illegal_recursion): Remove an assert().
366
367 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
368
369 PR other/16615
370 * expr.c: Change "can not" to "cannot".
371
372 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
373
374 PR other/16615
375 * class.c: Mechanically replace "can not" with "cannot".
376 * decl.c: Likewise.
377 * expr.c: Likewise.
378 * gfc-internals.texi: Likewise.
379 * intrinsic.texi: Likewise.
380 * invoke.texi: Likewise.
381 * io.c: Likewise.
382 * match.c: Likewise.
383 * parse.c: Likewise.
384 * primary.c: Likewise.
385 * resolve.c: Likewise.
386 * symbol.c: Likewise.
387 * trans-array.c: Likewise.
388 * trans-decl.c: Likewise.
389 * trans-intrinsic.c: Likewise.
390 * trans-stmt.c: Likewise.
391
392 2019-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
393
394 PR fortran/68426
395 * simplify.c (gfc_simplify_spread): Also simplify if the
396 type of source is an EXPR_STRUCTURE.
397
398 2019-01-08 Janus Weil <janus@gcc.gnu.org>
399
400 PR fortran/88047
401 * class.c (gfc_find_vtab): For polymorphic typespecs, the components of
402 the class container may not be available (in case of invalid code).
403
404 2019-01-08 Richard Biener <rguenther@suse.de>
405
406 PR fortran/88611
407 * trans-expr.c (gfc_conv_initializer): For ISOCBINDING_NULL_*
408 directly build the expected GENERIC tree.
409
410 2019-01-07 Thomas Koenig <tkoenig@gcc.gnu.org>
411 Harald Anlauf <anlauf@gmx.de>
412 Tobias Burnus <burnus@gcc.gnu.org>
413
414 PR fortran/45424
415 * check.c (gfc_check_is_contiguous): New function.
416 * expr.c (gfc_is_not_contiguous): New function.
417 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IS_CONTIGUOUS.
418 Add prototype for gfc_is_not_contiguous.
419 * intrinsic.c (do_ts29113_check): Add GFC_ISYM_IS_CONTIGUOUS.
420 (add_function): Add is_contiguous.
421 * intrinsic.h: Add prototypes for gfc_check_is_contiguous,
422 gfc_simplify_is_contiguous and gfc_resolve_is_contiguous.
423 * intrinsic.texi: Add IS_CONTIGUOUS.
424 * iresolve.c (gfc_resolve_is_contiguous): New function.
425 * simplify.c (gfc_simplify_is_contiguous): New function.
426 * trans-decl.c (gfor_fncecl_is_contiguous0): New variable.
427 (gfc_build_intrinsic_function_decl): Add it.
428 * trans-intrinsic.c (gfc_conv_intrinsic_is_contiguous): New
429 function.
430 (gfc_conv_intrinsic_function): Handle GFC_ISYM_IS_CONTIGUOUS.
431
432 2019-01-06 Thomas Koenig <tkoenig@gcc.gnu.org>
433
434 PR fortran/88658
435 * gfortran.h: Add macro gfc_real_4_kind
436 * simplify.c (simplify_min_max): Special case for the types of
437 AMAX0, AMIN0, MAX1 and MIN1, which actually change the types of
438 their arguments.
439
440 2019-01-05 Janus Weil <janus@gcc.gnu.org>
441
442 PR fortran/88009
443 * class.c (gfc_find_derived_vtab): Mark the _final component as
444 artificial.
445 (find_intrinsic_vtab): Ditto. Also add an extra check to avoid
446 dereferencing a null pointer and adjust indentation.
447 * resolve.c (resolve_fl_variable): Add extra check to avoid
448 dereferencing a null pointer. Move variable declarations to local scope.
449 (resolve_fl_procedure): Add extra check to avoid dereferencing a null
450 pointer.
451 * symbol.c (check_conflict): Suppress errors for artificial symbols.
452
453 2019-01-01 Steven G. Kargl <kargl@gcc.gnu.org>
454
455 * parse.c (decode_statement): Suppress "Unclassifiable statement"
456 error if previous error messages were emittes.
457
458 2019-01-01 Thomas Koenig <tkoenig@gcc.gnu.org>
459
460 PR fortran/82743
461 * primary.c (gfc_convert_to_structure_constructor): If a character
462 in a constructor is too long, add a warning with
463 -Wcharacter-truncation.
464
465 2019-01-01 Jakub Jelinek <jakub@redhat.com>
466
467 Update copyright years.
468
469 * gfortranspec.c (lang_specific_driver): Update copyright notice
470 dates.
471 * gfc-internals.texi: Bump @copying's copyright year.
472 * gfortran.texi: Ditto.
473 * intrinsic.texi: Ditto.
474 * invoke.texi: Ditto.
475 \f
476 Copyright (C) 2019 Free Software Foundation, Inc.
477
478 Copying and distribution of this file, with or without modification,
479 are permitted in any medium without royalty provided the copyright
480 notice and this notice are preserved.