[Fortran] OpenACC – permit common blocks in some clauses
[official-gcc.git] / gcc / fortran / ChangeLog
blobd14d190b0bd3932617cb91b2bc25061f50f0982e
1 2019-10-25  Cesar Philippidis <cesar@codesourcery.com>
2             Tobias Burnus  <tobias@codesourcery.com>
4         * openmp.c (gfc_match_omp_map_clause): Add and pass allow_commons
5         argument.
6         (gfc_match_omp_clauses): Update calls to permit common blocks for
7         OpenACC's copy/copyin/copyout, create/delete, host,
8         pcopy/pcopy_in/pcopy_out, present_or_copy, present_or_copy_in,
9         present_or_copy_out, present_or_create and self.
11 2019-10-24  Martin Liska  <mliska@suse.cz>
13         PR fortran/92174
14         * array.c (gfc_resolve_array_spec): Break the loop
15         for out of bounds index.
16         * resolve.c (is_non_constant_shape_array): Likewise.
18 2019-10-23  Steven G. Kargl  <kargl@gcc.gnu.org>
20         dump-parse-tree.c (show_expr): Add dumping of BT_BOZ constants.
22 2019-10-22  Steven G. Kargl  <kargl@gcc.gnu.org>
24         PR fortran/92174
25         * decl.c (attr_decl1): Move check for F2018:C822 from here ...
26         * array.c (gfc_set_array_spec): ... to here. 
28 2019-10-18  Steven G. Kargl  <kargl@gcc.gnu.org>
30         PR fortran/69455
31         * trans-decl.c (generate_local_decl): Avoid misconstructed
32         intrinsic modules in a BLOCK construct.
34 2019-10-18  Tobias Burnus  <tobias@codesourcery.com>
36         PR fortran/91586
37         * class.c (gfc_find_derived_vtab): Return NULL
38         instead of deref'ing NULL pointer.
40 2019-10-15  James Norris  <jnorris@codesourcery.com>
41             Tobias Burnus  <tobias@codesourcery.com>
43         PR fortran/65438
44         * openmp.c (check_array_not_assumed): Remove pointer check.
46 2019-10-14  Steven G. Kargl  <kargl@gcc.gnu.org>
48         PR fortran/89943
49         decl.c (gfc_match_function_decl): Ignore duplicate BIND(C) for function
50         declaration in submodule.  Implement at check for F2018 C1550.
51         (gfc_match_entry): Use temporary for locus, which allows removal of
52         one gfc_error_now().
53         (gfc_match_subroutine): Ignore duplicate BIND(C) for subroutine
54         declaration in submodule.  Implement at check for F2018 C1550.
56 2019-10-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
58         PR fortran/92004
59         * array.c (expand_constructor): Set from_constructor on
60         expression.
61         * gfortran.h (gfc_symbol): Add maybe_array.
62         (gfc_expr): Add from_constructor.
63         * interface.c (maybe_dummy_array_arg): New function.
64         (compare_parameter): If the formal argument is generated from a
65         call, check the conditions where an array element could be
66         passed to an array.  Adjust error message for assumed-shape
67         or pointer array.  Use correct language for assumed shaped arrays.
68         (gfc_get_formal_from_actual_arglist): Set maybe_array on the
69         symbol if the actual argument is an array element fulfilling
70         the conditions of 15.5.2.4.
72 2019-10-14  Tobias Burnus  <tobias@codesourcery.com>
74         * error.c: Remove debug pragma added in previous commit.
76 2019-10-14  Tobias Burnus  <tobias@codesourcery.com>
78         PR fortran/92072
79         * error.c (error_print, gfc_format_decoder): Fix %C column-
80         offset handling.
82 2019-10-13  Damian Rouson  <damain@sourceryinstitue.org>
84         PR fortran/91513
85         * resolve.c (resolve_ordinary_assign): Improved error message.
87 2019-10-13  Steven G. Kargl  <kargl@gcc.gnu.org>
89         PR fortran/90297
90         * resolve.c (resolve_typebound_function): Remove code with no
91         functional effect.
93 2019-10-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
95         PR fortran/92017
96         * expr.c (simplify_parameter_variable): Set the character length
97         of the result expression from the original expression if
98         necessary.
100 2019-10-11  Steven G. Kargl  <kargl@gcc.gnu.org>
102         PR fortran/91649
103         check.c (gfc_check_findloc): Additional checking for valid arguments
105 2019-10-11  Steven G. Kargl  <kargl@gcc.gnu.org>
107         PR fortran/91715
108         * decl.c (gfc_match_prefix): If matching a type-spec returns an error,
109         it's an error so re-act correctly.
111 2019-10-11  Steven G. Kargl  <kargl@gcc.gnu.org>
113         PR fortran/92018
114         * check.c (reset_boz): New function.
115         (illegal_boz_arg, boz_args_check, gfc_check_complex, gfc_check_float,
116         gfc_check_transfer): Use it.
117         (gfc_check_dshift): Use reset_boz, and re-arrange the checking to
118         help suppress possible run-on errors.
119         (gfc_check_and): Restore checks for valid argument types.  Use
120         reset_boz, and re-arrange the checking to help suppress possible
121         run-on errors.
122         * resolve.c (resolve_function): Actual arguments cannot be BOZ in
123         a function reference.
125 2019-10-11  Steven G. Kargl  <kargl@gcc.gnu.org>
127         PR fortran/92019
128         * array.c (match_subscript): BOZ cannot be an array subscript.
130 2019-10-11  Tobias Burnus  <tobias@codesourcery.com>
132         PR fortran/92050
133         * trans-expr.c (gfc_conv_procedure_call): Handle code generated
134         by -fcheck=all.
136 2019-10-11  Tobias Burnus  <tobias@codesourcery.com>
138         * f95-lang.c (LANG_HOOKS_OMP_IS_ALLOCATABLE_OR_PTR): Re-define to
139         gfc_omp_is_allocatable_or_ptr.
140         * trans-decl.c (create_function_arglist): Set GFC_DECL_OPTIONAL_ARGUMENT
141         only if not passed by value.
142         * trans-openmp.c (gfc_omp_is_allocatable_or_ptr): New.
143         (gfc_trans_omp_clauses): For MAP, handle (present) optional arguments;
144         for target update, handle allocatable/pointer scalars.
145         * trans.h (gfc_omp_is_allocatable_or_ptr): Declare.
147 2019-10-10  Tobias Burnus  <tobias@codesourcery.com>
149         * trans-openmp.c (gfc_trans_omp_clauses): Actually pass use_device_addr
150         on to the middle end.
152 2019-10-08  Steven G. Kargl  <kargl@gcc.gnu.org>
154         PR fortran/91801
155         * simplify.c (gfc_simplify_reshape): Convert a gcc_assert into a
156         gfc_error as a user can easily hit the condition.
158 2019-10-08  Tobias Burnus  <tobias@codesourcery.com>
160         * parse.c (parse_executable): Add missing ST_OMP_TARGET_SIMD.
162 2019-10-08  Tobias Burnus  <tobias@codesourcery.com>
164         * match.h (gfc_match_omp_eos_error): Renamed from gfc_match_omp_eos.
165         * openmp.c (gfc_match_omp_eos): Make static.
166         (gfc_match_omp_eos_error): New.
167         * parse.c (matchs, matchdo, matchds): Do as done for 'matcho' -
168         if error occurred after OpenMP/OpenACC directive matched, do not
169         try other directives.
170         (decode_oacc_directive, decode_omp_directive): Call new function
171         instead.
173 2019-10-05  Steven G. Kargl  <kargl@gcc.gnu.org>
175         PR fortran/47045
176         * decl.c (variable_decl): Do not search parent namespace for symbol.
178 2019-10-05  Paul Thomas  <pault@gcc.gnu.org>
180         PR fortran/91926
181         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Correct the
182         assignment of the attribute field to account correctly for an
183         assumed shape dummy. Assign separately to the gfc and cfi
184         descriptors since the atribute can be different. Add btanch to
185         correctly handle missing optional dummies.
187 2019-10-04  Steven G. Kargl  <kargl@gcc.gnu.org>
189         PR fortran.91959
190         * fortran/decl.c (variable_decl): Re-arrange code for matching %FILL.
192 2019-10-04  Tobias Burnus  <tobias@codesourcery.com>
194         * error.c (error_print, gfc_format_decoder): Fix off-by one issue
195         with %C.
197 2019-10-03  Steven G. Kargl  <kargl@gcc.gnu.org>
199         PR fortran/91497
200         * simplify.c (gfc_simplify_dble, simplify_intconv, gfc_simplify_real,
201         gfc_simplify_sngl): Disable -Wconversion and -Wconversion-extra
202         warnings for explicit conversion of literal constants.
204 2019-10-03  Bernd Edlinger  <bernd.edlinger@hotmail.de>
206         * primary.c (match_real_constant): Remove shadowing local vars.
207         Rename local vars.  Fix undefined behavior in loop termination.
208         (gfc_convert_to_structure_constructor): Rename local var.
210 2019-10-03  Thomas Koenig <tkoenig@gcc.gnu.org>
212         PR fortran/84487
213         * trans-decl.c (gfc_get_symbol_decl): For __def_init, set
214         DECL_ARTIFICAL and do not set TREE_READONLY.
216 2019-10-03  Mark Eggleston  <mark.eggleston@codethink.com>
218         * array.c (check_element_type): Call gfc_typename with the gfc_expr
219         "expr" instead of its gfc_typespec "ts".
220         * check.c (gfc_check_co_reduce): Call gfc_typename with the gfc_expr
221         "a" instead of its gfc_typespec "ts".
222         (gfc_check_co_reduce): Call gfc_typename with the gfc_expr "a" instead
223          of its gfc_typespec "ts".
224         (gfc_check_eoshift): Call gfc_typename with the gfc_expr "array"
225         instead of its gfc_typespec ts.
226         (gfc_check_same_type_as): In two calls to gfc_typename use "a" and "b"
227         of type gfc_expr instead of the "ts" fields of "a" and "b"
228         * decl.c (variable_decl): Call gfc_typename with the gfc_expr
229         "initializer" instead of its gfc_typespec "ts".
230         * expr.c (gfc_check_assign): Use "rvalue" and "lvalue" of type gfc_expr
231         in calls to gfc_typename instead of their "ts" fields of type
232         gfc_typespec.
233         (gfc_check_pointer_assign): Use "rvalue" and "lvalue" of type gfc_expr
234         in calls to gfc_typename instead of their "ts" fields of type
235         gfc_typespec.
236         * gfortran.h: Add prototypes for gfc_dummy_typename and a new function
237         gfc_typename for gfc_expr *.
238         *interface.c (gfc_check_dummy_characteristics): Use gfc_dummy_typename
239         for the dummy variable.
240         (compare_parameter): Use gfc_dummy_typename for the formal argument.
241         Use "actual" of type gfc_expr in call to gfc_typename for the actual
242         argument.
243         * intrinsic.c (check_arglist): Use gfc_dummy_typename for the formal
244         argument. Use expressions of type gfc_expr from the argument list to
245         call gfc_typename.
246         (gfc_convert_type_warn): New local variable "is_char_constant" set if
247         the expression type is a character constant. At the "bad" label
248         determine source type name by calling gfc_typename with either "expr"
249         for character constants or "from_ts" and use that in the warning
250         messages instead of the original call to gfc_typename.
251         * misc.c (gfc_typename): New function for gfc_expr *, use for where
252         character types are possible it can get the character length from
253         gfc_expr for character literals.
254         (gfc_dummy_typename): New functionfor gfc_typespec *, if no character
255         length is present the character type is assumed and the appropriate
256         string is return otherwise it calls gfc_typename for gfc_typespec *.
257         (gfc_typespec): for character types construct the type name with length
258         and kind (if it is not default kind).
260 2019-10-02  Steven G. Kargl  <kargl@gcc.gnu.org>
262         PR fortran/91784
263         * simplify.c (gfc_convert_constant): Simplify expression if the
264         expression type is EXPR_OP.
266 2019-10-02  Steven G. Kargl  <kargl@gcc.gnu.org>
268         PR fortran/91785
269         * primary.c (gfc_match_varspec): Ensure an inquiry parameter has
270         it locus set.
272 2019-10-02  Steven G. Kargl  <kargl@gcc.gnu.org>
274         PR fortran/91942
275         * io.c (match_vtag): Check for non-NULL result->symtree.
276         (match_out_tag): Check for invalid constant due to inquiry parameter.
277         (match_filepos): Instead of a syntax error, go to cleanup to get better
278         error messages.
280 2019-10-02  Steven G. Kargl  <kargl@gcc.gnu.org>
282         PR fortran/91943
283         * match.c (gfc_match_call): BOZ cannot be an actual argument in
284         a subroutine reference.
285         * resolve.c (resolve_function): BOZ cannot be an actual argument in
286         a function reference.
288 2019-10-01  Jan Hubicka  <jh@suse.cz>
290         * module.c (load_commons): Initialize flags to 0 to silence
291         -Wmaybe-uninitialized warning.
292         (read_module): Likewise for n and comp_name.
294 2019-10-02  Tobias Burnus  <tobias@codesourcery.com>
296         * dump-parse-tree.c (show_omp_clauses): Handle OMP_LIST_USE_DEVICE_ADDR.
297         * gfortran.h (enum): Add OMP_LIST_USE_DEVICE_ADDR.
298         * openmp.c (omp_mask1): Likewise.
299         (gfc_match_omp_clauses): Match 'use_device_addr'.
300         (OMP_TARGET_DATA_CLAUSES): Add OMP_LIST_USE_DEVICE_ADDR.
301         (resolve_omp_clauses): Add it; add is_device_ptr checks.
303 2019-10-02  Tobias Burnus  <tobias@codesourcery.com>
305         * openmp.c (gfc_match_omp_clauses): Show a clause-parsing
306         error if none was rised before.
307         * parse.c (matcha, matcho): If error occurred after
308         OpenMP/OpenACC directive matched, do not try other directives.
310 2019-10-02  Tobias Burnus  <tobias@codesourcery.com>
312         * trans-openmp.c (gfc_omp_is_optional_argument): Fix coding
313         style.
315 2019-10-02  Kwok Cheung Yeung  <kcy@codesourcery.com>
317         * f95-lang.c (LANG_HOOKS_OMP_IS_OPTIONAL_ARGUMENT): Define to
318         gfc_omp_is_optional_argument.
319         * trans-decl.c (create_function_arglist): Set
320         GFC_DECL_OPTIONAL_ARGUMENT in the generated decl if the parameter is
321         optional.
322         * trans-openmp.c (gfc_omp_is_optional_argument): New.
323         (gfc_omp_privatize_by_reference): Return true if the decl is an
324         optional pass-by-reference argument.
325         * trans.h (gfc_omp_is_optional_argument): New declaration.
326         (lang_decl): Add new optional_arg field.
327         (GFC_DECL_OPTIONAL_ARGUMENT): New macro.
329 2019-10-01  David Malcolm  <dmalcolm@redhat.com>
331         * error.c (gfc_diagnostic_starter): Clear the prefix before
332         calling diagnostic_show_locus.
334 2019-09-29  Steven G. Kargl  <kargl@gcc.gnu.org>
336         PR fortran/91641
337         * check.c (gfc_check_is_contiguous): null() cannot be an actual
338         argument to is_contiguous().
340 2019-09-29  Steven G. Kargl  <kargl@gcc.gnu.org>
342         PR fortran/91714
343         * decl.c (gfc_match_decl_type_spec):  Issue errors for a few
344         mangled types.
346 2019-09-29  Paul Thomas  <pault@gcc.gnu.org>
348         PR fortran/91726
349         * resolve.c (gfc_expr_to_initialize): Bail out with a copy of
350         the original expression if the array ref is a scalar and the
351         array_spec has corank.
352         * trans-array.c (gfc_conv_array_ref): Such expressions are OK
353         even if the array ref codimen is zero.
354         * trans-expr.c (gfc_get_class_from_expr): New function taken
355         from gfc_get_vptr_from_expr.
356         (gfc_get_vptr_from_expr): Call new function.
357         * trans-stmt.c (trans_associate_var): If one of these is a
358         target expression, extract the class expression from the target
359         and copy its fields to a new target variable.
360         * trans.h : Add prototype for gfc_get_class_from_expr.
362 2019-09-28  Jerry DeLisle  <jvdelisle@gcc.ngu.org>
364         PR fortran/91802
365         * decl.c (attr_decl1): Return MATCH_ERROR without free to avoid
366         bad expression type in free_expr0() ICE in rank+corank check.
368 2019-09-28  Steven G. Kargl  <kargl@gcc.ngu.org>
370         PR fortran/91802
371         * decl.c (attr_decl1): Check if rank+corank > 15.
373 2019-09-28  Steven G. Kargl  <kargl@gcc.gnu.org>
375         PR fortran/91864
376         * gcc/fortran/io.c (match_io_element): An inquiry parameter cannot be
377         read into.
378         * gcc/fortran/match.c (gfc_match_allocate): An inquiry parameter
379         can be neither an allocate-object nor stat variable.
380         (gfc_match_deallocate): An inquiry parameter cannot be deallocated.
382 2019-09-26  Alessandro Fanfarillo  <afanfa@gcc.gnu.org>
384         * trans-array.c (structure_alloc_comps):
385         Add new enum item for BCAST_ALLOC_COMP.
386         New argument for structure_alloc_comp, and new case to handle
387         recursive components in derived types.
388         * trans-array.c (gfc_bcast_alloc_comp): New function
389         used to handleco_broadcast for allocatable components
390         of derived types.
391         * trans-array.h: Add gfc_bcast_alloc_comp
392         * trans-intrinsics.c (conv_co_collective): Add check for
393         derived type variable and invocation of co_bcast_alloc_comp.
394         * trans.h: New data structure gfc_co_subroutines_args.
396 2019-09-25  David Malcolm  <dmalcolm@redhat.com>
398         PR fortran/91426
399         * error.c (curr_diagnostic): New static variable.
400         (gfc_report_diagnostic): New static function.
401         (gfc_warning): Replace call to diagnostic_report_diagnostic with
402         call to gfc_report_diagnostic.
403         (gfc_format_decoder): Colorize the text of %L and %C to match the
404         colorization used by diagnostic_show_locus.
405         (gfc_warning_now_at): Replace call to diagnostic_report_diagnostic with
406         call to gfc_report_diagnostic.
407         (gfc_warning_now): Likewise.
408         (gfc_warning_internal): Likewise.
409         (gfc_error_now): Likewise.
410         (gfc_fatal_error): Likewise.
411         (gfc_error_opt): Likewise.
412         (gfc_internal_error): Likewise.
414 2019-09-23  Paul Thomas  <pault@gcc.gnu.org>
416         PR fortran/91729
417         * match.c (gfc_match_select_rank): Initialise 'as' to NULL.
418         Check for a symtree in the selector expression before trying to
419         assign a value to 'as'. Revert to gfc_error and go to cleanup
420         after setting a MATCH_ERROR.
422 2019-09-20  Tobias Burnus  <tobias@codesourcery.com>
424         PR fortran/78260
425         * openmp.c (gfc_resolve_oacc_declare): Reject all
426         non variables but accept function result variables.
427         * trans-openmp.c (gfc_trans_omp_clauses): Handle
428         function-result variables for remaing cases.
430 2019-09-17  Paul Thomas  <pault@gcc.gnu.org>
432         PR fortran/91588
433         * expr.c (check_inquiry): Remove extended component refs by
434         using symbol pointers. If a function argument is an associate
435         variable with a constant target, copy the target expression in
436         place of the argument expression. Check that the charlen is not
437         NULL before using the string length.
438         (gfc_check_assign): Remove extraneous space.
440 2019-09-15  Steven G. Kargl  <kargl@gcc.gnu.org>
442         PR fortran/91727
443         * resolve.c (conformable_arrays):  If array-spec is NULL, then
444         allocate-object is a scalar.  a conformability check only occurs
445         for an array source-expr.
447 2019-09-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
449         PR fortran/91550
450         * frontend-passes.c (do_subscript): If step equals
451         zero, a previuos error has been reported; do nothing
452         in this case.
453         * resolve.c (gfc_resolve_iterator): Move error checking
454         after type conversion.
456 2019-09-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
458         PR fortran/91557
459         PR fortran/91556
460         * frontend-passes.c (check_externals_procedure): Reformat argument
461         list. Use gfc_compare_actual_formal instead of gfc_procedure_use.
462         * gfortran.h (gfc_symbol): Add flag error.
463         * interface.c (gfc_compare_interfaces): Reformat.
464         (argument_rank_mismatch): Add where_formal argument. If it is
465         present, note that the error is between different calls.
466         (compare_parameter): Change warnings that previously dependended
467         on -Wargument-mismatch to unconditional.  Issue an error / warning
468         on type mismatch only once.  Pass where_formal to
469         argument_rank_mismatch for artificial variables.
470         (compare_actual_formal): Change warnings that previously
471         dependeded on -Wargument-mismatch to unconditional.
472         (gfc_check_typebound_override): Likewise.
473         (gfc_get_formal_from_actual_arglist): Set declared_at for
474         artificial symbol.
475         * invoke.texi: Extend description of -fallow-argument-mismatch.
476         Delete -Wargument-mismatch.
477         * lang.opt: Change -Wargument-mismatch to do-nothing option.
478         * resolve.c (resolve_structure_cons): Change warnings that
479         previously depended on -Wargument-mismatch to unconditional.
480         * trans-decl.c (generate_local_decl): Do not warn if the symbol is
481         artificial.
483 2019-09-13  Steven G. Kargl  <kargl@gcc.gnu.org>
485         PR fortran/91566
486         * simplify.c (gfc_simplify_merge): Need to simplify expression
487         after insertation of parenthesis.
489 2019-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
491         PR fortran/91716
492         * trans-array.c (gfc_conv_array_initializer): Always assign the
493         array type of the field to the string constant.
495 2019-09-13  Paul Thomas  <pault@gcc.gnu.org>
497         PR fortran/91717
498         * dependency.c (gfc_dep_resolver): Flag identical components
499         and exit with return value 1 if set and no array refs.
501 2019-09-11  Steven G. Kargl  <kargl@gcc.gnu.org>
503         PR fortran/91553
504         * simplify.c (gfc_convert_constant):  During conversion check if the
505         constant is enclosed in parenthesis, and simplify expression.
507 2019-09-11  Steven G. Kargl  <kargl@gcc.gnu.org>
509         PR fortran/91642
510         * io.c (gfc_match_inquire): null() cannot be in an iolength inquire
511         list.
513 2019-09-05  Harald Anlauf  <anlauf@gmx.de>
515         PR fortran/91496
516         * parse.c (parse_executable): Improve error messages for
517         improperly placed pragmas not preceeding a loop.
519 2019-09-05  Steven G. Kargl  <kargl@gcc.gnu.org>
521         PR fortran/91660
522         * decl.c (gfc_match_decl_type_spec): Improve and restore error
523         message for malformed types-spec.
525 2019-09-04  Steven G. Kargl  <kargl@gcvc.gnu.org>
527         PR fortran/91650
528         * io.c (match_io_element):  An output IO list item cannot be a BOZ.
530 2019-09-03  Steven G. Kargl  <kargl@gcc.gnu.org>
532         * gfortran.texi: Update documentation to catch up with BOZ changes.
533         * invoke.texi: Fix English from previous BOZ changes commit.
535 2019-09-02  Paul Thomas  <pault@gcc.gnu.org>
537         PR fortran/91589
538         * primary.c (gfc_match_varspec): Return MATCH_NO on an apparent
539         component ref, when the primary type is intrinsic.
541 2019-09-02  Steven G. Kargl  <kargl@gc.gnu.org>
543         PR fortran/91552
544         * array.c (walk_array_constructor): New function.
545         (gfc_match_array_constructor): Use it.
547 2019-09-01  Paul Thomas  <pault@gcc.gnu.org>
549         * array.c (spec_dimen_size): Check for the presence of
550         expressions for the bounds.
551         * decl.c (gfc_match_end): Add case COMP_SELECT_RANK.
552         * dump-parse-tree.c(show_symbol): Show the arrayspec of class
553         entities.
554         (show_code_node): Show the code for SELECT_RANK.
555         * expr.c (gfc_check_vardef_context): Omit the context of
556         variable definition for select rank associate names since the
557         ASSUMED RANK throws.
558         * gfortran.h : Add ST_SELECT_RANK and ST_RANK to enum
559         gfc_statement. Add select_rank_temporary to symbol attribute
560         structure. Add EXEC_SELECT_RANK to enum gfc_exec_op.
561         * match.c (match_exit_cycle): Add COMP_SELECT_RANK.
562         (copy_ts_from_selector_to_associate): Add as special case for
563         assumed rank class variables.
564         (select_intrinsic_set_tmp): Clean up the code by using symbols
565         for references to the temporary and the selector.
566         (select_type_set_tmp): Ditto.
567         (select_rank_set_tmp): New function.
568         (gfc_match_select_rank): New function.
569         (gfc_match_rank_is): New function.
570         * match.h : Add prototypes for gfc_match_select_rank and
571         gfc_match_rank_is.
572         * parse.c (decode_statement): Attempt to match select_rank and
573         rank statements.
574         (next_statement, gfc_ascii_statement): Add ST_SELECT_RANK.
575         (parse_select_rank_block): New function.
576         (parse_executable): Parse select rank block for ST_SELECT_RANK.
577         * parse.h : Add COMP_SELECT_RANK to enum gfc_compile_state.
578         * resolve.c (resolve_variable): Exclude select_rank_temporaries
579         from the check on use of ASSUMED RANK.
580         (gfc_resolve_expr): Make sure that unlimited polymorphic select
581         rank temporaries expressions are not resolved again after being
582         successfully resolved.
583         (resolve_assoc_var): Do not do the rank check for select rank
584         temporaries.
585         (resolve_select_rank): New function.
586         (gfc_resolve_blocks): Deal with case EXEC_SELECT_RANK.
587         (resolve_symbol): Exclude select rank temporaries for check on
588         use of ASSUMED RANK.
589         * st.c (gfc_free_statement): Include EXEC_SELECT_RANK.
590         * trans-array.c (gfc_conv_array_ref): Select rank temporaries
591         may have dimen == 0.
592         (gfc_conv_expr_descriptor): Zero the offset of select rank
593         temporaries.
594         * trans-stmt.c (copy_descriptor): New function.
595         (trans_associate_var): Add code to associate select rank temps.
596         (gfc_trans_select_rank_cases): New function.
597         (gfc_trans_select_rank): New function.
598         * trans-stmt.h : Add prototype for gfc_trans_select_rank.
599         trans.c (trans_code): Add select rank case.
601 2019-08-30  Steven G. Kargl  <kargl@gcc.gnu.org>
603         PR fortran/91587
604         * io.c (match_filepos): MATCH_ERROR should branch to a syntax error.
606 2019-08-28  Steven G. Kargl  <kargl@gcc.gnu.org>
608         PR fortran/91551
609         * intrinsic.c (sort_actual): ALLOCATED has one argument. Check for
610         no argument case.
612 2019-08-28  Steven G. Kargl  <kargl@gcc.gnu.org>
614         PR fortran/91565
615         * simplify.c (gfc_simplify_reshape): Add additional checks of the
616         ORDER dummy argument.
618 2019-08-28  Steven G. Kargl  <kargl@gcc.gnu.org>
620         PR fortran/91564
621         * check.c (gfc_check_kill_sub): Additional checks on status dummy
622         argument.
624 2019-08-28  Mark Eggleston  <mark.eggleston@codethink.com>
626         * intrinsics.text: Corrected stated standard for intrinsics
627         and specific intrinsics where necessary.  Also in C_SIZEOF the
628         printed value is T not .TRUE.. In IPARITY example wrap BOZ
629         constants in calls to INT.
631 2019-08-27  Harald Anlauf  <anlauf@gmx.de>
633         PR fortran/91496
634         * gfortran.h: Extend struct gfc_iterator for loop annotations.
635         * array.c (gfc_copy_iterator): Copy loop annotations by IVDEP,
636         VECTOR, and NOVECTOR pragmas.
637         * decl.c (gfc_match_gcc_ivdep, gfc_match_gcc_vector)
638         (gfc_match_gcc_novector): New matcher functions handling IVDEP,
639         VECTOR, and NOVECTOR pragmas.
640         * match.h: Declare prototypes of matcher functions handling IVDEP,
641         VECTOR, and NOVECTOR pragmas.
642         * parse.c (decode_gcc_attribute, parse_do_block)
643         (parse_executable): Decode IVDEP, VECTOR, and NOVECTOR pragmas;
644         emit warning for unrecognized pragmas instead of error.
645         * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do): Add code to
646         emit annotations for IVDEP, VECTOR, and NOVECTOR pragmas.
647         * gfortran.texi: Document IVDEP, VECTOR, and NOVECTOR pragmas.
649 2019-08-27  Mark Eggleston  <mark.eggleston@codethink.com>
651         * invoke.texi: Ensure that the option lists fit within the
652         margins of a PDF page.  Re-worded description of
653         '-ffrontend-loop-interchange' so that it fits with the margins
654         of a PDF page.  Add '-fdec-include', '-fdec-blank-format-item'
655         and '-fdec-format-defaults' to list of options that are enabled
656         by '-fdec'.
658 2019-08-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
660         PR fortran/91390
661         PR fortran/91473
662         * frontend-passes.c (gfc_check_externals): Make
663         gfc_errors_to_warnings conditional on -fallow-argument-mismatch.
664         * invoke.texi: Document -fallow-argument-mismatch.
665         * lang.opt: Add -fallow-argument-mismatch.
667 2019-08-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
669         PR fortran/91390
670         PR fortran/91519
671         * frontend-passes.c (check_externals_procedure): New
672         function. If a procedure is not in the translation unit, create
673         an "interface" for it, including its formal arguments.
674         (check_externals_code): Use check_externals_procedure for common
675         code with check_externals_expr.
676         (check_externals_expr): Vice versa.
677         * gfortran.h (gfc_get_formal_from_actual-arglist): New prototype.
678         (gfc_compare_actual_formal): New prototype.
679         * interface.c (compare_actual_formal): Rename to
680         (gfc_compare_actual_formal): New function, make global.
681         (gfc_get_formal_from_actual_arglist): Make global, and move here from
682         * trans-types.c (get_formal_from_actual_arglist): Remove here.
683         (gfc_get_function_type): Use gfc_get_formal_from_actual_arglist.
685 2019-08-23  Mark Eggleston  <mark.eggleston@codethink.com>
687         * intrinsics.text: References in 'See also:' are now on
688         separate lines to ensure that they always fit in the margins of
689         a PDF page.  The column widths of tables have been adjusted
690         where necessary to prevent overlapping text.  All program
691         examples now fit within the margins of a PDF page.
693 2019-08-23  Jakub Jelinek  <jakub@redhat.com>
695         PR middle-end/91283
696         * options.c (gfc_post_options): Set flag_excess_precision instead of
697         flag_excess_precision_cmdline.  Remove comment.
699 2019-08-23  Mark Eggleston  <mark.eggleston@codethink.com>
701         * intrinsics.text: Removed empty sections. The order of
702         sections for each intrinsic is now consistent throughout.
703         Stray words removed. Text in the wrong section moved.
704         Missing standard statement inserted.
706 2019-08-23  Mark Eggleston  <mark.eggleston@codethink.com>
708         * intrinsics.text: Correct the return types for ZABS and CDABS.
710 2019-08-22  Steven G. Kargl  <kargl@gcc.gnu.org>
712         * intrinsic.c (add_subroutines): ERRMSG is INTENT(INOUT) in
713         co_broadcast, co_max, co_min, co_reduce, and  co_sum.
715 2019-08-20  Mark Eggleston  <mark.eggleston@codethink.com>
717         PR fortran/89236
718         * intrinsic.texi: Add GNU extension notes to DIM, MOD, MODULO.
720 2019-08-19  Mark Eggleston  <mark.eggleston@codethink.com>
722         * gfortran.texi: Delete paragraph about integer overload errors
723         when initialising integer variables with BOZ constants as these
724         no longer occur.
726 2019-08-18  Steven G. Kargl  <kargl@gcc.gnu.org>
728         PR fortran/91485
729         module.c (gfc_match_use): User defined operator cannot conflict with
730         a rename symbol.
732 2019-08-17  Steven G. Kargl  <kargl@gcc.gnu.org>
734         PR fortran/82992
735         * module.c (gfc_match_use):  When renaming a module entity, search
736         current namespace for conflicting symbol.
738 2019-08-17  Steven G. Kargl  <kargl@gcc.gnu.org>
740         PR fortran/78739
741         * match.c (gfc_match_st_function):  When matching a statement function,
742         need to check if the statement function name shadows the function
743         name.
745 2019-08-17  Steven G. Kargl  <kargl@gcc.gnu.org>
747         PR fortran/78719
748         * decl.c (get_proc_name): Check for a CLASS entity when trying to
749         add attributes to an entity that already has an explicit interface.
751 2019-08-17  Steven G. Kargl  <kargl@gcc.gnu.org>
753         PR fortran/91471
754         * primary.c (gfc_variable_attr): Remove a gfc_internal_error(),
755         which cannot be reached by conforming Fortran code, but seems to
756         be reachable from nonconforming Fortran code.  Treat the AR_UNKNOWN
757         case as a no-op.
759 2019-08-17  Janne Blomqvist  <jb@gcc.gnu.org>
761         PR fortran/68401
762         * trans-decl.c (gfc_build_builtin_function_decls): Replace
763         os_error with os_error_at decl.
764         * trans.c (trans_runtime_error_vararg): Modify so the error
765         function decl is passed directly.
766         (gfc_trans_runtime_error): Pass correct error function decl.
767         (gfc_trans_runtime_check): Likewise.
768         (trans_os_error_at): New function.
769         (gfc_call_malloc): Use trans_os_error_at.
770         (gfc_allocate_using_malloc): Likewise.
771         (gfc_call_realloc): Likewise.
772         * trans.h (gfor_fndecl_os_error): Replace with gfor_fndecl_os_error_at.
774 2019-08-16  Jeff Law <law@redhat.com>
775             Mark Eggleston <mark.eggleston@codethink.com>
777         * gfortran.h: Add gfc_check_conflict declaration.
778         * symbol.c (check_conflict): Rename cfg_check_conflict and remove
779         static.
780         * symbol.c (cfg_check_conflict): Remove automatic in equivalence
781         conflict check.
782         * symbol.c (save_symbol): Add check for in equivalence to stop the
783         the save attribute being added.
784         * trans-common.c (build_equiv_decl): Add is_auto parameter and
785         add !is_auto to condition where TREE_STATIC (decl) is set.
786         * trans-common.c (build_equiv_decl): Add local variable is_auto,
787         set it true if an atomatic attribute is encountered in the variable
788         list.  Call build_equiv_decl with is_auto as an additional parameter.
789         flag_dec_format_defaults is enabled.
790         * trans-common.c (accumulate_equivalence_attributes) : New subroutine.
791         * trans-common.c (find_equivalence) : New local variable dummy_symbol,
792         accumulated equivalence attributes from each symbol then check for
793         conflicts.
795 2019-08-16  Richard Biener  <rguenther@suse.de>
797         * trans-intrinsic.c (gfc_conv_intrinsic_findloc): Initialize
798         forward_branch to avoid bogus uninitialized warning.
800 2019-08-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
802         PR fortran/91443
803         * frontend-passes.c (check_externals_expr): New function.
804         (check_externals_code): New function.
805         (gfc_check_externals): New function.
806         * gfortran.h (debug): Add prototypes for gfc_symbol * and
807         gfc_expr *.
808         (gfc_check_externals): Add prototype.
809         * interface.c (compare_actual_formal): Do not complain about
810         alternate returns if the formal argument is optional.
811         (gfc_procedure_use): Handle cases when an error has been issued
812         previously.  Break long line.
813         * parse.c (gfc_parse_file): Call gfc_check_externals for all
814         external procedures.
815         * resolve.c (resolve_global_procedure): Remove checking of
816         argument list.
818 2019-08-13  Steven G. Kargl  <kargl@gcc.gnu.org>
820         PR fortran/87991
821         * resolve.c (check_data_variable): data-stmt-object with pointer
822         attribute requires a data-stmt-value with the target attribute.
824 2019-08-13  Steven G. Kargl  <kargl@gcc.gnu.org>
826         PR fortran/88072
827         * misc.c (gfc_typename): Do not point to something that ought not to
828         be pointed at.
830 2013-08-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
832         PR fortran/90563
833         * frontend-passes.c (insert_index): Suppress errors while
834         simplifying the resulting expression.
836 2019-08-13  Steven G. Kargl  <kargl@gcc.gnu.org>
838         PR fortran/89647
839         resolve.c (resolve_typebound_procedure): Allow host associated
840         procedure to be a binding target.  While here, wrap long line.
842 2019-08-13  Steven G. Kargl  <kargl@gcc.gnu.org>
844         PR fortran/87993
845         * expr.c (gfc_simplify_expr): Simplifcation of an array with a kind
846         type inquiry suffix yields a constant expression.
848 2019-08-13  Janne Blomqvist  <jb@gcc.gnu.org>
850         PR fortran/91414
851         * check.c (gfc_check_random_seed): Reduce seed_size.
852         * intrinsic.texi (RANDOM_NUMBER): Update to match new PRNG.
854 2019-08-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
856         PR fortran/91424
857         * frontend-passes.c (do_subscript): Do not warn for an
858         expression a second time.  Do not warn about a zero-trip loop.
859         (doloop_warn): Also look at contained namespaces.
861 2019-08-11  Janne Blomqvist  <jb@gcc.gnu.org>
863         PR fortran/91413
864         * invoke.texi (-fmax-stack-var-size): Document increased default.
865         * options.c (gfc_post_options): Increase default stack var size to
866         65536 bytes.
867         * trans-decl.c (gfc_finish_var_decl): Generate warning when local
868         array moved to static storage.
870 2019-08-10  Steven G. Kargl  <kargl@gcc.gnu.org>
872         * decl.c (match_old_style_init): Use a clearer error message.
873         * expr.c (gfc_check_assign): Update BOZ checking to provide a stricter
874         adherence to the Fortran standard.  Use gfc_invalid_boz () to
875         relax errors into warnings.
876         * gfortran.h (gfc_isym_id): Add new ids GFC_ISYM_DFLOAT,
877         GFC_ISYM_FLOAT, GFC_ISYM_REALPART, and GFC_ISYM_SNGL
878         * intrinsic.c (add_functions): Use new ids to split REAL generic into
879         REAL, FLOAT, DFLOAT, SNGL, and REALPART generics.
880         (gfc_intrinsic_func_interface): Allow new intrinsics in an
881         initialization expression
882         * resolve.c (resolve_operator): Deal with BOZ as operands.
883         Use gfc_invalid_boz to allow for errors or warnings via the
884         -fallow-invalid-boz option.  A BOZ cannot be an operand to an
885         unary operator.  Both operands of a binary operator cannot be BOZ.
886         For binary operators, convert a BOZ operand into the type and
887         kind of the other operand for REAL or INTEGER operand.
888         * trans-intrinsic.c: Use new ids to cause conversions to happen.
890 2019-08-06  Steven G. Kargl  <kargl@gcc.gnu.org>
892         PR fortran/91359
893         * trans-decl.c (gfc_generate_return): Ensure something is returned
894         from a function.
896 2019-08-06  Steven G. Kargl  <kargl@gcc.gnu.org>
898         PR fortran/42546
899         * check.c(gfc_check_allocated): Add comment pointing to ...
900         * intrinsic.c(sort_actual): ... the checking done here.
902 2019-08-05  Steven g. Kargl  <kargl@gcc.gnu.org>
904         PR fortran/91372
905         * decl.c (gfc_match_data): Allow an implied do-loop to nestle against
906         DATA.
908 2019-08-04  Steven G. Kargl  <kargl@gcc.gnu.org>
910         PR fortran/88227
911         * check.c (oct2bin): New function.  Convert octal string to binary.
912         (hex2bin): New function.  Convert hexidecimal string to binary.
913         (bin2real): New function.  Convert binary string to REAL.  Use
914         oct2bin and hex2bin.
915         (gfc_boz2real): Use fallback conversion bin2real.
917 2019-08-02  Steven G. Kargl  <kargl@gcc.gnu.org>
919         PR fortran/90985
920         * decl.c (gfc_match_data): In free-form code, DATA be followed by
921         whitespace.
923 2019-08-02  Steven G. Kargl  <kargl@gcc.gnu.org>
925         PR fortran/90986
926         * match.c (gfc_match_equivalence): Check that EQUIVALENCE is followed
927         by '('.
929 2019-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>
931         PR fortran/91296
932         * interface.c (compare_actual_expr): When checking for aliasing, add
933         a case to handle REF_INQUIRY (e.g., foo(x%re, x%im) do not alias).
935 2019-07-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
937         PR fortran/90813
938         * dump-parse-tree.c (show_global_symbol): New function.
939         (gfc_dump_global_symbols): New function.
940         * gfortran.h (gfc_traverse_gsymbol): Add prototype.
941         (gfc_dump_global_symbols): Likewise.
942         * invoke.texi: Document -fdump-fortran-global.
943         * lang.opt: Add -fdump-fortran-global.
944         * parse.c (gfc_parse_file): Handle flag_dump_fortran_global.
945         * symbol.c (gfc_traverse_gsymbol): New function.
946         * trans-decl.c (sym_identifier): New function.
947         (mangled_identifier): New function, doing most of the work
948         of gfc_sym_mangled_identifier.
949         (gfc_sym_mangled_identifier): Use mangled_identifier.  Add mangled
950         identifier to global symbol table.
951         (get_proc_pointer_decl): Use backend decl from global identifier
952         if present.
954 2019-07-25  Thomas Koenig  <tkoenig@gcc.gnu.org>
956         PR fortran/65819
957         * dependency.h (gfc_dep_resovler): Add optional argument identical.
958         * dependency.c (gfc_check_dependency): Do not alway return 1 if
959         the symbol is the same. Pass on identical to gfc_dep_resolver.
960         (gfc_check_element_vs_element): Whitespace fix.
961         (gfc_dep_resolver): Adjust comment for function.  If identical is
962         true, return 1 if any overlap has been found.
964 2019-07-23  Steven G. Kargl  <kargl@gcc.gnu.org>
966         PR fortran/54072
967         * check.c (gfc_invalid_boz): Fix comment.
968         (illegal_boz_arg): New function.
969         (gfc_check_transfer): Use to arguments.
970         (gfc_check_storage_size): Ditto.
971         (gfc_check_complex): Remove leftover comment from BOZ patch.
972         * primary.c (match_boz_constant): Remove leftover comment.
974 2019-07-23  Steven G. Kargl  <kargl@gcc.gnu.org>
976         * arith.c (gfc_convert_integer, gfc_convert_real, gfc_convert_complex):
977         Move to ...
978         * primary.c (convert_integer, convert_real, convert_complex): ... here.
979         Rename and make static functions.
980         (match_integer_constant): Use convert_integer
981         (match_real_constant): Use convert_real.
982         (match_complex_constant: Use convert_complex.
983         * arith.h (gfc_convert_integer, gfc_convert_real, gfc_convert_complex):
984         Remove prototypes.
985         * array.c (match_array_cons_element): A BOZ cannot be a data
986         statement value.  Jump to a common exit point.
987         * check.c (gfc_invalid_boz): New function.  Emit error or warning
988         for a BOZ in an invalid context.
989         (boz_args_check): Move to top of file to prevent need of forward
990         declaration.
991         (is_boz_constant): New function.  Check that BOZ expr is constant.
992         (gfc_boz2real): New function. In-place conversion of BOZ literal
993         constant to REAL in accordance to F2018.
994         (gfc_boz2int): New function. In-place conversion of BOZ literal
995         constant to INTEGER in accordance to F2018.
996         (gfc_check_achar, gfc_check_char, gfc_check_float): Use gfc_invalid_boz.  Convert BOZ
997         as needed.
998         (gfc_check_bge_bgt_ble_blt): Enforce F2018 requirements on BGE,
999         BGT, BLE, and BLT intrinsic functions.
1000         (gfc_check_cmplx): Re-organize to check kind, if present, first.
1001         Convert BOZ real and/or imaginary parts as needed in accordance to
1002         F2018.
1003         (gfc_check_complex): Use gfc_invalid_boz.  Convert BOZ as needed.
1004         (gfc_check_dcmplx, gfc_check_dble ): Convert BOZ as needed.
1005         (gfc_check_dshift): Make dshift[lr] conform to F2018 standard.
1006         gfc_check_float (gfc_expr *a)
1007         (gfc_check_iand_ieor_ior): Make IAND, IEOR, and IOR conform to
1008         F2018 standard.
1009         (gfc_check_int): Conform to F2018 standard.
1010         (gfc_check_intconv): Deprecate SHORT and LONG aliases for INT2 and
1011         INT.  Simply return for a BOZ argument. See gfc_simplify_intconv.
1012         (gfc_check_merge_bits): Make MERGE_BITS conform to Fortran 2018
1013         standard.
1014         (gfc_check_real): Remove incorrect comment. Check kind, if present,
1015         first.  Simply return for a BOZ argument. See gfc_simplify_real.
1016         (gfc_check_and): Re-do error handling for BOZ arguments.  Remove
1017         special casing ts.type != BT_INTEGER or BT_LOGICAL.
1018         * decl.c (match_old_style_init): Check for BOZ in old-style
1019         initialization.  Issue error or warning depending on
1020         -fallow-invalid-boz option.  Issue error if variable is not an
1021         INTEGER or REAL and the value is BOZ.
1022         * expr.c (gfc_copy_expr): Copy a BT_BOZ gfc_expr.
1023         (gfc_check_assign): Re-do error handling for a BOZ in an assignment
1024         statement.  Do in-place conversion of RHS based on LHS type of
1025         INTEGER or REAL.
1026         * gfortran.h (gfc_expr): Add a boz component.  Remove is_boz component.
1027         (gfc_boz2int, gfc_boz2real, gfc_invalid_boz): New prototypes.
1028         * interface.c (gfc_extend_assign): Guard against replacing an
1029         intrinsic involving a BOZ literal constant on RHS.
1030         * invoke.texi: Doument -fallow-invalid-boz.
1031         * lang.opt: New option. -fallow-invalid-boz.
1032         * libgfortran.h (bt): Elevate BOZ to a basic type.
1033         * misc.c (gfc_basic_typename, gfc_typename): Translate BT_BOZ to BOZ.
1034         * primary.c (convert_integer, convert_real, convert_complex): to here.
1035         Rename and make static functions.
1036         * primary.c(match_boz_constant): Rewrite parsing of a BOZ. Re-do
1037         error handling.  Deprecate 'X' for hexidecimal and postfix notation.
1038         Use -fallow-invalid-boz and gfc_invalid_boz to accept deprecated code.
1039         * resolve.c (resolve_ordinary_assign): Rework a RHS that is a
1040         BOZ literal constant.  Use gfc_invalid_boz to allow previous
1041         nonstandard behavior.  Remove range checking of BOZ conversion.
1042         * simplify.c (convert_boz): Remove function.
1043         (simplify_cmplx): Remove conversion of BOZ constants, because
1044         conversion is done in gfc_check_cmplx.
1045         (gfc_simplify_float): Remove conversion of BOZ constant, because
1046         conversion is done in gfc_check_float.
1047         (simplify_intconv): Use gfc_boz2int to convert BOZ to INTEGER.
1048         Remove range checking for BOZ conversion.
1049         (gfc_simplify_real): Use k, if present, to determine kind.  Convert
1050         BOZ to REAL.  Remove range checking for BOZ conversion.
1051         target-memory.c (gfc_convert_boz): Rewrite to deal with convert of
1052         a BOZ to a REAL value.
1054 2019-07-21  Thomas König  <tkoenig@gcc.gnu.org>
1056         PR libfortran/91030
1057         * gfortran.texi (GFORTRAN_FORMATTED_BUFFER_SIZE): Document
1058         (GFORTRAN_UNFORMATTED_BUFFER_SIZE): Likewise.
1060 2019-07-16  Harald Anlauf  <anlauf@gmx.de>
1062         PR fortran/90903
1063         * libgfortran.h: Add mask for -fcheck=bits option.
1064         * options.c (gfc_handle_runtime_check_option): Add option "bits"
1065         to run-time checks selectable via -fcheck.
1066         * trans-intrinsic.c (gfc_conv_intrinsic_btest)
1067         (gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits)
1068         (gfc_conv_intrinsic_shift, gfc_conv_intrinsic_ishft)
1069         (gfc_conv_intrinsic_ishftc): Implement run-time checks for the
1070         POS, LEN, SHIFT, and SIZE arguments.
1071         * gfortran.texi: Document run-time checks for bit manipulation
1072         intrinsics.
1073         * invoke.texi: Document new -fcheck=bits option.
1075 2019-07-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1077         PR fortran/87233
1078         * expr.c (check_restricted): Relax constraint C1279 which was
1079         removed from F2008 and above.
1081 2019-07-07  Paul Thomas  <pault@gcc.gnu.org>
1083         PR fortran/91077
1084         * trans-array.c (gfc_conv_scalarized_array_ref) Delete code
1085         that gave symbol backend decl for subref arrays and deferred
1086         length variables.
1088 2019-07-05  Andrew Stubbs  <ams@codesourcery.com>
1090         * openmp.c (resolve_omp_clauses): Add custom error messages for
1091         parameters in map clauses.
1093 2019-07-03  Martin Liska  <mliska@suse.cz>
1095         * check.c (gfc_check_c_funloc): Remove
1096         dead assignemts.
1097         * decl.c (variable_decl): Likewise.
1098         * resolve.c (resolve_typebound_function): Likewise.
1099         * simplify.c (gfc_simplify_matmul): Likewise.
1100         (gfc_simplify_scan): Likewise.
1101         * trans-array.c (gfc_could_be_alias): Likewise.
1102         * trans-common.c (add_equivalences): Likewise.
1103         * trans-expr.c (trans_class_vptr_len_assignment): Likewise.
1104         (gfc_trans_array_constructor_copy): Likewise.
1105         (gfc_trans_assignment_1): Likewise.
1106         * trans-intrinsic.c (conv_intrinsic_atomic_op): Likewise.
1107         * trans-openmp.c (gfc_omp_finish_clause): Likewise.
1108         * trans-types.c (gfc_get_array_descriptor_base): Likewise.
1109         * trans.c (gfc_build_final_call): Likewise.
1111 2019-06-27  Steven G. Kargl  <kargl@gcc.gnu.org>
1113         PR fortran/90987
1114         * gfortran.dg/common_1.f: new test.
1115         * gfortran.dg/common_26.f90: Ditto.
1117 2019-06-26  Steven G. Kargl  <kargl@gcc.gnu.org>
1119         PR Fortran/90988
1120         ChangeLog forgotten with revision 272667
1121         * decl.c (access_attr_decl): Use temporary variable to reduce
1122         unreadability of code.  Normalize jumping to return.
1123         (gfc_match_protected): Fix parsing error.  Add comments to
1124         explain code.  Remove dead code.
1125         (gfc_match_private): Use temporary variable to reduce unreadability
1126         of code. Fix parsing error.  Move code to test for blank PRIVATE.
1127         Remove dead code.
1128         (gfc_match_public): Move code to test for blank PUBLIC.  Fix
1129         parsing error.  Remove dead code.
1131 2019-06-24  Jan Hubicka  <jh@suse.cz>
1133         * trans-expr.c (gfc_conv_substring): Check that
1134         type is array or integer prior checking string flag.
1135         (gfc_conv_string_parameter): Likewise.
1136         * trans-openmp.c (gfc_omp_scalar_p): Likewise.
1137         * trans.c (gfc_build_array_ref): Likewise.
1139 2019-06-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1141         PR fortran/89782
1142         * io.c (gfc_resolve_dt): Check that internal units are not
1143         character PARAMETER.
1145 2019-06-21  Steven G. Kargl  <kargl@gcc.gnu.org>
1147         PR fortran/67884
1148         * resolve.c (deferred_requirements) : Check only the result variable.
1149         (resolve_fl_procedure): Check deferred requirements on functions.
1151 2019-06-21  Steven G. Kargl  <kargl@gcc.gnu.org>
1153         PR fortran/51991
1154         * decl.c (gfc_match_save): If SAVE was not seen, return MATCH_NO
1155         instead issuing an error message and returning MATCH_ERROR.
1157 2019-06-20  Steven G. Kargl  <kargl@gcc.gnu.org>
1159         PR fortran/77632
1160         * /decl.c (variable_decl): Mark a variable that is a target in pointer
1161         initialization when in PROGRAM, MODULE, or SUBMODULE scope with an
1162         implicit save.
1164 2019-06-20  Steven G. Kargl  <kargl@gcc.gnu.org>
1166         PR fortran/86587
1167         * symbol.c (verify_bind_c_derived_type): Remove erroneous error
1168         checking for BIND(C) and PRIVATE attributes.
1170 2019-06-20  Thomas Koenig  <tkoenig@gcc.gnu.org>
1172         PR fortran/90937
1173         * trans-types.c (get_formal_from_actual_arglist): Get symbol from
1174         current namespace so it will be freed later.  If symbol is of type
1175         character, get an empty character length.
1177 2019-06-19  Steven G. Kargl  <kargl@gcc.gnu.org>
1179         PR fortran/69499
1180         * match.c (gfc_match_select_type): SELECT TYPE is an executable
1181         statement, and cannot appear in MODULE or SUBMODULE scope.
1183 2019-06-19  Steven G. Kargl  <kargl@gcc.gnu.org>
1185         PR fortran/69398
1186         * decl.c (attr_decl): Check for duplicate DIMENSION attribute for a
1187         CLASS entity.
1189 2019-06-19  Steven G. Kargl  <kargl@gcc.gnu.org>
1191         PR fortran/87907
1192         * resolve.c (resolve_contained_fntype): Do not dereference a NULL
1193         pointer.
1195 2019-06-19  Jim MacArthur  <jim.macarthur@codethink.co.uk>
1196             Mark Eggleston  <mark.eggleston@codethink.com>
1198         PR fortran/89103
1199         * gfortran.texi: Add -fdec-blank-format-item
1200         * invoke.texi: Add option to list of options.
1201         * invoke.texi: Add to section on Commas in FORMAT specifications.
1202         * io.c (check_format): At FMT_RPAREN goto finished if
1203         -fdec-blank-format-item otherwise set error string.
1204         * lang.opt: Add new option.
1205         * options.c (set_dec_flags): Add SET_BITFLAG for
1206         flag_dec_format_defaults.
1208 2019-06-18  Julian Brown  <julian@codesourcery.com>
1210         PR fortran/90921
1211         * trans-decl.c (finish_oacc_declare): Reset module_oacc_clauses
1212         before scanning each namespace.
1214 2019-06-18  Thomas Schwinge  <thomas@codesourcery.com>
1216         PR fortran/85221
1217         * trans-decl.c (add_attributes_to_decl): Handle OpenACC 'declare'
1218         directive.
1220 2019-06-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
1222         * dump_parse_tree (debug): Add verison for formal arglist.
1223         Do not crash when a gfc_expr is NULL.
1225 2019-06-15  Steven G. Kargl  <kargl@gcc.gnu.org>
1227         * decl.c (gfc_match_derived_decl): Dummy argument cannot be a derived
1228         type.
1230 2019-06-14  Steven G. Kargl  <kargl@gcc.gnu.org>
1232         * arith.c (arith_power): Rework overflow of an integer to an integer
1233         exponent.
1235 2019-06-14  Harald Anlauf  <anlauf@gmx.de>
1237         PR fortran/90577
1238         PR fortran/90578
1239         * trans-intrinsic.c (gfc_conv_intrinsic_shift): Properly
1240         distinguish logical/arithmetic shifts.
1241         * intrinsic.texi: Update documentation for SHIFTR/SHIFTL/SHIFTA
1242         (Fortran 2008) and LSHIFT/RSHIFT (GNU extensions).
1244 2019-06-14  Steven G. Kargl  <kargl@gcc.gnu.org>
1246         PR fortran/89646
1247         * dependency.c (gfc_check_argument_var_dependency): Suppress spurious
1248         warnings by comparing variable names.
1250 2019-06-13  Steven G. Kargl  <kargl@gcc.gnu.org>
1252         PR fortran/68544
1253         * resolve.c (is_dt_name): New function to compare symbol name against
1254         list of derived types.
1255         (resolve_actual_arglist): Use it to find wrong code.
1257 2019-06-13  Steven G. Kargl  <kargl@gcc.gnu.org>
1259         PR fortran/89344
1260         * expr.c (gfc_check_vardef_context): Check for INTENT(IN) variable
1261         in SELECT TYPE construct.
1263 2019-06-13  Steven G. Kargl  <kargl@gcc.gnu.org>
1265         PR fortran/88810
1266         * dependency.c (gfc_dep_resolver): Re-arrange code to make the logic
1267         a bit more transparent.  Fix 2 nearby formatting issues.
1269 2019-06-13  Jakub Jelinek  <jakub@redhat.com>
1271         * io.c (check_format): Use G_(...) instead of _(...) for error values,
1272         append " in format string at %L" to all strings but unexpected_element,
1273         use error as gfc_error formating string instead of
1274         "%s in format string at %L".  Formatting fixes.
1276 2019-06-12  Steven G. Kargl  <kargl@gcc.gnu.org>
1278         * gfortran.h (gfc_free_dt_list): Remove prototype.
1280 2019-06-12  Steven G. Kargl  <kargl@gcc.gnu.org>
1282         PR fortran/90002
1283         * array.c (gfc_free_array_spec): When freeing an array-spec, avoid
1284         an ICE for assumed-shape coarrays.
1286 2019-06-08  Paul Thomas  <pault@gcc.gnu.org>
1288         PR fortran/90786
1289         * trans-expr.c (pointer_assignment_is_proc_pointer) Remove as
1290         it is very simple and only called from one place.
1291         (gfc_trans_pointer_assignment): Rename non_proc_pointer_assign
1292         as non_proc_ptr_assign. Assign to it directly, rather than call
1293         to above, deleted function and use gfc_expr_attr instead of
1294         only checking the reference chain.
1296 2019-06-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
1297             Tomáš Trnka  <trnka@scm.com>
1299         PR fortran/90744
1300         * trans-types.c (get_formal_from_actual_arglist): Unset typespec
1301         flags which make no sense for procedures without explicit
1302         interface.
1304 2019-06-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
1306         PR fortran/90539
1307         * trans-expr.c (gfc_conv_subref_array_arg): If the size of the
1308         expression can be determined to be one, treat it as contiguous.
1309         Set likelyhood of presence of an actual argument according to
1310         PRED_FORTRAN_ABSENT_DUMMY and likelyhood of being contiguous
1311         according to PRED_FORTRAN_CONTIGUOUS.
1313 2019-05-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
1315         * gfc-internals.texi (Translating to GENERIC): New chapter.
1317 2019-05-30  Marek Polacek  <polacek@redhat.com>
1319         * lang.opt (ftail-call-workaround): Fix a typo.
1321 2019-05-30  Jakub Jelinek  <jakub@redhat.com>
1323         * lang.opt (ftail-call-workaround=): Fix a typo - lenghts to lengths.
1325 2019-05-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
1327         PR fortran/90539
1328         * gfortran.h (gfc_has_dimen_vector_ref): Add prototype.
1329         * trans.h (gfc_conv_subref_array_arg): Add argument check_contiguous.
1330         (gfc_conv_is_contiguous_expr): Add prototype.
1331         * frontend-passes.c (has_dimen_vector_ref): Remove prototype,
1332         rename to
1333         (gfc_has_dimen_vector_ref): New function name.
1334         (matmul_temp_args): Use gfc_has_dimen_vector_ref.
1335         (inline_matmul_assign): Likewise.
1336         * trans-array.c (gfc_conv_array_parameter): Also check for absence
1337         of a vector subscript before calling gfc_conv_subref_array_arg.
1338         Pass additional argument to gfc_conv_subref_array_arg.
1339         * trans-expr.c (gfc_conv_subref_array_arg): Add argument
1340         check_contiguous. If that is true, check if the argument
1341         is contiguous and do not repack in that case.
1342         * trans-intrinsic.c (gfc_conv_intrinsic_is_contiguous): Split
1343         away most of the work into, and call
1344         (gfc_conv_intrinsic_is_coniguous_expr): New function.
1346 2019-05-29  Jakub Jelinek  <jakub@redhat.com>
1348         PR fortran/90329
1349         * lang.opt (fbroken-callers): Remove.
1350         (ftail-call-workaround, ftail-call-workaround=): New options.
1351         * gfortran.h (struct gfc_namespace): Add implicit_interface_calls.
1352         * interface.c (gfc_procedure_use): Set implicit_interface_calls
1353         for calls to implicit interface procedures.
1354         * trans-decl.c (create_function_arglist): Use flag_tail_call_workaround
1355         instead of flag_broken_callers.  If it is not 2, also require
1356         sym->ns->implicit_interface_calls.
1357         * invoke.texi (fbroken-callers): Remove documentation.
1358         (ftail-call-workaround, ftail-call-workaround=): Document.
1360 2019-05-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
1362         PR fortran/90539
1363         * trans-types.c (get_formal_from_actual_arglist): Set rank
1364         and lower bound for assumed size arguments.
1366 2019-05-22  Andrew Stubbs  <ams@codesourcery.com>
1368         * trans-stmt.c (gfc_trans_critical): Use size_type_node for
1369         gfor_fndecl_caf_lock and gfor_fndecl_caf_unlock calls.
1370         (gfc_trans_allocate): Use size_type_node for gfor_fndecl_caf_sync_all
1371         call.
1373 2019-05-22  Jeff Law  <law@redhat.com>
1374             Mark Eggleston  <mark.eggleston@codethink.com>
1376         PR fortran/89100
1377         * gfortran.texi: Add Default widths for F, G and I format
1378         descriptors to Extensions section.
1379         * invoke.texi: Add -fdec-format-defaults
1380         * io.c (check_format): Use default widths for i, f and g when
1381         flag_dec_format_defaults is enabled.
1382         * lang.opt: Add new option.
1383         * options.c (set_dec_flags): Add SET_BITFLAG for
1384         flag_dec_format_defaults.
1386 2019-05-21  Janne Blomqvist  <jb@gcc.gnu.org>
1388         PR libfortran/90038
1389         * intrinsic.texi (EXECUTE_COMMAND_LINE): Explain new
1390         wait=.false. implementation.
1392 2019-05-20  Mark Eggleston  <markeggleston@codethink.com>
1394         * gfortran.texi: Remove reference to the ASSIGN statement, capitalise
1395         complex, state that padding is with spaces and modify the Hollerith
1396         constant examples.
1398 2019-05-19  Paul Thomas  <pault@gcc.gnu.org>
1400         PR fortran/90498
1401         * trans-stmt.c (trans_associate_var) Do not use the saved
1402         descriptor if the expression is a COMPONENT_REF.
1404 2019-05-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
1406         PR fortran/90329
1407         * invoke.texi: Document -fbroken-callers.
1408         * lang.opt: Add -fbroken-callers.
1409         * trans-decl.c (create_function_arglist): Only set
1410         DECL_HIDDEN_STRING_LENGTH if flag_broken_callers is set.
1412 2019-05-17  Thomas Schwinge  <thomas@codesourcery.com>
1414         PR fortran/89433
1415         * f95-lang.c (gfc_attribute_table): Set min_len to -1 for "omp
1416         declare target".
1417         * trans-decl.c (add_attributes_to_decl): Refer to OpenACC
1418         'routine' clauses from "omp declare target" attribute.
1420 2019-05-16  Martin Sebor  <msebor@redhat.com>
1422         * gfortranspec.c (append_arg): Spell out the word "argument."
1424 2019-05-16  Jakub Jelinek  <jakub@redhat.com>
1426         PR fortran/90329
1427         * trans-decl.c (create_function_arglist): Set
1428         DECL_HIDDEN_STRING_LENGTH on hidden string length PARM_DECLs if
1429         len is constant.
1431 2019-05-15  Janne Blomqvist  <jb@gcc.gnu.org>
1433         * parse.c (gfc_parse_file): Remove translation string markers.
1435 2019-05-12  Janne Blomqvist  <jb@gcc.gnu.org>
1437         * dump-parse-tree.c (get_c_type_name): Use macros for complex type
1438         names.
1439         * parse.c (gfc_parse_file): Define complex macros, add CPP support
1440         when printing C prototypes.
1442 2019-05-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
1444         PR fortran/61968
1445         * interface.c (compare_actual_formal): Do not create a vtab if
1446         the actual argument is assumed type.
1448 2019-05-10  Paul Thomas  <pault@gcc.gnu.org>
1450         PR fortran/90093
1451         * trans-decl.c (convert_CFI_desc): Test that the dummy is
1452         present before doing any of the conversions.
1454         PR fortran/90352
1455         * decl.c (gfc_verify_c_interop_param): Restore the error for
1456         charlen > 1 actual arguments passed to bind(C) procs.
1457         Clean up trailing white space.
1459         PR fortran/90355
1460         * trans-array.c (gfc_trans_create_temp_array): Set the 'span'
1461         field to the element length for all types.
1462         (gfc_conv_expr_descriptor): The force_no_tmp flag is used to
1463         prevent temporary creation, especially for substrings.
1464         * trans-decl.c (gfc_trans_deferred_vars): Rather than assert
1465         that the backend decl for the string length is non-null, use it
1466         as a condition before calling gfc_trans_vla_type_sizes.
1467         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): 'force_no_tmp'
1468         is set before calling gfc_conv_expr_descriptor.
1469         * trans.c (get_array_span): Move the code for extracting 'span'
1470         from gfc_build_array_ref to this function. This is specific to
1471         descriptors that are component and indirect references.
1472         * trans.h : Add the force_no_tmp flag bitfield to gfc_se.
1474 2019-05-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
1476         PR fortran/90351
1477         PR fortran/90329
1478         * dump-parse-tree.c: Include version.h.
1479         (gfc_dump_external_c_prototypes): New function.
1480         (get_c_type_name): Select "char" as a name for a simple char.
1481         Adjust to handling external functions. Also handle complex.
1482         (write_decl): Add argument bind_c. Adjust for dumping of external
1483         procedures.
1484         (write_proc): Likewise.
1485         (write_interop_decl): Add bind_c argument to call of write_proc.
1486         * gfortran.h: Add prototype for gfc_dump_external_c_prototypes.
1487         * lang.opt: Add -fc-prototypes-external flag.
1488         * parse.c (gfc_parse_file): Move dumping of BIND(C) prototypes.
1489         Call gfc_dump_external_c_prototypes if option is set.
1490         * invoke.texi: Document -fc-prototypes-external.
1492 2019-05-06  Steven G. Kargl  <kargl@gcc.gnu.org>
1494         PR fortran/90290
1495         * match.c (gfc_match_stopcode): Check F2008 condition on stop code.
1497 2019-05-01  Andrew Benson  <abensonca@gmail.com>
1499         * module.c (write_module): Initialize module_column before writing
1500         module to ensure line break occurs at correct column.
1502 2019-05-01  Dominique d'Humieres  <dominiq@gcc.gnu.org>
1504         PR fortran/60144
1505         * match.c (gfc_match_parens): Change the location for missing ')'.
1506         (gfc_match_if): Detect a missing '('. Remove the spurious named
1507         constant error. Change the wording of some errors.
1508         (gfc_match_else): Change the wording of an error.
1509         (gfc_match_elseif): Detect a missing '('. Improve the matching
1510         process to get a better syntax analysis.
1512 2019-04-19  Steven G. Kargl  <kargl@gcc.gnu.org>
1514         PR fortran/90166
1515         * decl.c (in_module_or_interface): New function to check that the
1516         current state is in a module, submodule, or interface.
1517         (gfc_match_prefix): Use it.
1519 2019-04-22  Paul Thomas  <pault@gcc.gnu.org>
1521         PR fortran/57284
1522         * resolve.c (find_array_spec): If this is a class expression
1523         and the symbol and component array specs are the same, this is
1524         not an error.
1525         *trans-intrinsic.c (gfc_conv_intrinsic_size): If a class symbol
1526         argument, has no namespace, it has come from the interface
1527         mapping and the _data component must be accessed directly.
1529 2019-04-17  Thomas Schwinge  <thomas@codesourcery.com>
1531         PR fortran/90048
1532         * openmp.c (gfc_resolve_do_iterator): Handle sharing_clauses for
1533         OpenACC, too.
1534         (gfc_resolve_oacc_blocks): Populate sharing_clauses with private
1535         clauses.
1537 2019-04-14  Paul Thomas  <pault@gcc.gnu.org>
1539         PR fortran/89843
1540         * trans-decl.c (gfc_get_symbol_decl): Assumed shape and assumed
1541         rank dummies of bind C procs require deferred initialization.
1542         (convert_CFI_desc): New procedure to convert incoming CFI
1543         descriptors to gfc types and back again.
1544         (gfc_trans_deferred_vars): Call it.
1545         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Null the CFI
1546         descriptor pointer. Free the descriptor in all cases.
1548         PR fortran/89846
1549         * expr.c (is_CFI_desc): New function.
1550         (is_subref_array): Tidy up by referencing the symbol directly.
1551         * gfortran.h : Prototype for is_CFI_desc.
1552         * trans_array.c (get_CFI_desc): New function.
1553         (gfc_get_array_span, gfc_conv_scalarized_array_ref,
1554         gfc_conv_array_ref): Use it.
1555         * trans.c (get_array_span): Extract the span from descriptors
1556         that are indirect references.
1558         PR fortran/90022
1559         * trans-decl.c (gfc_get_symbol_decl): Make sure that the se
1560         expression is a pointer type before converting it to the symbol
1561         backend_decl type.
1562         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Eliminate
1563         temporary creation for intent(in).
1565 2019-04-13  Dominique d'Humieres  <dominiq@gcc.gnu.org>
1567         PR fortran/79842
1568         * module.c (gfc_use_module): use complete sentences.
1570 2019-04-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
1572         PR translation/89939
1573         * frontend-passes.c (B_ERROR): Delete macro.
1574         (C_ERROR): Delete macro.
1575         (B_ERROR_1): New macro.
1576         (C_ERROR_1): New macro.
1577         (C_ERROR_2): New macro.
1578         (inline_matmul_assign): Use new macros.
1579         (call_external_blas): Likewise.
1581 2019-04-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
1583         PR fortran/87352
1584         * gfortran.h (gfc_component): Add finalized field.
1585         * class.c (finalize_component): If the component is already
1586         finalized, return early.  Set component->finalized on exit.
1588 2019-04-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
1590         PR fortran/89981
1591         * resolve.c (resolve_global_procedure): If the global symbol is an
1592         ENTRY, also look up its name among the entries.
1594 2019-04-04  Harald Anlauf  <anlauf@gmx.de>
1596         PR fortran/89904
1597         * check.c (gfc_check_transfer): Reject procedures as actual
1598         arguments for SOURCE and MOLD of TRANSFER intrinsic.
1600 2019-04-03  Steven G. Kargl  <kargl@gcc.gnu.org>
1602         PR fortran/68567
1603         * expr.c (gfc_reduce_init_expr): Add extra check to avoid
1604         dereferencing a null pointer.
1606 2019-04-03  Dominique d'Humieres  <dominiq@gcc.gnu.org>
1608         PR fortran/89375
1609         * expr.c (comp_pointer): Remove redundant condition.
1611 2019-03-31  Harald Anlauf  <anlauf@gmx.de>
1613         PR fortran/83515
1614         PR fortran/85797
1615         * trans-types.c (gfc_typenode_for_spec): Handle conversion for
1616         procedure pointers.
1617         * target-memory.c (gfc_element_size): Handle size determination
1618         for procedure pointers.
1620 2019-03-31  Thomas Koenig  <tkoenig@gcc.gnu.org>
1622         * dump-parse-tree.c (debug): Add for symbol_attribute *,
1623         symbol_attribute and gfc_ref * arguments.
1625 2019-03-30  Paul Thomas  <pault@gcc.gnu.org>
1627         PR fortran/89841
1628         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Use the formal
1629         argument attributes rather than those of the actual argument.
1631         PR fortran/89842
1632         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Call
1633         'set_dtype_for_unallocated' for any type of arrayspec.
1635 2019-03-27  Janus Weil  <janus@gcc.gnu.org>
1637         PR fortran/85537
1638         * expr.c (gfc_check_assign_symbol): Reject internal and dummy procedures
1639         in procedure pointer initialization.
1641 2019-03-27  Paul Thomas  <pault@gcc.gnu.org>
1643         PR fortran/88247
1644         * expr.c (is_subref_array): Permit substrings to be detected
1645         as subref arrays.
1646         * trans-array.c (get_array_ctor_var_strlen): Obtain the length
1647         of deferred length strings. Handle substrings with a NULL end
1648         expression.
1649         (trans_array_constructor): Remove an unnecessary blank line.
1650         (gfc_conv_scalarized_array_ref): Skip to label 'done' if 'decl'
1651         is a pointer array.
1652         (get_array_charlen): If the expression is an array, convert the
1653         first element of the constructor and use its string length. Get
1654         a new charlen if necessary.
1655         (gfc_conv_expr_descriptor): Call 'get_array_charlen' for array
1656         constructor expressions. If the ss_info string length is
1657         available, use that to set the span of character arrays.
1658         * trans-expr.c (gfc_get_expr_charlen): Handle substrings
1659         * trans-stmt.c (trans_associate_var): Set the pointer array
1660         flag for variable targets and constant array constructors. Take
1661         care not to reset the string length or the span in the case of
1662         expressions that are not converted as direct by reference.
1664 2019-03-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1666         * intrinsic.texi (MINLOC): Fix typo in BACK argument documentation.
1667         (MAXLOC): Likewise.
1669 2019-03-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
1671         PR fortran/78865
1672         * interface.c (compare_actual_formal): Change errors about
1673         missing or extra to gfc_error_now to make sure they are issued.
1674         Change "spec" to "specifier" in message.
1675         * resolve.c (resolve_global_procedure): Also check for mismatching
1676         interface with global symbols if the namespace has already been
1677         resolved.
1679 2019-03-21  Thomas Schwinge  <thomas@codesourcery.com>
1681         PR fortran/72741
1682         * openmp.c (gfc_match_oacc_routine): Set the level of parallelism
1683         for all variants.
1684         (gfc_resolve_oacc_routines): Call gfc_add_omp_declare_target.
1686         PR fortran/89773
1687         * gfortran.h (gfc_oacc_routine_name): Add loc member.
1688         (gfc_resolve_oacc_routines): Declare.
1689         * openmp.c (gfc_match_oacc_routine): Move some error checking
1690         into...
1691         (gfc_resolve_oacc_routines): ... this new function.
1692         * resolve.c (resolve_codes): Call it.
1694         PR fortran/72741
1695         * openmp.c (gfc_match_oacc_routine): Clarify.
1697         PR fortran/72741
1698         * module.c (verify_OACC_ROUTINE_LOP_NONE): New function.
1699         (enum ab_attribute): Add AB_OACC_ROUTINE_LOP_GANG,
1700         AB_OACC_ROUTINE_LOP_WORKER, AB_OACC_ROUTINE_LOP_VECTOR,
1701         AB_OACC_ROUTINE_LOP_SEQ.
1702         (attr_bits): Add these.
1703         (mio_symbol_attribute): Handle these.
1705 2019-03-20  Janus Weil  <janus@gcc.gnu.org>
1707         PR fortran/71861
1708         * symbol.c (check_conflict): ABSTRACT attribute conflicts with
1709         INTRINSIC attribute.
1711 2019-03-18  Thomas Koenig  <tkoeng@gcc.gnu.org>
1713         PR fortran/68009
1714         * iresolve.c: Include trans.h.
1715         (gfc_resolve_fe_runtine_error): Set backend_decl on
1716         resolved_sym.
1718 2019-03-17  Thomas Koenig  <tkoenig@gcc.gnu.org>
1720         PR fortran/88008
1721         * gfortran.h (expr_t): Add EXPR_UNKNOWN.
1722         * expr.c (gfc_copy_expr): Add EXPR_UNKNOWN to switch statement.
1723         (gfc_simplify_expr): Likewise.
1724         * module.c (mio_expr): Likewise.
1725         * resovle.c (extract_compcall_passed_object): Issue error on
1726         unknown type.
1727         (check_typebound_baseobject): Issue error on wrong type.
1728         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Add
1729         EXPR_UNKNOWN to switch statement.
1731 2019-03-16  Jakub Jelinek  <jakub@redhat.com>
1733         PR fortran/89724
1734         * scanner.c (load_line): Remove linenum and current_line static
1735         variables, add warned_tabs automatic variable.  Use current_file->line
1736         instead of current_line and warned_tabs boolean to avoid diagnosing
1737         tabs multiple times on the same line.
1739 2019-03-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
1741         PR fortran/84394
1742         * symbol.c (gfc_add_subroutine): If we are encountering a
1743         subrtoutine within a BLOCK DATA and the name starts with an
1744         underscore, do not check.
1746 2019-03-15  Harald Anlauf  <anlauf@gmx.de>
1748         PR fortran/60091
1749         * expr.c (gfc_check_pointer_assign): Correct and improve error
1750         messages for invalid pointer assignments.
1752 2019-03-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
1754         * gfortran.texi: Document Q edit descriptor under
1755         "Extensions not implemented in GNU Fortran".
1757 2019-03-13  Harald Anlauf  <anlauf@gmx.de>
1759         PR fortran/87045
1760         * trans-expr.c (gfc_trans_pointer_assignment): Move check for same
1761         string length so that we do not get false errors for deferred
1762         length.
1764 2019-03-13  Janus Weil  <janus@gcc.gnu.org>
1766         PR fortran/89601
1767         * decl.c (gfc_match_formal_arglist): Reject empty type parameter lists.
1768         (gfc_match_derived_decl): Mark as PDT only if type parameter list was
1769         matched successfully.
1771 2019-03-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
1773         PR fortran/66695
1774         PR fortran/77746
1775         PR fortran/79485
1776         * gfortran.h (gfc_symbol): Add bind_c component.
1777         (gfc_get_gsymbol): Add argument bind_c.
1778         * decl.c (add_global_entry): Add bind_c argument to
1779         gfc_get_symbol.
1780         * parse.c (parse_block_data): Likewise.
1781         (parse_module): Likewise.
1782         (add_global_procedure): Likewise.
1783         (add_global_program): Likewise.
1784         * resolve.c (resolve_common_blocks): Likewise.
1785         (resolve_global_procedure): Likewise.
1786         (gfc_verify_binding_labels): Likewise.
1787         * symbol.c (gfc_get_gsymbol): Add argument bind_c. Set bind_c
1788         in gsym.
1789         * trans-decl.c (gfc_get_module_backend_decl): Add bind_c argument
1790         to gfc_get_symbol.
1791         (gfc_get_extern_function_decl): If the sym has a binding label
1792         and it cannot be found in the global symbol tabel, it is the wrong
1793         one and vice versa.
1795 2019-03-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
1797         PR fortran/87673
1798         * match.c (gfc_match_type_spec): Remove call to
1799         gfc_resolve_expr for character length.
1801 2019-03-12  Martin Liska  <mliska@suse.cz>
1803         * decl.c (add_init_expr_to_sym): Replace usage of 'can't'
1804         with 'cannot'.
1805         (variable_decl): Likewise.
1806         (cray_pointer_decl): Likewise.
1807         (match_binding_attributes): Likewise.
1808         * f95-lang.c (gfc_init): Likewise.
1809         * interface.c (gfc_check_typebound_override): Likewise.
1810         * intrinsic.c (make_generic): Likewise.
1811         * module.c (dump_module): Likewise.
1812         (gfc_use_module): Likewise.
1813         * primary.c (gfc_convert_to_structure_constructor): Likewise.
1814         * resolve.c (resolve_entries): Likewise.
1815         (check_generic_tbp_ambiguity): Likewise.
1816         (get_checked_tb_operator_target): Likewise.
1817         * scanner.c (load_file): Likewise.
1818         * trans-expr.c (gfc_conv_intrinsic_to_class): Likewise.
1820 2019-03-12  Paul Thomas  <pault@gcc.gnu.org>
1822         PR fortran/89363
1823         PR fortran/89364
1824         * trans-expr.c (set_dtype_for_unallocated): New function.
1825         (gfc_conv_gfc_desc_to_cfi_desc): Call it for allocatable and
1826         pointer arguments.
1827         (gfc_conv_procedure_call): Likewise. Also, set the ubound of
1828         the final dimension to -1 for assumed rank formal args that are
1829         associated with assumed size arrays.
1830         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Return -1 for
1831         the final dimension of assumed rank entities that are argument
1832         associated with assumed size arrays.
1833         (gfc_conv_intrinsic_shape): Likewise return -1 for the final
1834         dimension of the shape intrinsic.
1836 2019-03-11  Jakub Jelinek  <jakub@redhat.com>
1838         PR fortran/89651
1839         * trans-openmp.c (gfc_omp_clause_default_ctor): Set TREE_NO_WARNING
1840         on decl if adding COND_EXPR for allocatable.
1841         (gfc_omp_clause_copy_ctor): Set TREE_NO_WARNING on dest.
1843 2019-03-11  Martin Liska  <mliska@suse.cz>
1845         * decl.c (match_record_decl): Wrap an option name
1846         in a string format message and fix GNU coding style.
1847         (gfc_match_pointer): Likewise.
1848         * expr.c (find_array_section): Likewise.
1849         * intrinsic.c (gfc_is_intrinsic): Likewise.
1850         * options.c (gfc_post_options): Likewise.
1851         * primary.c (match_integer_constant): Likewise.
1852         * trans-common.c (translate_common): Likewise.
1854 2019-03-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
1856         PR fortran/66089
1857         * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
1858         Return false if a scalar tempoary is needed.
1859         (gfc_walk_variable_expr): Fix up class refs.
1861 2019-03-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
1863         PR fortran/87734
1864         * symbol.c (gfc_add_procedure): Only throw an error if the
1865         procedure has not been declared either PUBLIC or PRIVATE.
1867 2019-03-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
1869         PR fortran/71544
1870         * trans-types.c (gfc_typenode_for_spec) Set ts->is_c_interop of
1871         C_PTR and C_FUNPTR.
1872         (create_fn_spec): Mark argument as escaping if ts->is_c_interop is set.
1874 2019-03-09  Janus Weil  <janus@gcc.gnu.org>
1876         PR fortran/84504
1877         * expr.c (gfc_check_assign_symbol): Deal with procedure pointers to
1878         pointer-valued functions.
1880 2019-03-09  Thomas König  <tkoenig@gcc.gnu.org>
1882         PR fortran/71203
1883         * decl.c (add_init_expr_to_sym): Add shape if init has none.  Add
1884         asserts that it has to be an EXPR_ARRAY in this case.
1886 2019-03-08  Jakub Jelinek  <jakub@redhat.com>
1888         PR other/80058
1889         * arith.c (gfc_complex2complex): Avoid two spaces in the middle of
1890         diagnostics.
1891         * resolve.c (resolve_allocate_expr): Likewise.
1893 2019-03-06  Harald Anlauf  <anlauf@gmx.de>
1895         PR fortran/71203
1896         * expr.c (simplify_const_ref): Avoid null pointer dereference.
1898 2019-03-03  Harald Anlauf  <anlauf@gmx.de>
1899             Steven G. Kargl  <kargl@gcc.gnu.org>
1901         PR fortran/77583
1902         * symbol.c (check_conflict): Check for valid procedure name
1903         passed to error reporting routine.
1905 2019-03-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
1907         PR fortran/72714
1908         * resolve.c (resolve_allocate_expr): Add some tests for coarrays.
1910 2019-03-02  Harald Anlauf  <anlauf@gmx.de>
1912         PR fortran/89516
1913         * check.c (gfc_calculate_transfer_sizes): Correct checks for cases
1914         where storage size of elements of MOLD is 0.
1916 2019-02-28  Thomas Schwinge  <thomas@codesourcery.com>
1917             Cesar Philippidis  <cesar@codesourcery.com>
1919         PR fortran/72741
1920         PR fortran/89433
1921         * openmp.c (gfc_match_oacc_routine): Handle repeated use of the
1922         Fortran OpenACC 'routine' directive.
1924         PR fortran/72741
1925         * gfortran.h (enum oacc_routine_lop): Add OACC_ROUTINE_LOP_ERROR.
1926         * openmp.c (gfc_oacc_routine_lop, gfc_match_oacc_routine): Use it.
1927         * trans-decl.c (add_attributes_to_decl): Likewise.
1929         PR fortran/72741
1930         PR fortran/89433
1931         * openmp.c (gfc_match_oacc_routine): Accept intrinsic symbols.
1933 2019-02-26  Harald Anlauf  <anlauf@gmx.de>
1935         PR fortran/89492
1936         * check.c (gfc_calculate_transfer_sizes): Handle cases where
1937         storage size of elements of MOLD is 0.
1939 2019-02-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
1941         PR fortran/89496
1942         * trans-types.c (get_formal_from_actual_arglist): If
1943         the actual arglist has no expression, the corresponding
1944         formal arglist is an alternate return.
1946 2019-02-26  Uroš Bizjak  <ubizjak@gmail.com>
1948         * invoke.texi (-ffpe-trap): Use @var for every item in the list.
1950 2019-02-26  Jakub Jelinek  <jakub@redhat.com>
1952         PR fortran/43210
1953         * trans-array.c (gfc_conv_array_initializer): Use RANGE_EXPR instead
1954         of duplicating the initializer possibly many times.
1956 2019-02-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
1958         PR fortran/89174
1959         * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Add is_mold
1960         to arguments. If we are dealing with a MOLD, call
1961         gfc_expr_to_initialize().
1962         * trans-stmt.c (gfc_trans_allocate): For MOLD, pass is_mold=true
1963         to gfc_find_and_cut_at_last_class_ref.
1964         * trans.h (gfc_find_and_cut_at_last_class_ref): Add optional
1965         argument is_mold with default false.
1967 2019-02-24  Harald Anlauf  <anlauf@gmx.de>
1969         PR fortran/89266
1970         PR fortran/88326
1971         * target-memory.c (gfc_element_size): Return false if element size
1972         cannot be determined; element size is returned separately.
1973         (gfc_target_expr_size): Return false if expression size cannot be
1974         determined; expression size is returned separately.
1975         * target-memory.h: Adjust prototypes.
1976         * check.c (gfc_calculate_transfer_sizes): Adjust references to
1977         gfc_target_expr_size, gfc_element_size.
1978         * arith.c (hollerith2representation): Likewise.
1979         * class.c (find_intrinsic_vtab): Likewise.
1980         * simplify.c (gfc_simplify_sizeof): Likewise.
1982 2019-02-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1984         PR fortran/84387
1985         * trans-io.c (transfer_expr): Do not return if there are no
1986         components to the derived type or class.
1988 2019-02-23  Paul Thomas  <pault@gcc.gnu.org>
1990         PR fortran/88117
1991         * resolve.c (deferred_op_assign): Return if the lhs expression
1992         has the pointer attribute.
1993         * trans-expr.c (gfc_trans_assignment_1): Do not fix the string
1994         length if the lhs expression has the pointer attribute.
1996 2019-02-23  Paul Thomas  <pault@gcc.gnu.org>
1998         PR fortran/89385
1999         PR fortran/89366
2000         * decl.c (gfc_verify_c_interop_param): Restriction on string
2001         length being one is lifted for F2018.
2002         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): For scalar
2003         characters with intent in, make a temporary and copy the result
2004         of the expression evaluation into it.
2005         (gfc_conv_procedure_call): Set a flag for character formal args
2006         having a character length that is not unity. If the procedure
2007         is bind C, call gfc_conv_gfc_desc_to_cfi_desc in this case.
2008         Also, extend bind C calls to unconditionally convert both
2009         pointers and allocatable expressions.
2011 2019-02-23  David Malcolm  <dmalcolm@redhat.com>
2012             Jakub Jelinek  <jakub@redhat.com>
2014         PR middle-end/88074
2015         * simplify.c (norm2_do_sqrt, gfc_simplify_norm2): Use
2016         mpfr_number_p && !mpfr_zero_p instead of mpfr_regular_p.
2017         (norm2_add_squared): Likewise.  Use mp_exp_t rather than mpfr_exp_t.
2019 2019-02-22  Harald Anlauf  <anlauf@gmx.de>
2021         PR fortran/83057
2022         * io.c (gfc_match_open): Fix logic in checks of OPEN statement
2023         when NEWUNIT= is specified.
2025 2019-02-22  Steven G. Kargl  <kargl@gcc.gnu.org>
2027         PR fortran/89431
2028         * gfortran.texi: Fix documentation to match the implementation.
2030 2019-02-22  Thomas Schwinge  <thomas@codesourcery.com>
2031             Cesar Philippidis  <cesar@codesourcery.com>
2033         PR fortran/72741
2034         * gfortran.h (oacc_routine_lop): New enum.
2035         (symbol_attribute): Use it.
2036         * openmp.c (gfc_oacc_routine_dims): Replace with...
2037         (gfc_oacc_routine_lop): ... this new function.
2038         (gfc_match_oacc_routine): Adjust.
2039         * trans-decl.c (add_attributes_to_decl): Likewise.
2041 2019-02-22  Thomas Schwinge  <thomas@codesourcery.com>
2043         * openmp.c (gfc_match_oacc_declare): Revert earlier changes.
2045 2019-02-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
2047         * dump-parse-tree.c (debug): Implement for gfc_expr *,
2048         gfc_typespec *, gfc_typespec and gfc_symbol *.
2050 2019-02-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
2052         PR fortran/86119
2053         * class.c (gfc_get_len_component): Add argument k for kind.
2054         If the kind of the resulting expression is not equal to k,
2055         convert it.
2056         * gfortran.h (gfc_len_component): Adjust prototype.
2057         * simplify.c (gfc_simplify_len): Pass kind to
2058         gfc_get_len_component.
2060 2019-02-20  Martin Liska  <mliska@suse.cz>
2062         * gfortran.texi: Change singular to plural.
2064 2019-02-20  Martin Liska  <mliska@suse.cz>
2066         * gfortran.texi: Document Fortran header directive.
2068 2019-02-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
2070         PR fortran/89384
2071         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): If the dummy
2072         argument is contiguous and the actual argument may not be,
2073         use gfc_conv_subref_array_arg.
2075 2019-02-19  Thomas Schwinge  <thomas@codesourcery.com>
2077         PR c/87924
2078         * openmp.c (gfc_match_omp_clauses): Add representation of wait clause
2079         without argument as 'wait (GOMP_ASYNC_NOVAL)'.
2081 2019-02-18  Thomas Koenig  <tkoenig@gcc.gnu.org>
2083         PR fortran/87689
2084         * trans-decl.c (gfc_get_extern_function_decl): Add argument
2085         actual_args and pass it through to gfc_get_function_type.
2086         * trans-expr.c (conv_function_val): Add argument actual_args
2087         and pass it on to gfc_get_extern_function_decl.
2088         (conv_procedure_call): Pass actual arguments to conv_function_val.
2089         * trans-types.c (get_formal_from_actual_arglist): New function.
2090         (gfc_get_function_type): Add argument actual_args.  Generate
2091         formal args from actual args if necessary.
2092         * trans-types.h (gfc_get_function_type): Add optional argument.
2093         * trans.h (gfc_get_extern_function_decl): Add optional argument.
2095 2019-02-18  Martin Liska  <mliska@suse.cz>
2097         * decl.c (gfc_match_gcc_builtin): Add support for filtering
2098         of builtin directive based on multilib ABI name.
2100 2019-02-17  Harald Anlauf  <anlauf@gmx.de>
2102         PR fortran/88299
2103         * resolve.c (resolve_common_blocks,resolve_common_vars): Move
2104         check for obsolent COMMON feature in F2018 to better place.
2106 2019-02-17  Harald Anlauf  <anlauf@gmx.de>
2108         PR fortran/89077
2109         * decl.c (gfc_set_constant_character_len): Clear original string
2110         representation after padding has been performed to target length.
2112 2019-02-16  Jakub Jelinek  <jakub@redhat.com>
2114         PR middle-end/88074
2115         * simplify.c (simplify_transformation_to_array): Run post_op
2116         immediately after processing corresponding row, rather than at the
2117         end.
2118         (norm2_scale): New variable.
2119         (add_squared): Rename to ...
2120         (norm2_add_squared): ... this.  Scale down operand and/or result
2121         if needed.
2122         (do_sqrt): Rename to ...
2123         (norm2_do_sqrt): ... this.  Handle the result == e case.  Scale up
2124         result and clear norm2_scale.
2125         (gfc_simplify_norm2): Clear norm2_scale.  Change add_squared to
2126         norm2_add_squared and &do_sqrt to norm2_do_sqrt.  Scale up result
2127         and clear norm2_scale again.
2129 2019-02-17  Thomas Koenig  <tkoenig@gcc.gnu.org>
2131         PR fortran/71066
2132         * trans-decl.c (generate_coarray_sym_init): For an array
2133         constructor in a DATA statement of a coarray variable, set the
2134         rank to 1 to avoid confusion later on.  If the constructor
2135         contains only one value, use that for initiailizig.
2137 2019-02-14  Janne Blomqvist  <jb@gcc.gnu.org>
2139         PR fortran/81552
2140         * gfortran.h (gfc_option_t): Make flag_init_integer_value a long.
2141         * options.c (gfc_handle_option): Use strtol instead of atoi.
2142         * invoke.texi: Document -finit-integer behavior in more detail.
2144 2019-02-14  Harald Anlauf  <anlauf@gmx.de>
2146         PR fortran/88248
2147         * symbol.c: Move check for labeled DO statement from
2148         gfc_define_st_label to gfc_reference_st_label.
2150 2019-02-14  Cesar Philippidis  <cesar@codesourcery.com>
2152         PR fortran/72715
2153         * openmp.c (resolve_oacc_nested_loops): Error on do concurrent
2154         loops.
2156 2019-02-13  Martin Liska  <mliska@suse.cz>
2158         PR fortran/88649
2159         * resolve.c (resolve_operator): Initialize 't' right
2160         after function entry.  Skip switch (e->value.op.op)
2161         for -fdec operands that become function calls.
2163 2019-02-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
2165         PR fortran/71723
2166         * expr.c (gfc_check_assign): Add argument is_init_expr.  If we are
2167         looking at an init expression, issue error if the target is not a
2168         TARGET and we are not looking at a procedure pointer.
2169         * gfortran.h (gfc_check_assign): Add optional argument
2170         is_init_expr.
2172 2019-02-09  Harald Anlauf  <anlauf@gmx.de>
2174         PR fortran/89077
2175         * resolve.c (gfc_resolve_substring_charlen): Check substring
2176         length for constantness prior to general calculation of length.
2178 2019-02-09  Paul Thomas  <pault@gcc.gnu.org>
2180         PR fortran/89200
2181         * trans-array.c (gfc_trans_create_temp_array): Set the 'span'
2182         field for derived types.
2184 2019-02-04  Harald Anlauf  <anlauf@gmx.de>
2186         PR fortran/89077
2187         * decl.c (add_init_expr_to_sym): Copy length of string initializer
2188         to declared symbol.
2190 2019-02-04  Martin Liska  <mliska@suse.cz>
2192         PR fortran/89185
2193         * resolve.c (resolve_ref): Remove breakout variable as
2194         we need to prevent prev = &(*prev)->next to happen
2195         with *prev == NULL.
2197 2019-02-04  Martin Liska  <mliska@suse.cz>
2199         PR fortran/88912
2200         * scanner.c (load_file): Report error for -fpre-include
2201         file and do not ICE.
2203 2019-02-02  Dominique d'Humieres  <dominiq@gcc.gnu.org>
2205         PR fortran/81344
2206         * invoke.texi: Document the behavior of repeated -ffpe-trap
2207         and -ffpe-summary.
2209 2019-02-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
2211         PR fortran/88298
2212         * arith.c (gfc_int2int): Do not warn if src->do_not_warn is set.
2213         * gfortran.h (gfc_expr): Add flag do_not_warn.
2214         * intrinsic.c (gfc_convert_type_warn): Set expr->do_not_warn if
2215         no warning is desired.
2217 2019-02-02  Paul Thomas  <pault@gcc.gnu.org>
2219         PR fortran/88393
2220         * trans-expr.c (gfc_conv_procedure_call): For derived entities,
2221         passed in parentheses to class formals, invert the order of
2222         copying allocatable components to taking the _data of the
2223         class expression.
2225 2019-02-02  Paul Thomas  <pault@gcc.gnu.org>
2227         PR fortran/88980
2228         * trans-array.c (gfc_array_init_size): Add element_size to the
2229         arguments.
2230         (gfc_array_allocate): Remove the recalculation of the size of
2231         the element and use element_size from the call to the above.
2232         Unconditionally set the span field of the descriptor.
2234 2019-02-02  Paul Thomas  <pault@gcc.gnu.org>
2236         PR fortran/88685
2237         * expr.c (is_subref_array): Move the check for class pointer
2238         dummy arrays to after the reference check. If we haven't seen
2239         an array reference other than an element and a component is not
2240         class or derived, return false.
2242 2019-02-01  Jakub Jelinek  <jakub@redhat.com>
2244         PR fortran/83246
2245         PR fortran/89084
2246         * trans-decl.c (generate_local_decl): Add referenced FL_PARAMETERs
2247         if sym->ns->construct_entities rather than if
2248         sym->ns->parent->code->op == EXEC_BLOCK.
2250 2019-01-31  Thomas Koenig  <tkoenig@gcc.gnu.org>
2252         PR fortran/88669
2253         * resolve.c (resolve_component): If the reference is a BT_CLASS,
2254         copy the contiguous attribute from the reference and use the
2255         correct attributes.
2257 2019-01-30  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2259         PR fortran/52564
2260         * io.c (match_io): Add check for comma after '*' without subsequent
2261         IO list.
2263 2019-01-30  Dominique d'Humieres  <dominiq@gcc.gnu.org>
2265         PR fortran/52884
2266         * invoke.texi: Document the promotion of double precision
2267         constants.
2269 2019-01-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
2271         PR fortran/57048
2272         * interface.c (gfc_compare_types): If a derived type and an
2273         integer both have a derived type, and they are identical,
2274         this is a C binding type and compares equal.
2276 2019-01-26  Harald Anlauf  <anlauf@gmx.de>
2278         PR fortran/57553
2279         * expr.c (check_inquiry): Add list of inquiry functions allowed in
2280         constant expressions for F2008+.
2282 2019-01-25  Steven G. Kargl  <kargl@gcc.gnu.org>
2284         PR fortran/85780
2285         * decl.c (gfc_match_subroutine): Check for conflict between BIND(C)
2286         and alternative return.
2288 2019-01-24  Paul Thomas  <pault@gcc.gnu.org>
2290         PR fortran/88929
2291         * trans-array.c (gfc_conv_descriptor_elem_len): New function.
2292         * trans-array.h : Add prototype for above.
2293         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Take account of
2294         assumed rank arrays being flagged by rank = -1 in expressions.
2295         Intent in arrays need a pointer to a copy of the data to be
2296         assigned to the descriptor passed for conversion. This should
2297         then be freed, together with the CFI descriptor on return from
2298         the C call.
2300 2019-01-22  Harald Anlauf  <anlauf@gmx.de>
2302         PR fortran/88579
2303         * trans-expr.c (gfc_conv_power_op): Handle cases of (2**e) ** integer
2304         and (- 2**e) ** integer.
2306 2019-01-19  Dominique d'Humieres  <dominiq@gcc.gnu.org>
2308         PR fortran/37835
2309         * resolve.c (resolve_types): Add !flag_automatic.
2310         * symbol.c (gfc_add_save): Silence warnings.
2312 2019-01-19  Steven G. Kargl  <kargl@gcc.gnu.org>
2314         PR fortran/77960
2315         * io.c (match_io_element): input-item cannot be an external function.
2317 2018-01-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
2318             Paul Thomas  <pault@gcc.gnu.org>
2320         PR fortran/56789
2321         * trans-expr.c (gfc_conv_procedure_call): Call
2322         gfc_conv_subref_array_arg if the formal arg is contiguous
2323         and the actual arg may not be.
2325 2019-01-17  Thomas Koenig  <tkoenig@gcc.gnu.org>
2327         PR fortran/88871
2328         * resolve.c (resolve_ref): Fix logic for removal of
2329         reference.
2331 2019-01-19  Jakub Jelinek  <jakub@redhat.com>
2333         PR fortran/88902
2334         * trans-decl.c (gfc_get_symbol_decl): Don't add length to function
2335         or parent function if it has been added there already.
2337 2019-01-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
2339         PR fortran/43136
2340         * resolve.c (resolve_array_ref): Add equal_length argument; set it
2341         if the length of the substring equals that of the orignal
2342         variable.
2343         (resolve_ref): Remove the substring if it is equal in length to
2344         the original variable, unless it is an EXPR_SUBSTRING).
2346 2019-01-15  Steven G. Kargl  <kargl@gcc.gnu.org>
2348         PR fortran/81849
2349         * resolve.c (resolve_symbol): Host associated varaibles can appear
2350         in the specification statement of a RESULT array.
2352 2019-01-15  Paul Thomas  <pault@gcc.gnu.org>
2354         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Deal with exprs
2355         that are indirect references; ie. dummy arguments.
2357 2019-01-13  Dominique d'Humieres  <dominiq@gcc.gnu.org>
2359         PR fortran/88803
2360         * gfortran.texi: Replace @xref with @ref and adjust the sentence.
2362 2019-01-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
2364         PR fortran/57992
2365         * trans-array.c (gfc_conv_array_parameter): Do not pack/unpack
2366         functions with contiguous results.
2368 2019-01-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
2370         PR fortran/59345
2371         * trans-array.c (gfc_conv_array_parameter): Remove TODO.  Do not
2372         pack/unpack results of functions which return an explicit-shaped
2373         or allocatable array.
2375 2019-01-12  Steven G. Kargl  <kargl@gcc.gnu.org>
2377         PR fortran/61765
2378         * resolve.c (gfc_verify_binding_labels): Break if-elseif-elseif
2379         structure into independent if's with a return to simplify logic.
2380         Avoid a check for ENTRY name with bind(c).
2382 2019-01-12  Paul Thomas  <pault@gcc.gnu.org>
2384         * gfortran.texi: Add description in sections on TS 29113 and
2385         further interoperability with C.
2386         * trans-array.c (gfc_conv_descriptor_attribute): New function.
2387         (gfc_get_dataptr_offset): Remove static function attribute.
2388         * trans-array.h: Add prototypes for above functions.
2389         * trans-decl.c: Add declarations for the library functions
2390         cfi_desc_to_gfc_desc and gfc_desc_to_cfi_desc.
2391         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): New function.
2392         (gfc_conv_procedure_call): Call it for scalar and array actual
2393         arguments, when the formal arguments are bind_c with assumed
2394         shape or assumed rank.
2395         * trans.h: External declarations for gfor_fndecl_cfi_to_gfc
2396         and gfor_fndecl_gfc_to_cfi.
2398 2019-01-11  Steven G. Kargl  <kargl@gcc.gnu.org>
2400         PR fortran/35031
2401         * decl.c (gfc_match_entry): Check for F2018:C1546.  Fix nearby
2402         mis-indentation.
2404 2019-01-11  Jakub Jelinek  <jakub@redhat.com>
2406         PR middle-end/85956
2407         PR lto/88733
2408         * trans-openmp.c: Include attribs.h.
2409         (gfc_walk_alloc_comps, gfc_omp_clause_linear_ctor): Handle
2410         VAR_DECL max bound with "omp dummy var" attribute like NULL or
2411         error_mark_node - recompute number of elts independently.
2413 2019-01-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
2415         PR fortran/59345
2416         * trans-array.c (gfc_conv_parameter_array): Temporary
2417         arrays generated for expressions do not need to be repacked.
2419 2019-01-10  Steven G. Kargl  <kargl@gcc.gnu.org>
2421         PR fortran/86322
2422         * decl.c (top_var_list): Set locus of expr.
2423         (gfc_match_data): Detect pointer on non-rightmost part-refs.
2425 2019-01-09  Steven G. Kargl  <kargl@gcc.gnu.org>
2427         PR fortran/88376
2428         * resolve.c (is_illegal_recursion): Remove an assert().
2430 2019-01-09  Sandra Loosemore  <sandra@codesourcery.com>
2432         PR other/16615
2433         * expr.c: Change "can not" to "cannot".
2435 2019-01-09  Sandra Loosemore  <sandra@codesourcery.com>
2437         PR other/16615
2438         * class.c: Mechanically replace "can not" with "cannot".
2439         * decl.c: Likewise.
2440         * expr.c: Likewise.
2441         * gfc-internals.texi: Likewise.
2442         * intrinsic.texi: Likewise.
2443         * invoke.texi: Likewise.
2444         * io.c: Likewise.
2445         * match.c: Likewise.
2446         * parse.c: Likewise.
2447         * primary.c: Likewise.
2448         * resolve.c: Likewise.
2449         * symbol.c: Likewise.
2450         * trans-array.c: Likewise.
2451         * trans-decl.c: Likewise.
2452         * trans-intrinsic.c: Likewise.
2453         * trans-stmt.c: Likewise.
2455 2019-01-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
2457         PR fortran/68426
2458         * simplify.c (gfc_simplify_spread): Also simplify if the
2459         type of source is an EXPR_STRUCTURE.
2461 2019-01-08  Janus Weil  <janus@gcc.gnu.org>
2463         PR fortran/88047
2464         * class.c (gfc_find_vtab): For polymorphic typespecs, the components of
2465         the class container may not be available (in case of invalid code).
2467 2019-01-08  Richard Biener  <rguenther@suse.de>
2469         PR fortran/88611
2470         * trans-expr.c (gfc_conv_initializer): For ISOCBINDING_NULL_*
2471         directly build the expected GENERIC tree.
2473 2019-01-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
2474             Harald Anlauf  <anlauf@gmx.de>
2475             Tobias Burnus  <burnus@gcc.gnu.org>
2477         PR fortran/45424
2478         * check.c (gfc_check_is_contiguous): New function.
2479         * expr.c (gfc_is_not_contiguous): New function.
2480         * gfortran.h (gfc_isym_id): Add GFC_ISYM_IS_CONTIGUOUS.
2481         Add prototype for gfc_is_not_contiguous.
2482         * intrinsic.c (do_ts29113_check): Add GFC_ISYM_IS_CONTIGUOUS.
2483         (add_function): Add is_contiguous.
2484         * intrinsic.h: Add prototypes for gfc_check_is_contiguous,
2485         gfc_simplify_is_contiguous and gfc_resolve_is_contiguous.
2486         * intrinsic.texi: Add IS_CONTIGUOUS.
2487         * iresolve.c (gfc_resolve_is_contiguous): New function.
2488         * simplify.c (gfc_simplify_is_contiguous): New function.
2489         * trans-decl.c (gfor_fncecl_is_contiguous0): New variable.
2490         (gfc_build_intrinsic_function_decl): Add it.
2491         * trans-intrinsic.c (gfc_conv_intrinsic_is_contiguous): New
2492         function.
2493         (gfc_conv_intrinsic_function): Handle GFC_ISYM_IS_CONTIGUOUS.
2495 2019-01-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
2497         PR fortran/88658
2498         * gfortran.h: Add macro gfc_real_4_kind
2499         * simplify.c (simplify_min_max): Special case for the types of
2500         AMAX0, AMIN0, MAX1 and MIN1, which actually change the types of
2501         their arguments.
2503 2019-01-05  Janus Weil  <janus@gcc.gnu.org>
2505         PR fortran/88009
2506         * class.c (gfc_find_derived_vtab): Mark the _final component as
2507         artificial.
2508         (find_intrinsic_vtab): Ditto. Also add an extra check to avoid
2509         dereferencing a null pointer and adjust indentation.
2510         * resolve.c (resolve_fl_variable): Add extra check to avoid
2511         dereferencing a null pointer. Move variable declarations to local scope.
2512         (resolve_fl_procedure): Add extra check to avoid dereferencing a null
2513         pointer.
2514         * symbol.c (check_conflict): Suppress errors for artificial symbols.
2516 2019-01-01  Steven G. Kargl  <kargl@gcc.gnu.org>
2518         * parse.c (decode_statement): Suppress "Unclassifiable statement"
2519         error if previous error messages were emittes.
2521 2019-01-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
2523         PR fortran/82743
2524         * primary.c (gfc_convert_to_structure_constructor): If a character
2525         in a constructor is too long, add a  warning with
2526         -Wcharacter-truncation.
2528 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
2530         Update copyright years.
2532         * gfortranspec.c (lang_specific_driver): Update copyright notice
2533         dates.
2534         * gfc-internals.texi: Bump @copying's copyright year.
2535         * gfortran.texi: Ditto.
2536         * intrinsic.texi: Ditto.
2537         * invoke.texi: Ditto.
2539 Copyright (C) 2019 Free Software Foundation, Inc.
2541 Copying and distribution of this file, with or without modification,
2542 are permitted in any medium without royalty provided the copyright
2543 notice and this notice are preserved.