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