2016-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
[official-gcc.git] / gcc / fortran / ChangeLog
blob900d91560f292e7e3cb1e1ec5eabb476578bf7be
1 2016-08-22  Steven G. Kargl  <kargl@gcc.gnu.org>
3         PR fortran/77260
4         * gcc/fortran/trans-decl.c (generate_local_decl): Suppress warning
5         for unused variable if symbol is entry point.
8 2016-08-19  Joseph Myers  <joseph@codesourcery.com>
10         PR c/32187
11         * trans-types.h (float128_type_node): Rename to
12         gfc_float128_type_node.
13         (complex_float128_type_node): Rename to
14         gfc_complex_float128_type_node.
15         * iso-c-binding.def, trans-intrinsic.c, trans-types.c: All users
16         changed.
18 2016-08-19  Jakub Jelinek  <jakub@redhat.com>
20         PR fortran/71014
21         * resolve.c (gfc_resolve): For ns->construct_entities don't save, clear
22         and restore omp state around the resolving.
24         PR fortran/69281
25         * trans-openmp.c (gfc_trans_omp_parallel, gfc_trans_omp_task,
26         gfc_trans_omp_target): Wrap gfc_trans_omp_code result in an extra
27         BIND_EXPR with its own forced BLOCK.
29 2016-08-19  Janne Blomqvist  <jb@gcc.gnu.org>
31         * intrinsics.texi (RANDOM_NUMBER): Remove reference to
32         init_random_seed in example.
33         (RANDOM_SEED): Remove warning to not set all seed values to 0.
35 2016-08-18  David Malcolm  <dmalcolm@redhat.com>
37         * error.c (gfc_diagnostic_starter): Update for change to
38         diagnostic_show_locus.
40 2016-08-17  Jakub Jelinek  <jakub@redhat.com>
42         PR fortran/67496
43         * trans-array.c (trans_array_constructor): Load
44         expr->ts.u.cl->length_from_typespec only if expr->ts.type is
45         BT_CHARACTER.
47 2016-08-15  Fritz Reese  <fritzoreese@gmail.com>
49         * lang.opt, invoke.texi: New flag -finit-derived.
50         * gfortran.h (gfc_build_default_init_expr, gfc_apply_init,
51         gfc_generate_initializer): New prototypes.
52         * expr.c (gfc_build_default_init_expr, gfc_apply_init,
53         component_initializer, gfc_generate_initializer): New functions.
54         * expr.c (gfc_default_initializer): Wrap gfc_generate_initializer.
55         * decl.c (build_struct): Move common code to gfc_apply_init.
56         * resolve.c (can_generate_init): New function.
57         * resolve.c (build_default_init_expr): Wrap gfc_build_default_init_expr.
58         * resolve.c (apply_default_init, resolve_fl_variable_derived): Use
59         gfc_generate_initializer.
60         * trans-decl.c (gfc_generate_function_code): Use
61         gfc_generate_initializer.
63 2016-08-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
65         * frontend-passes.c (create_var):  Set ts.deferred for
66         deferred-length character variables.
67         * dump-parse-tree.c (show_typespec):  Also dump
68         is_c_interop, is_iso_c and deferred flags.
70 2016-08-15  Jakub Jelinek  <jakub@redhat.com>
72         PR debug/71906
73         * trans-decl.c (gfc_get_symbol_decl): Call gfc_finish_var_decl
74         for decl's character length before gfc_finish_var_decl on the
75         decl itself.
77 2016-08-14  Chung-Lin Tang  <cltang@codesourcery.com>
79         PR fortran/70598
80         * openmp.c (resolve_omp_clauses): Adjust use_device clause
81         handling to only allow pointers and arrays.
83 2016-08-12  Marek Polacek  <polacek@redhat.com>
85         PR c/7652
86         * decl.c (match_attr_spec): Add FALLTHRU.
87         * primary.c (match_arg_list_function): Likewise.
88         * resolve.c (resolve_operator): Adjust fall through comment.
89         (fixup_charlen): Add FALLTHRU.
90         (resolve_allocate_expr): Adjust fall through comment.
91         * trans-array.c (gfc_conv_ss_startstride): Add FALLTHRU.
92         * trans-intrinsic.c (gfc_conv_intrinsic_len): Adjust fall through
93         comment.
95 2016-08-11  Janne Blomqvist  <jb@gcc.gnu.org>
97         * check.c (gfc_check_random_seed): Use new seed size in check.
98         * intrinsic.texi (RANDOM_NUMBER): Updated documentation.
99         (RANDOM_SEED): Likewise.
101 2016-08-08  Jakub Jelinek  <jakub@redhat.com>
103         PR fortran/72716
104         * openmp.c (gfc_match_omp_declare_simd): Don't stick anything into
105         BLOCK DATA ns, it will be rejected later.
107 2016-08-08  Andre Vehreschild  <vehre@gcc.gnu.org>
109         PR fortran/71936
110         * trans-array.c (gfc_array_allocate): When SOURCE= is a function
111         stick with the ref of the object to allocate.
113 2016-08-08  Andre Vehreschild  <vehre@gcc.gnu.org>
115         PR fortran/72698
116         * trans-stmt.c (gfc_trans_allocate): Prevent generating code for
117         copy of zero sized string and with it an ICE.
119 2016-08-08  Andre Vehreschild  <vehre@gcc.gnu.org>
121         PR fortran/70524
122         * trans-array.c (gfc_trans_dummy_array_bias): Ensure that the
123         location information is correctly set.
124         * trans-decl.c (gfc_trans_deferred_vars): Set the locus of the
125         current construct early.
127 2016-08-03  Fritz Reese  <fritzoreese@gmail.com>
129         * lang.opt: New option -fdec-intrinsic-ints.
130         * options.c (set_dec_flags): Enable with -fdec.
131         * gfortran.texi, invoke.texi, intrinsics.texi: Update documentation.
132         * intrinsic.c (add_function, add_subroutine): New B/I/J/K intrinsic
133         variants.
135 2016-07-30  Steven G. Kargl <kargl@gcc.gnu.org>
137         PR fortran/41922
138         * target-memory.c (expr_to_char): Pass in locus and use it in error
139         messages.
140         (gfc_merge_initializers): Ditto.
141         * target-memory.h: Update prototype for gfc_merge_initializers ().
142         * trans-common.c (get_init_field): Use the correct locus.
144 2016-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>
146         PR fortran/68566
147         * check.c (gfc_check_reshape): Check for constant expression.
149 2016-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>
151         PR fortran/69867
152         * decl.c (build_struct): Ensure that pointers point to something.
154 2016-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>
156         PR fortran/69962
157         * decl.c (gfc_set_constant_character_len):  if expr is not
158         constant issue an error instead of an ICE.
160 2016-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>
162         PR fortran/70006
163         * io.c (gfc_resolve_dt): Use correct locus.
164         * resolve.c (resolve_branch): Ditto.
166 2016-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>
168         PR fortran/71730
169         * decl.c (char_len_param_value): Check return value of
170         gfc_reduce_init_expr().
172 2016-07-29  Dominik Vogt  <vogt@linux.vnet.ibm.com>
174         * trans-array.c (gfc_conv_array_ref): Fix allocation of diagnostic
175         message (was too small).
177 2016-07-28  Steven G. Kargl  <kargl@gcc.gnu.org>
179         PR fortran/71067
180         * decl.c (match_data_constant): On error, set 'result' to NULL.
182 2016-07-28  Steven G. Kargl  <kargl@gcc.gnu.org>
184         PR fortran/71799
185         * resolve.c(gfc_resolve_iterator): Failure of type conversion need
186         not ICE.
188 2016-07-28  Steven G. Kargl  <kargl@gcc.gnu.org>
190         PR fortran/71859
191         * check.c(numeric_check): Prevent ICE.  Issue error for invalid
192         subroutine as an actual argument when numeric argument is expected.
194 2016-07-28  Steven G. Kargl  <kargl@gcc.gnu.org>
195             Thomas Koenig  <tkoenig@gcc.gnu.org>
197         PR fortran/71883
198         * frontend-passes.c (gfc_run_passes): Bail out if there are any
199         errors.
200         * error.c (gfc_internal_error): If there are any errors in the
201         buffer, exit with EXIT_FAILURE.
203 2016-07-28  Renlin Li  <renlin.li@arm.com>
205         Revert
206         2016-07-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
208         PR fortran/71902
209         * dependency.c (gfc_check_dependency): Use dep_ref.  Handle case
210         if identical is true and two array element references differ.
211         (gfc_dep_resovler):  Move most of the code to dep_ref.
212         (dep_ref):  New function.
213         * frontend-passes.c (realloc_string_callback):  Name temporary
214         variable "realloc_string".
216 2016-07-26  Steven G. Kargl  <kargl@gcc.gnu.org>
218         PR fortran/71862
219         * class.c: Remove assert.  Iterate over component only if non-null.
221 2016-07-22  Steven G. Kargl  <kargl@gcc.gnu.org>
223         PR fortran/71935
224         * check.c (is_c_interoperable): Simplify right expression.
226 2016-07-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
228         PR fortran/71795
229         * frontend-passes.c (combine_array_constructor):  Don't
230         do anything if the expression is inside an array iterator.
232 2016-07-22  Andre Vehreschild  <vehre@gcc.gnu.org>
234         * expr.c (gfc_find_stat_co): Fixed whitespaces.
235         * gfortran.texi: Fixed typos and reversed meaning of caf_get()'s
236         src and dst description.
237         * trans-decl.c (gfc_build_builtin_function_decls): Fixed style
238         and corrected fnspec for caf functions.
239         * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Fixed style.
240         (conv_caf_send): Dito.
242 2016-07-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
244         PR fortran/71902
245         * dependency.c (gfc_check_dependency): Use dep_ref.  Handle case
246         if identical is true and two array element references differ.
247         (gfc_dep_resovler):  Move most of the code to dep_ref.
248         (dep_ref):  New function.
249         * frontend-passes.c (realloc_string_callback):  Name temporary
250         variable "realloc_string".
252 2016-07-17  Fritz Reese  <fritzoreese@gmail.com>
254         PR fortran/71523
255         * trans-decl.c (gfc_finish_var_decl): Replace automatic initializer with
256         a static one.
258 2016-07-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
259             Marco Restelli <mrestelli@gmail.com>
261         PR fortran/62125
262         * symbol.c (select_type_insert_tmp): Recursively call self to take care
263         of nested select type.
265 2016-07-15  Cesar Philippidis  <cesar@codesourcery.com>
267         * openmp.c (gfc_match_omp_clauses): Scan for clause vector_length
268         before vector.
270 2016-07-15  Andre Vehreschild  <vehre@gcc.gnu.org>
272         PR fortran/71807
273         * trans-expr.c (gfc_trans_subcomponent_assign): Special casing
274         when allocatable component is set to null() in initializer.
276 2016-07-14  Steven G. Kargl  <kargl@gcc.gnu.org>
278         PR fortran/29819
279         * parse.c (parse_contained): Use proper locus.
281 2016-07-14  Andre Vehreschild  <vehre@gcc.gnu.org>
283         PR fortran/70842
284         * simplify.c (gfc_simplify_len): Only for unlimited polymorphic
285         types replace the expression's _data ref with a _len ref.
287 2016-07-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
289         PR fortran/71783
290         * frontend-passes.c (create_var):  Always allocate a charlen
291         for character variables.
293 2016-07-08  Steven G. Kargl  <kargl@gcc.gnu.org>
295         PR fortran/68426
296         * simplify (gfc_simplify_spread): Adjust locus.
298 2016-07-08  Cesar Philippidis  <cesar@codesourcery.com>
300         * parse.c (matcha): Define.
301         (decode_oacc_directive): Add spec_only local var and set it.  Use
302         matcha to parse acc directives except for routine and declare.  Return
303         ST_GET_FCN_CHARACTERISTICS if a non-declarative directive could be
304         matched.
306 2016-07-08  Martin Liska  <mliska@suse.cz>
308         * invoke.texi (Wundefined-do-loop): Enhance documentation.
310 2016-07-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
312         PR fortran/71764
313         * trans-expr.c (gfc_trans_structure_assign): Remove assert.
315 2016-07-07  Martin Liska  <mliska@suse.cz>
317         * lang.opt (Wundefined-do-loop): New option.
318         * resolve.c (gfc_resolve_iterator): Warn for Wundefined-do-loop.
319         (gfc_trans_simple_do): Generate a c-style loop.
320         (gfc_trans_do): Fix GNU coding style.
321         * invoke.texi: Mention the new warning.
323 2016-07-07  Martin Liska  <mliska@suse.cz>
325         * trans-stmt.c (gfc_trans_do): Add expect builtin for DO
326         loops with step bigger than +-1.
328 2016-07-05  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
330         * array.c (gfc_match_array_ref): Add parsing support for
331         STAT= attribute in CAF reference.
332         * expr.c (gfc_find_stat_co): New function that returns
333         the STAT= assignment.
334         * gfortran.h (gfc_array_ref): New member.
335         * trans-decl.c (gfc_build_builtin_function_decls):
336         new attribute for caf_get and caf_send functions.
337         * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Passing
338         the stat attribute to external function.
339         (gfc_conv_intrinsic_caf_send): Ditto.
341 2016-07-05  Andre Vehreschild  <vehre@gcc.gnu.org>
343         PR fortran/71623
344         * trans-stmt.c (gfc_trans_allocate): Add code of pre block of typespec
345         in allocate to parent block.
347 2016-07-04  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
349         PR fortran/66575
350         * decl.c (match_procedure_interface): Exit loop if procedure
351         interface refers to itself.
353 2016-07-04  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
354             Steven G. Kargl  <kargl@gcc.gnu.org>
356         PR fortran/35849
357         * simplify.c (gfc_simplify_ishftc): Check that absolute value of
358         SHIFT is less than or equal to SIZE.
360 2016-07-01  Jakub Jelinek  <jakub@redhat.com>
362         PR fortran/71687
363         * f95-lang.c (struct binding_level): Add reversed field.
364         (clear_binding_level): Adjust initializer.
365         (getdecls): If reversed is clear, set it and nreverse the names
366         chain before returning it.
367         (poplevel): Use getdecls.
368         * trans-decl.c (gfc_generate_function_code, gfc_process_block_locals):
369         Use nreverse to pushdecl decls in the declaration order.
371         PR fortran/71717
372         * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
373         for GFC_DECL_ASSOCIATE_VAR_P with POINTER_TYPE.
375 2016-06-30  Jakub Jelinek  <jakub@redhat.com>
377         PR fortran/71704
378         * parse.c (matchs, matcho): Move right before decode_omp_directive.
379         If spec_only, only gfc_match the keyword and if successful, goto
380         do_spec_only.
381         (matchds, matchdo): Define.
382         (decode_omp_directive): Add spec_only local var and set it.
383         Use matchds or matchdo macros instead of matchs or matcho
384         for declare target, declare simd, declare reduction and threadprivate
385         directives.  Return ST_GET_FCN_CHARACTERISTICS if a non-declarative
386         directive could be matched.
387         (next_statement): For ST_GET_FCN_CHARACTERISTICS restore
388         gfc_current_locus from old_locus even if there is no label.
390         PR fortran/71705
391         * trans-openmp.c (gfc_trans_omp_clauses): Set TREE_ADDRESSABLE on
392         decls in to/from clauses.
394 2016-06-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
396         PR fortran/71686
397         * scanner.c (gfc_next_char_literal): Only decrement nextc if it
398         is not NULL.
400 2016-06-29  Cesar Philippidis  <cesar@codesourcery.com>
402         * openmp.c (match_oacc_clause_gang): Rename to ...
403         (match_oacc_clause_gwv): this.  Add support for OpenACC worker and
404         vector clauses.
405         (gfc_match_omp_clauses): Use match_oacc_clause_gwv for
406         OMP_CLAUSE_{GANG,WORKER,VECTOR}.  Propagate any MATCH_ERRORs for
407         invalid OMP_CLAUSE_{ASYNC,WAIT,GANG,WORKER,VECTOR} clauses.
408         (gfc_match_oacc_wait): Propagate MATCH_ERROR for invalid
409         oacc_expr_lists.  Adjust the first and needs_space arguments to
410         gfc_match_omp_clauses.
412 2016-06-29  Richard Biener  <rguenther@suse.de>
414         PR middle-end/71002
415         * f95-lang.c (LANG_HOOKS_GET_ALIAS_SET): Remove (un-)define.
416         (gfc_get_alias_set): Remove.
418 2016-06-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
420         PR fortran/71649
421         * module.c (create_intrinsic_function): Check for NULL values and
422         return after giving error.
424 2016-06-21  Michael Meissner  <meissner@linux.vnet.ibm.com>
426         * trans-types.c (gfc_build_complex_type): Move setting complex
427         MODE to layout_type, instead of setting it ahead of time by the
428         caller.
430 2016-06-21  Tobias Burnus  <burnus@net-b.de>
432         PR fortran/71068
433         * resolve.c (resolve_function): Don't resolve caf_get/caf_send.
434         (check_data_variable): Strip-off caf_get before checking.
436 2016-06-20  Tobias Burnus  <burnus@net-b.de>
438         PR fortran/71194
439         * trans-expr.c (gfc_trans_pointer_assignment): Correctly handle
440         RHS pointer functions.
442 2016-06-19  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
444         * class.c (gfc_add_class_array_ref): Call gfc_add_data_component()
445         instead of gfc_add_component_ref().
446         (gfc_get_len_component): Call gfc_add_len_component() instead of
447         gfc_add_component_ref().
448         * trans-intrinsic.c (gfc_conv_intrinsic_loc): Call
449         gfc_add_data_component() instead of gfc_add_component_ref().
450         * trans.c (gfc_add_finalizer_call): Call
451         gfc_add_final_component() and gfc_add_size_component() instead
452         of gfc_add_component_ref.
454 2016-06-18  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
456         * trans-types.c (gfc_typenode_for_spec): Commentary typo fix.
458 2016-06-17  Cesar Philippidis  <cesar@codesourcery.com>
460         * openmp.c (match_acc): New generic function to parse OpenACC
461         directives.
462         (gfc_match_oacc_parallel_loop): Use it.
463         (gfc_match_oacc_parallel): Likewise.
464         (gfc_match_oacc_kernels_loop): Likewise.
465         (gfc_match_oacc_kernels): Likewise.
466         (gfc_match_oacc_data): Likewise.
467         (gfc_match_oacc_host_data): Likewise.
468         (gfc_match_oacc_loop): Likewise.
469         (gfc_match_oacc_enter_data): Likewise.
470         (gfc_match_oacc_exit_data): Likewise.
472 2016-06-16  Martin Liska  <mliska@suse.cz>
474         * trans-stmt.c (gfc_trans_simple_do): Predict the edge.
476 2016-06-16  Martin Liska  <mliska@suse.cz>
478         * trans-array.c (gfc_array_allocate): Do not generate expect
479         stmt.
480         * trans.c (gfc_allocate_using_malloc): Properly set FAIL_ALLOC
481         predictor for malloc return value.
482         (gfc_allocate_allocatable): Use REALLOC predictor instead of
483         FAIL_ALLOC.
484         (gfc_deallocate_with_status): Likewise.
486 2016-06-13  Paul Thomas  <pault@gcc.gnu.org>
488         PR fortran/70673
489         * frontend-passes.c (realloc_string_callback): Add a call to
490         gfc_dep_compare_expr.
492 2016-06-11  Dominique d'Humieres  <dominiq@lps.ens.fr>
494         PR fortran/60751
495         * io.c (gfc_resolve_dt): Replace GFC_STD_GNU with GFC_STD_LEGACY.
497 2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
499         PR c/71381
500         * openmp.c (gfc_match_oacc_cache): Add comment.
502 2016-06-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
504         PR fortran/71404
505         * io.c (match_io): For READ, commit in pending symbols in the
506         current statement before trying to match an expression so that
507         if the match fails and we undo symbols we dont toss good symbols.
509 2016-06-05  Andre Vehreschild  <vehre@gcc.gnu.org>
511         PR fortran/69659
512         * trans-array.c (gfc_trans_dummy_array_bias): For class arrays use
513         the address of the _data component to reference the arrays data
514         component.
516 2016-06-03  Chung-Lin Tang  <cltang@codesourcery.com>
518         * trans-openmp.c (gfc_trans_omp_reduction_list): Add mark_addressable
519         bool parameter, set reduction clause DECLs as addressable when true.
520         (gfc_trans_omp_clauses): Pass clauses->async to
521         gfc_trans_omp_reduction_list, add comment describing OpenACC situation.
523 2016-06-01  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
525         PR fortran/52393
526         * io.c (match_io): For READ, try to match a default character
527         expression. If found, set the dt format expression to this,
528         otherwise go back and try control list.
530 2016-06-01  Paul Thomas  <pault@gcc.gnu.org>
532         PR fortran/71156
533         * decl.c (copy_prefix): Add checks that the module procedure
534         declaration prefixes are compliant with the interface. Invert
535         order of existing elemental and pure checks.
536         * resolve.c (resolve_fl_procedure): Invert order of elemental
537         and pure errors.
539 2016-06-01  Jakub Jelinek  <jakub@redhat.com>
541         * parse.c (case_decl): Move ST_OMP_* to ...
542         (case_omp_decl): ... here, new macro.
543         (verify_st_order): For case_omp_decl, complain about
544         p->state >= ORDER_EXEC, but don't change p->state otherwise.
546 2016-05-26  Jakub Jelinek  <jakub@redhat.com>
548         * openmp.c (resolve_omp_clauses): Warn if chunk_size is known not to
549         be positive.
551 2016-05-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
553         PR fortran/66461
554         * scanner.c (gfc_next_char_literal): Clear end_flag when adjusting
555         current locus back to old_locus.
557 2016-05-20  Jakub Jelinek  <jakub@redhat.com>
559         PR fortran/71204
560         * frontend-passes.c (realloc_string_callback): Clear inserted_block
561         and changed_statement before calling create_var.
563 2016-05-15  Harald Anlauf  <anlauf@gmx.de>
565         PR fortran/69603
566         * interface.c (compare_parameter): Check for non-NULL pointer.
568 2016-05-14  Fritz Reese  <fritzoreese@gmail.com>
570         * gfortran.texi: Update example of DEC UNION extension.
572 2016-05-14  Fritz Reese  <fritzoreese@gmail.com>
574         PR fortran/71047
575         * expr.c (gfc_default_initializer): Avoid extra component refs in
576         constructors for derived types and classes.
578 2016-05-11  Jakub Jelinek  <jakub@redhat.com>
580         PR fortran/70855
581         * frontend-passes.c (inline_matmul_assign): Disable in !$omp workshare.
583 2016-05-09  Richard Biener  <rguenther@suse.de>
585         PR fortran/70937
586         * trans-decl.c: Include gimplify.h for unshare_expr.
587         (gfc_trans_vla_one_sizepos): Unshare exprs before inserting
588         them into the IL.
590 2016-05-07  Fritz Reese  <fritzoreese@gmail.com>
592         PR fortran/56226
593         * module.c (dt_upper_string): Rename to gfc_dt_upper_string
594         (dt_lower_string): Likewise.
595         * gfortran.h: Make new gfc_dt_upper/lower_string global.
596         * class.c: Use gfc_dt_upper_string.
597         * decl.c: Likewise.
598         * symbol.c: Likewise.
599         * resolve.c (resolve_component): New function.
600         (resolve_fl_derived0): Move component loop code to resolve_component.
601         * parse.c (check_component): New function.
602         (parse_derived): Move loop code to check_component.
603         * lang.opt, invoke.texi, options.c : New option -fdec-structure.
604         * libgfortran.h (bt): New basic type BT_UNION.
605         * gfortran.h (gfc_option): New option -fdec-structure.
606         (gfc_get_union_type, gfc_compare_union_types): New prototypes.
607         (gfc_bt_struct, gfc_fl_struct, case_bt_struct, case_fl_struct): New
608         macros.
609         (gfc_find_component): Change prototype.
610         * match.h (gfc_match_member_sep, gfc_match_map, gfc_match_union,
611         gfc_match_structure_decl): New prototypes.
612         * parse.h (gfc_comp_struct): New macro.
613         * symbol.c (gfc_find_component): Search for components in nested unions
614         * class.c (insert_component_ref, gfc_add_component_ref, add_proc_comp,
615         copy_vtab_proc_comps): Update calls to gfc_find_component.
616         * primary.c (gfc_convert_to_structure_constructor): Likewise.
617         * symbol.c (gfc_add_component): Likewise.
618         * resolve.c (resolve_typebound_function, resolve_typebound_subroutine,
619         resolve_typebound_procedure, resolve_component, resolve_fl_derived):
620         Likewise.
621         * expr.c (get_union_init, component_init): New functions.
622         * decl.c (match_clist_expr, match_record_decl, get_struct_decl,
623         gfc_match_map, gfc_match_union, gfc_match_structure_decl): Likewise.
624         * interface.c (compare_components, gfc_compare_union_types): Likewise.
625         * match.c (gfc_match_member_sep): Likewise.
626         * parse.c (check_component, parse_union, parse_struct_map): Likewise.
627         * resolve.c (resolve_fl_struct): Likewise.
628         * symbol.c (find_union_component): Likewise.
629         * trans-types.c (gfc_get_union_type): Likewise.
630         * parse.c (parse_derived): Use new functions.
631         * interface.c (gfc_compare_derived_types, gfc_compare_types): Likewise.
632         * expr.c (gfc_default_initializer): Likewise.
633         * gfortran.texi: Support for DEC structures, unions, and maps.
634         * gfortran.h (gfc_statement, sym_flavor): Likewise.
635         * check.c (gfc_check_kill_sub): Likewise.
636         * expr.c (gfc_copy_expr, simplify_const_ref,
637         gfc_has_default_initializer): Likewise.
638         * decl.c (build_sym, match_data_constant, add_init_expr_to_sym,
639         match_pointer_init, build_struct, variable_decl,
640         gfc_match_decl_type_spec, gfc_mach_data-decl, gfc_match_entry,
641         gfc_match_end, gfc_match_derived_decl): Likewise.
642         * interface.c (check_interface0, check_interface1,
643         gfc_search_interface): Likewise.
644         * misc.c (gfc_basic_typename, gfc_typename): Likewise.
645         * module.c (add_true_name, build_tnt, bt_types, mio_typespec,
646         fix_mio_expr, load_needed, mio_symbol, read_module, write_symbol,
647         gfc_get_module_backend_decl): Likewise.
648         * parse.h (gfc_compile_state): Likewise.
649         * parse.c (decode_specification_statement, decode_statement,
650         gfc_ascii_statement, verify_st_order, parse_spec): Likewise.
651         * primary.c (gfc_match_varspec, gfc_match_structure_constructor,
652         gfc_match_rvalue, match_variable): Likewise.
653         * resolve.c (find_arglists, resolve_structure_cons,
654         is_illegal_recursion, resolve_generic_f, get_declared_from_expr,
655         resolve_typebound_subroutine, resolve_allocate_expr,
656         nonscalar_typebound_assign, generate_component_assignments,
657         resolve_fl_variable_derived, check_defined_assignments,
658         resolve_component, resolve_symbol, resolve_equivalence_derived):
659         Likewise.
660         * symbol.c (flavors, check_conflict, gfc_add_flavor, gfc_use_derived,
661         gfc_restore_last_undo_checkpoint, gfc_type_compatible,
662         gfc_find_dt_in_generic): Likewise.
663         * trans-decl.c (gfc_get_module_backend_decl, create_function_arglist,
664         gfc_create_module_variable, check_constant_initializer): Likewise.
665         * trans-expr.c (gfc_conv_component_ref, gfc_conv_initializer,
666         gfc_trans_alloc_subarray_assign, gfc_trans_subcomponent_assign,
667         gfc_conv_structure, gfc_trans_scalar_assign, copyable_array_p):
668         Likewise.
669         * trans-io.c (transfer_namelist_element, transfer_expr,
670         gfc_trans_transfer): Likewise.
671         * trans-stmt.c (gfc_trans_deallocate): Likewise.
672         * trans-types.c (gfc_typenode_for_spec, gfc_copy_dt_decls_ifequal,
673         gfc_get_derived_type): Likewise.
675 2016-05-05  Jakub Jelinek  <jakub@redhat.com>
677         * openmp.c (gfc_match_omp_clauses): Restructuralize, so that clause
678         parsing is done in a big switch based on gfc_peek_ascii_char and
679         individual clauses under their first letters are sorted too.
681 2016-05-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
683         * trans-types.c (gfc_build_complex_type):
685 2016-05-02  Richard Biener  <rguenther@suse.de>
687         * trans-array.c (gfc_trans_create_temp_array): Properly
688         create a DECL_EXPR for the anonymous VLA array type.
690 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
692         PR middle-end/70626
693         * trans-openmp.c (gfc_trans_oacc_combined_directive): Duplicate
694         the reduction clause in both parallel and loop directives.
696 2016-04-18  Michael Matz  <matz@suse.de>
698         * trans-io.c (gfc_build_io_library_fndecls): Use SET_TYPE_ALIGN.
699         * trans-common.c (build_common_decl): Use SET_DECL_ALIGN.
700         * trans-types.c (gfc_add_field_to_struct): Use SET_DECL_ALIGN.
702 2016-04-13  Dominique d'Humieres  <dominiq@lps.ens.fr>
704         PR fortran/67039
705         * intrinsic.texi: Correct the documentation of pseudorandom
706         number intrinsics.
708 2016-04-13  Dominique d'Humieres  <dominiq@lps.ens.fr>
710         PR fortran/58000
711         * gfortran.texi: Document OPEN( ... NAME=) as not implemented
712         in GNU Fortran
714 2016-04-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
716         PR fortran/68566
717         * array.c (match_array_element_spec): Add check for non-integer.
718         * simplify.c (gfc_simplify_reshape): If source shape is NULL return.
720 2016-04-06  Patrick Palka  <ppalka@gcc.gnu.org>
722         PR c/70436
723         * openmp.c (gfc_find_omp_udr): Add explicit braces to resolve a
724         future -Wparentheses warning.
726 2016-04-04  Andre Vehreschild  <vehre@gcc.gnu.org>
728         PR fortran/67538
729         * resolve.c (resolve_allocate_expr): Emit error message when no
730         array spec and no array valued source= expression is given in an
731         F2008 allocate() for an array to allocate.
733 2016-04-04  Andre Vehreschild  <vehre@gcc.gnu.org>
735         PR fortran/65795
736         * trans-array.c (gfc_array_allocate): When the array is a coarray,
737         do not nullyfing its allocatable components in array_allocate, because
738         the nullify missed the array ref and nullifies the wrong component.
739         Cosmetics.
741 2016-03-29  Andre Vehreschild  <vehre@gcc.gnu.org>
743         PR fortran/70397
744         * trans-expr.c (gfc_class_len_or_zero_get): Add function to return a
745         constant zero tree, when the class to get the _len component from is
746         not unlimited polymorphic.
747         (gfc_copy_class_to_class): Use the new function.
748         * trans.h: Added interface of new function gfc_class_len_or_zero_get.
750 2016-03-28  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
752         * trans-decl.c (gfc_build_builtin_function_decls):
753         caf_stop_numeric and caf_stop_str definition.
754         * trans-stmt.c (gfc_trans_stop): invoke external functions
755         for stop and stop_str when coarrays are used.
756         * trans.h: extern for new functions.
758 2016-03-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
760         PR fortran/69043
761         * scanner.c (load_file): Update to use S_ISREG macro.
763 2016-03-17  Thomas Schwinge  <thomas@codesourcery.com>
765         * gfortran.h (enum gfc_omp_map_op): Rename OMP_MAP_FORCE_DEALLOC
766         to OMP_MAP_DELETE.  Adjust all users.
768 2016-03-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
769             Jim MacArthur  <jim.macarthur@codethink.co.uk>
771         PR fortran/69043
772         * scanner.c (load_file): Check that included file is regular.
774 2016-03-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
775             Harold Anlauf  <anlauf@gmx.de>
777         PR fortran/69520
778         * invoke.texi: Explain use of the 'no-' construct within the
779         -fcheck= option.
780         * options.c (gfc_handle_runtime_check_option): Enable use of
781         'no-' prefix for the various options with -fcheck= to allow
782         negating previously enabled check options.
784 2016-03-12  Paul Thomas  <pault@gcc.gnu.org>
786         PR fortran/70031
787         * decl.c (gfc_match_prefix): Treat the 'module' prefix in the
788         same way as the others, rather than fixing it to come last.
789         (gfc_match_function_decl, gfc_match_subroutine): After errors
790         in 'copy_prefix', emit them immediately in the case of module
791         procedures to prevent a later ICE.
793         PR fortran/69524
794         * decl.c (gfc_match_submod_proc): Permit 'module procedure'
795         declarations within the contains section of modules as well as
796         submodules.
797         * resolve.c (resolve_fl_procedure): Likewise.
798         *trans-decl.c (build_function_decl): Change the gcc_assert to
799         allow all forms of module procedure declarations within module
800         contains sections.
802 2016-02-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
804         PR fortran/68147
805         PR fortran/47674
806         * frontend-passes.c (realloc_string_callback): Don't set
807         walk_subtrees.
809 2016-02-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
811         * dump-parse-tree.c (show_code_node):  Print association
812         list of a block if present.  Handle EXEC_END_BLOCK.
814 2016-02-28  Harald Anlauf <anlauf@gmx.de>
815             Jerry DeLisle  <jvdelisle@gcc.gnu.org>
817         PR fortran/56007
818         * match.c (gfc_match_iterator): Add diagnostic for array variable
819         as do loop index.
821 2016-02-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
822             Steven G. Kargl  <kargl@gcc.gnu.org>
824         PR fortran/69910
825         * io.c (gfc_match_open): Check that open status is an expression
826         constant before comparing string to 'scratch' with NEWUNIT.
828 2016-02-27  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
830         * trans.c (gfc_allocate_allocatable): size conversion
831         from byte to number of elements for event variables.
832         * trans-types.c (gfc_get_derived_type): event variables
833         represented as a pointer (like lock variable).
835 2016-02-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
837         PR fortran/61156
838         * scanner.c (add_path_to_list): If include path is not a directory,
839         issue a fatal error.
841 2016-02-23  Andre Vehreschild  <vehre@gcc.gnu.org>
843         PR fortran/67451
844         * trans-array.c (gfc_array_allocate): Take the attributes from the
845         expression to allocate and not from the source=-expression.
847 2016-02-20  Paul Thomas  <pault@gcc.gnu.org>
849         PR fortran/69423
850         * trans-decl.c (create_function_arglist): Deferred character
851         length functions, with and without declared results, address
852         the passed reference type as '.result' and the local string
853         length as '..result'.
854         (gfc_null_and_pass_deferred_len): Helper function to null and
855         return deferred string lengths, as needed.
856         (gfc_trans_deferred_vars): Call it, thereby reducing repeated
857         code, add call for deferred arrays and reroute pointer function
858         results. Avoid using 'tmp' for anything other that a temporary
859         tree by introducing 'type_of_array' for the arrayspec type.
861 2015-02-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
863         PR fortran/69742
864         * frontend-passes.c (cfe-expr_0):  Don't register functions
865         from within an ASSOCIATE statement.
867 2016-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
869         PR fortran/60526
870         * decl.c (build_sym):  If the name has already been defined as a
871         type, it has a symtree with an upper case letter at the beginning.
872         If such a symtree exists, issue an error and exit.  Don't do
873         this if there is no corresponding upper case letter.
875 2016-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
877         PR fortran/60526
878         PR bootstrap/69816
879         * decl.c (build_sym):  Reverted previous patch.
881 2016-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
883         PR fortran/60526
884         * decl.c (build_sym):  If the name has already been defined as a
885         type, issue error and return false.
887 2016-02-12  David Malcolm  <dmalcolm@redhat.com>
889         PR other/69554
890         * error.c (gfc_diagnostic_start_span): New function.
891         (gfc_diagnostics_init): Initialize global_dc's start_span.
893 2016-02-11  Andre Vehreschild  <vehre@gcc.gnu.org>
895         PR fortran/69296
896         * gfortran.h: Added flag to gfc_association_list indicating that
897         the rank of an associate variable has been guessed only.
898         * parse.c (parse_associate): Set the guess flag mentioned above
899         when guessing the rank of an expression.
900         * resolve.c (resolve_assoc_var): When the rank has been guessed,
901         make sure, that the guess was correct else overwrite with the actual
902         rank.
903         * trans-stmt.c (trans_associate_var): For subref_array_pointers in
904         class objects, take the span from the _data component.
906 2016-02-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
908         PR fortran/50555
909         * primary.c (match_actual_arg): If symbol has attribute flavor of
910         namelist, generate an error. (gfc_match_rvalue): Likewise return
911         MATCH_ERROR.
912         * resolve.c (resolve_symbol): Scan arument list of procedures and
913         generate an error if a namelist is found.
915 2016-02-05  Mikael Morin  <mikael@gcc.gnu.org>
917         PR fortran/66089
918         * trans-expr.c (expr_is_variable, gfc_expr_is_variable): Rename
919         the former to the latter and make it non-static.  Update callers.
920         * gfortran.h (gfc_expr_is_variable): New declaration.
921         (struct gfc_ss_info): Add field needs_temporary.
922         * trans-array.c (gfc_scalar_elemental_arg_saved_as_argument):
923         Tighten the condition on aggregate expressions with a check
924         that the expression is a variable and doesn't need a temporary.
925         (gfc_conv_resolve_dependency): Add intermediary reference variable.
926         Set the needs_temporary field.
928 2016-02-03  Andre Vehreschild  <vehre@gcc.gnu.org>
930         PR fortran/67451
931         PR fortran/69418
932         * trans-expr.c (gfc_copy_class_to_class): For coarrays just the
933         pointer is passed.  Take it as is without trying to deref the
934         _data component.
935         * trans-stmt.c (gfc_trans_allocate): Take care of coarrays as
936         argument to source=-expression.
938 2016-02-02  Nathan Sidwell  <nathan@codesourcery.com>
940         * lang.opt (fopenacc-dim=): New option.
942 2016-01-31  Paul Thomas  <pault@gcc.gnu.org>
944         PR fortran/67564
945         * trans-expr.c (gfc_conv_procedure_call): For the vtable copy
946         subroutines, add a string length argument, when the actual
947         argument is an unlimited polymorphic class object.
949 2016-01-30  Paul Thomas  <pault@gcc.gnu.org>
951         PR fortran/69566
952         * trans-expr.c (gfc_conv_procedure_call): Correct expression
953         for 'ulim_copy', which was missing a test for 'comp'.
955 2016-01-28  Andre Vehreschild  <vehre@gcc.gnu.org>
957         PR fortran/62536
958         * decl.c (gfc_match_end): Only unnest and remove BLOCK namespaces
959         when the END encountered does not match a BLOCK's end.
961 2016-01-27  Janus Weil  <janus@gcc.gnu.org>
963         PR fortran/69484
964         * invoke.texi: Fix documentation of -Wall with respect to -Wtabs.
966 2016-01-27  Paul Thomas  <pault@gcc.gnu.org>
968         PR fortran/69422
969         * trans-expr.c (is_scalar_reallocatable_lhs): Remove the check
970         for allocatable components, whilst checking if the symbol is a
971         derived or class entity..
973 2016-01-26  Paul Thomas  <pault@gcc.gnu.org>
975         PR fortran/69385
976         * trans-expr.c (gfc_trans_assignment_1): Exclude initialization
977         assignments from check on assignment of scalars to unassigned
978         arrays and correct wrong code within the corresponding block.
980 2016-01-26  David Malcolm  <dmalcolm@redhat.com>
982         PR other/69006
983         * error.c (gfc_diagnostic_starter): Delete use of pp_newline.
985 2016-01-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
987         PR fortran/69397
988         PR fortran/68442
989         * interface.c (gfc_arglist_matches_symbol): Replace assert with
990         a return false if not a procedure.
991         * resolve.c (resolve_generic_f): Test if we are resolving an
992         initialization expression and adjust error message accordingly.
994 2016-01-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
996         PR fortran/66094
997         * frontend-passes.c (matmul_lhs_realloc):  Add
998         forgotten break statement.
1000 2016-01-24  Dominique d'Humieres <dominiq@lps.ens.fr>
1002         PR fortran/68283
1003         * primary.c (gfc_variable_attr): revert revision r221955,
1004         call gfc_internal_error only if there is no error.
1006 2016-01-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
1008         PR fortran/66094
1009         * frontend-passes.c (enum matrix_case):  Add case A2B2T for
1010         MATMUL(A,TRANSPoSE(B)) where A and B are rank 2.
1011         (inline_limit_check):  Also add A2B2T.
1012         (matmul_lhs_realloc):  Handle A2B2T.
1013         (check_conjg_variable):  Rename to
1014         (check_conjg_transpose_variable):  and also count TRANSPOSE.
1015         (inline_matmul_assign):  Handle A2B2T.
1017 2016-01-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1019         PR fortran/65996
1020         * error.c (gfc_error): Save the state of abort_on_error and set
1021         it to false for buffered errors to allow normal processing.
1022         Restore the state before leaving.
1024 2016-01-19  Martin Jambor  <mjambor@suse.cz>
1026         * types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New.
1027         (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed.
1028         (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): New.
1030 2016-01-15  Paul Thomas  <pault@gcc.gnu.org>
1032         PR fortran/64324
1033         * resolve.c (check_uop_procedure): Prevent deferred length
1034         characters from being trapped by assumed length error.
1036         PR fortran/49630
1037         PR fortran/54070
1038         PR fortran/60593
1039         PR fortran/60795
1040         PR fortran/61147
1041         PR fortran/64324
1042         * trans-array.c (gfc_conv_scalarized_array_ref): Pass decl for
1043         function as well as variable expressions.
1044         (gfc_array_init_size): Add 'expr' as an argument. Use this to
1045         correctly set the descriptor dtype for deferred characters.
1046         (gfc_array_allocate): Add 'expr' to the call to
1047         'gfc_array_init_size'.
1048         * trans.c (gfc_build_array_ref): Expand logic for setting span
1049         to include indirect references to character lengths.
1050         * trans-decl.c (gfc_get_symbol_decl): Ensure that deferred
1051         result char lengths that are PARM_DECLs are indirectly
1052         referenced both for directly passed and by reference.
1053         (create_function_arglist): If the length type is a pointer type
1054         then store the length as the 'passed_length' and make the char
1055         length an indirect reference to it.
1056         (gfc_trans_deferred_vars): If a character length has escaped
1057         being set as an indirect reference, return it via the 'passed
1058         length'.
1059         * trans-expr.c (gfc_conv_procedure_call): The length of
1060         deferred character length results is set TREE_STATIC and set to
1061         zero.
1062         (gfc_trans_assignment_1): Do not fix the rse string_length if
1063         it is a variable, a parameter or an indirect reference. Add the
1064         code to trap assignment of scalars to unallocated arrays.
1065         * trans-stmt.c (gfc_trans_allocate): Remove 'def_str_len' and
1066         all references to it. Instead, replicate the code to obtain a
1067         explicitly defined string length and provide a value before
1068         array allocation so that the dtype is correctly set.
1069         trans-types.c (gfc_get_character_type): If the character length
1070         is a pointer, use the indirect reference.
1072 2016-01-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
1074         PR fortran/69154
1075         * frontend-passes.c (in_where):  New variable.
1076         (inline_matmul_assign):  Don't try this if we are within
1077         a WHERE statement.
1078         (gfc_code_walker):  Keep track of in_where.
1080 2016-01-10  Paul Thomas  <pault@gcc.gnu.org>
1082         PR fortran/67779
1083         * trans_array.c (gfc_conv_scalarized_array_ref): Add missing
1084         se->use_offset from condition for calculation of 'base'.
1086 2016-01-08  Jakub Jelinek  <jakub@redhat.com>
1088         PR fortran/69128
1089         * trans.h (OMPWS_SCALARIZER_BODY): Define.
1090         (OMPWS_NOWAIT): Renumber.
1091         * trans-stmt.c (gfc_trans_where_3): Only set OMPWS_SCALARIZER_WS
1092         if OMPWS_SCALARIZER_BODY is not set already, and set also
1093         OMPWS_SCALARIZER_BODY until the final loop creation.
1094         * trans-expr.c (gfc_trans_assignment_1): Likewise.
1095         * trans-openmp.c (gfc_trans_omp_workshare): Also clear
1096         OMPWS_SCALARIZER_BODY.
1097         * trans-array.c (gfc_trans_scalarized_loop_end): Don't create
1098         OMP_FOR if OMPWS_SCALARIZER_BODY is set.
1100 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
1102         Update copyright years.
1104         * gfortranspec.c (lang_specific_driver): Update copyright notice
1105         dates.
1106         * gfc-internals.texi: Bump @copying's copyright year.
1107         * gfortran.texi: Ditto.
1108         * intrinsic.texi: Ditto.
1109         * invoke.texi: Ditto.
1111 2016-01-01  Paul Thomas  <pault@gcc.gnu.org>
1113         PR fortran/68864
1114         * trans-array.c (evaluate_bound): If deferred, test that 'desc'
1115         is an array descriptor before using gfc_conv_descriptor_xxx.
1117 Copyright (C) 2016 Free Software Foundation, Inc.
1119 Copying and distribution of this file, with or without modification,
1120 are permitted in any medium without royalty provided the copyright
1121 notice and this notice are preserved.