2016-10-11 Fritz Reese <fritzoreese@gmail.com>
[official-gcc.git] / gcc / fortran / ChangeLog
blob907a8ef41e9d3edad31f4ce12eb2ad3602458e13
1 2016-10-11  Fritz Reese  <fritzoreese@gmail.com>
3         * lang.opt: New flag -fdec-math.
4         * options.c (set_dec_flags): Enable with -fdec.
5         * invoke.texi, gfortran.texi, intrinsic.texi: Update documentation.
6         * intrinsics.c (add_functions, do_simplify): New intrinsics
7         with -fdec-math.
8         * gfortran.h (gfc_isym_id): New isym GFC_ISYM_COTAN.
9         * gfortran.h (gfc_resolve_atan2d, gfc_resolve_cotan,
10         gfc_resolve_trigd, gfc_resolve_atrigd): New prototypes.
11         * iresolve.c (resolve_trig_call, get_degrees, get_radians,
12         is_trig_resolved, gfc_resolve_cotan, gfc_resolve_trigd,
13         gfc_resolve_atrigd, gfc_resolve_atan2d): New functions.
14         * intrinsics.h (gfc_simplify_atan2d, gfc_simplify_atrigd,
15         gfc_simplify_cotan, gfc_simplify_trigd): New prototypes.
16         * simplify.c (simplify_trig_call, degrees_f, radians_f,
17         gfc_simplify_cotan, gfc_simplify_trigd, gfc_simplify_atrigd,
18         gfc_simplify_atan2d): New functions.
20 2016-10-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
22         PR fortran/77915
23         * frontend-passes.c (inline_matmul_assign):  Return early if
24         inside a FORALL statement.
26 2016-10-07  Fritz Reese  <fritzoreese@gmail.com>
28         * interface.c (compare_components): Check charlen for BT_CHAR.
30 2016-10-07  Steven G. Kargl  <kargl@gcc.gnu.org>
32         PR fortran/77406
33         * interface.c (gfc_compare_interfaces): Fix detection of ambiguous
34         interface involving alternate return.
35         (check_interface1): Improve error message and loci.
37 2016-10-06  Louis Krupp  <louis.krupp@zoho.com>
39         PR fortran/69955
40         * trans-array.c (gfc_conv_expr_descriptor): Don't allocate
41         components if it's not necessary.
43 2016-10-05  Louis Krupp  <louis.krupp@zoho.com>
45         PR fortran/57910
46         * trans-expr.c (gfc_add_interface_mapping): Don't try to
47         dereference call-by-value scalar argument.
49 2016-10-05  Steven G. Kargl  <kargls@gcc.gnu.org>
51         PR fortran/58991
52         PR fortran/58992
53         * resolve.c (resolve_assoc_var):  Fix CHARACTER type-spec for a
54         selector in ASSOCIATE.
55         (resolve_fl_variable): Skip checks for an ASSOCIATE variable.
57 2016-10-05  Fritz Reese  <fritzoreese@gmail.com>
59         * interface.c (gfc_compare_types): Don't compare BT_UNION components
60         until we know they're both UNIONs.
61         * interface.c (gfc_compare_union_types): Guard against empty
62         components.
64 2016-10-05  Louis Krupp  <louis.krupp@zoho.com>
66         PR fortran/67524
67         * resolve.c (resolve_symbol): Don't apply default type rules to
68         mixed-entry master created for function entry points.
70 2016-09-30  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
72         PR fortran/66643
73         * io.c (match_dt_unit): Peek check for missing format.
75 2016-09-30  Fritz Reese  <fritzoreese@gmail.com>
77         PR fortran/77764
78         * interface.c (gfc_compare_union_types): Null-guard map components.
80 2016-09-30  Fritz Reese  <fritzoreese@gmail.com>
82         PR fortran/77782
83         * interface.c (gfc_compare_derived_types): Use gfc_compare_union_types
84         to compare union types.
86 2016-09-30  Andre Vehreschild  <vehre@gcc.gnu.org>
88         * trans-array.c (gfc_array_allocate): Use the token from coarray's
89         .token member.
90         * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Only generate
91         caf-reference chains from the first coarray references on.
92         * trans-types.c (gfc_get_derived_type): Switch on mandatory .token
93         member generation for allocatable arrays in coarrays in derived types.
95 2016-09-29  James Greenhalgh  <james.greenhalgh@arm.com>
97         * options.c (gfc_post_options): Remove special case for
98         TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard.
100 2016-09-27  Jakub Jelinek  <jakub@redhat.com>
102         * dependency.c (gfc_dep_compare_expr): Remove break after return.
103         * frontend-passes.c (optimize_op): Likewise.
104         * interface.c (gfc_current_interface_head): Likewise.
105         * symbol.c (check_conflict): Likewise.
106         * trans-intrinsic.c (build_fix_expr): Likewise.
108         PR fortran/77666
109         * trans-openmp.c (gfc_omp_private_outer_ref): Return true even for
110         references to allocatable arrays.
112 2016-09-26  Steven G. Kargl  <kargl@gcc.gnu.org>
114         PR fortran/77420
115         * trans-common.c:  Handle array elements in equivalence when
116         the lower and upper bounds of array spec are NULL.
118 2016-09-26  Paul Thomas  <pault@gcc.gnu.org>
120         PR fortran/48298
121         * interface.c (gfc_find_specific_dtio_proc) : Return NULL if
122         the derived type is broken, as indicated by a flavor other than
123         FL_DERIVED.
125 2016-09-26  Marek Polacek  <polacek@redhat.com>
127         PR c/7652
128         * arith.c (eval_intrinsic): Add gcc_fallthrough.
129         * frontend-passes.c (optimize_op): Likewise.
130         (gfc_expr_walker): Likewise.
131         * parse.c (next_fixed): Likewise.
132         * primary.c (match_variable): Likewise.
133         * trans-array.c: Likewise.
134         * trans-expr.c (flatten_array_ctors_without_strlen): Likewise.
135         * trans-io.c (transfer_expr): Likewise.
137 2016-09-25  Steven G. Kargl  <kargl@gcc.gnu.org>
139         PR fortran/77429
140         * dependency.c (gfc_check_dependency):  Convert gcc_assert() to
141         a conditional and possible call to  gfc_internal_error().
143 2016-09-25  Steven G. Kargl  <kargl@gcc.gnu.org>
145         PR fortran/77694
146         * frontend-passes.c (optimize_binop_array_assignment): Check pointer
147         for NULL.
149 2016-09-23  Fritz Reese  <fritzoreese@gmail.com>
151         * lang.opt, invoke.texi, gfortran.texi: New flag -fdec-static.
152         * options.c (set_dec_flags): Set -fdec-static with -fdec.
153         * gfortran.h (symbol_attribute): New attribute automatic.
154         * gfortran.h (gfc_add_automatic): New prototype.
155         * match.h (gfc_match_automatic, gfc_match_static): New functions.
156         * decl.c (gfc_match_automatic, gfc_match_static): Ditto.
157         * symbol.c (gfc_add_automatic): Ditto.
158         * decl.c (match_attr_spec): Match AUTOMATIC and STATIC decls.
159         * parse.c (decode_specification_statement, decode_statement): Ditto.
160         * resolve.c (apply_default_init_local, resolve_fl_variable_derived,
161         resolve_symbol): Support for automatic attribute.
162         * symbol.c (check_conflict, gfc_copy_attr, gfc_is_var_automatic):
163         Ditto.
164         * trans-decl.c (gfc_finish_var_decl): Ditto.
166 2016-09-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
168         PR fortran/48298
169         * gfortran.h (gfc_dt): Add *udtio.
170         * ioparm.def: Add bit IOPARM_dt_f2003 to align with library use of bit
171         25. Add IOPARM_dt_dtio bit to common flags.
172         * resolve.c (resolve_transfer): Set dt->udtio to expression.
173         * io.c (gfc_match_inquire): Adjust error message for internal
174         unit KIND.
175         * libgfortran.h: Adjust defines for GFC_INTERNAL_UNIT4,
176         GFC_INTERNAL_UNIT, and GFC_INVALID_UNIT.
177         * trans-io.c (build_dt): Set common_unit to reflect the KIND of
178         the internal unit. Set mask bit for presence of dt->udtio.
180 2016-09-22  Andre Vehreschild  <vehre@gcc.gnu.org>
182         * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Use the old caf-
183         interface where possible.
185 2016-09-22  Paul Thomas  <pault@gcc.gnu.org>
187         * interface.c (check_dtio_interface1): Introduce errors for
188         alternate returns and incorrect numbers of arguments.
189         (gfc_find_specific_dtio_proc): Return cleanly if the derived
190         type either doesn't exist or has no namespace.
192 2016-09-21  Louis Krupp  <louis.krupp@zoho.com>
194         PR fortran/66107
195         * decl.c (add_init_expr_to_sym): Catch variable character length
196         in parameter array.
198 2016-09-21  Paul Thomas  <pault@gcc.gnu.org>
200         PR fortran/77657
202         * interface.c (gfc_find_specific_dtio_proc): Borrow trick from
203         resolve_typebound_generic_call to find dtio procedures that
204         over-ride those in the declared type.
206 2016-09-20  Marek Polacek  <polacek@redhat.com>
208         * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Adjust fall through
209         comment.
211 2016-09-19  Andre Vehreschild  <vehre@gcc.gnu.org>
213         PR fortran/71952
214         * expr.c (gfc_check_assign): Added flag to control whether datatype
215         conversion is allowed.
216         * gfortran.h: Added caf-token-tree to gfc_component.  Changed
217         prototypes mostly to add whether datatype conversion is allowed.
218         * gfortran.texi: Added documentation for the caf_reference_t and the
219         caf_*_by_ref function.
220         * primary.c (caf_variable_attr): Similar to gfc_variable_attr but
221         focused on the needs of coarrays.
222         (gfc_caf_attr): Same.
223         * resolve.c (resolve_ordinary_assign): Set the conversion allowed
224         flag when not in a coarray.
225         * trans-array.c (gfc_array_init_size): Moved setting of array
226         descriptor's datatype before the alloc, because caf_register needs it.
227         (gfc_array_allocate): Changed notion of whether an array is a coarray.
228         (gfc_array_deallocate): Same.
229         (gfc_alloc_allocatable_for_assignment): Added setting of coarray's
230         array descriptor datatype before the register.  And using deregister/
231         register to mimmick a realloc for coarrays.
232         * trans-decl.c (gfc_build_builtin_function_decls): Corrected signatures
233         of old caf-functions and added signature definitions of the _by_ref
234         ones.
235         (generate_coarray_sym_init): Adapted to new caf_register signature.
236         * trans-expr.c (gfc_conv_scalar_to_descriptor): Make sure a constant
237         is translated to an lvalue expression before use in an array
238         descriptor.
239         (gfc_get_ultimate_alloc_ptr_comps_caf_token): New function.  Get the
240         last allocatable component's coarray token.
241         (gfc_get_tree_for_caf_expr): For top-level object get the coarray
242         token and check for unsupported features.
243         (gfc_get_caf_token_offset): Getting the offset might procude new
244         statements, which now are stored in the pre and post of the current se.
245         (gfc_caf_get_image_index): For this image return a call to
246         caf_this_image.
247         (expr_may_alias_variables): Check that the result is set for testing
248         its properties.
249         (alloc_scalar_allocatable_for_assignment): Added auto allocation of
250         coarray components.
251         (gfc_trans_assignment_1): Rewrite an assign to a coarray object to
252         be a sendget.
253         * trans-intrinsic.c (conv_caf_vector_subscript_elem): Corrected
254         wrong comment.
255         (compute_component_offset): Compute the correct offset a structure
256         member.
257         (conv_expr_ref_to_caf_ref): Convert to a chain of refs into
258         caf_references.
259         (gfc_conv_intrinsic_caf_get): Call caf_get_by_ref instead of caf_get.
260         (conv_caf_send): Call caf_*_by_ref for coarrays that need
261         reallocation.
262         (gfc_conv_intrinsic_function): Adapted to new signuature of the caf
263         drivers.
264         (conv_intrinsic_atomic_op): Add pre and post statements correctly.
265         (conv_intrinsic_atomic_ref): Same.
266         (conv_intrinsic_atomic_cas): Same.
267         (conv_intrinsic_event_query): Same.
268         * trans-stmt.c (gfc_trans_lock_unlock): Same.
269         (gfc_trans_event_post_wait): Same.
270         (gfc_trans_allocate): Support allocation of allocatable coarrays.
271         (gfc_trans_deallocate): And there deallocation.
272         * trans-types.c (gfc_typenode_for_spec): Added flag to control whether
273         a component is part of coarray.  When so, then add space to store a
274         coarray token.
275         (gfc_build_array_type): Same.
276         (gfc_get_array_descriptor_base): Same.
277         (gfc_get_array_type_bounds): Same.
278         (gfc_sym_type): Same.
279         (gfc_get_derived_type): Same.
280         (gfc_get_caf_reference_type): Declare the caf_reference_type.
281         * trans-types.h: Prototype changes only.
282         * trans.c (gfc_allocate_using_lib): Use the updated caf_register
283         signature.
284         (gfc_allocate_allocatable): Same.
285         (gfc_deallocate_with_status): Same.
286         * trans.h: Defined the runtime types for caf_reference_t and the enums.
288 2016-09-19  Fritz Reese  <fritzoreese@gmail.com>
290         PR fortran/77584
291         * decl.c (match_record_decl, gfc_match_decl_type_spec): Fixes to
292         handling of structure/record from declaration-type-spec.
294 2016_09_17  Louis Krupp  <louis.krupp@zoho.com>
296         PR fortran/68078
297         * resolve.c (resolve_allocate_expr): Check that derived type
298         pointer, object or array has been successfully allocated before
299         initializing.
301 2016-09-16  Steven G. Kargl  <kargl@gcc.gnu.org>
303         PR fortran/77612
304         * decl.c (char_len_param_value): Check parent namespace for
305         seen_implicit_none.
307 2016-09-15  Louis Krupp  <louis.krupp@zoho.com>
309         PR fortran/69963
310         * parse.c (reject_statement): Clear charlen pointers in implicit
311         character typespecs before those charlen structures are freed.
313 2016-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
315         * simplify.c (gfc_simplify_repeat): Fix a misplaced closing ')'.
317 2016-09-13  Steven G. Kargl  <kargl@gcc.gnu.org>
319         PR fortran/77420
320         * module.c (load_equiv):  Revert revision 240063.
322 2016-09-10  Paul Thomas  <pault@gcc.gnu.org>
323             Steven G. Kargl  <kargl@gcc.gnu.org>
325         PR fortran/77532
326         * interface.c (check_dtio_arg_TKR_intent): Return after error.
327         (check_dtio_interface1): Remove asserts, test for NULL and return
328         if found.
330 2016-09-09  Steven G. Kargl  <kargl@gcc.gnu.org>
332         PR fortran/77420
333         * module.c (load_equiv): If the current namespace has a list of
334         equivalence statements, initialize duplicate to false and then
335         look for duplicates; otherwise, initialize it to true.
337 2016-09-09  Steven G. Kargl  <kargl@gcc.gnu.org>
339         PR fortran/77506
340         * array.c (gfc_match_array_constructor): CHARACTER(len=*) cannot
341         appear in an array constructor.
343 2016-09-09  Steven G. Kargl  <kargl@gcc.gnu.org>
345         PR fortran/77507
346         * intrinsic.c (add_functions):  Use correct keyword.
348 2016-09-08  Steven G. Kargl  <kargl@gcc.gnu.org>
350         PR fortran/69514
351         * array.c (gfc_match_array_constructor):  If type-spec is present,
352         walk the array constructor performing possible conversions for
353         numeric types.
355 2016-09-08  Jakub Jelinek  <jakub@redhat.com>
357         PR fortran/77500
358         * trans-openmp.c (gfc_trans_omp_atomic): For atomic write or
359         swap, don't try to look through GFC_ISYM_CONVERSION.  In other cases,
360         check that value.function.isym is non-NULL before dereferencing it.
362 2016-09-04  Steven G. Kargl  <kargl@gcc.gnu.org>
364         PR fortran/77391
365         * resolve.c (deferred_requirements): New function to check F2008:C402.
366         (resolve_fl_variable,resolve_fl_parameter): Use it.
368 2016-09-04  Steven G. Kargl  <kargl@gcc.gnu.org>
370         PR fortran/77460
371         * simplify.c (simplify_transformation_to_scalar):  On error, result
372         may be NULL, simply return.
374 2016-08-31  Jakub Jelinek  <jakub@redhat.com>
376         PR fortran/77352
377         * trans-openmp.c (gfc_trans_omp_parallel_workshare): Always add a
378         BIND_EXPR with BLOCK around what gfc_trans_omp_workshare returns.
380         PR fortran/77374
381         * parse.c (parse_omp_oacc_atomic): Copy over cp->ext.omp_atomic
382         to cp->block->ext.omp_atomic.
383         * resolve.c (gfc_resolve_blocks): Assert block with one or two
384         EXEC_ASSIGNs for EXEC_*_ATOMIC.
385         * openmp.c (resolve_omp_atomic): Don't assert one or two
386         EXEC_ASSIGNs, instead return quietly for EXEC_NOPs and otherwise
387         error unexpected statements.
389 2016-08-31  Paul Thomas  <pault@gcc.gnu.org>
390             Jerry DeLisle  <jvdelisle@gcc.gnu.org>
392         PR fortran/48298
393         * decl.c (access_attr_decl): Include case INTERFACE_DTIO as
394         appropriate.
395         * gfortran.h : Add INTRINSIC_FORMATTED and
396         INTRINSIC_UNFORMATTED to gfc_intrinsic_op. Add INTERFACE_DTIO
397         to interface type. Add new enum 'dtio_codes'. Add bitfield
398         'has_dtio_procs' to symbol_attr. Add prototypes
399         'gfc_check_dtio_interfaces' and 'gfc_find_specific_dtio_proc'.
400         * interface.c (dtio_op): New function.
401         (gfc_match_generic_spec): Match generic DTIO interfaces.
402         (gfc_match_interface): Treat DTIO interfaces in the same way as
403         (gfc_current_interface_head): Add INTERFACE_DTIO appropriately.
404         (check_dtio_arg_TKR_intent): New function.
405         (check_dtio_interface1): New function.
406         (gfc_check_dtio_interfaces): New function.
407         (gfc_find_specific_dtio_proc): New function.
408         * io.c : Add FMT_DT to format_token.
409         (format_lex): Handle DTIO formatting.
410         * match.c (gfc_op2string): Add DTIO operators.
411         * resolve.c (derived_inaccessible): Ignore pointer components
412         to enclosing derived type.
413         (resolve_transfer): Resolve transfers that involve DTIO.
414         procedures. Find the specific subroutine for the transfer and
415         use its existence to over-ride some of the constraints on
416         derived types. If the transfer is recursive, require that the
417         subroutine be so qualified.
418         (dtio_procs_present): New function.
419         (resolve_fl_namelist): Remove inhibition of polymorphic objects
420         in namelists if DTIO read and write subroutines exist. Likewise
421         for derived types.
422         (resolve_types): Invoke 'gfc_verify_dtio_procedures'.
423         * symbol.c : Set 'dtio_procs' using 'minit'.
424         * trans-decl.c (gfc_finish_var_decl): If a derived-type/class
425         object is associated with DTIO procedures, make it TREE_STATIC.
426         * trans-expr.c (gfc_get_vptr_from_expr): If the expression
427         drills down to a PARM_DECL, extract the vptr correctly.
428         (gfc_conv_derived_to_class): Check 'info' in the test for
429         'useflags'. If the se expression exists and is a pointer, use
430         it as the class _data.
431         * trans-io.c : Add IOCALL_X_DERIVED to iocall and the function
432         prototype. Likewise for IOCALL_SET_NML_DTIO_VAL.
433         (set_parameter_tree): Renamed from 'set_parameter_const', now
434         returns void and has new tree argument. Calls modified to match
435         new interface.
436         (transfer_namelist_element): Transfer DTIO procedure pointer
437         and vpointer using the new function IOCALL_SET_NML_DTIO_VAL.
438         (get_dtio_proc): New function.
439         (transfer_expr): Add new argument for the vptr field of class
440         objects. Add the code to call the specific DTIO proc, convert
441         derived types to class and call IOCALL_X_DERIVED.
442         (trans_transfer): Add BT_CLASS to structures for treatment by
443         the scalarizer. Obtain the vptr for the dynamic type, both for
444         scalar and array transfer.
446 2016-08-30  Fritz Reese  <fritzoreese@gmail.com>
448         * gfortran.texi: Fix typo in STRUCTURE documentation.
450 2016-08-29  Fritz Reese  <fritzoreese@gmail.com>
452         Fix, reorganize, and clarify comparisons of anonymous types/components.
454         PR fortran/77327
455         * interface.c (is_anonymous_component, is_anonymous_dt): New functions.
456         * interface.c (compare_components, gfc_compare_derived_types): Use new
457         functions.
459 2016-08-27  Steven G. Kargl  <kargl@gcc.gnu.org>
461         PR fortran/77380
462         * dependency.c (gfc_check_dependency): Do not assert with
463         -fcoarray=lib.
465 2016-08-27  Steven G. Kargl  <kargl@gcc.gnu.org>
467         PR fortran/77372
468         simplify.c (simplify_ieee_selected_real_kind): Check for NULL pointers.
470 2016-08-25  Steven g. Kargl  <kargl@gcc.gnu.org>
472         PR fortran/77351
473         * frontend-passes.c (remove_trim,combine_array_constructor): Check for
474         NULL pointer.
476 2016-08-24  Paul Thomas  <pault@gcc.gnu.org>
478         PR fortran/77358
479         * resolve.c (resolve_fl_procedure): Use the correct gfc_charlen
480         for deferred character length module procedures.
482 2016-08-23  Fritz Reese  <fritzoreese@gmail.com>
484         * decl.c (gfc_match_structure_decl): Make gfc_structure_id static.
486 2016-08-23  Fritz Reese  <fritzoreese@gmail.com>
488         * interface.c (compare_components): Fix typo in name check conditional.
490 2016-08-22  Steven G. Kargl  <kargl@gcc.gnu.org>
491             Bud Davis  <jmdavis@link.com>
493         PR fortran/60774
494         * parse.c (next_free,next_fixed): Issue error for statement label
495         without a statement.
497 2016-08-22  Steven G. Kargl  <kargl@gcc.gnu.org>
499         PR fortran/61318
500         * interface.c (compare_parameter): Use better locus for error message.
502 2016-08-22  Steven G. Kargl  <kargl@gcc.gnu.org>
504         PR fortran/77260
505         * gcc/fortran/trans-decl.c (generate_local_decl): Suppress warning
506         for unused variable if symbol is entry point.
508 2016-08-19  Joseph Myers  <joseph@codesourcery.com>
510         PR c/32187
511         * trans-types.h (float128_type_node): Rename to
512         gfc_float128_type_node.
513         (complex_float128_type_node): Rename to
514         gfc_complex_float128_type_node.
515         * iso-c-binding.def, trans-intrinsic.c, trans-types.c: All users
516         changed.
518 2016-08-19  Jakub Jelinek  <jakub@redhat.com>
520         PR fortran/71014
521         * resolve.c (gfc_resolve): For ns->construct_entities don't save, clear
522         and restore omp state around the resolving.
524         PR fortran/69281
525         * trans-openmp.c (gfc_trans_omp_parallel, gfc_trans_omp_task,
526         gfc_trans_omp_target): Wrap gfc_trans_omp_code result in an extra
527         BIND_EXPR with its own forced BLOCK.
529 2016-08-19  Janne Blomqvist  <jb@gcc.gnu.org>
531         * intrinsics.texi (RANDOM_NUMBER): Remove reference to
532         init_random_seed in example.
533         (RANDOM_SEED): Remove warning to not set all seed values to 0.
535 2016-08-18  David Malcolm  <dmalcolm@redhat.com>
537         * error.c (gfc_diagnostic_starter): Update for change to
538         diagnostic_show_locus.
540 2016-08-17  Jakub Jelinek  <jakub@redhat.com>
542         PR fortran/67496
543         * trans-array.c (trans_array_constructor): Load
544         expr->ts.u.cl->length_from_typespec only if expr->ts.type is
545         BT_CHARACTER.
547 2016-08-15  Fritz Reese  <fritzoreese@gmail.com>
549         * lang.opt, invoke.texi: New flag -finit-derived.
550         * gfortran.h (gfc_build_default_init_expr, gfc_apply_init,
551         gfc_generate_initializer): New prototypes.
552         * expr.c (gfc_build_default_init_expr, gfc_apply_init,
553         component_initializer, gfc_generate_initializer): New functions.
554         * expr.c (gfc_default_initializer): Wrap gfc_generate_initializer.
555         * decl.c (build_struct): Move common code to gfc_apply_init.
556         * resolve.c (can_generate_init): New function.
557         * resolve.c (build_default_init_expr): Wrap gfc_build_default_init_expr.
558         * resolve.c (apply_default_init, resolve_fl_variable_derived): Use
559         gfc_generate_initializer.
560         * trans-decl.c (gfc_generate_function_code): Use
561         gfc_generate_initializer.
563 2016-08-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
565         * frontend-passes.c (create_var):  Set ts.deferred for
566         deferred-length character variables.
567         * dump-parse-tree.c (show_typespec):  Also dump
568         is_c_interop, is_iso_c and deferred flags.
570 2016-08-15  Jakub Jelinek  <jakub@redhat.com>
572         PR debug/71906
573         * trans-decl.c (gfc_get_symbol_decl): Call gfc_finish_var_decl
574         for decl's character length before gfc_finish_var_decl on the
575         decl itself.
577 2016-08-14  Chung-Lin Tang  <cltang@codesourcery.com>
579         PR fortran/70598
580         * openmp.c (resolve_omp_clauses): Adjust use_device clause
581         handling to only allow pointers and arrays.
583 2016-08-12  Marek Polacek  <polacek@redhat.com>
585         PR c/7652
586         * decl.c (match_attr_spec): Add FALLTHRU.
587         * primary.c (match_arg_list_function): Likewise.
588         * resolve.c (resolve_operator): Adjust fall through comment.
589         (fixup_charlen): Add FALLTHRU.
590         (resolve_allocate_expr): Adjust fall through comment.
591         * trans-array.c (gfc_conv_ss_startstride): Add FALLTHRU.
592         * trans-intrinsic.c (gfc_conv_intrinsic_len): Adjust fall through
593         comment.
595 2016-08-11  Janne Blomqvist  <jb@gcc.gnu.org>
597         * check.c (gfc_check_random_seed): Use new seed size in check.
598         * intrinsic.texi (RANDOM_NUMBER): Updated documentation.
599         (RANDOM_SEED): Likewise.
601 2016-08-08  Jakub Jelinek  <jakub@redhat.com>
603         PR fortran/72716
604         * openmp.c (gfc_match_omp_declare_simd): Don't stick anything into
605         BLOCK DATA ns, it will be rejected later.
607 2016-08-08  Andre Vehreschild  <vehre@gcc.gnu.org>
609         PR fortran/71936
610         * trans-array.c (gfc_array_allocate): When SOURCE= is a function
611         stick with the ref of the object to allocate.
613 2016-08-08  Andre Vehreschild  <vehre@gcc.gnu.org>
615         PR fortran/72698
616         * trans-stmt.c (gfc_trans_allocate): Prevent generating code for
617         copy of zero sized string and with it an ICE.
619 2016-08-08  Andre Vehreschild  <vehre@gcc.gnu.org>
621         PR fortran/70524
622         * trans-array.c (gfc_trans_dummy_array_bias): Ensure that the
623         location information is correctly set.
624         * trans-decl.c (gfc_trans_deferred_vars): Set the locus of the
625         current construct early.
627 2016-08-03  Fritz Reese  <fritzoreese@gmail.com>
629         * lang.opt: New option -fdec-intrinsic-ints.
630         * options.c (set_dec_flags): Enable with -fdec.
631         * gfortran.texi, invoke.texi, intrinsics.texi: Update documentation.
632         * intrinsic.c (add_function, add_subroutine): New B/I/J/K intrinsic
633         variants.
635 2016-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>
637         PR fortran/41922
638         * target-memory.c (expr_to_char): Pass in locus and use it in error
639         messages.
640         (gfc_merge_initializers): Ditto.
641         * target-memory.h: Update prototype for gfc_merge_initializers ().
642         * trans-common.c (get_init_field): Use the correct locus.
644 2016-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>
646         PR fortran/68566
647         * check.c (gfc_check_reshape): Check for constant expression.
649 2016-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>
651         PR fortran/69867
652         * decl.c (build_struct): Ensure that pointers point to something.
654 2016-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>
656         PR fortran/69962
657         * decl.c (gfc_set_constant_character_len):  if expr is not
658         constant issue an error instead of an ICE.
660 2016-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>
662         PR fortran/70006
663         * io.c (gfc_resolve_dt): Use correct locus.
664         * resolve.c (resolve_branch): Ditto.
666 2016-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>
668         PR fortran/71730
669         * decl.c (char_len_param_value): Check return value of
670         gfc_reduce_init_expr().
672 2016-07-29  Dominik Vogt  <vogt@linux.vnet.ibm.com>
674         * trans-array.c (gfc_conv_array_ref): Fix allocation of diagnostic
675         message (was too small).
677 2016-07-28  Steven G. Kargl  <kargl@gcc.gnu.org>
679         PR fortran/71067
680         * decl.c (match_data_constant): On error, set 'result' to NULL.
682 2016-07-28  Steven G. Kargl  <kargl@gcc.gnu.org>
684         PR fortran/71799
685         * resolve.c(gfc_resolve_iterator): Failure of type conversion need
686         not ICE.
688 2016-07-28  Steven G. Kargl  <kargl@gcc.gnu.org>
690         PR fortran/71859
691         * check.c(numeric_check): Prevent ICE.  Issue error for invalid
692         subroutine as an actual argument when numeric argument is expected.
694 2016-07-28  Steven G. Kargl  <kargl@gcc.gnu.org>
695             Thomas Koenig  <tkoenig@gcc.gnu.org>
697         PR fortran/71883
698         * frontend-passes.c (gfc_run_passes): Bail out if there are any
699         errors.
700         * error.c (gfc_internal_error): If there are any errors in the
701         buffer, exit with EXIT_FAILURE.
703 2016-07-28  Renlin Li  <renlin.li@arm.com>
705         Revert
706         2016-07-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
708         PR fortran/71902
709         * dependency.c (gfc_check_dependency): Use dep_ref.  Handle case
710         if identical is true and two array element references differ.
711         (gfc_dep_resovler):  Move most of the code to dep_ref.
712         (dep_ref):  New function.
713         * frontend-passes.c (realloc_string_callback):  Name temporary
714         variable "realloc_string".
716 2016-07-26  Steven G. Kargl  <kargl@gcc.gnu.org>
718         PR fortran/71862
719         * class.c: Remove assert.  Iterate over component only if non-null.
721 2016-07-22  Steven G. Kargl  <kargl@gcc.gnu.org>
723         PR fortran/71935
724         * check.c (is_c_interoperable): Simplify right expression.
726 2016-07-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
728         PR fortran/71795
729         * frontend-passes.c (combine_array_constructor):  Don't
730         do anything if the expression is inside an array iterator.
732 2016-07-22  Andre Vehreschild  <vehre@gcc.gnu.org>
734         * expr.c (gfc_find_stat_co): Fixed whitespaces.
735         * gfortran.texi: Fixed typos and reversed meaning of caf_get()'s
736         src and dst description.
737         * trans-decl.c (gfc_build_builtin_function_decls): Fixed style
738         and corrected fnspec for caf functions.
739         * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Fixed style.
740         (conv_caf_send): Dito.
742 2016-07-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
744         PR fortran/71902
745         * dependency.c (gfc_check_dependency): Use dep_ref.  Handle case
746         if identical is true and two array element references differ.
747         (gfc_dep_resovler):  Move most of the code to dep_ref.
748         (dep_ref):  New function.
749         * frontend-passes.c (realloc_string_callback):  Name temporary
750         variable "realloc_string".
752 2016-07-17  Fritz Reese  <fritzoreese@gmail.com>
754         PR fortran/71523
755         * trans-decl.c (gfc_finish_var_decl): Replace automatic initializer with
756         a static one.
758 2016-07-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
759             Marco Restelli  <mrestelli@gmail.com>
761         PR fortran/62125
762         * symbol.c (select_type_insert_tmp): Recursively call self to take care
763         of nested select type.
765 2016-07-15  Cesar Philippidis  <cesar@codesourcery.com>
767         * openmp.c (gfc_match_omp_clauses): Scan for clause vector_length
768         before vector.
770 2016-07-15  Andre Vehreschild  <vehre@gcc.gnu.org>
772         PR fortran/71807
773         * trans-expr.c (gfc_trans_subcomponent_assign): Special casing
774         when allocatable component is set to null() in initializer.
776 2016-07-14  Steven G. Kargl  <kargl@gcc.gnu.org>
778         PR fortran/29819
779         * parse.c (parse_contained): Use proper locus.
781 2016-07-14  Andre Vehreschild  <vehre@gcc.gnu.org>
783         PR fortran/70842
784         * simplify.c (gfc_simplify_len): Only for unlimited polymorphic
785         types replace the expression's _data ref with a _len ref.
787 2016-07-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
789         PR fortran/71783
790         * frontend-passes.c (create_var):  Always allocate a charlen
791         for character variables.
793 2016-07-08  Steven G. Kargl  <kargl@gcc.gnu.org>
795         PR fortran/68426
796         * simplify (gfc_simplify_spread): Adjust locus.
798 2016-07-08  Cesar Philippidis  <cesar@codesourcery.com>
800         * parse.c (matcha): Define.
801         (decode_oacc_directive): Add spec_only local var and set it.  Use
802         matcha to parse acc directives except for routine and declare.  Return
803         ST_GET_FCN_CHARACTERISTICS if a non-declarative directive could be
804         matched.
806 2016-07-08  Martin Liska  <mliska@suse.cz>
808         * invoke.texi (Wundefined-do-loop): Enhance documentation.
810 2016-07-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
812         PR fortran/71764
813         * trans-expr.c (gfc_trans_structure_assign): Remove assert.
815 2016-07-07  Martin Liska  <mliska@suse.cz>
817         * lang.opt (Wundefined-do-loop): New option.
818         * resolve.c (gfc_resolve_iterator): Warn for Wundefined-do-loop.
819         (gfc_trans_simple_do): Generate a c-style loop.
820         (gfc_trans_do): Fix GNU coding style.
821         * invoke.texi: Mention the new warning.
823 2016-07-07  Martin Liska  <mliska@suse.cz>
825         * trans-stmt.c (gfc_trans_do): Add expect builtin for DO
826         loops with step bigger than +-1.
828 2016-07-05  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
830         * array.c (gfc_match_array_ref): Add parsing support for
831         STAT= attribute in CAF reference.
832         * expr.c (gfc_find_stat_co): New function that returns
833         the STAT= assignment.
834         * gfortran.h (gfc_array_ref): New member.
835         * trans-decl.c (gfc_build_builtin_function_decls):
836         new attribute for caf_get and caf_send functions.
837         * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Passing
838         the stat attribute to external function.
839         (gfc_conv_intrinsic_caf_send): Ditto.
841 2016-07-05  Andre Vehreschild  <vehre@gcc.gnu.org>
843         PR fortran/71623
844         * trans-stmt.c (gfc_trans_allocate): Add code of pre block of typespec
845         in allocate to parent block.
847 2016-07-04  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
849         PR fortran/66575
850         * decl.c (match_procedure_interface): Exit loop if procedure
851         interface refers to itself.
853 2016-07-04  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
854             Steven G. Kargl  <kargl@gcc.gnu.org>
856         PR fortran/35849
857         * simplify.c (gfc_simplify_ishftc): Check that absolute value of
858         SHIFT is less than or equal to SIZE.
860 2016-07-01  Jakub Jelinek  <jakub@redhat.com>
862         PR fortran/71687
863         * f95-lang.c (struct binding_level): Add reversed field.
864         (clear_binding_level): Adjust initializer.
865         (getdecls): If reversed is clear, set it and nreverse the names
866         chain before returning it.
867         (poplevel): Use getdecls.
868         * trans-decl.c (gfc_generate_function_code, gfc_process_block_locals):
869         Use nreverse to pushdecl decls in the declaration order.
871         PR fortran/71717
872         * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
873         for GFC_DECL_ASSOCIATE_VAR_P with POINTER_TYPE.
875 2016-06-30  Jakub Jelinek  <jakub@redhat.com>
877         PR fortran/71704
878         * parse.c (matchs, matcho): Move right before decode_omp_directive.
879         If spec_only, only gfc_match the keyword and if successful, goto
880         do_spec_only.
881         (matchds, matchdo): Define.
882         (decode_omp_directive): Add spec_only local var and set it.
883         Use matchds or matchdo macros instead of matchs or matcho
884         for declare target, declare simd, declare reduction and threadprivate
885         directives.  Return ST_GET_FCN_CHARACTERISTICS if a non-declarative
886         directive could be matched.
887         (next_statement): For ST_GET_FCN_CHARACTERISTICS restore
888         gfc_current_locus from old_locus even if there is no label.
890         PR fortran/71705
891         * trans-openmp.c (gfc_trans_omp_clauses): Set TREE_ADDRESSABLE on
892         decls in to/from clauses.
894 2016-06-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
896         PR fortran/71686
897         * scanner.c (gfc_next_char_literal): Only decrement nextc if it
898         is not NULL.
900 2016-06-29  Cesar Philippidis  <cesar@codesourcery.com>
902         * openmp.c (match_oacc_clause_gang): Rename to ...
903         (match_oacc_clause_gwv): this.  Add support for OpenACC worker and
904         vector clauses.
905         (gfc_match_omp_clauses): Use match_oacc_clause_gwv for
906         OMP_CLAUSE_{GANG,WORKER,VECTOR}.  Propagate any MATCH_ERRORs for
907         invalid OMP_CLAUSE_{ASYNC,WAIT,GANG,WORKER,VECTOR} clauses.
908         (gfc_match_oacc_wait): Propagate MATCH_ERROR for invalid
909         oacc_expr_lists.  Adjust the first and needs_space arguments to
910         gfc_match_omp_clauses.
912 2016-06-29  Richard Biener  <rguenther@suse.de>
914         PR middle-end/71002
915         * f95-lang.c (LANG_HOOKS_GET_ALIAS_SET): Remove (un-)define.
916         (gfc_get_alias_set): Remove.
918 2016-06-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
920         PR fortran/71649
921         * module.c (create_intrinsic_function): Check for NULL values and
922         return after giving error.
924 2016-06-21  Michael Meissner  <meissner@linux.vnet.ibm.com>
926         * trans-types.c (gfc_build_complex_type): Move setting complex
927         MODE to layout_type, instead of setting it ahead of time by the
928         caller.
930 2016-06-21  Tobias Burnus  <burnus@net-b.de>
932         PR fortran/71068
933         * resolve.c (resolve_function): Don't resolve caf_get/caf_send.
934         (check_data_variable): Strip-off caf_get before checking.
936 2016-06-20  Tobias Burnus  <burnus@net-b.de>
938         PR fortran/71194
939         * trans-expr.c (gfc_trans_pointer_assignment): Correctly handle
940         RHS pointer functions.
942 2016-06-19  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
944         * class.c (gfc_add_class_array_ref): Call gfc_add_data_component()
945         instead of gfc_add_component_ref().
946         (gfc_get_len_component): Call gfc_add_len_component() instead of
947         gfc_add_component_ref().
948         * trans-intrinsic.c (gfc_conv_intrinsic_loc): Call
949         gfc_add_data_component() instead of gfc_add_component_ref().
950         * trans.c (gfc_add_finalizer_call): Call
951         gfc_add_final_component() and gfc_add_size_component() instead
952         of gfc_add_component_ref.
954 2016-06-18  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
956         * trans-types.c (gfc_typenode_for_spec): Commentary typo fix.
958 2016-06-17  Cesar Philippidis  <cesar@codesourcery.com>
960         * openmp.c (match_acc): New generic function to parse OpenACC
961         directives.
962         (gfc_match_oacc_parallel_loop): Use it.
963         (gfc_match_oacc_parallel): Likewise.
964         (gfc_match_oacc_kernels_loop): Likewise.
965         (gfc_match_oacc_kernels): Likewise.
966         (gfc_match_oacc_data): Likewise.
967         (gfc_match_oacc_host_data): Likewise.
968         (gfc_match_oacc_loop): Likewise.
969         (gfc_match_oacc_enter_data): Likewise.
970         (gfc_match_oacc_exit_data): Likewise.
972 2016-06-16  Martin Liska  <mliska@suse.cz>
974         * trans-stmt.c (gfc_trans_simple_do): Predict the edge.
976 2016-06-16  Martin Liska  <mliska@suse.cz>
978         * trans-array.c (gfc_array_allocate): Do not generate expect
979         stmt.
980         * trans.c (gfc_allocate_using_malloc): Properly set FAIL_ALLOC
981         predictor for malloc return value.
982         (gfc_allocate_allocatable): Use REALLOC predictor instead of
983         FAIL_ALLOC.
984         (gfc_deallocate_with_status): Likewise.
986 2016-06-13  Paul Thomas  <pault@gcc.gnu.org>
988         PR fortran/70673
989         * frontend-passes.c (realloc_string_callback): Add a call to
990         gfc_dep_compare_expr.
992 2016-06-11  Dominique d'Humieres  <dominiq@lps.ens.fr>
994         PR fortran/60751
995         * io.c (gfc_resolve_dt): Replace GFC_STD_GNU with GFC_STD_LEGACY.
997 2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
999         PR c/71381
1000         * openmp.c (gfc_match_oacc_cache): Add comment.
1002 2016-06-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1004         PR fortran/71404
1005         * io.c (match_io): For READ, commit in pending symbols in the
1006         current statement before trying to match an expression so that
1007         if the match fails and we undo symbols we dont toss good symbols.
1009 2016-06-05  Andre Vehreschild  <vehre@gcc.gnu.org>
1011         PR fortran/69659
1012         * trans-array.c (gfc_trans_dummy_array_bias): For class arrays use
1013         the address of the _data component to reference the arrays data
1014         component.
1016 2016-06-03  Chung-Lin Tang  <cltang@codesourcery.com>
1018         * trans-openmp.c (gfc_trans_omp_reduction_list): Add mark_addressable
1019         bool parameter, set reduction clause DECLs as addressable when true.
1020         (gfc_trans_omp_clauses): Pass clauses->async to
1021         gfc_trans_omp_reduction_list, add comment describing OpenACC situation.
1023 2016-06-01  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1025         PR fortran/52393
1026         * io.c (match_io): For READ, try to match a default character
1027         expression. If found, set the dt format expression to this,
1028         otherwise go back and try control list.
1030 2016-06-01  Paul Thomas  <pault@gcc.gnu.org>
1032         PR fortran/71156
1033         * decl.c (copy_prefix): Add checks that the module procedure
1034         declaration prefixes are compliant with the interface. Invert
1035         order of existing elemental and pure checks.
1036         * resolve.c (resolve_fl_procedure): Invert order of elemental
1037         and pure errors.
1039 2016-06-01  Jakub Jelinek  <jakub@redhat.com>
1041         * parse.c (case_decl): Move ST_OMP_* to ...
1042         (case_omp_decl): ... here, new macro.
1043         (verify_st_order): For case_omp_decl, complain about
1044         p->state >= ORDER_EXEC, but don't change p->state otherwise.
1046 2016-05-26  Jakub Jelinek  <jakub@redhat.com>
1048         * openmp.c (resolve_omp_clauses): Warn if chunk_size is known not to
1049         be positive.
1051 2016-05-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1053         PR fortran/66461
1054         * scanner.c (gfc_next_char_literal): Clear end_flag when adjusting
1055         current locus back to old_locus.
1057 2016-05-20  Jakub Jelinek  <jakub@redhat.com>
1059         PR fortran/71204
1060         * frontend-passes.c (realloc_string_callback): Clear inserted_block
1061         and changed_statement before calling create_var.
1063 2016-05-15  Harald Anlauf  <anlauf@gmx.de>
1065         PR fortran/69603
1066         * interface.c (compare_parameter): Check for non-NULL pointer.
1068 2016-05-14  Fritz Reese  <fritzoreese@gmail.com>
1070         * gfortran.texi: Update example of DEC UNION extension.
1072 2016-05-14  Fritz Reese  <fritzoreese@gmail.com>
1074         PR fortran/71047
1075         * expr.c (gfc_default_initializer): Avoid extra component refs in
1076         constructors for derived types and classes.
1078 2016-05-11  Jakub Jelinek  <jakub@redhat.com>
1080         PR fortran/70855
1081         * frontend-passes.c (inline_matmul_assign): Disable in !$omp workshare.
1083 2016-05-09  Richard Biener  <rguenther@suse.de>
1085         PR fortran/70937
1086         * trans-decl.c: Include gimplify.h for unshare_expr.
1087         (gfc_trans_vla_one_sizepos): Unshare exprs before inserting
1088         them into the IL.
1090 2016-05-07  Fritz Reese  <fritzoreese@gmail.com>
1092         PR fortran/56226
1093         * module.c (dt_upper_string): Rename to gfc_dt_upper_string
1094         (dt_lower_string): Likewise.
1095         * gfortran.h: Make new gfc_dt_upper/lower_string global.
1096         * class.c: Use gfc_dt_upper_string.
1097         * decl.c: Likewise.
1098         * symbol.c: Likewise.
1099         * resolve.c (resolve_component): New function.
1100         (resolve_fl_derived0): Move component loop code to resolve_component.
1101         * parse.c (check_component): New function.
1102         (parse_derived): Move loop code to check_component.
1103         * lang.opt, invoke.texi, options.c : New option -fdec-structure.
1104         * libgfortran.h (bt): New basic type BT_UNION.
1105         * gfortran.h (gfc_option): New option -fdec-structure.
1106         (gfc_get_union_type, gfc_compare_union_types): New prototypes.
1107         (gfc_bt_struct, gfc_fl_struct, case_bt_struct, case_fl_struct): New
1108         macros.
1109         (gfc_find_component): Change prototype.
1110         * match.h (gfc_match_member_sep, gfc_match_map, gfc_match_union,
1111         gfc_match_structure_decl): New prototypes.
1112         * parse.h (gfc_comp_struct): New macro.
1113         * symbol.c (gfc_find_component): Search for components in nested unions
1114         * class.c (insert_component_ref, gfc_add_component_ref, add_proc_comp,
1115         copy_vtab_proc_comps): Update calls to gfc_find_component.
1116         * primary.c (gfc_convert_to_structure_constructor): Likewise.
1117         * symbol.c (gfc_add_component): Likewise.
1118         * resolve.c (resolve_typebound_function, resolve_typebound_subroutine,
1119         resolve_typebound_procedure, resolve_component, resolve_fl_derived):
1120         Likewise.
1121         * expr.c (get_union_init, component_init): New functions.
1122         * decl.c (match_clist_expr, match_record_decl, get_struct_decl,
1123         gfc_match_map, gfc_match_union, gfc_match_structure_decl): Likewise.
1124         * interface.c (compare_components, gfc_compare_union_types): Likewise.
1125         * match.c (gfc_match_member_sep): Likewise.
1126         * parse.c (check_component, parse_union, parse_struct_map): Likewise.
1127         * resolve.c (resolve_fl_struct): Likewise.
1128         * symbol.c (find_union_component): Likewise.
1129         * trans-types.c (gfc_get_union_type): Likewise.
1130         * parse.c (parse_derived): Use new functions.
1131         * interface.c (gfc_compare_derived_types, gfc_compare_types): Likewise.
1132         * expr.c (gfc_default_initializer): Likewise.
1133         * gfortran.texi: Support for DEC structures, unions, and maps.
1134         * gfortran.h (gfc_statement, sym_flavor): Likewise.
1135         * check.c (gfc_check_kill_sub): Likewise.
1136         * expr.c (gfc_copy_expr, simplify_const_ref,
1137         gfc_has_default_initializer): Likewise.
1138         * decl.c (build_sym, match_data_constant, add_init_expr_to_sym,
1139         match_pointer_init, build_struct, variable_decl,
1140         gfc_match_decl_type_spec, gfc_mach_data-decl, gfc_match_entry,
1141         gfc_match_end, gfc_match_derived_decl): Likewise.
1142         * interface.c (check_interface0, check_interface1,
1143         gfc_search_interface): Likewise.
1144         * misc.c (gfc_basic_typename, gfc_typename): Likewise.
1145         * module.c (add_true_name, build_tnt, bt_types, mio_typespec,
1146         fix_mio_expr, load_needed, mio_symbol, read_module, write_symbol,
1147         gfc_get_module_backend_decl): Likewise.
1148         * parse.h (gfc_compile_state): Likewise.
1149         * parse.c (decode_specification_statement, decode_statement,
1150         gfc_ascii_statement, verify_st_order, parse_spec): Likewise.
1151         * primary.c (gfc_match_varspec, gfc_match_structure_constructor,
1152         gfc_match_rvalue, match_variable): Likewise.
1153         * resolve.c (find_arglists, resolve_structure_cons,
1154         is_illegal_recursion, resolve_generic_f, get_declared_from_expr,
1155         resolve_typebound_subroutine, resolve_allocate_expr,
1156         nonscalar_typebound_assign, generate_component_assignments,
1157         resolve_fl_variable_derived, check_defined_assignments,
1158         resolve_component, resolve_symbol, resolve_equivalence_derived):
1159         Likewise.
1160         * symbol.c (flavors, check_conflict, gfc_add_flavor, gfc_use_derived,
1161         gfc_restore_last_undo_checkpoint, gfc_type_compatible,
1162         gfc_find_dt_in_generic): Likewise.
1163         * trans-decl.c (gfc_get_module_backend_decl, create_function_arglist,
1164         gfc_create_module_variable, check_constant_initializer): Likewise.
1165         * trans-expr.c (gfc_conv_component_ref, gfc_conv_initializer,
1166         gfc_trans_alloc_subarray_assign, gfc_trans_subcomponent_assign,
1167         gfc_conv_structure, gfc_trans_scalar_assign, copyable_array_p):
1168         Likewise.
1169         * trans-io.c (transfer_namelist_element, transfer_expr,
1170         gfc_trans_transfer): Likewise.
1171         * trans-stmt.c (gfc_trans_deallocate): Likewise.
1172         * trans-types.c (gfc_typenode_for_spec, gfc_copy_dt_decls_ifequal,
1173         gfc_get_derived_type): Likewise.
1175 2016-05-05  Jakub Jelinek  <jakub@redhat.com>
1177         * openmp.c (gfc_match_omp_clauses): Restructuralize, so that clause
1178         parsing is done in a big switch based on gfc_peek_ascii_char and
1179         individual clauses under their first letters are sorted too.
1181 2016-05-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
1183         * trans-types.c (gfc_build_complex_type):
1185 2016-05-02  Richard Biener  <rguenther@suse.de>
1187         * trans-array.c (gfc_trans_create_temp_array): Properly
1188         create a DECL_EXPR for the anonymous VLA array type.
1190 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
1192         PR middle-end/70626
1193         * trans-openmp.c (gfc_trans_oacc_combined_directive): Duplicate
1194         the reduction clause in both parallel and loop directives.
1196 2016-04-18  Michael Matz  <matz@suse.de>
1198         * trans-io.c (gfc_build_io_library_fndecls): Use SET_TYPE_ALIGN.
1199         * trans-common.c (build_common_decl): Use SET_DECL_ALIGN.
1200         * trans-types.c (gfc_add_field_to_struct): Use SET_DECL_ALIGN.
1202 2016-04-13  Dominique d'Humieres  <dominiq@lps.ens.fr>
1204         PR fortran/67039
1205         * intrinsic.texi: Correct the documentation of pseudorandom
1206         number intrinsics.
1208 2016-04-13  Dominique d'Humieres  <dominiq@lps.ens.fr>
1210         PR fortran/58000
1211         * gfortran.texi: Document OPEN( ... NAME=) as not implemented
1212         in GNU Fortran
1214 2016-04-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1216         PR fortran/68566
1217         * array.c (match_array_element_spec): Add check for non-integer.
1218         * simplify.c (gfc_simplify_reshape): If source shape is NULL return.
1220 2016-04-06  Patrick Palka  <ppalka@gcc.gnu.org>
1222         PR c/70436
1223         * openmp.c (gfc_find_omp_udr): Add explicit braces to resolve a
1224         future -Wparentheses warning.
1226 2016-04-04  Andre Vehreschild  <vehre@gcc.gnu.org>
1228         PR fortran/67538
1229         * resolve.c (resolve_allocate_expr): Emit error message when no
1230         array spec and no array valued source= expression is given in an
1231         F2008 allocate() for an array to allocate.
1233 2016-04-04  Andre Vehreschild  <vehre@gcc.gnu.org>
1235         PR fortran/65795
1236         * trans-array.c (gfc_array_allocate): When the array is a coarray,
1237         do not nullyfing its allocatable components in array_allocate, because
1238         the nullify missed the array ref and nullifies the wrong component.
1239         Cosmetics.
1241 2016-03-29  Andre Vehreschild  <vehre@gcc.gnu.org>
1243         PR fortran/70397
1244         * trans-expr.c (gfc_class_len_or_zero_get): Add function to return a
1245         constant zero tree, when the class to get the _len component from is
1246         not unlimited polymorphic.
1247         (gfc_copy_class_to_class): Use the new function.
1248         * trans.h: Added interface of new function gfc_class_len_or_zero_get.
1250 2016-03-28  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
1252         * trans-decl.c (gfc_build_builtin_function_decls):
1253         caf_stop_numeric and caf_stop_str definition.
1254         * trans-stmt.c (gfc_trans_stop): invoke external functions
1255         for stop and stop_str when coarrays are used.
1256         * trans.h: extern for new functions.
1258 2016-03-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1260         PR fortran/69043
1261         * scanner.c (load_file): Update to use S_ISREG macro.
1263 2016-03-17  Thomas Schwinge  <thomas@codesourcery.com>
1265         * gfortran.h (enum gfc_omp_map_op): Rename OMP_MAP_FORCE_DEALLOC
1266         to OMP_MAP_DELETE.  Adjust all users.
1268 2016-03-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1269             Jim MacArthur  <jim.macarthur@codethink.co.uk>
1271         PR fortran/69043
1272         * scanner.c (load_file): Check that included file is regular.
1274 2016-03-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1275             Harold Anlauf  <anlauf@gmx.de>
1277         PR fortran/69520
1278         * invoke.texi: Explain use of the 'no-' construct within the
1279         -fcheck= option.
1280         * options.c (gfc_handle_runtime_check_option): Enable use of
1281         'no-' prefix for the various options with -fcheck= to allow
1282         negating previously enabled check options.
1284 2016-03-12  Paul Thomas  <pault@gcc.gnu.org>
1286         PR fortran/70031
1287         * decl.c (gfc_match_prefix): Treat the 'module' prefix in the
1288         same way as the others, rather than fixing it to come last.
1289         (gfc_match_function_decl, gfc_match_subroutine): After errors
1290         in 'copy_prefix', emit them immediately in the case of module
1291         procedures to prevent a later ICE.
1293         PR fortran/69524
1294         * decl.c (gfc_match_submod_proc): Permit 'module procedure'
1295         declarations within the contains section of modules as well as
1296         submodules.
1297         * resolve.c (resolve_fl_procedure): Likewise.
1298         *trans-decl.c (build_function_decl): Change the gcc_assert to
1299         allow all forms of module procedure declarations within module
1300         contains sections.
1302 2016-02-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
1304         PR fortran/68147
1305         PR fortran/47674
1306         * frontend-passes.c (realloc_string_callback): Don't set
1307         walk_subtrees.
1309 2016-02-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
1311         * dump-parse-tree.c (show_code_node):  Print association
1312         list of a block if present.  Handle EXEC_END_BLOCK.
1314 2016-02-28  Harald Anlauf  <anlauf@gmx.de>
1315             Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1317         PR fortran/56007
1318         * match.c (gfc_match_iterator): Add diagnostic for array variable
1319         as do loop index.
1321 2016-02-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1322             Steven G. Kargl  <kargl@gcc.gnu.org>
1324         PR fortran/69910
1325         * io.c (gfc_match_open): Check that open status is an expression
1326         constant before comparing string to 'scratch' with NEWUNIT.
1328 2016-02-27  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
1330         * trans.c (gfc_allocate_allocatable): size conversion
1331         from byte to number of elements for event variables.
1332         * trans-types.c (gfc_get_derived_type): event variables
1333         represented as a pointer (like lock variable).
1335 2016-02-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1337         PR fortran/61156
1338         * scanner.c (add_path_to_list): If include path is not a directory,
1339         issue a fatal error.
1341 2016-02-23  Andre Vehreschild  <vehre@gcc.gnu.org>
1343         PR fortran/67451
1344         * trans-array.c (gfc_array_allocate): Take the attributes from the
1345         expression to allocate and not from the source=-expression.
1347 2016-02-20  Paul Thomas  <pault@gcc.gnu.org>
1349         PR fortran/69423
1350         * trans-decl.c (create_function_arglist): Deferred character
1351         length functions, with and without declared results, address
1352         the passed reference type as '.result' and the local string
1353         length as '..result'.
1354         (gfc_null_and_pass_deferred_len): Helper function to null and
1355         return deferred string lengths, as needed.
1356         (gfc_trans_deferred_vars): Call it, thereby reducing repeated
1357         code, add call for deferred arrays and reroute pointer function
1358         results. Avoid using 'tmp' for anything other that a temporary
1359         tree by introducing 'type_of_array' for the arrayspec type.
1361 2015-02-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
1363         PR fortran/69742
1364         * frontend-passes.c (cfe-expr_0):  Don't register functions
1365         from within an ASSOCIATE statement.
1367 2016-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
1369         PR fortran/60526
1370         * decl.c (build_sym):  If the name has already been defined as a
1371         type, it has a symtree with an upper case letter at the beginning.
1372         If such a symtree exists, issue an error and exit.  Don't do
1373         this if there is no corresponding upper case letter.
1375 2016-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
1377         PR fortran/60526
1378         PR bootstrap/69816
1379         * decl.c (build_sym):  Reverted previous patch.
1381 2016-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
1383         PR fortran/60526
1384         * decl.c (build_sym):  If the name has already been defined as a
1385         type, issue error and return false.
1387 2016-02-12  David Malcolm  <dmalcolm@redhat.com>
1389         PR other/69554
1390         * error.c (gfc_diagnostic_start_span): New function.
1391         (gfc_diagnostics_init): Initialize global_dc's start_span.
1393 2016-02-11  Andre Vehreschild  <vehre@gcc.gnu.org>
1395         PR fortran/69296
1396         * gfortran.h: Added flag to gfc_association_list indicating that
1397         the rank of an associate variable has been guessed only.
1398         * parse.c (parse_associate): Set the guess flag mentioned above
1399         when guessing the rank of an expression.
1400         * resolve.c (resolve_assoc_var): When the rank has been guessed,
1401         make sure, that the guess was correct else overwrite with the actual
1402         rank.
1403         * trans-stmt.c (trans_associate_var): For subref_array_pointers in
1404         class objects, take the span from the _data component.
1406 2016-02-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1408         PR fortran/50555
1409         * primary.c (match_actual_arg): If symbol has attribute flavor of
1410         namelist, generate an error. (gfc_match_rvalue): Likewise return
1411         MATCH_ERROR.
1412         * resolve.c (resolve_symbol): Scan arument list of procedures and
1413         generate an error if a namelist is found.
1415 2016-02-05  Mikael Morin  <mikael@gcc.gnu.org>
1417         PR fortran/66089
1418         * trans-expr.c (expr_is_variable, gfc_expr_is_variable): Rename
1419         the former to the latter and make it non-static.  Update callers.
1420         * gfortran.h (gfc_expr_is_variable): New declaration.
1421         (struct gfc_ss_info): Add field needs_temporary.
1422         * trans-array.c (gfc_scalar_elemental_arg_saved_as_argument):
1423         Tighten the condition on aggregate expressions with a check
1424         that the expression is a variable and doesn't need a temporary.
1425         (gfc_conv_resolve_dependency): Add intermediary reference variable.
1426         Set the needs_temporary field.
1428 2016-02-03  Andre Vehreschild  <vehre@gcc.gnu.org>
1430         PR fortran/67451
1431         PR fortran/69418
1432         * trans-expr.c (gfc_copy_class_to_class): For coarrays just the
1433         pointer is passed.  Take it as is without trying to deref the
1434         _data component.
1435         * trans-stmt.c (gfc_trans_allocate): Take care of coarrays as
1436         argument to source=-expression.
1438 2016-02-02  Nathan Sidwell  <nathan@codesourcery.com>
1440         * lang.opt (fopenacc-dim=): New option.
1442 2016-01-31  Paul Thomas  <pault@gcc.gnu.org>
1444         PR fortran/67564
1445         * trans-expr.c (gfc_conv_procedure_call): For the vtable copy
1446         subroutines, add a string length argument, when the actual
1447         argument is an unlimited polymorphic class object.
1449 2016-01-30  Paul Thomas  <pault@gcc.gnu.org>
1451         PR fortran/69566
1452         * trans-expr.c (gfc_conv_procedure_call): Correct expression
1453         for 'ulim_copy', which was missing a test for 'comp'.
1455 2016-01-28  Andre Vehreschild  <vehre@gcc.gnu.org>
1457         PR fortran/62536
1458         * decl.c (gfc_match_end): Only unnest and remove BLOCK namespaces
1459         when the END encountered does not match a BLOCK's end.
1461 2016-01-27  Janus Weil  <janus@gcc.gnu.org>
1463         PR fortran/69484
1464         * invoke.texi: Fix documentation of -Wall with respect to -Wtabs.
1466 2016-01-27  Paul Thomas  <pault@gcc.gnu.org>
1468         PR fortran/69422
1469         * trans-expr.c (is_scalar_reallocatable_lhs): Remove the check
1470         for allocatable components, whilst checking if the symbol is a
1471         derived or class entity..
1473 2016-01-26  Paul Thomas  <pault@gcc.gnu.org>
1475         PR fortran/69385
1476         * trans-expr.c (gfc_trans_assignment_1): Exclude initialization
1477         assignments from check on assignment of scalars to unassigned
1478         arrays and correct wrong code within the corresponding block.
1480 2016-01-26  David Malcolm  <dmalcolm@redhat.com>
1482         PR other/69006
1483         * error.c (gfc_diagnostic_starter): Delete use of pp_newline.
1485 2016-01-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1487         PR fortran/69397
1488         PR fortran/68442
1489         * interface.c (gfc_arglist_matches_symbol): Replace assert with
1490         a return false if not a procedure.
1491         * resolve.c (resolve_generic_f): Test if we are resolving an
1492         initialization expression and adjust error message accordingly.
1494 2016-01-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
1496         PR fortran/66094
1497         * frontend-passes.c (matmul_lhs_realloc):  Add
1498         forgotten break statement.
1500 2016-01-24  Dominique d'Humieres  <dominiq@lps.ens.fr>
1502         PR fortran/68283
1503         * primary.c (gfc_variable_attr): revert revision r221955,
1504         call gfc_internal_error only if there is no error.
1506 2016-01-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
1508         PR fortran/66094
1509         * frontend-passes.c (enum matrix_case):  Add case A2B2T for
1510         MATMUL(A,TRANSPoSE(B)) where A and B are rank 2.
1511         (inline_limit_check):  Also add A2B2T.
1512         (matmul_lhs_realloc):  Handle A2B2T.
1513         (check_conjg_variable):  Rename to
1514         (check_conjg_transpose_variable):  and also count TRANSPOSE.
1515         (inline_matmul_assign):  Handle A2B2T.
1517 2016-01-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1519         PR fortran/65996
1520         * error.c (gfc_error): Save the state of abort_on_error and set
1521         it to false for buffered errors to allow normal processing.
1522         Restore the state before leaving.
1524 2016-01-19  Martin Jambor  <mjambor@suse.cz>
1526         * types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New.
1527         (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed.
1528         (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): New.
1530 2016-01-15  Paul Thomas  <pault@gcc.gnu.org>
1532         PR fortran/64324
1533         * resolve.c (check_uop_procedure): Prevent deferred length
1534         characters from being trapped by assumed length error.
1536         PR fortran/49630
1537         PR fortran/54070
1538         PR fortran/60593
1539         PR fortran/60795
1540         PR fortran/61147
1541         PR fortran/64324
1542         * trans-array.c (gfc_conv_scalarized_array_ref): Pass decl for
1543         function as well as variable expressions.
1544         (gfc_array_init_size): Add 'expr' as an argument. Use this to
1545         correctly set the descriptor dtype for deferred characters.
1546         (gfc_array_allocate): Add 'expr' to the call to
1547         'gfc_array_init_size'.
1548         * trans.c (gfc_build_array_ref): Expand logic for setting span
1549         to include indirect references to character lengths.
1550         * trans-decl.c (gfc_get_symbol_decl): Ensure that deferred
1551         result char lengths that are PARM_DECLs are indirectly
1552         referenced both for directly passed and by reference.
1553         (create_function_arglist): If the length type is a pointer type
1554         then store the length as the 'passed_length' and make the char
1555         length an indirect reference to it.
1556         (gfc_trans_deferred_vars): If a character length has escaped
1557         being set as an indirect reference, return it via the 'passed
1558         length'.
1559         * trans-expr.c (gfc_conv_procedure_call): The length of
1560         deferred character length results is set TREE_STATIC and set to
1561         zero.
1562         (gfc_trans_assignment_1): Do not fix the rse string_length if
1563         it is a variable, a parameter or an indirect reference. Add the
1564         code to trap assignment of scalars to unallocated arrays.
1565         * trans-stmt.c (gfc_trans_allocate): Remove 'def_str_len' and
1566         all references to it. Instead, replicate the code to obtain a
1567         explicitly defined string length and provide a value before
1568         array allocation so that the dtype is correctly set.
1569         trans-types.c (gfc_get_character_type): If the character length
1570         is a pointer, use the indirect reference.
1572 2016-01-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
1574         PR fortran/69154
1575         * frontend-passes.c (in_where):  New variable.
1576         (inline_matmul_assign):  Don't try this if we are within
1577         a WHERE statement.
1578         (gfc_code_walker):  Keep track of in_where.
1580 2016-01-10  Paul Thomas  <pault@gcc.gnu.org>
1582         PR fortran/67779
1583         * trans_array.c (gfc_conv_scalarized_array_ref): Add missing
1584         se->use_offset from condition for calculation of 'base'.
1586 2016-01-08  Jakub Jelinek  <jakub@redhat.com>
1588         PR fortran/69128
1589         * trans.h (OMPWS_SCALARIZER_BODY): Define.
1590         (OMPWS_NOWAIT): Renumber.
1591         * trans-stmt.c (gfc_trans_where_3): Only set OMPWS_SCALARIZER_WS
1592         if OMPWS_SCALARIZER_BODY is not set already, and set also
1593         OMPWS_SCALARIZER_BODY until the final loop creation.
1594         * trans-expr.c (gfc_trans_assignment_1): Likewise.
1595         * trans-openmp.c (gfc_trans_omp_workshare): Also clear
1596         OMPWS_SCALARIZER_BODY.
1597         * trans-array.c (gfc_trans_scalarized_loop_end): Don't create
1598         OMP_FOR if OMPWS_SCALARIZER_BODY is set.
1600 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
1602         Update copyright years.
1604         * gfortranspec.c (lang_specific_driver): Update copyright notice
1605         dates.
1606         * gfc-internals.texi: Bump @copying's copyright year.
1607         * gfortran.texi: Ditto.
1608         * intrinsic.texi: Ditto.
1609         * invoke.texi: Ditto.
1611 2016-01-01  Paul Thomas  <pault@gcc.gnu.org>
1613         PR fortran/68864
1614         * trans-array.c (evaluate_bound): If deferred, test that 'desc'
1615         is an array descriptor before using gfc_conv_descriptor_xxx.
1617 Copyright (C) 2016 Free Software Foundation, Inc.
1619 Copying and distribution of this file, with or without modification,
1620 are permitted in any medium without royalty provided the copyright
1621 notice and this notice are preserved.