gfortran: Fix allocation of diagnostig string (was too small).
[official-gcc.git] / gcc / fortran / ChangeLog
blobe8f8a81aeb9b95e2c215b5501c9ee54b88b0d7f9
1 2016-07-29  Dominik Vogt  <vogt@linux.vnet.ibm.com>
3         * trans-array.c (gfc_conv_array_ref): Fix allocation of diagnostic
4         message (was too small).
6 2016-07-28  Steven G. Kargl  <kargl@gcc.gnu.org>
8         PR fortran/71067
9         * decl.c (match_data_constant): On error, set 'result' to NULL.
11 2016-07-28  Steven G. Kargl  <kargl@gcc.gnu.org>
13         PR fortran/71799
14         * resolve.c(gfc_resolve_iterator): Failure of type conversion need
15         not ICE.
17 2016-07-28  Steven G. Kargl  <kargl@gcc.gnu.org>
19         PR fortran/71859
20         * check.c(numeric_check): Prevent ICE.  Issue error for invalid
21         subroutine as an actual argument when numeric argument is expected.
23 2016-07-28  Steven G. Kargl  <kargl@gcc.gnu.org>
24             Thomas Koenig  <tkoenig@gcc.gnu.org>
26         PR fortran/71883
27         * frontend-passes.c (gfc_run_passes): Bail out if there are any
28         errors.
29         * error.c (gfc_internal_error): If there are any errors in the
30         buffer, exit with EXIT_FAILURE.
32 2016-07-28  Renlin Li  <renlin.li@arm.com>
34         Revert
35         2016-07-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
37         PR fortran/71902
38         * dependency.c (gfc_check_dependency): Use dep_ref.  Handle case
39         if identical is true and two array element references differ.
40         (gfc_dep_resovler):  Move most of the code to dep_ref.
41         (dep_ref):  New function.
42         * frontend-passes.c (realloc_string_callback):  Name temporary
43         variable "realloc_string".
45 2016-07-26  Steven G. Kargl  <kargl@gcc.gnu.org>
47         PR fortran/71862
48         * class.c: Remove assert.  Iterate over component only if non-null.
50 2016-07-22  Steven G. Kargl  <kargl@gcc.gnu.org>
52         PR fortran/71935
53         * check.c (is_c_interoperable): Simplify right expression.
55 2016-07-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
57         PR fortran/71795
58         * frontend-passes.c (combine_array_constructor):  Don't
59         do anything if the expression is inside an array iterator.
61 2016-07-22  Andre Vehreschild  <vehre@gcc.gnu.org>
63         * expr.c (gfc_find_stat_co): Fixed whitespaces.
64         * gfortran.texi: Fixed typos and reversed meaning of caf_get()'s
65         src and dst description.
66         * trans-decl.c (gfc_build_builtin_function_decls): Fixed style
67         and corrected fnspec for caf functions.
68         * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Fixed style.
69         (conv_caf_send): Dito.
71 2016-07-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
73         PR fortran/71902
74         * dependency.c (gfc_check_dependency): Use dep_ref.  Handle case
75         if identical is true and two array element references differ.
76         (gfc_dep_resovler):  Move most of the code to dep_ref.
77         (dep_ref):  New function.
78         * frontend-passes.c (realloc_string_callback):  Name temporary
79         variable "realloc_string".
81 2016-07-17  Fritz Reese  <fritzoreese@gmail.com>
83         PR fortran/71523
84         * trans-decl.c (gfc_finish_var_decl): Replace automatic initializer with
85         a static one.
87 2016-07-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
88             Marco Restelli <mrestelli@gmail.com>
90         PR fortran/62125
91         * symbol.c (select_type_insert_tmp): Recursively call self to take care
92         of nested select type.
94 2016-07-15  Cesar Philippidis  <cesar@codesourcery.com>
96         * openmp.c (gfc_match_omp_clauses): Scan for clause vector_length
97         before vector.
99 2016-07-15  Andre Vehreschild  <vehre@gcc.gnu.org>
101         PR fortran/71807
102         * trans-expr.c (gfc_trans_subcomponent_assign): Special casing
103         when allocatable component is set to null() in initializer.
105 2016-07-14  Steven G. Kargl  <kargl@gcc.gnu.org>
107         PR fortran/29819
108         * parse.c (parse_contained): Use proper locus.
110 2016-07-14  Andre Vehreschild  <vehre@gcc.gnu.org>
112         PR fortran/70842
113         * simplify.c (gfc_simplify_len): Only for unlimited polymorphic
114         types replace the expression's _data ref with a _len ref.
116 2016-07-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
118         PR fortran/71783
119         * frontend-passes.c (create_var):  Always allocate a charlen
120         for character variables.
122 2016-07-08  Steven G. Kargl  <kargl@gcc.gnu.org>
124         PR fortran/68426
125         * simplify (gfc_simplify_spread): Adjust locus.
127 2016-07-08  Cesar Philippidis  <cesar@codesourcery.com>
129         * parse.c (matcha): Define.
130         (decode_oacc_directive): Add spec_only local var and set it.  Use
131         matcha to parse acc directives except for routine and declare.  Return
132         ST_GET_FCN_CHARACTERISTICS if a non-declarative directive could be
133         matched.
135 2016-07-08  Martin Liska  <mliska@suse.cz>
137         * invoke.texi (Wundefined-do-loop): Enhance documentation.
139 2016-07-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
141         PR fortran/71764
142         * trans-expr.c (gfc_trans_structure_assign): Remove assert.
144 2016-07-07  Martin Liska  <mliska@suse.cz>
146         * lang.opt (Wundefined-do-loop): New option.
147         * resolve.c (gfc_resolve_iterator): Warn for Wundefined-do-loop.
148         (gfc_trans_simple_do): Generate a c-style loop.
149         (gfc_trans_do): Fix GNU coding style.
150         * invoke.texi: Mention the new warning.
152 2016-07-07  Martin Liska  <mliska@suse.cz>
154         * trans-stmt.c (gfc_trans_do): Add expect builtin for DO
155         loops with step bigger than +-1.
157 2016-07-05  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
159         * array.c (gfc_match_array_ref): Add parsing support for
160         STAT= attribute in CAF reference.
161         * expr.c (gfc_find_stat_co): New function that returns
162         the STAT= assignment.
163         * gfortran.h (gfc_array_ref): New member.
164         * trans-decl.c (gfc_build_builtin_function_decls):
165         new attribute for caf_get and caf_send functions.
166         * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Passing
167         the stat attribute to external function.
168         (gfc_conv_intrinsic_caf_send): Ditto.
170 2016-07-05  Andre Vehreschild  <vehre@gcc.gnu.org>
172         PR fortran/71623
173         * trans-stmt.c (gfc_trans_allocate): Add code of pre block of typespec
174         in allocate to parent block.
176 2016-07-04  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
178         PR fortran/66575
179         * decl.c (match_procedure_interface): Exit loop if procedure
180         interface refers to itself.
182 2016-07-04  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
183             Steven G. Kargl  <kargl@gcc.gnu.org>
185         PR fortran/35849
186         * simplify.c (gfc_simplify_ishftc): Check that absolute value of
187         SHIFT is less than or equal to SIZE.
189 2016-07-01  Jakub Jelinek  <jakub@redhat.com>
191         PR fortran/71687
192         * f95-lang.c (struct binding_level): Add reversed field.
193         (clear_binding_level): Adjust initializer.
194         (getdecls): If reversed is clear, set it and nreverse the names
195         chain before returning it.
196         (poplevel): Use getdecls.
197         * trans-decl.c (gfc_generate_function_code, gfc_process_block_locals):
198         Use nreverse to pushdecl decls in the declaration order.
200         PR fortran/71717
201         * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
202         for GFC_DECL_ASSOCIATE_VAR_P with POINTER_TYPE.
204 2016-06-30  Jakub Jelinek  <jakub@redhat.com>
206         PR fortran/71704
207         * parse.c (matchs, matcho): Move right before decode_omp_directive.
208         If spec_only, only gfc_match the keyword and if successful, goto
209         do_spec_only.
210         (matchds, matchdo): Define.
211         (decode_omp_directive): Add spec_only local var and set it.
212         Use matchds or matchdo macros instead of matchs or matcho
213         for declare target, declare simd, declare reduction and threadprivate
214         directives.  Return ST_GET_FCN_CHARACTERISTICS if a non-declarative
215         directive could be matched.
216         (next_statement): For ST_GET_FCN_CHARACTERISTICS restore
217         gfc_current_locus from old_locus even if there is no label.
219         PR fortran/71705
220         * trans-openmp.c (gfc_trans_omp_clauses): Set TREE_ADDRESSABLE on
221         decls in to/from clauses.
223 2016-06-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
225         PR fortran/71686
226         * scanner.c (gfc_next_char_literal): Only decrement nextc if it
227         is not NULL.
229 2016-06-29  Cesar Philippidis  <cesar@codesourcery.com>
231         * openmp.c (match_oacc_clause_gang): Rename to ...
232         (match_oacc_clause_gwv): this.  Add support for OpenACC worker and
233         vector clauses.
234         (gfc_match_omp_clauses): Use match_oacc_clause_gwv for
235         OMP_CLAUSE_{GANG,WORKER,VECTOR}.  Propagate any MATCH_ERRORs for
236         invalid OMP_CLAUSE_{ASYNC,WAIT,GANG,WORKER,VECTOR} clauses.
237         (gfc_match_oacc_wait): Propagate MATCH_ERROR for invalid
238         oacc_expr_lists.  Adjust the first and needs_space arguments to
239         gfc_match_omp_clauses.
241 2016-06-29  Richard Biener  <rguenther@suse.de>
243         PR middle-end/71002
244         * f95-lang.c (LANG_HOOKS_GET_ALIAS_SET): Remove (un-)define.
245         (gfc_get_alias_set): Remove.
247 2016-06-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
249         PR fortran/71649
250         * module.c (create_intrinsic_function): Check for NULL values and
251         return after giving error.
253 2016-06-21  Michael Meissner  <meissner@linux.vnet.ibm.com>
255         * trans-types.c (gfc_build_complex_type): Move setting complex
256         MODE to layout_type, instead of setting it ahead of time by the
257         caller.
259 2016-06-21  Tobias Burnus  <burnus@net-b.de>
261         PR fortran/71068
262         * resolve.c (resolve_function): Don't resolve caf_get/caf_send.
263         (check_data_variable): Strip-off caf_get before checking.
265 2016-06-20  Tobias Burnus  <burnus@net-b.de>
267         PR fortran/71194
268         * trans-expr.c (gfc_trans_pointer_assignment): Correctly handle
269         RHS pointer functions.
271 2016-06-19  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
273         * class.c (gfc_add_class_array_ref): Call gfc_add_data_component()
274         instead of gfc_add_component_ref().
275         (gfc_get_len_component): Call gfc_add_len_component() instead of
276         gfc_add_component_ref().
277         * trans-intrinsic.c (gfc_conv_intrinsic_loc): Call
278         gfc_add_data_component() instead of gfc_add_component_ref().
279         * trans.c (gfc_add_finalizer_call): Call
280         gfc_add_final_component() and gfc_add_size_component() instead
281         of gfc_add_component_ref.
283 2016-06-18  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
285         * trans-types.c (gfc_typenode_for_spec): Commentary typo fix.
287 2016-06-17  Cesar Philippidis  <cesar@codesourcery.com>
289         * openmp.c (match_acc): New generic function to parse OpenACC
290         directives.
291         (gfc_match_oacc_parallel_loop): Use it.
292         (gfc_match_oacc_parallel): Likewise.
293         (gfc_match_oacc_kernels_loop): Likewise.
294         (gfc_match_oacc_kernels): Likewise.
295         (gfc_match_oacc_data): Likewise.
296         (gfc_match_oacc_host_data): Likewise.
297         (gfc_match_oacc_loop): Likewise.
298         (gfc_match_oacc_enter_data): Likewise.
299         (gfc_match_oacc_exit_data): Likewise.
301 2016-06-16  Martin Liska  <mliska@suse.cz>
303         * trans-stmt.c (gfc_trans_simple_do): Predict the edge.
305 2016-06-16  Martin Liska  <mliska@suse.cz>
307         * trans-array.c (gfc_array_allocate): Do not generate expect
308         stmt.
309         * trans.c (gfc_allocate_using_malloc): Properly set FAIL_ALLOC
310         predictor for malloc return value.
311         (gfc_allocate_allocatable): Use REALLOC predictor instead of
312         FAIL_ALLOC.
313         (gfc_deallocate_with_status): Likewise.
315 2016-06-13  Paul Thomas  <pault@gcc.gnu.org>
317         PR fortran/70673
318         * frontend-passes.c (realloc_string_callback): Add a call to
319         gfc_dep_compare_expr.
321 2016-06-11  Dominique d'Humieres  <dominiq@lps.ens.fr>
323         PR fortran/60751
324         * io.c (gfc_resolve_dt): Replace GFC_STD_GNU with GFC_STD_LEGACY.
326 2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
328         PR c/71381
329         * openmp.c (gfc_match_oacc_cache): Add comment.
331 2016-06-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
333         PR fortran/71404
334         * io.c (match_io): For READ, commit in pending symbols in the
335         current statement before trying to match an expression so that
336         if the match fails and we undo symbols we dont toss good symbols.
338 2016-06-05  Andre Vehreschild  <vehre@gcc.gnu.org>
340         PR fortran/69659
341         * trans-array.c (gfc_trans_dummy_array_bias): For class arrays use
342         the address of the _data component to reference the arrays data
343         component.
345 2016-06-03  Chung-Lin Tang  <cltang@codesourcery.com>
347         * trans-openmp.c (gfc_trans_omp_reduction_list): Add mark_addressable
348         bool parameter, set reduction clause DECLs as addressable when true.
349         (gfc_trans_omp_clauses): Pass clauses->async to
350         gfc_trans_omp_reduction_list, add comment describing OpenACC situation.
352 2016-06-01  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
354         PR fortran/52393
355         * io.c (match_io): For READ, try to match a default character
356         expression. If found, set the dt format expression to this,
357         otherwise go back and try control list.
359 2016-06-01  Paul Thomas  <pault@gcc.gnu.org>
361         PR fortran/71156
362         * decl.c (copy_prefix): Add checks that the module procedure
363         declaration prefixes are compliant with the interface. Invert
364         order of existing elemental and pure checks.
365         * resolve.c (resolve_fl_procedure): Invert order of elemental
366         and pure errors.
368 2016-06-01  Jakub Jelinek  <jakub@redhat.com>
370         * parse.c (case_decl): Move ST_OMP_* to ...
371         (case_omp_decl): ... here, new macro.
372         (verify_st_order): For case_omp_decl, complain about
373         p->state >= ORDER_EXEC, but don't change p->state otherwise.
375 2016-05-26  Jakub Jelinek  <jakub@redhat.com>
377         * openmp.c (resolve_omp_clauses): Warn if chunk_size is known not to
378         be positive.
380 2016-05-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
382         PR fortran/66461
383         * scanner.c (gfc_next_char_literal): Clear end_flag when adjusting
384         current locus back to old_locus.
386 2016-05-20  Jakub Jelinek  <jakub@redhat.com>
388         PR fortran/71204
389         * frontend-passes.c (realloc_string_callback): Clear inserted_block
390         and changed_statement before calling create_var.
392 2016-05-15  Harald Anlauf  <anlauf@gmx.de>
394         PR fortran/69603
395         * interface.c (compare_parameter): Check for non-NULL pointer.
397 2016-05-14  Fritz Reese  <fritzoreese@gmail.com>
399         * gfortran.texi: Update example of DEC UNION extension.
401 2016-05-14  Fritz Reese  <fritzoreese@gmail.com>
403         PR fortran/71047
404         * expr.c (gfc_default_initializer): Avoid extra component refs in
405         constructors for derived types and classes.
407 2016-05-11  Jakub Jelinek  <jakub@redhat.com>
409         PR fortran/70855
410         * frontend-passes.c (inline_matmul_assign): Disable in !$omp workshare.
412 2016-05-09  Richard Biener  <rguenther@suse.de>
414         PR fortran/70937
415         * trans-decl.c: Include gimplify.h for unshare_expr.
416         (gfc_trans_vla_one_sizepos): Unshare exprs before inserting
417         them into the IL.
419 2016-05-07  Fritz Reese  <fritzoreese@gmail.com>
421         PR fortran/56226
422         * module.c (dt_upper_string): Rename to gfc_dt_upper_string
423         (dt_lower_string): Likewise.
424         * gfortran.h: Make new gfc_dt_upper/lower_string global.
425         * class.c: Use gfc_dt_upper_string.
426         * decl.c: Likewise.
427         * symbol.c: Likewise.
428         * resolve.c (resolve_component): New function.
429         (resolve_fl_derived0): Move component loop code to resolve_component.
430         * parse.c (check_component): New function.
431         (parse_derived): Move loop code to check_component.
432         * lang.opt, invoke.texi, options.c : New option -fdec-structure.
433         * libgfortran.h (bt): New basic type BT_UNION.
434         * gfortran.h (gfc_option): New option -fdec-structure.
435         (gfc_get_union_type, gfc_compare_union_types): New prototypes.
436         (gfc_bt_struct, gfc_fl_struct, case_bt_struct, case_fl_struct): New
437         macros.
438         (gfc_find_component): Change prototype.
439         * match.h (gfc_match_member_sep, gfc_match_map, gfc_match_union,
440         gfc_match_structure_decl): New prototypes.
441         * parse.h (gfc_comp_struct): New macro.
442         * symbol.c (gfc_find_component): Search for components in nested unions
443         * class.c (insert_component_ref, gfc_add_component_ref, add_proc_comp,
444         copy_vtab_proc_comps): Update calls to gfc_find_component.
445         * primary.c (gfc_convert_to_structure_constructor): Likewise.
446         * symbol.c (gfc_add_component): Likewise.
447         * resolve.c (resolve_typebound_function, resolve_typebound_subroutine,
448         resolve_typebound_procedure, resolve_component, resolve_fl_derived):
449         Likewise.
450         * expr.c (get_union_init, component_init): New functions.
451         * decl.c (match_clist_expr, match_record_decl, get_struct_decl,
452         gfc_match_map, gfc_match_union, gfc_match_structure_decl): Likewise.
453         * interface.c (compare_components, gfc_compare_union_types): Likewise.
454         * match.c (gfc_match_member_sep): Likewise.
455         * parse.c (check_component, parse_union, parse_struct_map): Likewise.
456         * resolve.c (resolve_fl_struct): Likewise.
457         * symbol.c (find_union_component): Likewise.
458         * trans-types.c (gfc_get_union_type): Likewise.
459         * parse.c (parse_derived): Use new functions.
460         * interface.c (gfc_compare_derived_types, gfc_compare_types): Likewise.
461         * expr.c (gfc_default_initializer): Likewise.
462         * gfortran.texi: Support for DEC structures, unions, and maps.
463         * gfortran.h (gfc_statement, sym_flavor): Likewise.
464         * check.c (gfc_check_kill_sub): Likewise.
465         * expr.c (gfc_copy_expr, simplify_const_ref,
466         gfc_has_default_initializer): Likewise.
467         * decl.c (build_sym, match_data_constant, add_init_expr_to_sym,
468         match_pointer_init, build_struct, variable_decl,
469         gfc_match_decl_type_spec, gfc_mach_data-decl, gfc_match_entry,
470         gfc_match_end, gfc_match_derived_decl): Likewise.
471         * interface.c (check_interface0, check_interface1,
472         gfc_search_interface): Likewise.
473         * misc.c (gfc_basic_typename, gfc_typename): Likewise.
474         * module.c (add_true_name, build_tnt, bt_types, mio_typespec,
475         fix_mio_expr, load_needed, mio_symbol, read_module, write_symbol,
476         gfc_get_module_backend_decl): Likewise.
477         * parse.h (gfc_compile_state): Likewise.
478         * parse.c (decode_specification_statement, decode_statement,
479         gfc_ascii_statement, verify_st_order, parse_spec): Likewise.
480         * primary.c (gfc_match_varspec, gfc_match_structure_constructor,
481         gfc_match_rvalue, match_variable): Likewise.
482         * resolve.c (find_arglists, resolve_structure_cons,
483         is_illegal_recursion, resolve_generic_f, get_declared_from_expr,
484         resolve_typebound_subroutine, resolve_allocate_expr,
485         nonscalar_typebound_assign, generate_component_assignments,
486         resolve_fl_variable_derived, check_defined_assignments,
487         resolve_component, resolve_symbol, resolve_equivalence_derived):
488         Likewise.
489         * symbol.c (flavors, check_conflict, gfc_add_flavor, gfc_use_derived,
490         gfc_restore_last_undo_checkpoint, gfc_type_compatible,
491         gfc_find_dt_in_generic): Likewise.
492         * trans-decl.c (gfc_get_module_backend_decl, create_function_arglist,
493         gfc_create_module_variable, check_constant_initializer): Likewise.
494         * trans-expr.c (gfc_conv_component_ref, gfc_conv_initializer,
495         gfc_trans_alloc_subarray_assign, gfc_trans_subcomponent_assign,
496         gfc_conv_structure, gfc_trans_scalar_assign, copyable_array_p):
497         Likewise.
498         * trans-io.c (transfer_namelist_element, transfer_expr,
499         gfc_trans_transfer): Likewise.
500         * trans-stmt.c (gfc_trans_deallocate): Likewise.
501         * trans-types.c (gfc_typenode_for_spec, gfc_copy_dt_decls_ifequal,
502         gfc_get_derived_type): Likewise.
504 2016-05-05  Jakub Jelinek  <jakub@redhat.com>
506         * openmp.c (gfc_match_omp_clauses): Restructuralize, so that clause
507         parsing is done in a big switch based on gfc_peek_ascii_char and
508         individual clauses under their first letters are sorted too.
510 2016-05-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
512         * trans-types.c (gfc_build_complex_type):
514 2016-05-02  Richard Biener  <rguenther@suse.de>
516         * trans-array.c (gfc_trans_create_temp_array): Properly
517         create a DECL_EXPR for the anonymous VLA array type.
519 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
521         PR middle-end/70626
522         * trans-openmp.c (gfc_trans_oacc_combined_directive): Duplicate
523         the reduction clause in both parallel and loop directives.
525 2016-04-18  Michael Matz  <matz@suse.de>
527         * trans-io.c (gfc_build_io_library_fndecls): Use SET_TYPE_ALIGN.
528         * trans-common.c (build_common_decl): Use SET_DECL_ALIGN.
529         * trans-types.c (gfc_add_field_to_struct): Use SET_DECL_ALIGN.
531 2016-04-13  Dominique d'Humieres  <dominiq@lps.ens.fr>
533         PR fortran/67039
534         * intrinsic.texi: Correct the documentation of pseudorandom
535         number intrinsics.
537 2016-04-13  Dominique d'Humieres  <dominiq@lps.ens.fr>
539         PR fortran/58000
540         * gfortran.texi: Document OPEN( ... NAME=) as not implemented
541         in GNU Fortran
543 2016-04-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
545         PR fortran/68566
546         * array.c (match_array_element_spec): Add check for non-integer.
547         * simplify.c (gfc_simplify_reshape): If source shape is NULL return.
549 2016-04-06  Patrick Palka  <ppalka@gcc.gnu.org>
551         PR c/70436
552         * openmp.c (gfc_find_omp_udr): Add explicit braces to resolve a
553         future -Wparentheses warning.
555 2016-04-04  Andre Vehreschild  <vehre@gcc.gnu.org>
557         PR fortran/67538
558         * resolve.c (resolve_allocate_expr): Emit error message when no
559         array spec and no array valued source= expression is given in an
560         F2008 allocate() for an array to allocate.
562 2016-04-04  Andre Vehreschild  <vehre@gcc.gnu.org>
564         PR fortran/65795
565         * trans-array.c (gfc_array_allocate): When the array is a coarray,
566         do not nullyfing its allocatable components in array_allocate, because
567         the nullify missed the array ref and nullifies the wrong component.
568         Cosmetics.
570 2016-03-29  Andre Vehreschild  <vehre@gcc.gnu.org>
572         PR fortran/70397
573         * trans-expr.c (gfc_class_len_or_zero_get): Add function to return a
574         constant zero tree, when the class to get the _len component from is
575         not unlimited polymorphic.
576         (gfc_copy_class_to_class): Use the new function.
577         * trans.h: Added interface of new function gfc_class_len_or_zero_get.
579 2016-03-28  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
581         * trans-decl.c (gfc_build_builtin_function_decls):
582         caf_stop_numeric and caf_stop_str definition.
583         * trans-stmt.c (gfc_trans_stop): invoke external functions
584         for stop and stop_str when coarrays are used.
585         * trans.h: extern for new functions.
587 2016-03-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
589         PR fortran/69043
590         * scanner.c (load_file): Update to use S_ISREG macro.
592 2016-03-17  Thomas Schwinge  <thomas@codesourcery.com>
594         * gfortran.h (enum gfc_omp_map_op): Rename OMP_MAP_FORCE_DEALLOC
595         to OMP_MAP_DELETE.  Adjust all users.
597 2016-03-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
598             Jim MacArthur  <jim.macarthur@codethink.co.uk>
600         PR fortran/69043
601         * scanner.c (load_file): Check that included file is regular.
603 2016-03-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
604             Harold Anlauf  <anlauf@gmx.de>
606         PR fortran/69520
607         * invoke.texi: Explain use of the 'no-' construct within the
608         -fcheck= option.
609         * options.c (gfc_handle_runtime_check_option): Enable use of
610         'no-' prefix for the various options with -fcheck= to allow
611         negating previously enabled check options.
613 2016-03-12  Paul Thomas  <pault@gcc.gnu.org>
615         PR fortran/70031
616         * decl.c (gfc_match_prefix): Treat the 'module' prefix in the
617         same way as the others, rather than fixing it to come last.
618         (gfc_match_function_decl, gfc_match_subroutine): After errors
619         in 'copy_prefix', emit them immediately in the case of module
620         procedures to prevent a later ICE.
622         PR fortran/69524
623         * decl.c (gfc_match_submod_proc): Permit 'module procedure'
624         declarations within the contains section of modules as well as
625         submodules.
626         * resolve.c (resolve_fl_procedure): Likewise.
627         *trans-decl.c (build_function_decl): Change the gcc_assert to
628         allow all forms of module procedure declarations within module
629         contains sections.
631 2016-02-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
633         PR fortran/68147
634         PR fortran/47674
635         * frontend-passes.c (realloc_string_callback): Don't set
636         walk_subtrees.
638 2016-02-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
640         * dump-parse-tree.c (show_code_node):  Print association
641         list of a block if present.  Handle EXEC_END_BLOCK.
643 2016-02-28  Harald Anlauf <anlauf@gmx.de>
644             Jerry DeLisle  <jvdelisle@gcc.gnu.org>
646         PR fortran/56007
647         * match.c (gfc_match_iterator): Add diagnostic for array variable
648         as do loop index.
650 2016-02-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
651             Steven G. Kargl  <kargl@gcc.gnu.org>
653         PR fortran/69910
654         * io.c (gfc_match_open): Check that open status is an expression
655         constant before comparing string to 'scratch' with NEWUNIT.
657 2016-02-27  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
659         * trans.c (gfc_allocate_allocatable): size conversion
660         from byte to number of elements for event variables.
661         * trans-types.c (gfc_get_derived_type): event variables
662         represented as a pointer (like lock variable).
664 2016-02-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
666         PR fortran/61156
667         * scanner.c (add_path_to_list): If include path is not a directory,
668         issue a fatal error.
670 2016-02-23  Andre Vehreschild  <vehre@gcc.gnu.org>
672         PR fortran/67451
673         * trans-array.c (gfc_array_allocate): Take the attributes from the
674         expression to allocate and not from the source=-expression.
676 2016-02-20  Paul Thomas  <pault@gcc.gnu.org>
678         PR fortran/69423
679         * trans-decl.c (create_function_arglist): Deferred character
680         length functions, with and without declared results, address
681         the passed reference type as '.result' and the local string
682         length as '..result'.
683         (gfc_null_and_pass_deferred_len): Helper function to null and
684         return deferred string lengths, as needed.
685         (gfc_trans_deferred_vars): Call it, thereby reducing repeated
686         code, add call for deferred arrays and reroute pointer function
687         results. Avoid using 'tmp' for anything other that a temporary
688         tree by introducing 'type_of_array' for the arrayspec type.
690 2015-02-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
692         PR fortran/69742
693         * frontend-passes.c (cfe-expr_0):  Don't register functions
694         from within an ASSOCIATE statement.
696 2016-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
698         PR fortran/60526
699         * decl.c (build_sym):  If the name has already been defined as a
700         type, it has a symtree with an upper case letter at the beginning.
701         If such a symtree exists, issue an error and exit.  Don't do
702         this if there is no corresponding upper case letter.
704 2016-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
706         PR fortran/60526
707         PR bootstrap/69816
708         * decl.c (build_sym):  Reverted previous patch.
710 2016-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
712         PR fortran/60526
713         * decl.c (build_sym):  If the name has already been defined as a
714         type, issue error and return false.
716 2016-02-12  David Malcolm  <dmalcolm@redhat.com>
718         PR other/69554
719         * error.c (gfc_diagnostic_start_span): New function.
720         (gfc_diagnostics_init): Initialize global_dc's start_span.
722 2016-02-11  Andre Vehreschild  <vehre@gcc.gnu.org>
724         PR fortran/69296
725         * gfortran.h: Added flag to gfc_association_list indicating that
726         the rank of an associate variable has been guessed only.
727         * parse.c (parse_associate): Set the guess flag mentioned above
728         when guessing the rank of an expression.
729         * resolve.c (resolve_assoc_var): When the rank has been guessed,
730         make sure, that the guess was correct else overwrite with the actual
731         rank.
732         * trans-stmt.c (trans_associate_var): For subref_array_pointers in
733         class objects, take the span from the _data component.
735 2016-02-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
737         PR fortran/50555
738         * primary.c (match_actual_arg): If symbol has attribute flavor of
739         namelist, generate an error. (gfc_match_rvalue): Likewise return
740         MATCH_ERROR.
741         * resolve.c (resolve_symbol): Scan arument list of procedures and
742         generate an error if a namelist is found.
744 2016-02-05  Mikael Morin  <mikael@gcc.gnu.org>
746         PR fortran/66089
747         * trans-expr.c (expr_is_variable, gfc_expr_is_variable): Rename
748         the former to the latter and make it non-static.  Update callers.
749         * gfortran.h (gfc_expr_is_variable): New declaration.
750         (struct gfc_ss_info): Add field needs_temporary.
751         * trans-array.c (gfc_scalar_elemental_arg_saved_as_argument):
752         Tighten the condition on aggregate expressions with a check
753         that the expression is a variable and doesn't need a temporary.
754         (gfc_conv_resolve_dependency): Add intermediary reference variable.
755         Set the needs_temporary field.
757 2016-02-03  Andre Vehreschild  <vehre@gcc.gnu.org>
759         PR fortran/67451
760         PR fortran/69418
761         * trans-expr.c (gfc_copy_class_to_class): For coarrays just the
762         pointer is passed.  Take it as is without trying to deref the
763         _data component.
764         * trans-stmt.c (gfc_trans_allocate): Take care of coarrays as
765         argument to source=-expression.
767 2016-02-02  Nathan Sidwell  <nathan@codesourcery.com>
769         * lang.opt (fopenacc-dim=): New option.
771 2016-01-31  Paul Thomas  <pault@gcc.gnu.org>
773         PR fortran/67564
774         * trans-expr.c (gfc_conv_procedure_call): For the vtable copy
775         subroutines, add a string length argument, when the actual
776         argument is an unlimited polymorphic class object.
778 2016-01-30  Paul Thomas  <pault@gcc.gnu.org>
780         PR fortran/69566
781         * trans-expr.c (gfc_conv_procedure_call): Correct expression
782         for 'ulim_copy', which was missing a test for 'comp'.
784 2016-01-28  Andre Vehreschild  <vehre@gcc.gnu.org>
786         PR fortran/62536
787         * decl.c (gfc_match_end): Only unnest and remove BLOCK namespaces
788         when the END encountered does not match a BLOCK's end.
790 2016-01-27  Janus Weil  <janus@gcc.gnu.org>
792         PR fortran/69484
793         * invoke.texi: Fix documentation of -Wall with respect to -Wtabs.
795 2016-01-27  Paul Thomas  <pault@gcc.gnu.org>
797         PR fortran/69422
798         * trans-expr.c (is_scalar_reallocatable_lhs): Remove the check
799         for allocatable components, whilst checking if the symbol is a
800         derived or class entity..
802 2016-01-26  Paul Thomas  <pault@gcc.gnu.org>
804         PR fortran/69385
805         * trans-expr.c (gfc_trans_assignment_1): Exclude initialization
806         assignments from check on assignment of scalars to unassigned
807         arrays and correct wrong code within the corresponding block.
809 2016-01-26  David Malcolm  <dmalcolm@redhat.com>
811         PR other/69006
812         * error.c (gfc_diagnostic_starter): Delete use of pp_newline.
814 2016-01-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
816         PR fortran/69397
817         PR fortran/68442
818         * interface.c (gfc_arglist_matches_symbol): Replace assert with
819         a return false if not a procedure.
820         * resolve.c (resolve_generic_f): Test if we are resolving an
821         initialization expression and adjust error message accordingly.
823 2016-01-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
825         PR fortran/66094
826         * frontend-passes.c (matmul_lhs_realloc):  Add
827         forgotten break statement.
829 2016-01-24  Dominique d'Humieres <dominiq@lps.ens.fr>
831         PR fortran/68283
832         * primary.c (gfc_variable_attr): revert revision r221955,
833         call gfc_internal_error only if there is no error.
835 2016-01-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
837         PR fortran/66094
838         * frontend-passes.c (enum matrix_case):  Add case A2B2T for
839         MATMUL(A,TRANSPoSE(B)) where A and B are rank 2.
840         (inline_limit_check):  Also add A2B2T.
841         (matmul_lhs_realloc):  Handle A2B2T.
842         (check_conjg_variable):  Rename to
843         (check_conjg_transpose_variable):  and also count TRANSPOSE.
844         (inline_matmul_assign):  Handle A2B2T.
846 2016-01-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
848         PR fortran/65996
849         * error.c (gfc_error): Save the state of abort_on_error and set
850         it to false for buffered errors to allow normal processing.
851         Restore the state before leaving.
853 2016-01-19  Martin Jambor  <mjambor@suse.cz>
855         * types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New.
856         (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed.
857         (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): New.
859 2016-01-15  Paul Thomas  <pault@gcc.gnu.org>
861         PR fortran/64324
862         * resolve.c (check_uop_procedure): Prevent deferred length
863         characters from being trapped by assumed length error.
865         PR fortran/49630
866         PR fortran/54070
867         PR fortran/60593
868         PR fortran/60795
869         PR fortran/61147
870         PR fortran/64324
871         * trans-array.c (gfc_conv_scalarized_array_ref): Pass decl for
872         function as well as variable expressions.
873         (gfc_array_init_size): Add 'expr' as an argument. Use this to
874         correctly set the descriptor dtype for deferred characters.
875         (gfc_array_allocate): Add 'expr' to the call to
876         'gfc_array_init_size'.
877         * trans.c (gfc_build_array_ref): Expand logic for setting span
878         to include indirect references to character lengths.
879         * trans-decl.c (gfc_get_symbol_decl): Ensure that deferred
880         result char lengths that are PARM_DECLs are indirectly
881         referenced both for directly passed and by reference.
882         (create_function_arglist): If the length type is a pointer type
883         then store the length as the 'passed_length' and make the char
884         length an indirect reference to it.
885         (gfc_trans_deferred_vars): If a character length has escaped
886         being set as an indirect reference, return it via the 'passed
887         length'.
888         * trans-expr.c (gfc_conv_procedure_call): The length of
889         deferred character length results is set TREE_STATIC and set to
890         zero.
891         (gfc_trans_assignment_1): Do not fix the rse string_length if
892         it is a variable, a parameter or an indirect reference. Add the
893         code to trap assignment of scalars to unallocated arrays.
894         * trans-stmt.c (gfc_trans_allocate): Remove 'def_str_len' and
895         all references to it. Instead, replicate the code to obtain a
896         explicitly defined string length and provide a value before
897         array allocation so that the dtype is correctly set.
898         trans-types.c (gfc_get_character_type): If the character length
899         is a pointer, use the indirect reference.
901 2016-01-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
903         PR fortran/69154
904         * frontend-passes.c (in_where):  New variable.
905         (inline_matmul_assign):  Don't try this if we are within
906         a WHERE statement.
907         (gfc_code_walker):  Keep track of in_where.
909 2016-01-10  Paul Thomas  <pault@gcc.gnu.org>
911         PR fortran/67779
912         * trans_array.c (gfc_conv_scalarized_array_ref): Add missing
913         se->use_offset from condition for calculation of 'base'.
915 2016-01-08  Jakub Jelinek  <jakub@redhat.com>
917         PR fortran/69128
918         * trans.h (OMPWS_SCALARIZER_BODY): Define.
919         (OMPWS_NOWAIT): Renumber.
920         * trans-stmt.c (gfc_trans_where_3): Only set OMPWS_SCALARIZER_WS
921         if OMPWS_SCALARIZER_BODY is not set already, and set also
922         OMPWS_SCALARIZER_BODY until the final loop creation.
923         * trans-expr.c (gfc_trans_assignment_1): Likewise.
924         * trans-openmp.c (gfc_trans_omp_workshare): Also clear
925         OMPWS_SCALARIZER_BODY.
926         * trans-array.c (gfc_trans_scalarized_loop_end): Don't create
927         OMP_FOR if OMPWS_SCALARIZER_BODY is set.
929 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
931         Update copyright years.
933         * gfortranspec.c (lang_specific_driver): Update copyright notice
934         dates.
935         * gfc-internals.texi: Bump @copying's copyright year.
936         * gfortran.texi: Ditto.
937         * intrinsic.texi: Ditto.
938         * invoke.texi: Ditto.
940 2016-01-01  Paul Thomas  <pault@gcc.gnu.org>
942         PR fortran/68864
943         * trans-array.c (evaluate_bound): If deferred, test that 'desc'
944         is an array descriptor before using gfc_conv_descriptor_xxx.
946 Copyright (C) 2016 Free Software Foundation, Inc.
948 Copying and distribution of this file, with or without modification,
949 are permitted in any medium without royalty provided the copyright
950 notice and this notice are preserved.