re PR fortran/90985 (Wrong error message with variables named "DATA*")
[gcc.git] / gcc / fortran / ChangeLog
1 2019-08-02 Steven G. Kargl <kargl@gcc.gnu.org>
2
3 PR fortran/90985
4 * decl.c (gfc_match_data): In free-form code, DATA be followed by
5 whitespace.
6
7 2019-08-02 Steven G. Kargl <kargl@gcc.gnu.org>
8
9 PR fortran/90986
10 * match.c (gfc_match_equivalence): Check that EQUIVALENCE is followed
11 by '('.
12
13 2019-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
14
15 PR fortran/91296
16 * interface.c (compare_actual_expr): When checking for aliasing, add
17 a case to handle REF_INQUIRY (e.g., foo(x%re, x%im) do not alias).
18
19 2019-07-29 Thomas Koenig <tkoenig@gcc.gnu.org>
20
21 PR fortran/90813
22 * dump-parse-tree.c (show_global_symbol): New function.
23 (gfc_dump_global_symbols): New function.
24 * gfortran.h (gfc_traverse_gsymbol): Add prototype.
25 (gfc_dump_global_symbols): Likewise.
26 * invoke.texi: Document -fdump-fortran-global.
27 * lang.opt: Add -fdump-fortran-global.
28 * parse.c (gfc_parse_file): Handle flag_dump_fortran_global.
29 * symbol.c (gfc_traverse_gsymbol): New function.
30 * trans-decl.c (sym_identifier): New function.
31 (mangled_identifier): New function, doing most of the work
32 of gfc_sym_mangled_identifier.
33 (gfc_sym_mangled_identifier): Use mangled_identifier. Add mangled
34 identifier to global symbol table.
35 (get_proc_pointer_decl): Use backend decl from global identifier
36 if present.
37
38 2019-07-25 Thomas Koenig <tkoenig@gcc.gnu.org>
39
40 PR fortran/65819
41 * dependency.h (gfc_dep_resovler): Add optional argument identical.
42 * dependency.c (gfc_check_dependency): Do not alway return 1 if
43 the symbol is the same. Pass on identical to gfc_dep_resolver.
44 (gfc_check_element_vs_element): Whitespace fix.
45 (gfc_dep_resolver): Adjust comment for function. If identical is
46 true, return 1 if any overlap has been found.
47
48 2019-07-23 Steven G. Kargl <kargl@gcc.gnu.org>
49
50 PR fortran/54072
51 * check.c (gfc_invalid_boz): Fix comment.
52 (illegal_boz_arg): New function.
53 (gfc_check_transfer): Use to arguments.
54 (gfc_check_storage_size): Ditto.
55 (gfc_check_complex): Remove leftover comment from BOZ patch.
56 * primary.c (match_boz_constant): Remove leftover comment.
57
58 2019-07-23 Steven G. Kargl <kargl@gcc.gnu.org>
59
60 * arith.c (gfc_convert_integer, gfc_convert_real, gfc_convert_complex):
61 Move to ...
62 * primary.c (convert_integer, convert_real, convert_complex): ... here.
63 Rename and make static functions.
64 (match_integer_constant): Use convert_integer
65 (match_real_constant): Use convert_real.
66 (match_complex_constant: Use convert_complex.
67 * arith.h (gfc_convert_integer, gfc_convert_real, gfc_convert_complex):
68 Remove prototypes.
69 * array.c (match_array_cons_element): A BOZ cannot be a data
70 statement value. Jump to a common exit point.
71 * check.c (gfc_invalid_boz): New function. Emit error or warning
72 for a BOZ in an invalid context.
73 (boz_args_check): Move to top of file to prevent need of forward
74 declaration.
75 (is_boz_constant): New function. Check that BOZ expr is constant.
76 (gfc_boz2real): New function. In-place conversion of BOZ literal
77 constant to REAL in accordance to F2018.
78 (gfc_boz2int): New function. In-place conversion of BOZ literal
79 constant to INTEGER in accordance to F2018.
80 (gfc_check_achar, gfc_check_char, gfc_check_float): Use gfc_invalid_boz. Convert BOZ
81 as needed.
82 (gfc_check_bge_bgt_ble_blt): Enforce F2018 requirements on BGE,
83 BGT, BLE, and BLT intrinsic functions.
84 (gfc_check_cmplx): Re-organize to check kind, if present, first.
85 Convert BOZ real and/or imaginary parts as needed in accordance to
86 F2018.
87 (gfc_check_complex): Use gfc_invalid_boz. Convert BOZ as needed.
88 (gfc_check_dcmplx, gfc_check_dble ): Convert BOZ as needed.
89 (gfc_check_dshift): Make dshift[lr] conform to F2018 standard.
90 gfc_check_float (gfc_expr *a)
91 (gfc_check_iand_ieor_ior): Make IAND, IEOR, and IOR conform to
92 F2018 standard.
93 (gfc_check_int): Conform to F2018 standard.
94 (gfc_check_intconv): Deprecate SHORT and LONG aliases for INT2 and
95 INT. Simply return for a BOZ argument. See gfc_simplify_intconv.
96 (gfc_check_merge_bits): Make MERGE_BITS conform to Fortran 2018
97 standard.
98 (gfc_check_real): Remove incorrect comment. Check kind, if present,
99 first. Simply return for a BOZ argument. See gfc_simplify_real.
100 (gfc_check_and): Re-do error handling for BOZ arguments. Remove
101 special casing ts.type != BT_INTEGER or BT_LOGICAL.
102 * decl.c (match_old_style_init): Check for BOZ in old-style
103 initialization. Issue error or warning depending on
104 -fallow-invalid-boz option. Issue error if variable is not an
105 INTEGER or REAL and the value is BOZ.
106 * expr.c (gfc_copy_expr): Copy a BT_BOZ gfc_expr.
107 (gfc_check_assign): Re-do error handling for a BOZ in an assignment
108 statement. Do in-place conversion of RHS based on LHS type of
109 INTEGER or REAL.
110 * gfortran.h (gfc_expr): Add a boz component. Remove is_boz component.
111 (gfc_boz2int, gfc_boz2real, gfc_invalid_boz): New prototypes.
112 * interface.c (gfc_extend_assign): Guard against replacing an
113 intrinsic involving a BOZ literal constant on RHS.
114 * invoke.texi: Doument -fallow-invalid-boz.
115 * lang.opt: New option. -fallow-invalid-boz.
116 * libgfortran.h (bt): Elevate BOZ to a basic type.
117 * misc.c (gfc_basic_typename, gfc_typename): Translate BT_BOZ to BOZ.
118 * primary.c (convert_integer, convert_real, convert_complex): to here.
119 Rename and make static functions.
120 * primary.c(match_boz_constant): Rewrite parsing of a BOZ. Re-do
121 error handling. Deprecate 'X' for hexidecimal and postfix notation.
122 Use -fallow-invalid-boz and gfc_invalid_boz to accept deprecated code.
123 * resolve.c (resolve_ordinary_assign): Rework a RHS that is a
124 BOZ literal constant. Use gfc_invalid_boz to allow previous
125 nonstandard behavior. Remove range checking of BOZ conversion.
126 * simplify.c (convert_boz): Remove function.
127 (simplify_cmplx): Remove conversion of BOZ constants, because
128 conversion is done in gfc_check_cmplx.
129 (gfc_simplify_float): Remove conversion of BOZ constant, because
130 conversion is done in gfc_check_float.
131 (simplify_intconv): Use gfc_boz2int to convert BOZ to INTEGER.
132 Remove range checking for BOZ conversion.
133 (gfc_simplify_real): Use k, if present, to determine kind. Convert
134 BOZ to REAL. Remove range checking for BOZ conversion.
135 target-memory.c (gfc_convert_boz): Rewrite to deal with convert of
136 a BOZ to a REAL value.
137
138 2019-07-21 Thomas König <tkoenig@gcc.gnu.org>
139
140 PR libfortran/91030
141 * gfortran.texi (GFORTRAN_FORMATTED_BUFFER_SIZE): Document
142 (GFORTRAN_UNFORMATTED_BUFFER_SIZE): Likewise.
143
144 2019-07-16 Harald Anlauf <anlauf@gmx.de>
145
146 PR fortran/90903
147 * libgfortran.h: Add mask for -fcheck=bits option.
148 * options.c (gfc_handle_runtime_check_option): Add option "bits"
149 to run-time checks selectable via -fcheck.
150 * trans-intrinsic.c (gfc_conv_intrinsic_btest)
151 (gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits)
152 (gfc_conv_intrinsic_shift, gfc_conv_intrinsic_ishft)
153 (gfc_conv_intrinsic_ishftc): Implement run-time checks for the
154 POS, LEN, SHIFT, and SIZE arguments.
155 * gfortran.texi: Document run-time checks for bit manipulation
156 intrinsics.
157 * invoke.texi: Document new -fcheck=bits option.
158
159 2019-07-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
160
161 PR fortran/87233
162 * expr.c (check_restricted): Relax constraint C1279 which was
163 removed from F2008 and above.
164
165 2019-07-07 Paul Thomas <pault@gcc.gnu.org>
166
167 PR fortran/91077
168 * trans-array.c (gfc_conv_scalarized_array_ref) Delete code
169 that gave symbol backend decl for subref arrays and deferred
170 length variables.
171
172 2019-07-05 Andrew Stubbs <ams@codesourcery.com>
173
174 * openmp.c (resolve_omp_clauses): Add custom error messages for
175 parameters in map clauses.
176
177 2019-07-03 Martin Liska <mliska@suse.cz>
178
179 * check.c (gfc_check_c_funloc): Remove
180 dead assignemts.
181 * decl.c (variable_decl): Likewise.
182 * resolve.c (resolve_typebound_function): Likewise.
183 * simplify.c (gfc_simplify_matmul): Likewise.
184 (gfc_simplify_scan): Likewise.
185 * trans-array.c (gfc_could_be_alias): Likewise.
186 * trans-common.c (add_equivalences): Likewise.
187 * trans-expr.c (trans_class_vptr_len_assignment): Likewise.
188 (gfc_trans_array_constructor_copy): Likewise.
189 (gfc_trans_assignment_1): Likewise.
190 * trans-intrinsic.c (conv_intrinsic_atomic_op): Likewise.
191 * trans-openmp.c (gfc_omp_finish_clause): Likewise.
192 * trans-types.c (gfc_get_array_descriptor_base): Likewise.
193 * trans.c (gfc_build_final_call): Likewise.
194
195 2019-06-27 Steven G. Kargl <kargl@gcc.gnu.org>
196
197 PR fortran/90987
198 * gfortran.dg/common_1.f: new test.
199 * gfortran.dg/common_26.f90: Ditto.
200
201 2019-06-26 Steven G. Kargl <kargl@gcc.gnu.org>
202
203 PR Fortran/90988
204 ChangeLog forgotten with revision 272667
205 * decl.c (access_attr_decl): Use temporary variable to reduce
206 unreadability of code. Normalize jumping to return.
207 (gfc_match_protected): Fix parsing error. Add comments to
208 explain code. Remove dead code.
209 (gfc_match_private): Use temporary variable to reduce unreadability
210 of code. Fix parsing error. Move code to test for blank PRIVATE.
211 Remove dead code.
212 (gfc_match_public): Move code to test for blank PUBLIC. Fix
213 parsing error. Remove dead code.
214
215 2019-06-24 Jan Hubicka <jh@suse.cz>
216
217 * trans-expr.c (gfc_conv_substring): Check that
218 type is array or integer prior checking string flag.
219 (gfc_conv_string_parameter): Likewise.
220 * trans-openmp.c (gfc_omp_scalar_p): Likewise.
221 * trans.c (gfc_build_array_ref): Likewise.
222
223 2019-06-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
224
225 PR fortran/89782
226 * io.c (gfc_resolve_dt): Check that internal units are not
227 character PARAMETER.
228
229 2019-06-21 Steven G. Kargl <kargl@gcc.gnu.org>
230
231 PR fortran/67884
232 * resolve.c (deferred_requirements) : Check only the result variable.
233 (resolve_fl_procedure): Check deferred requirements on functions.
234
235 2019-06-21 Steven G. Kargl <kargl@gcc.gnu.org>
236
237 PR fortran/51991
238 * decl.c (gfc_match_save): If SAVE was not seen, return MATCH_NO
239 instead issuing an error message and returning MATCH_ERROR.
240
241 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
242
243 PR fortran/77632
244 * /decl.c (variable_decl): Mark a variable that is a target in pointer
245 initialization when in PROGRAM, MODULE, or SUBMODULE scope with an
246 implicit save.
247
248 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
249
250 PR fortran/86587
251 * symbol.c (verify_bind_c_derived_type): Remove erroneous error
252 checking for BIND(C) and PRIVATE attributes.
253
254 2019-06-20 Thomas Koenig <tkoenig@gcc.gnu.org>
255
256 PR fortran/90937
257 * trans-types.c (get_formal_from_actual_arglist): Get symbol from
258 current namespace so it will be freed later. If symbol is of type
259 character, get an empty character length.
260
261 2019-06-19 Steven G. Kargl <kargl@gcc.gnu.org>
262
263 PR fortran/69499
264 * match.c (gfc_match_select_type): SELECT TYPE is an executable
265 statement, and cannot appear in MODULE or SUBMODULE scope.
266
267 2019-06-19 Steven G. Kargl <kargl@gcc.gnu.org>
268
269 PR fortran/69398
270 * decl.c (attr_decl): Check for duplicate DIMENSION attribute for a
271 CLASS entity.
272
273 2019-06-19 Steven G. Kargl <kargl@gcc.gnu.org>
274
275 PR fortran/87907
276 * resolve.c (resolve_contained_fntype): Do not dereference a NULL
277 pointer.
278
279 2019-06-19 Jim MacArthur <jim.macarthur@codethink.co.uk>
280 Mark Eggleston <mark.eggleston@codethink.com>
281
282 PR fortran/89103
283 * gfortran.texi: Add -fdec-blank-format-item
284 * invoke.texi: Add option to list of options.
285 * invoke.texi: Add to section on Commas in FORMAT specifications.
286 * io.c (check_format): At FMT_RPAREN goto finished if
287 -fdec-blank-format-item otherwise set error string.
288 * lang.opt: Add new option.
289 * options.c (set_dec_flags): Add SET_BITFLAG for
290 flag_dec_format_defaults.
291
292 2019-06-18 Julian Brown <julian@codesourcery.com>
293
294 PR fortran/90921
295 * trans-decl.c (finish_oacc_declare): Reset module_oacc_clauses
296 before scanning each namespace.
297
298 2019-06-18 Thomas Schwinge <thomas@codesourcery.com>
299
300 PR fortran/85221
301 * trans-decl.c (add_attributes_to_decl): Handle OpenACC 'declare'
302 directive.
303
304 2019-06-16 Thomas Koenig <tkoenig@gcc.gnu.org>
305
306 * dump_parse_tree (debug): Add verison for formal arglist.
307 Do not crash when a gfc_expr is NULL.
308
309 2019-06-15 Steven G. Kargl <kargl@gcc.gnu.org>
310
311 * decl.c (gfc_match_derived_decl): Dummy argument cannot be a derived
312 type.
313
314 2019-06-14 Steven G. Kargl <kargl@gcc.gnu.org>
315
316 * arith.c (arith_power): Rework overflow of an integer to an integer
317 exponent.
318
319 2019-06-14 Harald Anlauf <anlauf@gmx.de>
320
321 PR fortran/90577
322 PR fortran/90578
323 * trans-intrinsic.c (gfc_conv_intrinsic_shift): Properly
324 distinguish logical/arithmetic shifts.
325 * intrinsic.texi: Update documentation for SHIFTR/SHIFTL/SHIFTA
326 (Fortran 2008) and LSHIFT/RSHIFT (GNU extensions).
327
328 2019-06-14 Steven G. Kargl <kargl@gcc.gnu.org>
329
330 PR fortran/89646
331 * dependency.c (gfc_check_argument_var_dependency): Suppress spurious
332 warnings by comparing variable names.
333
334 2019-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
335
336 PR fortran/68544
337 * resolve.c (is_dt_name): New function to compare symbol name against
338 list of derived types.
339 (resolve_actual_arglist): Use it to find wrong code.
340
341 2019-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
342
343 PR fortran/89344
344 * expr.c (gfc_check_vardef_context): Check for INTENT(IN) variable
345 in SELECT TYPE construct.
346
347 2019-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
348
349 PR fortran/88810
350 * dependency.c (gfc_dep_resolver): Re-arrange code to make the logic
351 a bit more transparent. Fix 2 nearby formatting issues.
352
353 2019-06-13 Jakub Jelinek <jakub@redhat.com>
354
355 * io.c (check_format): Use G_(...) instead of _(...) for error values,
356 append " in format string at %L" to all strings but unexpected_element,
357 use error as gfc_error formating string instead of
358 "%s in format string at %L". Formatting fixes.
359
360 2019-06-12 Steven G. Kargl <kargl@gcc.gnu.org>
361
362 * gfortran.h (gfc_free_dt_list): Remove prototype.
363
364 2019-06-12 Steven G. Kargl <kargl@gcc.gnu.org>
365
366 PR fortran/90002
367 * array.c (gfc_free_array_spec): When freeing an array-spec, avoid
368 an ICE for assumed-shape coarrays.
369
370 2019-06-08 Paul Thomas <pault@gcc.gnu.org>
371
372 PR fortran/90786
373 * trans-expr.c (pointer_assignment_is_proc_pointer) Remove as
374 it is very simple and only called from one place.
375 (gfc_trans_pointer_assignment): Rename non_proc_pointer_assign
376 as non_proc_ptr_assign. Assign to it directly, rather than call
377 to above, deleted function and use gfc_expr_attr instead of
378 only checking the reference chain.
379
380 2019-06-08 Thomas Koenig <tkoenig@gcc.gnu.org>
381 Tomáš Trnka <trnka@scm.com>
382
383 PR fortran/90744
384 * trans-types.c (get_formal_from_actual_arglist): Unset typespec
385 flags which make no sense for procedures without explicit
386 interface.
387
388 2019-06-02 Thomas Koenig <tkoenig@gcc.gnu.org>
389
390 PR fortran/90539
391 * trans-expr.c (gfc_conv_subref_array_arg): If the size of the
392 expression can be determined to be one, treat it as contiguous.
393 Set likelyhood of presence of an actual argument according to
394 PRED_FORTRAN_ABSENT_DUMMY and likelyhood of being contiguous
395 according to PRED_FORTRAN_CONTIGUOUS.
396
397 2019-05-30 Thomas Koenig <tkoenig@gcc.gnu.org>
398
399 * gfc-internals.texi (Translating to GENERIC): New chapter.
400
401 2019-05-30 Marek Polacek <polacek@redhat.com>
402
403 * lang.opt (ftail-call-workaround): Fix a typo.
404
405 2019-05-30 Jakub Jelinek <jakub@redhat.com>
406
407 * lang.opt (ftail-call-workaround=): Fix a typo - lenghts to lengths.
408
409 2019-05-29 Thomas Koenig <tkoenig@gcc.gnu.org>
410
411 PR fortran/90539
412 * gfortran.h (gfc_has_dimen_vector_ref): Add prototype.
413 * trans.h (gfc_conv_subref_array_arg): Add argument check_contiguous.
414 (gfc_conv_is_contiguous_expr): Add prototype.
415 * frontend-passes.c (has_dimen_vector_ref): Remove prototype,
416 rename to
417 (gfc_has_dimen_vector_ref): New function name.
418 (matmul_temp_args): Use gfc_has_dimen_vector_ref.
419 (inline_matmul_assign): Likewise.
420 * trans-array.c (gfc_conv_array_parameter): Also check for absence
421 of a vector subscript before calling gfc_conv_subref_array_arg.
422 Pass additional argument to gfc_conv_subref_array_arg.
423 * trans-expr.c (gfc_conv_subref_array_arg): Add argument
424 check_contiguous. If that is true, check if the argument
425 is contiguous and do not repack in that case.
426 * trans-intrinsic.c (gfc_conv_intrinsic_is_contiguous): Split
427 away most of the work into, and call
428 (gfc_conv_intrinsic_is_coniguous_expr): New function.
429
430 2019-05-29 Jakub Jelinek <jakub@redhat.com>
431
432 PR fortran/90329
433 * lang.opt (fbroken-callers): Remove.
434 (ftail-call-workaround, ftail-call-workaround=): New options.
435 * gfortran.h (struct gfc_namespace): Add implicit_interface_calls.
436 * interface.c (gfc_procedure_use): Set implicit_interface_calls
437 for calls to implicit interface procedures.
438 * trans-decl.c (create_function_arglist): Use flag_tail_call_workaround
439 instead of flag_broken_callers. If it is not 2, also require
440 sym->ns->implicit_interface_calls.
441 * invoke.texi (fbroken-callers): Remove documentation.
442 (ftail-call-workaround, ftail-call-workaround=): Document.
443
444 2019-05-26 Thomas Koenig <tkoenig@gcc.gnu.org>
445
446 PR fortran/90539
447 * trans-types.c (get_formal_from_actual_arglist): Set rank
448 and lower bound for assumed size arguments.
449
450 2019-05-22 Andrew Stubbs <ams@codesourcery.com>
451
452 * trans-stmt.c (gfc_trans_critical): Use size_type_node for
453 gfor_fndecl_caf_lock and gfor_fndecl_caf_unlock calls.
454 (gfc_trans_allocate): Use size_type_node for gfor_fndecl_caf_sync_all
455 call.
456
457 2019-05-22 Jeff Law <law@redhat.com>
458 Mark Eggleston <mark.eggleston@codethink.com>
459
460 PR fortran/89100
461 * gfortran.texi: Add Default widths for F, G and I format
462 descriptors to Extensions section.
463 * invoke.texi: Add -fdec-format-defaults
464 * io.c (check_format): Use default widths for i, f and g when
465 flag_dec_format_defaults is enabled.
466 * lang.opt: Add new option.
467 * options.c (set_dec_flags): Add SET_BITFLAG for
468 flag_dec_format_defaults.
469
470 2019-05-21 Janne Blomqvist <jb@gcc.gnu.org>
471
472 PR libfortran/90038
473 * intrinsic.texi (EXECUTE_COMMAND_LINE): Explain new
474 wait=.false. implementation.
475
476 2019-05-20 Mark Eggleston <markeggleston@codethink.com>
477
478 * gfortran.texi: Remove reference to the ASSIGN statement, capitalise
479 complex, state that padding is with spaces and modify the Hollerith
480 constant examples.
481
482 2019-05-19 Paul Thomas <pault@gcc.gnu.org>
483
484 PR fortran/90498
485 * trans-stmt.c (trans_associate_var) Do not use the saved
486 descriptor if the expression is a COMPONENT_REF.
487
488 2019-05-19 Thomas Koenig <tkoenig@gcc.gnu.org>
489
490 PR fortran/90329
491 * invoke.texi: Document -fbroken-callers.
492 * lang.opt: Add -fbroken-callers.
493 * trans-decl.c (create_function_arglist): Only set
494 DECL_HIDDEN_STRING_LENGTH if flag_broken_callers is set.
495
496 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
497
498 PR fortran/89433
499 * f95-lang.c (gfc_attribute_table): Set min_len to -1 for "omp
500 declare target".
501 * trans-decl.c (add_attributes_to_decl): Refer to OpenACC
502 'routine' clauses from "omp declare target" attribute.
503
504 2019-05-16 Martin Sebor <msebor@redhat.com>
505
506 * gfortranspec.c (append_arg): Spell out the word "argument."
507
508 2019-05-16 Jakub Jelinek <jakub@redhat.com>
509
510 PR fortran/90329
511 * trans-decl.c (create_function_arglist): Set
512 DECL_HIDDEN_STRING_LENGTH on hidden string length PARM_DECLs if
513 len is constant.
514
515 2019-05-15 Janne Blomqvist <jb@gcc.gnu.org>
516
517 * parse.c (gfc_parse_file): Remove translation string markers.
518
519 2019-05-12 Janne Blomqvist <jb@gcc.gnu.org>
520
521 * dump-parse-tree.c (get_c_type_name): Use macros for complex type
522 names.
523 * parse.c (gfc_parse_file): Define complex macros, add CPP support
524 when printing C prototypes.
525
526 2019-05-10 Thomas Koenig <tkoenig@gcc.gnu.org>
527
528 PR fortran/61968
529 * interface.c (compare_actual_formal): Do not create a vtab if
530 the actual argument is assumed type.
531
532 2019-05-10 Paul Thomas <pault@gcc.gnu.org>
533
534 PR fortran/90093
535 * trans-decl.c (convert_CFI_desc): Test that the dummy is
536 present before doing any of the conversions.
537
538 PR fortran/90352
539 * decl.c (gfc_verify_c_interop_param): Restore the error for
540 charlen > 1 actual arguments passed to bind(C) procs.
541 Clean up trailing white space.
542
543 PR fortran/90355
544 * trans-array.c (gfc_trans_create_temp_array): Set the 'span'
545 field to the element length for all types.
546 (gfc_conv_expr_descriptor): The force_no_tmp flag is used to
547 prevent temporary creation, especially for substrings.
548 * trans-decl.c (gfc_trans_deferred_vars): Rather than assert
549 that the backend decl for the string length is non-null, use it
550 as a condition before calling gfc_trans_vla_type_sizes.
551 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): 'force_no_tmp'
552 is set before calling gfc_conv_expr_descriptor.
553 * trans.c (get_array_span): Move the code for extracting 'span'
554 from gfc_build_array_ref to this function. This is specific to
555 descriptors that are component and indirect references.
556 * trans.h : Add the force_no_tmp flag bitfield to gfc_se.
557
558 2019-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
559
560 PR fortran/90351
561 PR fortran/90329
562 * dump-parse-tree.c: Include version.h.
563 (gfc_dump_external_c_prototypes): New function.
564 (get_c_type_name): Select "char" as a name for a simple char.
565 Adjust to handling external functions. Also handle complex.
566 (write_decl): Add argument bind_c. Adjust for dumping of external
567 procedures.
568 (write_proc): Likewise.
569 (write_interop_decl): Add bind_c argument to call of write_proc.
570 * gfortran.h: Add prototype for gfc_dump_external_c_prototypes.
571 * lang.opt: Add -fc-prototypes-external flag.
572 * parse.c (gfc_parse_file): Move dumping of BIND(C) prototypes.
573 Call gfc_dump_external_c_prototypes if option is set.
574 * invoke.texi: Document -fc-prototypes-external.
575
576 2019-05-06 Steven G. Kargl <kargl@gcc.gnu.org>
577
578 PR fortran/90290
579 * match.c (gfc_match_stopcode): Check F2008 condition on stop code.
580
581 2019-05-01 Andrew Benson <abensonca@gmail.com>
582
583 * module.c (write_module): Initialize module_column before writing
584 module to ensure line break occurs at correct column.
585
586 2019-05-01 Dominique d'Humieres <dominiq@gcc.gnu.org>
587
588 PR fortran/60144
589 * match.c (gfc_match_parens): Change the location for missing ')'.
590 (gfc_match_if): Detect a missing '('. Remove the spurious named
591 constant error. Change the wording of some errors.
592 (gfc_match_else): Change the wording of an error.
593 (gfc_match_elseif): Detect a missing '('. Improve the matching
594 process to get a better syntax analysis.
595
596 2019-04-19 Steven G. Kargl <kargl@gcc.gnu.org>
597
598 PR fortran/90166
599 * decl.c (in_module_or_interface): New function to check that the
600 current state is in a module, submodule, or interface.
601 (gfc_match_prefix): Use it.
602
603 2019-04-22 Paul Thomas <pault@gcc.gnu.org>
604
605 PR fortran/57284
606 * resolve.c (find_array_spec): If this is a class expression
607 and the symbol and component array specs are the same, this is
608 not an error.
609 *trans-intrinsic.c (gfc_conv_intrinsic_size): If a class symbol
610 argument, has no namespace, it has come from the interface
611 mapping and the _data component must be accessed directly.
612
613 2019-04-17 Thomas Schwinge <thomas@codesourcery.com>
614
615 PR fortran/90048
616 * openmp.c (gfc_resolve_do_iterator): Handle sharing_clauses for
617 OpenACC, too.
618 (gfc_resolve_oacc_blocks): Populate sharing_clauses with private
619 clauses.
620
621 2019-04-14 Paul Thomas <pault@gcc.gnu.org>
622
623 PR fortran/89843
624 * trans-decl.c (gfc_get_symbol_decl): Assumed shape and assumed
625 rank dummies of bind C procs require deferred initialization.
626 (convert_CFI_desc): New procedure to convert incoming CFI
627 descriptors to gfc types and back again.
628 (gfc_trans_deferred_vars): Call it.
629 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Null the CFI
630 descriptor pointer. Free the descriptor in all cases.
631
632 PR fortran/89846
633 * expr.c (is_CFI_desc): New function.
634 (is_subref_array): Tidy up by referencing the symbol directly.
635 * gfortran.h : Prototype for is_CFI_desc.
636 * trans_array.c (get_CFI_desc): New function.
637 (gfc_get_array_span, gfc_conv_scalarized_array_ref,
638 gfc_conv_array_ref): Use it.
639 * trans.c (get_array_span): Extract the span from descriptors
640 that are indirect references.
641
642 PR fortran/90022
643 * trans-decl.c (gfc_get_symbol_decl): Make sure that the se
644 expression is a pointer type before converting it to the symbol
645 backend_decl type.
646 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Eliminate
647 temporary creation for intent(in).
648
649 2019-04-13 Dominique d'Humieres <dominiq@gcc.gnu.org>
650
651 PR fortran/79842
652 * module.c (gfc_use_module): use complete sentences.
653
654 2019-04-11 Thomas Koenig <tkoenig@gcc.gnu.org>
655
656 PR translation/89939
657 * frontend-passes.c (B_ERROR): Delete macro.
658 (C_ERROR): Delete macro.
659 (B_ERROR_1): New macro.
660 (C_ERROR_1): New macro.
661 (C_ERROR_2): New macro.
662 (inline_matmul_assign): Use new macros.
663 (call_external_blas): Likewise.
664
665 2019-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
666
667 PR fortran/87352
668 * gfortran.h (gfc_component): Add finalized field.
669 * class.c (finalize_component): If the component is already
670 finalized, return early. Set component->finalized on exit.
671
672 2019-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
673
674 PR fortran/89981
675 * resolve.c (resolve_global_procedure): If the global symbol is an
676 ENTRY, also look up its name among the entries.
677
678 2019-04-04 Harald Anlauf <anlauf@gmx.de>
679
680 PR fortran/89904
681 * check.c (gfc_check_transfer): Reject procedures as actual
682 arguments for SOURCE and MOLD of TRANSFER intrinsic.
683
684 2019-04-03 Steven G. Kargl <kargl@gcc.gnu.org>
685
686 PR fortran/68567
687 * expr.c (gfc_reduce_init_expr): Add extra check to avoid
688 dereferencing a null pointer.
689
690 2019-04-03 Dominique d'Humieres <dominiq@gcc.gnu.org>
691
692 PR fortran/89375
693 * expr.c (comp_pointer): Remove redundant condition.
694
695 2019-03-31 Harald Anlauf <anlauf@gmx.de>
696
697 PR fortran/83515
698 PR fortran/85797
699 * trans-types.c (gfc_typenode_for_spec): Handle conversion for
700 procedure pointers.
701 * target-memory.c (gfc_element_size): Handle size determination
702 for procedure pointers.
703
704 2019-03-31 Thomas Koenig <tkoenig@gcc.gnu.org>
705
706 * dump-parse-tree.c (debug): Add for symbol_attribute *,
707 symbol_attribute and gfc_ref * arguments.
708
709 2019-03-30 Paul Thomas <pault@gcc.gnu.org>
710
711 PR fortran/89841
712 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Use the formal
713 argument attributes rather than those of the actual argument.
714
715 PR fortran/89842
716 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Call
717 'set_dtype_for_unallocated' for any type of arrayspec.
718
719 2019-03-27 Janus Weil <janus@gcc.gnu.org>
720
721 PR fortran/85537
722 * expr.c (gfc_check_assign_symbol): Reject internal and dummy procedures
723 in procedure pointer initialization.
724
725 2019-03-27 Paul Thomas <pault@gcc.gnu.org>
726
727 PR fortran/88247
728 * expr.c (is_subref_array): Permit substrings to be detected
729 as subref arrays.
730 * trans-array.c (get_array_ctor_var_strlen): Obtain the length
731 of deferred length strings. Handle substrings with a NULL end
732 expression.
733 (trans_array_constructor): Remove an unnecessary blank line.
734 (gfc_conv_scalarized_array_ref): Skip to label 'done' if 'decl'
735 is a pointer array.
736 (get_array_charlen): If the expression is an array, convert the
737 first element of the constructor and use its string length. Get
738 a new charlen if necessary.
739 (gfc_conv_expr_descriptor): Call 'get_array_charlen' for array
740 constructor expressions. If the ss_info string length is
741 available, use that to set the span of character arrays.
742 * trans-expr.c (gfc_get_expr_charlen): Handle substrings
743 * trans-stmt.c (trans_associate_var): Set the pointer array
744 flag for variable targets and constant array constructors. Take
745 care not to reset the string length or the span in the case of
746 expressions that are not converted as direct by reference.
747
748 2019-03-25 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
749
750 * intrinsic.texi (MINLOC): Fix typo in BACK argument documentation.
751 (MAXLOC): Likewise.
752
753 2019-03-24 Thomas Koenig <tkoenig@gcc.gnu.org>
754
755 PR fortran/78865
756 * interface.c (compare_actual_formal): Change errors about
757 missing or extra to gfc_error_now to make sure they are issued.
758 Change "spec" to "specifier" in message.
759 * resolve.c (resolve_global_procedure): Also check for mismatching
760 interface with global symbols if the namespace has already been
761 resolved.
762
763 2019-03-21 Thomas Schwinge <thomas@codesourcery.com>
764
765 PR fortran/72741
766 * openmp.c (gfc_match_oacc_routine): Set the level of parallelism
767 for all variants.
768 (gfc_resolve_oacc_routines): Call gfc_add_omp_declare_target.
769
770 PR fortran/89773
771 * gfortran.h (gfc_oacc_routine_name): Add loc member.
772 (gfc_resolve_oacc_routines): Declare.
773 * openmp.c (gfc_match_oacc_routine): Move some error checking
774 into...
775 (gfc_resolve_oacc_routines): ... this new function.
776 * resolve.c (resolve_codes): Call it.
777
778 PR fortran/72741
779 * openmp.c (gfc_match_oacc_routine): Clarify.
780
781 PR fortran/72741
782 * module.c (verify_OACC_ROUTINE_LOP_NONE): New function.
783 (enum ab_attribute): Add AB_OACC_ROUTINE_LOP_GANG,
784 AB_OACC_ROUTINE_LOP_WORKER, AB_OACC_ROUTINE_LOP_VECTOR,
785 AB_OACC_ROUTINE_LOP_SEQ.
786 (attr_bits): Add these.
787 (mio_symbol_attribute): Handle these.
788
789 2019-03-20 Janus Weil <janus@gcc.gnu.org>
790
791 PR fortran/71861
792 * symbol.c (check_conflict): ABSTRACT attribute conflicts with
793 INTRINSIC attribute.
794
795 2019-03-18 Thomas Koenig <tkoeng@gcc.gnu.org>
796
797 PR fortran/68009
798 * iresolve.c: Include trans.h.
799 (gfc_resolve_fe_runtine_error): Set backend_decl on
800 resolved_sym.
801
802 2019-03-17 Thomas Koenig <tkoenig@gcc.gnu.org>
803
804 PR fortran/88008
805 * gfortran.h (expr_t): Add EXPR_UNKNOWN.
806 * expr.c (gfc_copy_expr): Add EXPR_UNKNOWN to switch statement.
807 (gfc_simplify_expr): Likewise.
808 * module.c (mio_expr): Likewise.
809 * resovle.c (extract_compcall_passed_object): Issue error on
810 unknown type.
811 (check_typebound_baseobject): Issue error on wrong type.
812 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Add
813 EXPR_UNKNOWN to switch statement.
814
815 2019-03-16 Jakub Jelinek <jakub@redhat.com>
816
817 PR fortran/89724
818 * scanner.c (load_line): Remove linenum and current_line static
819 variables, add warned_tabs automatic variable. Use current_file->line
820 instead of current_line and warned_tabs boolean to avoid diagnosing
821 tabs multiple times on the same line.
822
823 2019-03-16 Thomas Koenig <tkoenig@gcc.gnu.org>
824
825 PR fortran/84394
826 * symbol.c (gfc_add_subroutine): If we are encountering a
827 subrtoutine within a BLOCK DATA and the name starts with an
828 underscore, do not check.
829
830 2019-03-15 Harald Anlauf <anlauf@gmx.de>
831
832 PR fortran/60091
833 * expr.c (gfc_check_pointer_assign): Correct and improve error
834 messages for invalid pointer assignments.
835
836 2019-03-14 Thomas Koenig <tkoenig@gcc.gnu.org>
837
838 * gfortran.texi: Document Q edit descriptor under
839 "Extensions not implemented in GNU Fortran".
840
841 2019-03-13 Harald Anlauf <anlauf@gmx.de>
842
843 PR fortran/87045
844 * trans-expr.c (gfc_trans_pointer_assignment): Move check for same
845 string length so that we do not get false errors for deferred
846 length.
847
848 2019-03-13 Janus Weil <janus@gcc.gnu.org>
849
850 PR fortran/89601
851 * decl.c (gfc_match_formal_arglist): Reject empty type parameter lists.
852 (gfc_match_derived_decl): Mark as PDT only if type parameter list was
853 matched successfully.
854
855 2019-03-13 Thomas Koenig <tkoenig@gcc.gnu.org>
856
857 PR fortran/66695
858 PR fortran/77746
859 PR fortran/79485
860 * gfortran.h (gfc_symbol): Add bind_c component.
861 (gfc_get_gsymbol): Add argument bind_c.
862 * decl.c (add_global_entry): Add bind_c argument to
863 gfc_get_symbol.
864 * parse.c (parse_block_data): Likewise.
865 (parse_module): Likewise.
866 (add_global_procedure): Likewise.
867 (add_global_program): Likewise.
868 * resolve.c (resolve_common_blocks): Likewise.
869 (resolve_global_procedure): Likewise.
870 (gfc_verify_binding_labels): Likewise.
871 * symbol.c (gfc_get_gsymbol): Add argument bind_c. Set bind_c
872 in gsym.
873 * trans-decl.c (gfc_get_module_backend_decl): Add bind_c argument
874 to gfc_get_symbol.
875 (gfc_get_extern_function_decl): If the sym has a binding label
876 and it cannot be found in the global symbol tabel, it is the wrong
877 one and vice versa.
878
879 2019-03-12 Thomas Koenig <tkoenig@gcc.gnu.org>
880
881 PR fortran/87673
882 * match.c (gfc_match_type_spec): Remove call to
883 gfc_resolve_expr for character length.
884
885 2019-03-12 Martin Liska <mliska@suse.cz>
886
887 * decl.c (add_init_expr_to_sym): Replace usage of 'can't'
888 with 'cannot'.
889 (variable_decl): Likewise.
890 (cray_pointer_decl): Likewise.
891 (match_binding_attributes): Likewise.
892 * f95-lang.c (gfc_init): Likewise.
893 * interface.c (gfc_check_typebound_override): Likewise.
894 * intrinsic.c (make_generic): Likewise.
895 * module.c (dump_module): Likewise.
896 (gfc_use_module): Likewise.
897 * primary.c (gfc_convert_to_structure_constructor): Likewise.
898 * resolve.c (resolve_entries): Likewise.
899 (check_generic_tbp_ambiguity): Likewise.
900 (get_checked_tb_operator_target): Likewise.
901 * scanner.c (load_file): Likewise.
902 * trans-expr.c (gfc_conv_intrinsic_to_class): Likewise.
903
904 2019-03-12 Paul Thomas <pault@gcc.gnu.org>
905
906 PR fortran/89363
907 PR fortran/89364
908 * trans-expr.c (set_dtype_for_unallocated): New function.
909 (gfc_conv_gfc_desc_to_cfi_desc): Call it for allocatable and
910 pointer arguments.
911 (gfc_conv_procedure_call): Likewise. Also, set the ubound of
912 the final dimension to -1 for assumed rank formal args that are
913 associated with assumed size arrays.
914 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Return -1 for
915 the final dimension of assumed rank entities that are argument
916 associated with assumed size arrays.
917 (gfc_conv_intrinsic_shape): Likewise return -1 for the final
918 dimension of the shape intrinsic.
919
920 2019-03-11 Jakub Jelinek <jakub@redhat.com>
921
922 PR fortran/89651
923 * trans-openmp.c (gfc_omp_clause_default_ctor): Set TREE_NO_WARNING
924 on decl if adding COND_EXPR for allocatable.
925 (gfc_omp_clause_copy_ctor): Set TREE_NO_WARNING on dest.
926
927 2019-03-11 Martin Liska <mliska@suse.cz>
928
929 * decl.c (match_record_decl): Wrap an option name
930 in a string format message and fix GNU coding style.
931 (gfc_match_pointer): Likewise.
932 * expr.c (find_array_section): Likewise.
933 * intrinsic.c (gfc_is_intrinsic): Likewise.
934 * options.c (gfc_post_options): Likewise.
935 * primary.c (match_integer_constant): Likewise.
936 * trans-common.c (translate_common): Likewise.
937
938 2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
939
940 PR fortran/66089
941 * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
942 Return false if a scalar tempoary is needed.
943 (gfc_walk_variable_expr): Fix up class refs.
944
945 2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
946
947 PR fortran/87734
948 * symbol.c (gfc_add_procedure): Only throw an error if the
949 procedure has not been declared either PUBLIC or PRIVATE.
950
951 2019-03-09 Thomas Koenig <tkoenig@gcc.gnu.org>
952
953 PR fortran/71544
954 * trans-types.c (gfc_typenode_for_spec) Set ts->is_c_interop of
955 C_PTR and C_FUNPTR.
956 (create_fn_spec): Mark argument as escaping if ts->is_c_interop is set.
957
958 2019-03-09 Janus Weil <janus@gcc.gnu.org>
959
960 PR fortran/84504
961 * expr.c (gfc_check_assign_symbol): Deal with procedure pointers to
962 pointer-valued functions.
963
964 2019-03-09 Thomas König <tkoenig@gcc.gnu.org>
965
966 PR fortran/71203
967 * decl.c (add_init_expr_to_sym): Add shape if init has none. Add
968 asserts that it has to be an EXPR_ARRAY in this case.
969
970 2019-03-08 Jakub Jelinek <jakub@redhat.com>
971
972 PR other/80058
973 * arith.c (gfc_complex2complex): Avoid two spaces in the middle of
974 diagnostics.
975 * resolve.c (resolve_allocate_expr): Likewise.
976
977 2019-03-06 Harald Anlauf <anlauf@gmx.de>
978
979 PR fortran/71203
980 * expr.c (simplify_const_ref): Avoid null pointer dereference.
981
982 2019-03-03 Harald Anlauf <anlauf@gmx.de>
983 Steven G. Kargl <kargl@gcc.gnu.org>
984
985 PR fortran/77583
986 * symbol.c (check_conflict): Check for valid procedure name
987 passed to error reporting routine.
988
989 2019-03-03 Thomas Koenig <tkoenig@gcc.gnu.org>
990
991 PR fortran/72714
992 * resolve.c (resolve_allocate_expr): Add some tests for coarrays.
993
994 2019-03-02 Harald Anlauf <anlauf@gmx.de>
995
996 PR fortran/89516
997 * check.c (gfc_calculate_transfer_sizes): Correct checks for cases
998 where storage size of elements of MOLD is 0.
999
1000 2019-02-28 Thomas Schwinge <thomas@codesourcery.com>
1001 Cesar Philippidis <cesar@codesourcery.com>
1002
1003 PR fortran/72741
1004 PR fortran/89433
1005 * openmp.c (gfc_match_oacc_routine): Handle repeated use of the
1006 Fortran OpenACC 'routine' directive.
1007
1008 PR fortran/72741
1009 * gfortran.h (enum oacc_routine_lop): Add OACC_ROUTINE_LOP_ERROR.
1010 * openmp.c (gfc_oacc_routine_lop, gfc_match_oacc_routine): Use it.
1011 * trans-decl.c (add_attributes_to_decl): Likewise.
1012
1013 PR fortran/72741
1014 PR fortran/89433
1015 * openmp.c (gfc_match_oacc_routine): Accept intrinsic symbols.
1016
1017 2019-02-26 Harald Anlauf <anlauf@gmx.de>
1018
1019 PR fortran/89492
1020 * check.c (gfc_calculate_transfer_sizes): Handle cases where
1021 storage size of elements of MOLD is 0.
1022
1023 2019-02-26 Thomas Koenig <tkoenig@gcc.gnu.org>
1024
1025 PR fortran/89496
1026 * trans-types.c (get_formal_from_actual_arglist): If
1027 the actual arglist has no expression, the corresponding
1028 formal arglist is an alternate return.
1029
1030 2019-02-26 Jakub Jelinek <jakub@redhat.com>
1031
1032 PR fortran/43210
1033 * trans-array.c (gfc_conv_array_initializer): Use RANGE_EXPR instead
1034 of duplicating the initializer possibly many times.
1035
1036 2019-02-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1037
1038 PR fortran/89174
1039 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Add is_mold
1040 to arguments. If we are dealing with a MOLD, call
1041 gfc_expr_to_initialize().
1042 * trans-stmt.c (gfc_trans_allocate): For MOLD, pass is_mold=true
1043 to gfc_find_and_cut_at_last_class_ref.
1044 * trans.h (gfc_find_and_cut_at_last_class_ref): Add optional
1045 argument is_mold with default false.
1046
1047 2019-02-24 Harald Anlauf <anlauf@gmx.de>
1048
1049 PR fortran/89266
1050 PR fortran/88326
1051 * target-memory.c (gfc_element_size): Return false if element size
1052 cannot be determined; element size is returned separately.
1053 (gfc_target_expr_size): Return false if expression size cannot be
1054 determined; expression size is returned separately.
1055 * target-memory.h: Adjust prototypes.
1056 * check.c (gfc_calculate_transfer_sizes): Adjust references to
1057 gfc_target_expr_size, gfc_element_size.
1058 * arith.c (hollerith2representation): Likewise.
1059 * class.c (find_intrinsic_vtab): Likewise.
1060 * simplify.c (gfc_simplify_sizeof): Likewise.
1061
1062 2019-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1063
1064 PR fortran/84387
1065 * trans-io.c (transfer_expr): Do not return if there are no
1066 components to the derived type or class.
1067
1068 2019-02-23 Paul Thomas <pault@gcc.gnu.org>
1069
1070 PR fortran/88117
1071 * resolve.c (deferred_op_assign): Return if the lhs expression
1072 has the pointer attribute.
1073 * trans-expr.c (gfc_trans_assignment_1): Do not fix the string
1074 length if the lhs expression has the pointer attribute.
1075
1076 2019-02-23 Paul Thomas <pault@gcc.gnu.org>
1077
1078 PR fortran/89385
1079 PR fortran/89366
1080 * decl.c (gfc_verify_c_interop_param): Restriction on string
1081 length being one is lifted for F2018.
1082 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): For scalar
1083 characters with intent in, make a temporary and copy the result
1084 of the expression evaluation into it.
1085 (gfc_conv_procedure_call): Set a flag for character formal args
1086 having a character length that is not unity. If the procedure
1087 is bind C, call gfc_conv_gfc_desc_to_cfi_desc in this case.
1088 Also, extend bind C calls to unconditionally convert both
1089 pointers and allocatable expressions.
1090
1091 2019-02-23 David Malcolm <dmalcolm@redhat.com>
1092 Jakub Jelinek <jakub@redhat.com>
1093
1094 PR middle-end/88074
1095 * simplify.c (norm2_do_sqrt, gfc_simplify_norm2): Use
1096 mpfr_number_p && !mpfr_zero_p instead of mpfr_regular_p.
1097 (norm2_add_squared): Likewise. Use mp_exp_t rather than mpfr_exp_t.
1098
1099 2019-02-22 Harald Anlauf <anlauf@gmx.de>
1100
1101 PR fortran/83057
1102 * io.c (gfc_match_open): Fix logic in checks of OPEN statement
1103 when NEWUNIT= is specified.
1104
1105 2019-02-22 Steven G. Kargl <kargl@gcc.gnu.org>
1106
1107 PR fortran/89431
1108 * gfortran.texi: Fix documentation to match the implementation.
1109
1110 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1111 Cesar Philippidis <cesar@codesourcery.com>
1112
1113 PR fortran/72741
1114 * gfortran.h (oacc_routine_lop): New enum.
1115 (symbol_attribute): Use it.
1116 * openmp.c (gfc_oacc_routine_dims): Replace with...
1117 (gfc_oacc_routine_lop): ... this new function.
1118 (gfc_match_oacc_routine): Adjust.
1119 * trans-decl.c (add_attributes_to_decl): Likewise.
1120
1121 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1122
1123 * openmp.c (gfc_match_oacc_declare): Revert earlier changes.
1124
1125 2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1126
1127 * dump-parse-tree.c (debug): Implement for gfc_expr *,
1128 gfc_typespec *, gfc_typespec and gfc_symbol *.
1129
1130 2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1131
1132 PR fortran/86119
1133 * class.c (gfc_get_len_component): Add argument k for kind.
1134 If the kind of the resulting expression is not equal to k,
1135 convert it.
1136 * gfortran.h (gfc_len_component): Adjust prototype.
1137 * simplify.c (gfc_simplify_len): Pass kind to
1138 gfc_get_len_component.
1139
1140 2019-02-20 Martin Liska <mliska@suse.cz>
1141
1142 * gfortran.texi: Change singular to plural.
1143
1144 2019-02-20 Martin Liska <mliska@suse.cz>
1145
1146 * gfortran.texi: Document Fortran header directive.
1147
1148 2019-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1149
1150 PR fortran/89384
1151 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): If the dummy
1152 argument is contiguous and the actual argument may not be,
1153 use gfc_conv_subref_array_arg.
1154
1155 2019-02-19 Thomas Schwinge <thomas@codesourcery.com>
1156
1157 PR c/87924
1158 * openmp.c (gfc_match_omp_clauses): Add representation of wait clause
1159 without argument as 'wait (GOMP_ASYNC_NOVAL)'.
1160
1161 2019-02-18 Thomas Koenig <tkoenig@gcc.gnu.org>
1162
1163 PR fortran/87689
1164 * trans-decl.c (gfc_get_extern_function_decl): Add argument
1165 actual_args and pass it through to gfc_get_function_type.
1166 * trans-expr.c (conv_function_val): Add argument actual_args
1167 and pass it on to gfc_get_extern_function_decl.
1168 (conv_procedure_call): Pass actual arguments to conv_function_val.
1169 * trans-types.c (get_formal_from_actual_arglist): New function.
1170 (gfc_get_function_type): Add argument actual_args. Generate
1171 formal args from actual args if necessary.
1172 * trans-types.h (gfc_get_function_type): Add optional argument.
1173 * trans.h (gfc_get_extern_function_decl): Add optional argument.
1174
1175 2019-02-18 Martin Liska <mliska@suse.cz>
1176
1177 * decl.c (gfc_match_gcc_builtin): Add support for filtering
1178 of builtin directive based on multilib ABI name.
1179
1180 2019-02-17 Harald Anlauf <anlauf@gmx.de>
1181
1182 PR fortran/88299
1183 * resolve.c (resolve_common_blocks,resolve_common_vars): Move
1184 check for obsolent COMMON feature in F2018 to better place.
1185
1186 2019-02-17 Harald Anlauf <anlauf@gmx.de>
1187
1188 PR fortran/89077
1189 * decl.c (gfc_set_constant_character_len): Clear original string
1190 representation after padding has been performed to target length.
1191
1192 2019-02-16 Jakub Jelinek <jakub@redhat.com>
1193
1194 PR middle-end/88074
1195 * simplify.c (simplify_transformation_to_array): Run post_op
1196 immediately after processing corresponding row, rather than at the
1197 end.
1198 (norm2_scale): New variable.
1199 (add_squared): Rename to ...
1200 (norm2_add_squared): ... this. Scale down operand and/or result
1201 if needed.
1202 (do_sqrt): Rename to ...
1203 (norm2_do_sqrt): ... this. Handle the result == e case. Scale up
1204 result and clear norm2_scale.
1205 (gfc_simplify_norm2): Clear norm2_scale. Change add_squared to
1206 norm2_add_squared and &do_sqrt to norm2_do_sqrt. Scale up result
1207 and clear norm2_scale again.
1208
1209 2019-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
1210
1211 PR fortran/71066
1212 * trans-decl.c (generate_coarray_sym_init): For an array
1213 constructor in a DATA statement of a coarray variable, set the
1214 rank to 1 to avoid confusion later on. If the constructor
1215 contains only one value, use that for initiailizig.
1216
1217 2019-02-14 Janne Blomqvist <jb@gcc.gnu.org>
1218
1219 PR fortran/81552
1220 * gfortran.h (gfc_option_t): Make flag_init_integer_value a long.
1221 * options.c (gfc_handle_option): Use strtol instead of atoi.
1222 * invoke.texi: Document -finit-integer behavior in more detail.
1223
1224 2019-02-14 Harald Anlauf <anlauf@gmx.de>
1225
1226 PR fortran/88248
1227 * symbol.c: Move check for labeled DO statement from
1228 gfc_define_st_label to gfc_reference_st_label.
1229
1230 2019-02-14 Cesar Philippidis <cesar@codesourcery.com>
1231
1232 PR fortran/72715
1233 * openmp.c (resolve_oacc_nested_loops): Error on do concurrent
1234 loops.
1235
1236 2019-02-13 Martin Liska <mliska@suse.cz>
1237
1238 PR fortran/88649
1239 * resolve.c (resolve_operator): Initialize 't' right
1240 after function entry. Skip switch (e->value.op.op)
1241 for -fdec operands that become function calls.
1242
1243 2019-02-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1244
1245 PR fortran/71723
1246 * expr.c (gfc_check_assign): Add argument is_init_expr. If we are
1247 looking at an init expression, issue error if the target is not a
1248 TARGET and we are not looking at a procedure pointer.
1249 * gfortran.h (gfc_check_assign): Add optional argument
1250 is_init_expr.
1251
1252 2019-02-09 Harald Anlauf <anlauf@gmx.de>
1253
1254 PR fortran/89077
1255 * resolve.c (gfc_resolve_substring_charlen): Check substring
1256 length for constantness prior to general calculation of length.
1257
1258 2019-02-09 Paul Thomas <pault@gcc.gnu.org>
1259
1260 PR fortran/89200
1261 * trans-array.c (gfc_trans_create_temp_array): Set the 'span'
1262 field for derived types.
1263
1264 2019-02-04 Harald Anlauf <anlauf@gmx.de>
1265
1266 PR fortran/89077
1267 * decl.c (add_init_expr_to_sym): Copy length of string initializer
1268 to declared symbol.
1269
1270 2019-02-04 Martin Liska <mliska@suse.cz>
1271
1272 PR fortran/89185
1273 * resolve.c (resolve_ref): Remove breakout variable as
1274 we need to prevent prev = &(*prev)->next to happen
1275 with *prev == NULL.
1276
1277 2019-02-04 Martin Liska <mliska@suse.cz>
1278
1279 PR fortran/88912
1280 * scanner.c (load_file): Report error for -fpre-include
1281 file and do not ICE.
1282
1283 2019-02-02 Dominique d'Humieres <dominiq@gcc.gnu.org>
1284
1285 PR fortran/81344
1286 * invoke.texi: Document the behavior of repeated -ffpe-trap
1287 and -ffpe-summary.
1288
1289 2019-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1290
1291 PR fortran/88298
1292 * arith.c (gfc_int2int): Do not warn if src->do_not_warn is set.
1293 * gfortran.h (gfc_expr): Add flag do_not_warn.
1294 * intrinsic.c (gfc_convert_type_warn): Set expr->do_not_warn if
1295 no warning is desired.
1296
1297 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
1298
1299 PR fortran/88393
1300 * trans-expr.c (gfc_conv_procedure_call): For derived entities,
1301 passed in parentheses to class formals, invert the order of
1302 copying allocatable components to taking the _data of the
1303 class expression.
1304
1305 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
1306
1307 PR fortran/88980
1308 * trans-array.c (gfc_array_init_size): Add element_size to the
1309 arguments.
1310 (gfc_array_allocate): Remove the recalculation of the size of
1311 the element and use element_size from the call to the above.
1312 Unconditionally set the span field of the descriptor.
1313
1314 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
1315
1316 PR fortran/88685
1317 * expr.c (is_subref_array): Move the check for class pointer
1318 dummy arrays to after the reference check. If we haven't seen
1319 an array reference other than an element and a component is not
1320 class or derived, return false.
1321
1322 2019-02-01 Jakub Jelinek <jakub@redhat.com>
1323
1324 PR fortran/83246
1325 PR fortran/89084
1326 * trans-decl.c (generate_local_decl): Add referenced FL_PARAMETERs
1327 if sym->ns->construct_entities rather than if
1328 sym->ns->parent->code->op == EXEC_BLOCK.
1329
1330 2019-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
1331
1332 PR fortran/88669
1333 * resolve.c (resolve_component): If the reference is a BT_CLASS,
1334 copy the contiguous attribute from the reference and use the
1335 correct attributes.
1336
1337 2019-01-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1338
1339 PR fortran/52564
1340 * io.c (match_io): Add check for comma after '*' without subsequent
1341 IO list.
1342
1343 2019-01-30 Dominique d'Humieres <dominiq@gcc.gnu.org>
1344
1345 PR fortran/52884
1346 * invoke.texi: Document the promotion of double precision
1347 constants.
1348
1349 2019-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1350
1351 PR fortran/57048
1352 * interface.c (gfc_compare_types): If a derived type and an
1353 integer both have a derived type, and they are identical,
1354 this is a C binding type and compares equal.
1355
1356 2019-01-26 Harald Anlauf <anlauf@gmx.de>
1357
1358 PR fortran/57553
1359 * expr.c (check_inquiry): Add list of inquiry functions allowed in
1360 constant expressions for F2008+.
1361
1362 2019-01-25 Steven G. Kargl <kargl@gcc.gnu.org>
1363
1364 PR fortran/85780
1365 * decl.c (gfc_match_subroutine): Check for conflict between BIND(C)
1366 and alternative return.
1367
1368 2019-01-24 Paul Thomas <pault@gcc.gnu.org>
1369
1370 PR fortran/88929
1371 * trans-array.c (gfc_conv_descriptor_elem_len): New function.
1372 * trans-array.h : Add prototype for above.
1373 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Take account of
1374 assumed rank arrays being flagged by rank = -1 in expressions.
1375 Intent in arrays need a pointer to a copy of the data to be
1376 assigned to the descriptor passed for conversion. This should
1377 then be freed, together with the CFI descriptor on return from
1378 the C call.
1379
1380 2019-01-22 Harald Anlauf <anlauf@gmx.de>
1381
1382 PR fortran/88579
1383 * trans-expr.c (gfc_conv_power_op): Handle cases of (2**e) ** integer
1384 and (- 2**e) ** integer.
1385
1386 2019-01-19 Dominique d'Humieres <dominiq@gcc.gnu.org>
1387
1388 PR fortran/37835
1389 * resolve.c (resolve_types): Add !flag_automatic.
1390 * symbol.c (gfc_add_save): Silence warnings.
1391
1392 2019-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
1393
1394 PR fortran/77960
1395 * io.c (match_io_element): input-item cannot be an external function.
1396
1397 2018-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1398 Paul Thomas <pault@gcc.gnu.org>
1399
1400 PR fortran/56789
1401 * trans-expr.c (gfc_conv_procedure_call): Call
1402 gfc_conv_subref_array_arg if the formal arg is contiguous
1403 and the actual arg may not be.
1404
1405 2019-01-17 Thomas Koenig <tkoenig@gcc.gnu.org>
1406
1407 PR fortran/88871
1408 * resolve.c (resolve_ref): Fix logic for removal of
1409 reference.
1410
1411 2019-01-19 Jakub Jelinek <jakub@redhat.com>
1412
1413 PR fortran/88902
1414 * trans-decl.c (gfc_get_symbol_decl): Don't add length to function
1415 or parent function if it has been added there already.
1416
1417 2019-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1418
1419 PR fortran/43136
1420 * resolve.c (resolve_array_ref): Add equal_length argument; set it
1421 if the length of the substring equals that of the orignal
1422 variable.
1423 (resolve_ref): Remove the substring if it is equal in length to
1424 the original variable, unless it is an EXPR_SUBSTRING).
1425
1426 2019-01-15 Steven G. Kargl <kargl@gcc.gnu.org>
1427
1428 PR fortran/81849
1429 * resolve.c (resolve_symbol): Host associated varaibles can appear
1430 in the specification statement of a RESULT array.
1431
1432 2019-01-15 Paul Thomas <pault@gcc.gnu.org>
1433
1434 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Deal with exprs
1435 that are indirect references; ie. dummy arguments.
1436
1437 2019-01-13 Dominique d'Humieres <dominiq@gcc.gnu.org>
1438
1439 PR fortran/88803
1440 * gfortran.texi: Replace @xref with @ref and adjust the sentence.
1441
1442 2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1443
1444 PR fortran/57992
1445 * trans-array.c (gfc_conv_array_parameter): Do not pack/unpack
1446 functions with contiguous results.
1447
1448 2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1449
1450 PR fortran/59345
1451 * trans-array.c (gfc_conv_array_parameter): Remove TODO. Do not
1452 pack/unpack results of functions which return an explicit-shaped
1453 or allocatable array.
1454
1455 2019-01-12 Steven G. Kargl <kargl@gcc.gnu.org>
1456
1457 PR fortran/61765
1458 * resolve.c (gfc_verify_binding_labels): Break if-elseif-elseif
1459 structure into independent if's with a return to simplify logic.
1460 Avoid a check for ENTRY name with bind(c).
1461
1462 2019-01-12 Paul Thomas <pault@gcc.gnu.org>
1463
1464 * gfortran.texi: Add description in sections on TS 29113 and
1465 further interoperability with C.
1466 * trans-array.c (gfc_conv_descriptor_attribute): New function.
1467 (gfc_get_dataptr_offset): Remove static function attribute.
1468 * trans-array.h: Add prototypes for above functions.
1469 * trans-decl.c: Add declarations for the library functions
1470 cfi_desc_to_gfc_desc and gfc_desc_to_cfi_desc.
1471 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): New function.
1472 (gfc_conv_procedure_call): Call it for scalar and array actual
1473 arguments, when the formal arguments are bind_c with assumed
1474 shape or assumed rank.
1475 * trans.h: External declarations for gfor_fndecl_cfi_to_gfc
1476 and gfor_fndecl_gfc_to_cfi.
1477
1478 2019-01-11 Steven G. Kargl <kargl@gcc.gnu.org>
1479
1480 PR fortran/35031
1481 * decl.c (gfc_match_entry): Check for F2018:C1546. Fix nearby
1482 mis-indentation.
1483
1484 2019-01-11 Jakub Jelinek <jakub@redhat.com>
1485
1486 PR middle-end/85956
1487 PR lto/88733
1488 * trans-openmp.c: Include attribs.h.
1489 (gfc_walk_alloc_comps, gfc_omp_clause_linear_ctor): Handle
1490 VAR_DECL max bound with "omp dummy var" attribute like NULL or
1491 error_mark_node - recompute number of elts independently.
1492
1493 2019-01-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1494
1495 PR fortran/59345
1496 * trans-array.c (gfc_conv_parameter_array): Temporary
1497 arrays generated for expressions do not need to be repacked.
1498
1499 2019-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
1500
1501 PR fortran/86322
1502 * decl.c (top_var_list): Set locus of expr.
1503 (gfc_match_data): Detect pointer on non-rightmost part-refs.
1504
1505 2019-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
1506
1507 PR fortran/88376
1508 * resolve.c (is_illegal_recursion): Remove an assert().
1509
1510 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
1511
1512 PR other/16615
1513 * expr.c: Change "can not" to "cannot".
1514
1515 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
1516
1517 PR other/16615
1518 * class.c: Mechanically replace "can not" with "cannot".
1519 * decl.c: Likewise.
1520 * expr.c: Likewise.
1521 * gfc-internals.texi: Likewise.
1522 * intrinsic.texi: Likewise.
1523 * invoke.texi: Likewise.
1524 * io.c: Likewise.
1525 * match.c: Likewise.
1526 * parse.c: Likewise.
1527 * primary.c: Likewise.
1528 * resolve.c: Likewise.
1529 * symbol.c: Likewise.
1530 * trans-array.c: Likewise.
1531 * trans-decl.c: Likewise.
1532 * trans-intrinsic.c: Likewise.
1533 * trans-stmt.c: Likewise.
1534
1535 2019-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
1536
1537 PR fortran/68426
1538 * simplify.c (gfc_simplify_spread): Also simplify if the
1539 type of source is an EXPR_STRUCTURE.
1540
1541 2019-01-08 Janus Weil <janus@gcc.gnu.org>
1542
1543 PR fortran/88047
1544 * class.c (gfc_find_vtab): For polymorphic typespecs, the components of
1545 the class container may not be available (in case of invalid code).
1546
1547 2019-01-08 Richard Biener <rguenther@suse.de>
1548
1549 PR fortran/88611
1550 * trans-expr.c (gfc_conv_initializer): For ISOCBINDING_NULL_*
1551 directly build the expected GENERIC tree.
1552
1553 2019-01-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1554 Harald Anlauf <anlauf@gmx.de>
1555 Tobias Burnus <burnus@gcc.gnu.org>
1556
1557 PR fortran/45424
1558 * check.c (gfc_check_is_contiguous): New function.
1559 * expr.c (gfc_is_not_contiguous): New function.
1560 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IS_CONTIGUOUS.
1561 Add prototype for gfc_is_not_contiguous.
1562 * intrinsic.c (do_ts29113_check): Add GFC_ISYM_IS_CONTIGUOUS.
1563 (add_function): Add is_contiguous.
1564 * intrinsic.h: Add prototypes for gfc_check_is_contiguous,
1565 gfc_simplify_is_contiguous and gfc_resolve_is_contiguous.
1566 * intrinsic.texi: Add IS_CONTIGUOUS.
1567 * iresolve.c (gfc_resolve_is_contiguous): New function.
1568 * simplify.c (gfc_simplify_is_contiguous): New function.
1569 * trans-decl.c (gfor_fncecl_is_contiguous0): New variable.
1570 (gfc_build_intrinsic_function_decl): Add it.
1571 * trans-intrinsic.c (gfc_conv_intrinsic_is_contiguous): New
1572 function.
1573 (gfc_conv_intrinsic_function): Handle GFC_ISYM_IS_CONTIGUOUS.
1574
1575 2019-01-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1576
1577 PR fortran/88658
1578 * gfortran.h: Add macro gfc_real_4_kind
1579 * simplify.c (simplify_min_max): Special case for the types of
1580 AMAX0, AMIN0, MAX1 and MIN1, which actually change the types of
1581 their arguments.
1582
1583 2019-01-05 Janus Weil <janus@gcc.gnu.org>
1584
1585 PR fortran/88009
1586 * class.c (gfc_find_derived_vtab): Mark the _final component as
1587 artificial.
1588 (find_intrinsic_vtab): Ditto. Also add an extra check to avoid
1589 dereferencing a null pointer and adjust indentation.
1590 * resolve.c (resolve_fl_variable): Add extra check to avoid
1591 dereferencing a null pointer. Move variable declarations to local scope.
1592 (resolve_fl_procedure): Add extra check to avoid dereferencing a null
1593 pointer.
1594 * symbol.c (check_conflict): Suppress errors for artificial symbols.
1595
1596 2019-01-01 Steven G. Kargl <kargl@gcc.gnu.org>
1597
1598 * parse.c (decode_statement): Suppress "Unclassifiable statement"
1599 error if previous error messages were emittes.
1600
1601 2019-01-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1602
1603 PR fortran/82743
1604 * primary.c (gfc_convert_to_structure_constructor): If a character
1605 in a constructor is too long, add a warning with
1606 -Wcharacter-truncation.
1607
1608 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1609
1610 Update copyright years.
1611
1612 * gfortranspec.c (lang_specific_driver): Update copyright notice
1613 dates.
1614 * gfc-internals.texi: Bump @copying's copyright year.
1615 * gfortran.texi: Ditto.
1616 * intrinsic.texi: Ditto.
1617 * invoke.texi: Ditto.
1618 \f
1619 Copyright (C) 2019 Free Software Foundation, Inc.
1620
1621 Copying and distribution of this file, with or without modification,
1622 are permitted in any medium without royalty provided the copyright
1623 notice and this notice are preserved.