* trans-intrinsic.c (conv_expr_ref_to_caf_ref): Adjust fall through
[official-gcc.git] / gcc / fortran / ChangeLog
blob1a799ad39dc271f384ea8b30a985462e9e027789
1 2016-09-20  Marek Polacek  <polacek@redhat.com>
3         * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Adjust fall through
4         comment.
6 2016-09-19  Andre Vehreschild  <vehre@gcc.gnu.org>
8         PR fortran/71952
9         * expr.c (gfc_check_assign): Added flag to control whether datatype
10         conversion is allowed.
11         * gfortran.h: Added caf-token-tree to gfc_component.  Changed
12         prototypes mostly to add whether datatype conversion is allowed.
13         * gfortran.texi: Added documentation for the caf_reference_t and the
14         caf_*_by_ref function.
15         * primary.c (caf_variable_attr): Similar to gfc_variable_attr but
16         focused on the needs of coarrays.
17         (gfc_caf_attr): Same.
18         * resolve.c (resolve_ordinary_assign): Set the conversion allowed
19         flag when not in a coarray.
20         * trans-array.c (gfc_array_init_size): Moved setting of array
21         descriptor's datatype before the alloc, because caf_register needs it.
22         (gfc_array_allocate): Changed notion of whether an array is a coarray.
23         (gfc_array_deallocate): Same.
24         (gfc_alloc_allocatable_for_assignment): Added setting of coarray's
25         array descriptor datatype before the register.  And using deregister/
26         register to mimmick a realloc for coarrays.
27         * trans-decl.c (gfc_build_builtin_function_decls): Corrected signatures
28         of old caf-functions and added signature definitions of the _by_ref
29         ones.
30         (generate_coarray_sym_init): Adapted to new caf_register signature.
31         * trans-expr.c (gfc_conv_scalar_to_descriptor): Make sure a constant
32         is translated to an lvalue expression before use in an array
33         descriptor.
34         (gfc_get_ultimate_alloc_ptr_comps_caf_token): New function.  Get the
35         last allocatable component's coarray token.
36         (gfc_get_tree_for_caf_expr): For top-level object get the coarray
37         token and check for unsupported features.
38         (gfc_get_caf_token_offset): Getting the offset might procude new
39         statements, which now are stored in the pre and post of the current se.
40         (gfc_caf_get_image_index): For this image return a call to
41         caf_this_image.
42         (expr_may_alias_variables): Check that the result is set for testing
43         its properties.
44         (alloc_scalar_allocatable_for_assignment): Added auto allocation of
45         coarray components.
46         (gfc_trans_assignment_1): Rewrite an assign to a coarray object to
47         be a sendget.
48         * trans-intrinsic.c (conv_caf_vector_subscript_elem): Corrected
49         wrong comment.
50         (compute_component_offset): Compute the correct offset a structure
51         member.
52         (conv_expr_ref_to_caf_ref): Convert to a chain of refs into
53         caf_references.
54         (gfc_conv_intrinsic_caf_get): Call caf_get_by_ref instead of caf_get.
55         (conv_caf_send): Call caf_*_by_ref for coarrays that need
56         reallocation.
57         (gfc_conv_intrinsic_function): Adapted to new signuature of the caf
58         drivers.
59         (conv_intrinsic_atomic_op): Add pre and post statements correctly.
60         (conv_intrinsic_atomic_ref): Same.
61         (conv_intrinsic_atomic_cas): Same.
62         (conv_intrinsic_event_query): Same.
63         * trans-stmt.c (gfc_trans_lock_unlock): Same.
64         (gfc_trans_event_post_wait): Same.
65         (gfc_trans_allocate): Support allocation of allocatable coarrays.
66         (gfc_trans_deallocate): And there deallocation.
67         * trans-types.c (gfc_typenode_for_spec): Added flag to control whether
68         a component is part of coarray.  When so, then add space to store a
69         coarray token.
70         (gfc_build_array_type): Same.
71         (gfc_get_array_descriptor_base): Same.
72         (gfc_get_array_type_bounds): Same.
73         (gfc_sym_type): Same.
74         (gfc_get_derived_type): Same.
75         (gfc_get_caf_reference_type): Declare the caf_reference_type.
76         * trans-types.h: Prototype changes only.
77         * trans.c (gfc_allocate_using_lib): Use the updated caf_register
78         signature.
79         (gfc_allocate_allocatable): Same.
80         (gfc_deallocate_with_status): Same.
81         * trans.h: Defined the runtime types for caf_reference_t and the enums.
83 2016-09-19  Fritz Reese  <fritzoreese@gmail.com>
85         PR fortran/77584
86         * decl.c (match_record_decl, gfc_match_decl_type_spec): Fixes to
87         handling of structure/record from declaration-type-spec.
89 2016_09_17  Louis Krupp  <louis.krupp@zoho.com>
91         PR fortran/68078
92         * resolve.c (resolve_allocate_expr): Check that derived type
93         pointer, object or array has been successfully allocated before
94         initializing.
96 2016-09-16  Steven G. Kargl  <kargl@gcc.gnu.org>
98         PR fortran/77612
99         * decl.c (char_len_param_value): Check parent namespace for 
100         seen_implicit_none.
102 2016-09-15  Louis Krupp  <louis.krupp@zoho.com>
104         PR fortran/69963
105         * parse.c (reject_statement): Clear charlen pointers in implicit
106         character typespecs before those charlen structures are freed.
108 2016-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
110         * simplify.c (gfc_simplify_repeat): Fix a misplaced closing ')'.
112 2016-09-13  Steven G. Kargl  <kargl@gcc.gnu.org>
114         PR fortran/77420
115         * module.c (load_equiv):  Revert revision 240063.
117 2016-09-10  Paul Thomas  <pault@gcc.gnu.org>
118             Steven G. Kargl  <kargl@gcc.gnu.org>
120         PR fortran/77532
121         * interface.c (check_dtio_arg_TKR_intent): Return after error.
122         (check_dtio_interface1): Remove asserts, test for NULL and return
123         if found.
125 2016-09-09  Steven G. Kargl  <kargl@gcc.gnu.org>
127         PR fortran/77420
128         * module.c (load_equiv): If the current namespace has a list of
129         equivalence statements, initialize duplicate to false and then
130         look for duplicates; otherwise, initialize it to true.
132 2016-09-09  Steven G. Kargl  <kargl@gcc.gnu.org>
134         PR fortran/77506
135         * array.c (gfc_match_array_constructor): CHARACTER(len=*) cannot
136         appear in an array constructor.
138 2016-09-09  Steven G. Kargl  <kargl@gcc.gnu.org>
140         PR fortran/77507
141         * intrinsic.c (add_functions):  Use correct keyword.
143 2016-09-08  Steven G. Kargl  <kargl@gcc.gnu.org>
145         PR fortran/69514
146         * array.c (gfc_match_array_constructor):  If type-spec is present,
147         walk the array constructor performing possible conversions for 
148         numeric types.
150 2016-09-08  Jakub Jelinek  <jakub@redhat.com>
152         PR fortran/77500
153         * trans-openmp.c (gfc_trans_omp_atomic): For atomic write or
154         swap, don't try to look through GFC_ISYM_CONVERSION.  In other cases,
155         check that value.function.isym is non-NULL before dereferencing it.
157 2016-09-04  Steven G. Kargl  <kargl@gcc.gnu.org>
159         PR fortran/77391
160         * resolve.c (deferred_requirements): New function to check F2008:C402.
161         (resolve_fl_variable,resolve_fl_parameter): Use it.
163 2016-09-04  Steven G. Kargl  <kargl@gcc.gnu.org>
165         PR fortran/77460
166         * simplify.c (simplify_transformation_to_scalar):  On error, result
167         may be NULL, simply return.
169 2016-08-31  Jakub Jelinek  <jakub@redhat.com>
171         PR fortran/77352
172         * trans-openmp.c (gfc_trans_omp_parallel_workshare): Always add a
173         BIND_EXPR with BLOCK around what gfc_trans_omp_workshare returns.
175         PR fortran/77374
176         * parse.c (parse_omp_oacc_atomic): Copy over cp->ext.omp_atomic
177         to cp->block->ext.omp_atomic.
178         * resolve.c (gfc_resolve_blocks): Assert block with one or two
179         EXEC_ASSIGNs for EXEC_*_ATOMIC.
180         * openmp.c (resolve_omp_atomic): Don't assert one or two
181         EXEC_ASSIGNs, instead return quietly for EXEC_NOPs and otherwise
182         error unexpected statements.
184 2016-08-31  Paul Thomas  <pault@gcc.gnu.org>
185             Jerry DeLisle  <jvdelisle@gcc.gnu.org>
187         PR fortran/48298
188         * decl.c (access_attr_decl): Include case INTERFACE_DTIO as
189         appropriate.
190         * gfortran.h : Add INTRINSIC_FORMATTED and
191         INTRINSIC_UNFORMATTED to gfc_intrinsic_op. Add INTERFACE_DTIO
192         to interface type. Add new enum 'dtio_codes'. Add bitfield
193         'has_dtio_procs' to symbol_attr. Add prototypes
194         'gfc_check_dtio_interfaces' and 'gfc_find_specific_dtio_proc'.
195         * interface.c (dtio_op): New function.
196         (gfc_match_generic_spec): Match generic DTIO interfaces.
197         (gfc_match_interface): Treat DTIO interfaces in the same way as
198         (gfc_current_interface_head): Add INTERFACE_DTIO appropriately.
199         (check_dtio_arg_TKR_intent): New function.
200         (check_dtio_interface1): New function.
201         (gfc_check_dtio_interfaces): New function.
202         (gfc_find_specific_dtio_proc): New function.
203         * io.c : Add FMT_DT to format_token.
204         (format_lex): Handle DTIO formatting.
205         * match.c (gfc_op2string): Add DTIO operators.
206         * resolve.c (derived_inaccessible): Ignore pointer components
207         to enclosing derived type.
208         (resolve_transfer): Resolve transfers that involve DTIO.
209         procedures. Find the specific subroutine for the transfer and
210         use its existence to over-ride some of the constraints on
211         derived types. If the transfer is recursive, require that the
212         subroutine be so qualified.
213         (dtio_procs_present): New function.
214         (resolve_fl_namelist): Remove inhibition of polymorphic objects
215         in namelists if DTIO read and write subroutines exist. Likewise
216         for derived types.
217         (resolve_types): Invoke 'gfc_verify_dtio_procedures'.
218         * symbol.c : Set 'dtio_procs' using 'minit'.
219         * trans-decl.c (gfc_finish_var_decl): If a derived-type/class
220         object is associated with DTIO procedures, make it TREE_STATIC.
221         * trans-expr.c (gfc_get_vptr_from_expr): If the expression
222         drills down to a PARM_DECL, extract the vptr correctly.
223         (gfc_conv_derived_to_class): Check 'info' in the test for
224         'useflags'. If the se expression exists and is a pointer, use
225         it as the class _data.
226         * trans-io.c : Add IOCALL_X_DERIVED to iocall and the function
227         prototype. Likewise for IOCALL_SET_NML_DTIO_VAL.
228         (set_parameter_tree): Renamed from 'set_parameter_const', now
229         returns void and has new tree argument. Calls modified to match
230         new interface.
231         (transfer_namelist_element): Transfer DTIO procedure pointer
232         and vpointer using the new function IOCALL_SET_NML_DTIO_VAL.
233         (get_dtio_proc): New function.
234         (transfer_expr): Add new argument for the vptr field of class
235         objects. Add the code to call the specific DTIO proc, convert
236         derived types to class and call IOCALL_X_DERIVED.
237         (trans_transfer): Add BT_CLASS to structures for treatment by
238         the scalarizer. Obtain the vptr for the dynamic type, both for
239         scalar and array transfer.
241 2016-08-30  Fritz Reese  <fritzoreese@gmail.com>
243         * gfortran.texi: Fix typo in STRUCTURE documentation.
245 2016-08-29  Fritz Reese  <fritzoreese@gmail.com>
247         Fix, reorganize, and clarify comparisons of anonymous types/components.
249         PR fortran/77327
250         * interface.c (is_anonymous_component, is_anonymous_dt): New functions.
251         * interface.c (compare_components, gfc_compare_derived_types): Use new
252         functions.
254 2016-08-27  Steven G. Kargl  <kargl@gcc.gnu.org>
256         PR fortran/77380
257         * dependency.c (gfc_check_dependency): Do not assert with
258         -fcoarray=lib.
260 2016-08-27  Steven G. Kargl  <kargl@gcc.gnu.org>
262         PR fortran/77372
263         simplify.c (simplify_ieee_selected_real_kind): Check for NULL pointers.
265 2016-08-25  Steven g. Kargl  <kargl@gcc.gnu.org>
267         PR fortran/77351
268         * frontend-passes.c (remove_trim,combine_array_constructor): Check for
269         NULL pointer.
271 2016-08-24  Paul Thomas  <pault@gcc.gnu.org>
273         PR fortran/77358
274         * resolve.c (resolve_fl_procedure): Use the correct gfc_charlen
275         for deferred character length module procedures.
277 2016-08-23  Fritz Reese  <fritzoreese@gmail.com>
279         * decl.c (gfc_match_structure_decl): Make gfc_structure_id static.
281 2016-08-23  Fritz Reese  <fritzoreese@gmail.com>
283         * interface.c (compare_components): Fix typo in name check conditional.
285 2016-08-22  Steven G. Kargl  <kargl@gcc.gnu.org>
286             Bud Davis  <jmdavis@link.com>
288         PR fortran/60774
289         * parse.c (next_free,next_fixed): Issue error for statement label
290         without a statement.
292 2016-08-22  Steven G. Kargl  <kargl@gcc.gnu.org>
294         PR fortran/61318
295         * interface.c (compare_parameter): Use better locus for error message.
297 2016-08-22  Steven G. Kargl  <kargl@gcc.gnu.org>
299         PR fortran/77260
300         * gcc/fortran/trans-decl.c (generate_local_decl): Suppress warning
301         for unused variable if symbol is entry point.
303 2016-08-19  Joseph Myers  <joseph@codesourcery.com>
305         PR c/32187
306         * trans-types.h (float128_type_node): Rename to
307         gfc_float128_type_node.
308         (complex_float128_type_node): Rename to
309         gfc_complex_float128_type_node.
310         * iso-c-binding.def, trans-intrinsic.c, trans-types.c: All users
311         changed.
313 2016-08-19  Jakub Jelinek  <jakub@redhat.com>
315         PR fortran/71014
316         * resolve.c (gfc_resolve): For ns->construct_entities don't save, clear
317         and restore omp state around the resolving.
319         PR fortran/69281
320         * trans-openmp.c (gfc_trans_omp_parallel, gfc_trans_omp_task,
321         gfc_trans_omp_target): Wrap gfc_trans_omp_code result in an extra
322         BIND_EXPR with its own forced BLOCK.
324 2016-08-19  Janne Blomqvist  <jb@gcc.gnu.org>
326         * intrinsics.texi (RANDOM_NUMBER): Remove reference to
327         init_random_seed in example.
328         (RANDOM_SEED): Remove warning to not set all seed values to 0.
330 2016-08-18  David Malcolm  <dmalcolm@redhat.com>
332         * error.c (gfc_diagnostic_starter): Update for change to
333         diagnostic_show_locus.
335 2016-08-17  Jakub Jelinek  <jakub@redhat.com>
337         PR fortran/67496
338         * trans-array.c (trans_array_constructor): Load
339         expr->ts.u.cl->length_from_typespec only if expr->ts.type is
340         BT_CHARACTER.
342 2016-08-15  Fritz Reese  <fritzoreese@gmail.com>
344         * lang.opt, invoke.texi: New flag -finit-derived.
345         * gfortran.h (gfc_build_default_init_expr, gfc_apply_init,
346         gfc_generate_initializer): New prototypes.
347         * expr.c (gfc_build_default_init_expr, gfc_apply_init,
348         component_initializer, gfc_generate_initializer): New functions.
349         * expr.c (gfc_default_initializer): Wrap gfc_generate_initializer.
350         * decl.c (build_struct): Move common code to gfc_apply_init.
351         * resolve.c (can_generate_init): New function.
352         * resolve.c (build_default_init_expr): Wrap gfc_build_default_init_expr.
353         * resolve.c (apply_default_init, resolve_fl_variable_derived): Use
354         gfc_generate_initializer.
355         * trans-decl.c (gfc_generate_function_code): Use
356         gfc_generate_initializer.
358 2016-08-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
360         * frontend-passes.c (create_var):  Set ts.deferred for
361         deferred-length character variables.
362         * dump-parse-tree.c (show_typespec):  Also dump
363         is_c_interop, is_iso_c and deferred flags.
365 2016-08-15  Jakub Jelinek  <jakub@redhat.com>
367         PR debug/71906
368         * trans-decl.c (gfc_get_symbol_decl): Call gfc_finish_var_decl
369         for decl's character length before gfc_finish_var_decl on the
370         decl itself.
372 2016-08-14  Chung-Lin Tang  <cltang@codesourcery.com>
374         PR fortran/70598
375         * openmp.c (resolve_omp_clauses): Adjust use_device clause
376         handling to only allow pointers and arrays.
378 2016-08-12  Marek Polacek  <polacek@redhat.com>
380         PR c/7652
381         * decl.c (match_attr_spec): Add FALLTHRU.
382         * primary.c (match_arg_list_function): Likewise.
383         * resolve.c (resolve_operator): Adjust fall through comment.
384         (fixup_charlen): Add FALLTHRU.
385         (resolve_allocate_expr): Adjust fall through comment.
386         * trans-array.c (gfc_conv_ss_startstride): Add FALLTHRU.
387         * trans-intrinsic.c (gfc_conv_intrinsic_len): Adjust fall through
388         comment.
390 2016-08-11  Janne Blomqvist  <jb@gcc.gnu.org>
392         * check.c (gfc_check_random_seed): Use new seed size in check.
393         * intrinsic.texi (RANDOM_NUMBER): Updated documentation.
394         (RANDOM_SEED): Likewise.
396 2016-08-08  Jakub Jelinek  <jakub@redhat.com>
398         PR fortran/72716
399         * openmp.c (gfc_match_omp_declare_simd): Don't stick anything into
400         BLOCK DATA ns, it will be rejected later.
402 2016-08-08  Andre Vehreschild  <vehre@gcc.gnu.org>
404         PR fortran/71936
405         * trans-array.c (gfc_array_allocate): When SOURCE= is a function
406         stick with the ref of the object to allocate.
408 2016-08-08  Andre Vehreschild  <vehre@gcc.gnu.org>
410         PR fortran/72698
411         * trans-stmt.c (gfc_trans_allocate): Prevent generating code for
412         copy of zero sized string and with it an ICE.
414 2016-08-08  Andre Vehreschild  <vehre@gcc.gnu.org>
416         PR fortran/70524
417         * trans-array.c (gfc_trans_dummy_array_bias): Ensure that the
418         location information is correctly set.
419         * trans-decl.c (gfc_trans_deferred_vars): Set the locus of the
420         current construct early.
422 2016-08-03  Fritz Reese  <fritzoreese@gmail.com>
424         * lang.opt: New option -fdec-intrinsic-ints.
425         * options.c (set_dec_flags): Enable with -fdec.
426         * gfortran.texi, invoke.texi, intrinsics.texi: Update documentation.
427         * intrinsic.c (add_function, add_subroutine): New B/I/J/K intrinsic
428         variants.
430 2016-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>
432         PR fortran/41922
433         * target-memory.c (expr_to_char): Pass in locus and use it in error
434         messages.
435         (gfc_merge_initializers): Ditto.
436         * target-memory.h: Update prototype for gfc_merge_initializers ().
437         * trans-common.c (get_init_field): Use the correct locus.
439 2016-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>
441         PR fortran/68566
442         * check.c (gfc_check_reshape): Check for constant expression.
444 2016-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>
446         PR fortran/69867
447         * decl.c (build_struct): Ensure that pointers point to something.
449 2016-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>
451         PR fortran/69962
452         * decl.c (gfc_set_constant_character_len):  if expr is not
453         constant issue an error instead of an ICE.
455 2016-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>
457         PR fortran/70006
458         * io.c (gfc_resolve_dt): Use correct locus.
459         * resolve.c (resolve_branch): Ditto.
461 2016-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>
463         PR fortran/71730
464         * decl.c (char_len_param_value): Check return value of
465         gfc_reduce_init_expr().
467 2016-07-29  Dominik Vogt  <vogt@linux.vnet.ibm.com>
469         * trans-array.c (gfc_conv_array_ref): Fix allocation of diagnostic
470         message (was too small).
472 2016-07-28  Steven G. Kargl  <kargl@gcc.gnu.org>
474         PR fortran/71067
475         * decl.c (match_data_constant): On error, set 'result' to NULL.
477 2016-07-28  Steven G. Kargl  <kargl@gcc.gnu.org>
479         PR fortran/71799
480         * resolve.c(gfc_resolve_iterator): Failure of type conversion need
481         not ICE.
483 2016-07-28  Steven G. Kargl  <kargl@gcc.gnu.org>
485         PR fortran/71859
486         * check.c(numeric_check): Prevent ICE.  Issue error for invalid
487         subroutine as an actual argument when numeric argument is expected.
489 2016-07-28  Steven G. Kargl  <kargl@gcc.gnu.org>
490             Thomas Koenig  <tkoenig@gcc.gnu.org>
492         PR fortran/71883
493         * frontend-passes.c (gfc_run_passes): Bail out if there are any
494         errors.
495         * error.c (gfc_internal_error): If there are any errors in the
496         buffer, exit with EXIT_FAILURE.
498 2016-07-28  Renlin Li  <renlin.li@arm.com>
500         Revert
501         2016-07-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
503         PR fortran/71902
504         * dependency.c (gfc_check_dependency): Use dep_ref.  Handle case
505         if identical is true and two array element references differ.
506         (gfc_dep_resovler):  Move most of the code to dep_ref.
507         (dep_ref):  New function.
508         * frontend-passes.c (realloc_string_callback):  Name temporary
509         variable "realloc_string".
511 2016-07-26  Steven G. Kargl  <kargl@gcc.gnu.org>
513         PR fortran/71862
514         * class.c: Remove assert.  Iterate over component only if non-null.
516 2016-07-22  Steven G. Kargl  <kargl@gcc.gnu.org>
518         PR fortran/71935
519         * check.c (is_c_interoperable): Simplify right expression.
521 2016-07-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
523         PR fortran/71795
524         * frontend-passes.c (combine_array_constructor):  Don't
525         do anything if the expression is inside an array iterator.
527 2016-07-22  Andre Vehreschild  <vehre@gcc.gnu.org>
529         * expr.c (gfc_find_stat_co): Fixed whitespaces.
530         * gfortran.texi: Fixed typos and reversed meaning of caf_get()'s
531         src and dst description.
532         * trans-decl.c (gfc_build_builtin_function_decls): Fixed style
533         and corrected fnspec for caf functions.
534         * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Fixed style.
535         (conv_caf_send): Dito.
537 2016-07-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
539         PR fortran/71902
540         * dependency.c (gfc_check_dependency): Use dep_ref.  Handle case
541         if identical is true and two array element references differ.
542         (gfc_dep_resovler):  Move most of the code to dep_ref.
543         (dep_ref):  New function.
544         * frontend-passes.c (realloc_string_callback):  Name temporary
545         variable "realloc_string".
547 2016-07-17  Fritz Reese  <fritzoreese@gmail.com>
549         PR fortran/71523
550         * trans-decl.c (gfc_finish_var_decl): Replace automatic initializer with
551         a static one.
553 2016-07-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
554             Marco Restelli  <mrestelli@gmail.com>
556         PR fortran/62125
557         * symbol.c (select_type_insert_tmp): Recursively call self to take care
558         of nested select type.
560 2016-07-15  Cesar Philippidis  <cesar@codesourcery.com>
562         * openmp.c (gfc_match_omp_clauses): Scan for clause vector_length
563         before vector.
565 2016-07-15  Andre Vehreschild  <vehre@gcc.gnu.org>
567         PR fortran/71807
568         * trans-expr.c (gfc_trans_subcomponent_assign): Special casing
569         when allocatable component is set to null() in initializer.
571 2016-07-14  Steven G. Kargl  <kargl@gcc.gnu.org>
573         PR fortran/29819
574         * parse.c (parse_contained): Use proper locus.
576 2016-07-14  Andre Vehreschild  <vehre@gcc.gnu.org>
578         PR fortran/70842
579         * simplify.c (gfc_simplify_len): Only for unlimited polymorphic
580         types replace the expression's _data ref with a _len ref.
582 2016-07-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
584         PR fortran/71783
585         * frontend-passes.c (create_var):  Always allocate a charlen
586         for character variables.
588 2016-07-08  Steven G. Kargl  <kargl@gcc.gnu.org>
590         PR fortran/68426
591         * simplify (gfc_simplify_spread): Adjust locus.
593 2016-07-08  Cesar Philippidis  <cesar@codesourcery.com>
595         * parse.c (matcha): Define.
596         (decode_oacc_directive): Add spec_only local var and set it.  Use
597         matcha to parse acc directives except for routine and declare.  Return
598         ST_GET_FCN_CHARACTERISTICS if a non-declarative directive could be
599         matched.
601 2016-07-08  Martin Liska  <mliska@suse.cz>
603         * invoke.texi (Wundefined-do-loop): Enhance documentation.
605 2016-07-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
607         PR fortran/71764
608         * trans-expr.c (gfc_trans_structure_assign): Remove assert.
610 2016-07-07  Martin Liska  <mliska@suse.cz>
612         * lang.opt (Wundefined-do-loop): New option.
613         * resolve.c (gfc_resolve_iterator): Warn for Wundefined-do-loop.
614         (gfc_trans_simple_do): Generate a c-style loop.
615         (gfc_trans_do): Fix GNU coding style.
616         * invoke.texi: Mention the new warning.
618 2016-07-07  Martin Liska  <mliska@suse.cz>
620         * trans-stmt.c (gfc_trans_do): Add expect builtin for DO
621         loops with step bigger than +-1.
623 2016-07-05  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
625         * array.c (gfc_match_array_ref): Add parsing support for
626         STAT= attribute in CAF reference.
627         * expr.c (gfc_find_stat_co): New function that returns
628         the STAT= assignment.
629         * gfortran.h (gfc_array_ref): New member.
630         * trans-decl.c (gfc_build_builtin_function_decls):
631         new attribute for caf_get and caf_send functions.
632         * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Passing
633         the stat attribute to external function.
634         (gfc_conv_intrinsic_caf_send): Ditto.
636 2016-07-05  Andre Vehreschild  <vehre@gcc.gnu.org>
638         PR fortran/71623
639         * trans-stmt.c (gfc_trans_allocate): Add code of pre block of typespec
640         in allocate to parent block.
642 2016-07-04  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
644         PR fortran/66575
645         * decl.c (match_procedure_interface): Exit loop if procedure
646         interface refers to itself.
648 2016-07-04  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
649             Steven G. Kargl  <kargl@gcc.gnu.org>
651         PR fortran/35849
652         * simplify.c (gfc_simplify_ishftc): Check that absolute value of
653         SHIFT is less than or equal to SIZE.
655 2016-07-01  Jakub Jelinek  <jakub@redhat.com>
657         PR fortran/71687
658         * f95-lang.c (struct binding_level): Add reversed field.
659         (clear_binding_level): Adjust initializer.
660         (getdecls): If reversed is clear, set it and nreverse the names
661         chain before returning it.
662         (poplevel): Use getdecls.
663         * trans-decl.c (gfc_generate_function_code, gfc_process_block_locals):
664         Use nreverse to pushdecl decls in the declaration order.
666         PR fortran/71717
667         * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
668         for GFC_DECL_ASSOCIATE_VAR_P with POINTER_TYPE.
670 2016-06-30  Jakub Jelinek  <jakub@redhat.com>
672         PR fortran/71704
673         * parse.c (matchs, matcho): Move right before decode_omp_directive.
674         If spec_only, only gfc_match the keyword and if successful, goto
675         do_spec_only.
676         (matchds, matchdo): Define.
677         (decode_omp_directive): Add spec_only local var and set it.
678         Use matchds or matchdo macros instead of matchs or matcho
679         for declare target, declare simd, declare reduction and threadprivate
680         directives.  Return ST_GET_FCN_CHARACTERISTICS if a non-declarative
681         directive could be matched.
682         (next_statement): For ST_GET_FCN_CHARACTERISTICS restore
683         gfc_current_locus from old_locus even if there is no label.
685         PR fortran/71705
686         * trans-openmp.c (gfc_trans_omp_clauses): Set TREE_ADDRESSABLE on
687         decls in to/from clauses.
689 2016-06-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
691         PR fortran/71686
692         * scanner.c (gfc_next_char_literal): Only decrement nextc if it
693         is not NULL.
695 2016-06-29  Cesar Philippidis  <cesar@codesourcery.com>
697         * openmp.c (match_oacc_clause_gang): Rename to ...
698         (match_oacc_clause_gwv): this.  Add support for OpenACC worker and
699         vector clauses.
700         (gfc_match_omp_clauses): Use match_oacc_clause_gwv for
701         OMP_CLAUSE_{GANG,WORKER,VECTOR}.  Propagate any MATCH_ERRORs for
702         invalid OMP_CLAUSE_{ASYNC,WAIT,GANG,WORKER,VECTOR} clauses.
703         (gfc_match_oacc_wait): Propagate MATCH_ERROR for invalid
704         oacc_expr_lists.  Adjust the first and needs_space arguments to
705         gfc_match_omp_clauses.
707 2016-06-29  Richard Biener  <rguenther@suse.de>
709         PR middle-end/71002
710         * f95-lang.c (LANG_HOOKS_GET_ALIAS_SET): Remove (un-)define.
711         (gfc_get_alias_set): Remove.
713 2016-06-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
715         PR fortran/71649
716         * module.c (create_intrinsic_function): Check for NULL values and
717         return after giving error.
719 2016-06-21  Michael Meissner  <meissner@linux.vnet.ibm.com>
721         * trans-types.c (gfc_build_complex_type): Move setting complex
722         MODE to layout_type, instead of setting it ahead of time by the
723         caller.
725 2016-06-21  Tobias Burnus  <burnus@net-b.de>
727         PR fortran/71068
728         * resolve.c (resolve_function): Don't resolve caf_get/caf_send.
729         (check_data_variable): Strip-off caf_get before checking.
731 2016-06-20  Tobias Burnus  <burnus@net-b.de>
733         PR fortran/71194
734         * trans-expr.c (gfc_trans_pointer_assignment): Correctly handle
735         RHS pointer functions.
737 2016-06-19  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
739         * class.c (gfc_add_class_array_ref): Call gfc_add_data_component()
740         instead of gfc_add_component_ref().
741         (gfc_get_len_component): Call gfc_add_len_component() instead of
742         gfc_add_component_ref().
743         * trans-intrinsic.c (gfc_conv_intrinsic_loc): Call
744         gfc_add_data_component() instead of gfc_add_component_ref().
745         * trans.c (gfc_add_finalizer_call): Call
746         gfc_add_final_component() and gfc_add_size_component() instead
747         of gfc_add_component_ref.
749 2016-06-18  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
751         * trans-types.c (gfc_typenode_for_spec): Commentary typo fix.
753 2016-06-17  Cesar Philippidis  <cesar@codesourcery.com>
755         * openmp.c (match_acc): New generic function to parse OpenACC
756         directives.
757         (gfc_match_oacc_parallel_loop): Use it.
758         (gfc_match_oacc_parallel): Likewise.
759         (gfc_match_oacc_kernels_loop): Likewise.
760         (gfc_match_oacc_kernels): Likewise.
761         (gfc_match_oacc_data): Likewise.
762         (gfc_match_oacc_host_data): Likewise.
763         (gfc_match_oacc_loop): Likewise.
764         (gfc_match_oacc_enter_data): Likewise.
765         (gfc_match_oacc_exit_data): Likewise.
767 2016-06-16  Martin Liska  <mliska@suse.cz>
769         * trans-stmt.c (gfc_trans_simple_do): Predict the edge.
771 2016-06-16  Martin Liska  <mliska@suse.cz>
773         * trans-array.c (gfc_array_allocate): Do not generate expect
774         stmt.
775         * trans.c (gfc_allocate_using_malloc): Properly set FAIL_ALLOC
776         predictor for malloc return value.
777         (gfc_allocate_allocatable): Use REALLOC predictor instead of
778         FAIL_ALLOC.
779         (gfc_deallocate_with_status): Likewise.
781 2016-06-13  Paul Thomas  <pault@gcc.gnu.org>
783         PR fortran/70673
784         * frontend-passes.c (realloc_string_callback): Add a call to
785         gfc_dep_compare_expr.
787 2016-06-11  Dominique d'Humieres  <dominiq@lps.ens.fr>
789         PR fortran/60751
790         * io.c (gfc_resolve_dt): Replace GFC_STD_GNU with GFC_STD_LEGACY.
792 2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
794         PR c/71381
795         * openmp.c (gfc_match_oacc_cache): Add comment.
797 2016-06-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
799         PR fortran/71404
800         * io.c (match_io): For READ, commit in pending symbols in the
801         current statement before trying to match an expression so that
802         if the match fails and we undo symbols we dont toss good symbols.
804 2016-06-05  Andre Vehreschild  <vehre@gcc.gnu.org>
806         PR fortran/69659
807         * trans-array.c (gfc_trans_dummy_array_bias): For class arrays use
808         the address of the _data component to reference the arrays data
809         component.
811 2016-06-03  Chung-Lin Tang  <cltang@codesourcery.com>
813         * trans-openmp.c (gfc_trans_omp_reduction_list): Add mark_addressable
814         bool parameter, set reduction clause DECLs as addressable when true.
815         (gfc_trans_omp_clauses): Pass clauses->async to
816         gfc_trans_omp_reduction_list, add comment describing OpenACC situation.
818 2016-06-01  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
820         PR fortran/52393
821         * io.c (match_io): For READ, try to match a default character
822         expression. If found, set the dt format expression to this,
823         otherwise go back and try control list.
825 2016-06-01  Paul Thomas  <pault@gcc.gnu.org>
827         PR fortran/71156
828         * decl.c (copy_prefix): Add checks that the module procedure
829         declaration prefixes are compliant with the interface. Invert
830         order of existing elemental and pure checks.
831         * resolve.c (resolve_fl_procedure): Invert order of elemental
832         and pure errors.
834 2016-06-01  Jakub Jelinek  <jakub@redhat.com>
836         * parse.c (case_decl): Move ST_OMP_* to ...
837         (case_omp_decl): ... here, new macro.
838         (verify_st_order): For case_omp_decl, complain about
839         p->state >= ORDER_EXEC, but don't change p->state otherwise.
841 2016-05-26  Jakub Jelinek  <jakub@redhat.com>
843         * openmp.c (resolve_omp_clauses): Warn if chunk_size is known not to
844         be positive.
846 2016-05-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
848         PR fortran/66461
849         * scanner.c (gfc_next_char_literal): Clear end_flag when adjusting
850         current locus back to old_locus.
852 2016-05-20  Jakub Jelinek  <jakub@redhat.com>
854         PR fortran/71204
855         * frontend-passes.c (realloc_string_callback): Clear inserted_block
856         and changed_statement before calling create_var.
858 2016-05-15  Harald Anlauf  <anlauf@gmx.de>
860         PR fortran/69603
861         * interface.c (compare_parameter): Check for non-NULL pointer.
863 2016-05-14  Fritz Reese  <fritzoreese@gmail.com>
865         * gfortran.texi: Update example of DEC UNION extension.
867 2016-05-14  Fritz Reese  <fritzoreese@gmail.com>
869         PR fortran/71047
870         * expr.c (gfc_default_initializer): Avoid extra component refs in
871         constructors for derived types and classes.
873 2016-05-11  Jakub Jelinek  <jakub@redhat.com>
875         PR fortran/70855
876         * frontend-passes.c (inline_matmul_assign): Disable in !$omp workshare.
878 2016-05-09  Richard Biener  <rguenther@suse.de>
880         PR fortran/70937
881         * trans-decl.c: Include gimplify.h for unshare_expr.
882         (gfc_trans_vla_one_sizepos): Unshare exprs before inserting
883         them into the IL.
885 2016-05-07  Fritz Reese  <fritzoreese@gmail.com>
887         PR fortran/56226
888         * module.c (dt_upper_string): Rename to gfc_dt_upper_string
889         (dt_lower_string): Likewise.
890         * gfortran.h: Make new gfc_dt_upper/lower_string global.
891         * class.c: Use gfc_dt_upper_string.
892         * decl.c: Likewise.
893         * symbol.c: Likewise.
894         * resolve.c (resolve_component): New function.
895         (resolve_fl_derived0): Move component loop code to resolve_component.
896         * parse.c (check_component): New function.
897         (parse_derived): Move loop code to check_component.
898         * lang.opt, invoke.texi, options.c : New option -fdec-structure.
899         * libgfortran.h (bt): New basic type BT_UNION.
900         * gfortran.h (gfc_option): New option -fdec-structure.
901         (gfc_get_union_type, gfc_compare_union_types): New prototypes.
902         (gfc_bt_struct, gfc_fl_struct, case_bt_struct, case_fl_struct): New
903         macros.
904         (gfc_find_component): Change prototype.
905         * match.h (gfc_match_member_sep, gfc_match_map, gfc_match_union,
906         gfc_match_structure_decl): New prototypes.
907         * parse.h (gfc_comp_struct): New macro.
908         * symbol.c (gfc_find_component): Search for components in nested unions
909         * class.c (insert_component_ref, gfc_add_component_ref, add_proc_comp,
910         copy_vtab_proc_comps): Update calls to gfc_find_component.
911         * primary.c (gfc_convert_to_structure_constructor): Likewise.
912         * symbol.c (gfc_add_component): Likewise.
913         * resolve.c (resolve_typebound_function, resolve_typebound_subroutine,
914         resolve_typebound_procedure, resolve_component, resolve_fl_derived):
915         Likewise.
916         * expr.c (get_union_init, component_init): New functions.
917         * decl.c (match_clist_expr, match_record_decl, get_struct_decl,
918         gfc_match_map, gfc_match_union, gfc_match_structure_decl): Likewise.
919         * interface.c (compare_components, gfc_compare_union_types): Likewise.
920         * match.c (gfc_match_member_sep): Likewise.
921         * parse.c (check_component, parse_union, parse_struct_map): Likewise.
922         * resolve.c (resolve_fl_struct): Likewise.
923         * symbol.c (find_union_component): Likewise.
924         * trans-types.c (gfc_get_union_type): Likewise.
925         * parse.c (parse_derived): Use new functions.
926         * interface.c (gfc_compare_derived_types, gfc_compare_types): Likewise.
927         * expr.c (gfc_default_initializer): Likewise.
928         * gfortran.texi: Support for DEC structures, unions, and maps.
929         * gfortran.h (gfc_statement, sym_flavor): Likewise.
930         * check.c (gfc_check_kill_sub): Likewise.
931         * expr.c (gfc_copy_expr, simplify_const_ref,
932         gfc_has_default_initializer): Likewise.
933         * decl.c (build_sym, match_data_constant, add_init_expr_to_sym,
934         match_pointer_init, build_struct, variable_decl,
935         gfc_match_decl_type_spec, gfc_mach_data-decl, gfc_match_entry,
936         gfc_match_end, gfc_match_derived_decl): Likewise.
937         * interface.c (check_interface0, check_interface1,
938         gfc_search_interface): Likewise.
939         * misc.c (gfc_basic_typename, gfc_typename): Likewise.
940         * module.c (add_true_name, build_tnt, bt_types, mio_typespec,
941         fix_mio_expr, load_needed, mio_symbol, read_module, write_symbol,
942         gfc_get_module_backend_decl): Likewise.
943         * parse.h (gfc_compile_state): Likewise.
944         * parse.c (decode_specification_statement, decode_statement,
945         gfc_ascii_statement, verify_st_order, parse_spec): Likewise.
946         * primary.c (gfc_match_varspec, gfc_match_structure_constructor,
947         gfc_match_rvalue, match_variable): Likewise.
948         * resolve.c (find_arglists, resolve_structure_cons,
949         is_illegal_recursion, resolve_generic_f, get_declared_from_expr,
950         resolve_typebound_subroutine, resolve_allocate_expr,
951         nonscalar_typebound_assign, generate_component_assignments,
952         resolve_fl_variable_derived, check_defined_assignments,
953         resolve_component, resolve_symbol, resolve_equivalence_derived):
954         Likewise.
955         * symbol.c (flavors, check_conflict, gfc_add_flavor, gfc_use_derived,
956         gfc_restore_last_undo_checkpoint, gfc_type_compatible,
957         gfc_find_dt_in_generic): Likewise.
958         * trans-decl.c (gfc_get_module_backend_decl, create_function_arglist,
959         gfc_create_module_variable, check_constant_initializer): Likewise.
960         * trans-expr.c (gfc_conv_component_ref, gfc_conv_initializer,
961         gfc_trans_alloc_subarray_assign, gfc_trans_subcomponent_assign,
962         gfc_conv_structure, gfc_trans_scalar_assign, copyable_array_p):
963         Likewise.
964         * trans-io.c (transfer_namelist_element, transfer_expr,
965         gfc_trans_transfer): Likewise.
966         * trans-stmt.c (gfc_trans_deallocate): Likewise.
967         * trans-types.c (gfc_typenode_for_spec, gfc_copy_dt_decls_ifequal,
968         gfc_get_derived_type): Likewise.
970 2016-05-05  Jakub Jelinek  <jakub@redhat.com>
972         * openmp.c (gfc_match_omp_clauses): Restructuralize, so that clause
973         parsing is done in a big switch based on gfc_peek_ascii_char and
974         individual clauses under their first letters are sorted too.
976 2016-05-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
978         * trans-types.c (gfc_build_complex_type):
980 2016-05-02  Richard Biener  <rguenther@suse.de>
982         * trans-array.c (gfc_trans_create_temp_array): Properly
983         create a DECL_EXPR for the anonymous VLA array type.
985 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
987         PR middle-end/70626
988         * trans-openmp.c (gfc_trans_oacc_combined_directive): Duplicate
989         the reduction clause in both parallel and loop directives.
991 2016-04-18  Michael Matz  <matz@suse.de>
993         * trans-io.c (gfc_build_io_library_fndecls): Use SET_TYPE_ALIGN.
994         * trans-common.c (build_common_decl): Use SET_DECL_ALIGN.
995         * trans-types.c (gfc_add_field_to_struct): Use SET_DECL_ALIGN.
997 2016-04-13  Dominique d'Humieres  <dominiq@lps.ens.fr>
999         PR fortran/67039
1000         * intrinsic.texi: Correct the documentation of pseudorandom
1001         number intrinsics.
1003 2016-04-13  Dominique d'Humieres  <dominiq@lps.ens.fr>
1005         PR fortran/58000
1006         * gfortran.texi: Document OPEN( ... NAME=) as not implemented
1007         in GNU Fortran
1009 2016-04-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1011         PR fortran/68566
1012         * array.c (match_array_element_spec): Add check for non-integer.
1013         * simplify.c (gfc_simplify_reshape): If source shape is NULL return.
1015 2016-04-06  Patrick Palka  <ppalka@gcc.gnu.org>
1017         PR c/70436
1018         * openmp.c (gfc_find_omp_udr): Add explicit braces to resolve a
1019         future -Wparentheses warning.
1021 2016-04-04  Andre Vehreschild  <vehre@gcc.gnu.org>
1023         PR fortran/67538
1024         * resolve.c (resolve_allocate_expr): Emit error message when no
1025         array spec and no array valued source= expression is given in an
1026         F2008 allocate() for an array to allocate.
1028 2016-04-04  Andre Vehreschild  <vehre@gcc.gnu.org>
1030         PR fortran/65795
1031         * trans-array.c (gfc_array_allocate): When the array is a coarray,
1032         do not nullyfing its allocatable components in array_allocate, because
1033         the nullify missed the array ref and nullifies the wrong component.
1034         Cosmetics.
1036 2016-03-29  Andre Vehreschild  <vehre@gcc.gnu.org>
1038         PR fortran/70397
1039         * trans-expr.c (gfc_class_len_or_zero_get): Add function to return a
1040         constant zero tree, when the class to get the _len component from is
1041         not unlimited polymorphic.
1042         (gfc_copy_class_to_class): Use the new function.
1043         * trans.h: Added interface of new function gfc_class_len_or_zero_get.
1045 2016-03-28  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
1047         * trans-decl.c (gfc_build_builtin_function_decls):
1048         caf_stop_numeric and caf_stop_str definition.
1049         * trans-stmt.c (gfc_trans_stop): invoke external functions
1050         for stop and stop_str when coarrays are used.
1051         * trans.h: extern for new functions.
1053 2016-03-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1055         PR fortran/69043
1056         * scanner.c (load_file): Update to use S_ISREG macro.
1058 2016-03-17  Thomas Schwinge  <thomas@codesourcery.com>
1060         * gfortran.h (enum gfc_omp_map_op): Rename OMP_MAP_FORCE_DEALLOC
1061         to OMP_MAP_DELETE.  Adjust all users.
1063 2016-03-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1064             Jim MacArthur  <jim.macarthur@codethink.co.uk>
1066         PR fortran/69043
1067         * scanner.c (load_file): Check that included file is regular.
1069 2016-03-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1070             Harold Anlauf  <anlauf@gmx.de>
1072         PR fortran/69520
1073         * invoke.texi: Explain use of the 'no-' construct within the
1074         -fcheck= option.
1075         * options.c (gfc_handle_runtime_check_option): Enable use of
1076         'no-' prefix for the various options with -fcheck= to allow
1077         negating previously enabled check options.
1079 2016-03-12  Paul Thomas  <pault@gcc.gnu.org>
1081         PR fortran/70031
1082         * decl.c (gfc_match_prefix): Treat the 'module' prefix in the
1083         same way as the others, rather than fixing it to come last.
1084         (gfc_match_function_decl, gfc_match_subroutine): After errors
1085         in 'copy_prefix', emit them immediately in the case of module
1086         procedures to prevent a later ICE.
1088         PR fortran/69524
1089         * decl.c (gfc_match_submod_proc): Permit 'module procedure'
1090         declarations within the contains section of modules as well as
1091         submodules.
1092         * resolve.c (resolve_fl_procedure): Likewise.
1093         *trans-decl.c (build_function_decl): Change the gcc_assert to
1094         allow all forms of module procedure declarations within module
1095         contains sections.
1097 2016-02-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
1099         PR fortran/68147
1100         PR fortran/47674
1101         * frontend-passes.c (realloc_string_callback): Don't set
1102         walk_subtrees.
1104 2016-02-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
1106         * dump-parse-tree.c (show_code_node):  Print association
1107         list of a block if present.  Handle EXEC_END_BLOCK.
1109 2016-02-28  Harald Anlauf  <anlauf@gmx.de>
1110             Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1112         PR fortran/56007
1113         * match.c (gfc_match_iterator): Add diagnostic for array variable
1114         as do loop index.
1116 2016-02-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1117             Steven G. Kargl  <kargl@gcc.gnu.org>
1119         PR fortran/69910
1120         * io.c (gfc_match_open): Check that open status is an expression
1121         constant before comparing string to 'scratch' with NEWUNIT.
1123 2016-02-27  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
1125         * trans.c (gfc_allocate_allocatable): size conversion
1126         from byte to number of elements for event variables.
1127         * trans-types.c (gfc_get_derived_type): event variables
1128         represented as a pointer (like lock variable).
1130 2016-02-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1132         PR fortran/61156
1133         * scanner.c (add_path_to_list): If include path is not a directory,
1134         issue a fatal error.
1136 2016-02-23  Andre Vehreschild  <vehre@gcc.gnu.org>
1138         PR fortran/67451
1139         * trans-array.c (gfc_array_allocate): Take the attributes from the
1140         expression to allocate and not from the source=-expression.
1142 2016-02-20  Paul Thomas  <pault@gcc.gnu.org>
1144         PR fortran/69423
1145         * trans-decl.c (create_function_arglist): Deferred character
1146         length functions, with and without declared results, address
1147         the passed reference type as '.result' and the local string
1148         length as '..result'.
1149         (gfc_null_and_pass_deferred_len): Helper function to null and
1150         return deferred string lengths, as needed.
1151         (gfc_trans_deferred_vars): Call it, thereby reducing repeated
1152         code, add call for deferred arrays and reroute pointer function
1153         results. Avoid using 'tmp' for anything other that a temporary
1154         tree by introducing 'type_of_array' for the arrayspec type.
1156 2015-02-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
1158         PR fortran/69742
1159         * frontend-passes.c (cfe-expr_0):  Don't register functions
1160         from within an ASSOCIATE statement.
1162 2016-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
1164         PR fortran/60526
1165         * decl.c (build_sym):  If the name has already been defined as a
1166         type, it has a symtree with an upper case letter at the beginning.
1167         If such a symtree exists, issue an error and exit.  Don't do
1168         this if there is no corresponding upper case letter.
1170 2016-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
1172         PR fortran/60526
1173         PR bootstrap/69816
1174         * decl.c (build_sym):  Reverted previous patch.
1176 2016-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
1178         PR fortran/60526
1179         * decl.c (build_sym):  If the name has already been defined as a
1180         type, issue error and return false.
1182 2016-02-12  David Malcolm  <dmalcolm@redhat.com>
1184         PR other/69554
1185         * error.c (gfc_diagnostic_start_span): New function.
1186         (gfc_diagnostics_init): Initialize global_dc's start_span.
1188 2016-02-11  Andre Vehreschild  <vehre@gcc.gnu.org>
1190         PR fortran/69296
1191         * gfortran.h: Added flag to gfc_association_list indicating that
1192         the rank of an associate variable has been guessed only.
1193         * parse.c (parse_associate): Set the guess flag mentioned above
1194         when guessing the rank of an expression.
1195         * resolve.c (resolve_assoc_var): When the rank has been guessed,
1196         make sure, that the guess was correct else overwrite with the actual
1197         rank.
1198         * trans-stmt.c (trans_associate_var): For subref_array_pointers in
1199         class objects, take the span from the _data component.
1201 2016-02-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1203         PR fortran/50555
1204         * primary.c (match_actual_arg): If symbol has attribute flavor of
1205         namelist, generate an error. (gfc_match_rvalue): Likewise return
1206         MATCH_ERROR.
1207         * resolve.c (resolve_symbol): Scan arument list of procedures and
1208         generate an error if a namelist is found.
1210 2016-02-05  Mikael Morin  <mikael@gcc.gnu.org>
1212         PR fortran/66089
1213         * trans-expr.c (expr_is_variable, gfc_expr_is_variable): Rename
1214         the former to the latter and make it non-static.  Update callers.
1215         * gfortran.h (gfc_expr_is_variable): New declaration.
1216         (struct gfc_ss_info): Add field needs_temporary.
1217         * trans-array.c (gfc_scalar_elemental_arg_saved_as_argument):
1218         Tighten the condition on aggregate expressions with a check
1219         that the expression is a variable and doesn't need a temporary.
1220         (gfc_conv_resolve_dependency): Add intermediary reference variable.
1221         Set the needs_temporary field.
1223 2016-02-03  Andre Vehreschild  <vehre@gcc.gnu.org>
1225         PR fortran/67451
1226         PR fortran/69418
1227         * trans-expr.c (gfc_copy_class_to_class): For coarrays just the
1228         pointer is passed.  Take it as is without trying to deref the
1229         _data component.
1230         * trans-stmt.c (gfc_trans_allocate): Take care of coarrays as
1231         argument to source=-expression.
1233 2016-02-02  Nathan Sidwell  <nathan@codesourcery.com>
1235         * lang.opt (fopenacc-dim=): New option.
1237 2016-01-31  Paul Thomas  <pault@gcc.gnu.org>
1239         PR fortran/67564
1240         * trans-expr.c (gfc_conv_procedure_call): For the vtable copy
1241         subroutines, add a string length argument, when the actual
1242         argument is an unlimited polymorphic class object.
1244 2016-01-30  Paul Thomas  <pault@gcc.gnu.org>
1246         PR fortran/69566
1247         * trans-expr.c (gfc_conv_procedure_call): Correct expression
1248         for 'ulim_copy', which was missing a test for 'comp'.
1250 2016-01-28  Andre Vehreschild  <vehre@gcc.gnu.org>
1252         PR fortran/62536
1253         * decl.c (gfc_match_end): Only unnest and remove BLOCK namespaces
1254         when the END encountered does not match a BLOCK's end.
1256 2016-01-27  Janus Weil  <janus@gcc.gnu.org>
1258         PR fortran/69484
1259         * invoke.texi: Fix documentation of -Wall with respect to -Wtabs.
1261 2016-01-27  Paul Thomas  <pault@gcc.gnu.org>
1263         PR fortran/69422
1264         * trans-expr.c (is_scalar_reallocatable_lhs): Remove the check
1265         for allocatable components, whilst checking if the symbol is a
1266         derived or class entity..
1268 2016-01-26  Paul Thomas  <pault@gcc.gnu.org>
1270         PR fortran/69385
1271         * trans-expr.c (gfc_trans_assignment_1): Exclude initialization
1272         assignments from check on assignment of scalars to unassigned
1273         arrays and correct wrong code within the corresponding block.
1275 2016-01-26  David Malcolm  <dmalcolm@redhat.com>
1277         PR other/69006
1278         * error.c (gfc_diagnostic_starter): Delete use of pp_newline.
1280 2016-01-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1282         PR fortran/69397
1283         PR fortran/68442
1284         * interface.c (gfc_arglist_matches_symbol): Replace assert with
1285         a return false if not a procedure.
1286         * resolve.c (resolve_generic_f): Test if we are resolving an
1287         initialization expression and adjust error message accordingly.
1289 2016-01-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
1291         PR fortran/66094
1292         * frontend-passes.c (matmul_lhs_realloc):  Add
1293         forgotten break statement.
1295 2016-01-24  Dominique d'Humieres  <dominiq@lps.ens.fr>
1297         PR fortran/68283
1298         * primary.c (gfc_variable_attr): revert revision r221955,
1299         call gfc_internal_error only if there is no error.
1301 2016-01-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
1303         PR fortran/66094
1304         * frontend-passes.c (enum matrix_case):  Add case A2B2T for
1305         MATMUL(A,TRANSPoSE(B)) where A and B are rank 2.
1306         (inline_limit_check):  Also add A2B2T.
1307         (matmul_lhs_realloc):  Handle A2B2T.
1308         (check_conjg_variable):  Rename to
1309         (check_conjg_transpose_variable):  and also count TRANSPOSE.
1310         (inline_matmul_assign):  Handle A2B2T.
1312 2016-01-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1314         PR fortran/65996
1315         * error.c (gfc_error): Save the state of abort_on_error and set
1316         it to false for buffered errors to allow normal processing.
1317         Restore the state before leaving.
1319 2016-01-19  Martin Jambor  <mjambor@suse.cz>
1321         * types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New.
1322         (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed.
1323         (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): New.
1325 2016-01-15  Paul Thomas  <pault@gcc.gnu.org>
1327         PR fortran/64324
1328         * resolve.c (check_uop_procedure): Prevent deferred length
1329         characters from being trapped by assumed length error.
1331         PR fortran/49630
1332         PR fortran/54070
1333         PR fortran/60593
1334         PR fortran/60795
1335         PR fortran/61147
1336         PR fortran/64324
1337         * trans-array.c (gfc_conv_scalarized_array_ref): Pass decl for
1338         function as well as variable expressions.
1339         (gfc_array_init_size): Add 'expr' as an argument. Use this to
1340         correctly set the descriptor dtype for deferred characters.
1341         (gfc_array_allocate): Add 'expr' to the call to
1342         'gfc_array_init_size'.
1343         * trans.c (gfc_build_array_ref): Expand logic for setting span
1344         to include indirect references to character lengths.
1345         * trans-decl.c (gfc_get_symbol_decl): Ensure that deferred
1346         result char lengths that are PARM_DECLs are indirectly
1347         referenced both for directly passed and by reference.
1348         (create_function_arglist): If the length type is a pointer type
1349         then store the length as the 'passed_length' and make the char
1350         length an indirect reference to it.
1351         (gfc_trans_deferred_vars): If a character length has escaped
1352         being set as an indirect reference, return it via the 'passed
1353         length'.
1354         * trans-expr.c (gfc_conv_procedure_call): The length of
1355         deferred character length results is set TREE_STATIC and set to
1356         zero.
1357         (gfc_trans_assignment_1): Do not fix the rse string_length if
1358         it is a variable, a parameter or an indirect reference. Add the
1359         code to trap assignment of scalars to unallocated arrays.
1360         * trans-stmt.c (gfc_trans_allocate): Remove 'def_str_len' and
1361         all references to it. Instead, replicate the code to obtain a
1362         explicitly defined string length and provide a value before
1363         array allocation so that the dtype is correctly set.
1364         trans-types.c (gfc_get_character_type): If the character length
1365         is a pointer, use the indirect reference.
1367 2016-01-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
1369         PR fortran/69154
1370         * frontend-passes.c (in_where):  New variable.
1371         (inline_matmul_assign):  Don't try this if we are within
1372         a WHERE statement.
1373         (gfc_code_walker):  Keep track of in_where.
1375 2016-01-10  Paul Thomas  <pault@gcc.gnu.org>
1377         PR fortran/67779
1378         * trans_array.c (gfc_conv_scalarized_array_ref): Add missing
1379         se->use_offset from condition for calculation of 'base'.
1381 2016-01-08  Jakub Jelinek  <jakub@redhat.com>
1383         PR fortran/69128
1384         * trans.h (OMPWS_SCALARIZER_BODY): Define.
1385         (OMPWS_NOWAIT): Renumber.
1386         * trans-stmt.c (gfc_trans_where_3): Only set OMPWS_SCALARIZER_WS
1387         if OMPWS_SCALARIZER_BODY is not set already, and set also
1388         OMPWS_SCALARIZER_BODY until the final loop creation.
1389         * trans-expr.c (gfc_trans_assignment_1): Likewise.
1390         * trans-openmp.c (gfc_trans_omp_workshare): Also clear
1391         OMPWS_SCALARIZER_BODY.
1392         * trans-array.c (gfc_trans_scalarized_loop_end): Don't create
1393         OMP_FOR if OMPWS_SCALARIZER_BODY is set.
1395 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
1397         Update copyright years.
1399         * gfortranspec.c (lang_specific_driver): Update copyright notice
1400         dates.
1401         * gfc-internals.texi: Bump @copying's copyright year.
1402         * gfortran.texi: Ditto.
1403         * intrinsic.texi: Ditto.
1404         * invoke.texi: Ditto.
1406 2016-01-01  Paul Thomas  <pault@gcc.gnu.org>
1408         PR fortran/68864
1409         * trans-array.c (evaluate_bound): If deferred, test that 'desc'
1410         is an array descriptor before using gfc_conv_descriptor_xxx.
1412 Copyright (C) 2016 Free Software Foundation, Inc.
1414 Copying and distribution of this file, with or without modification,
1415 are permitted in any medium without royalty provided the copyright
1416 notice and this notice are preserved.