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