Update ChangeLog and version files for release
[official-gcc.git] / gcc / fortran / ChangeLog
blobc54de23b7b758187d11288ac0939ec2c5431e904
1 2016-12-21  Release Manager
3         * GCC 6.3.0 released.
5 2016-12-09  Janus Weil  <janus@gcc.gnu.org>
7         Backport from trunk
8         PR fortran/78593
9         * primary.c (gfc_match_varspec): Check if sym is non-null to avoid ICE.
11 2016-12-07  Jakub Jelinek  <jakub@redhat.com>
13         Backported from mainline
14         2016-09-27  Jakub Jelinek  <jakub@redhat.com>
16         PR fortran/77666
17         * trans-openmp.c (gfc_omp_private_outer_ref): Return true even for
18         references to allocatable arrays.
20 2016-12-04  Janus Weil  <janus@gcc.gnu.org>
22         Backport from trunk
23         PR fortran/78443
24         * class.c (add_proc_comp): Add a vtype component for non-overridable
25         procedures that are overriding.
27 2016-12-01  Steven G. Kargl  <kargl@gcc.gnu.org>
29         PR fortran/78279
30         * dependency.c (identical_array_ref): Convert gcc_assert to conditional
31         and gfc_internal_error.
33 2016-11-24  Steven G. Kargl  <kargl@gcc.gnu.org>
35         PR fortran/78500
36         * expr.c (gfc_check_vardef_contextm): Fix NULL pointer dereference.
37         * interface.c (matching_typebound_op): Ditto.
39 2016-11-23  Steven G. Kargl  <kargl@gcc.gnu.org>
41         PR fortran/78297
42         * trans-common.c (finish_equivalences): Do not dereference a NULL pointer.
44 2016-11-23  Janus Weil  <janus@gcc.gnu.org>
46         Backport from trunk
47         PR fortran/66227
48         * simplify.c (gfc_simplify_extends_type_of): Fix missed optimization.
49         Prevent over-simplification. Fix a comment. Add a comment.
51 2016-11-22  Steven G. Kargl  <kargl@gcc.gnu.org>
53         PR fortran/58001
54         * io.c (next_char_not_space): Update handling of a 'tab' in a FORMAT.
55         (format_lex): Adjust invocations of next_char_not_space().
57 2016-11-20  Harald Anlauf  <anlauf@gmx.de>
59         PR fortran/69741
60         * resolve.c (gfc_resolve_forall): Check for nonscalar index variables.
62 2016-11-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
64         Backport from trunk
65         PR fortran/78221
66         * arith.c (gfc_complex2real):  Change gfc_warning_now to
67         gfc_warning.
69 2016-11-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
71         Backport from trunk
72         PR fortran/69544
73         PR fortran/78178
74         * match.c (match_simple_where):  Fill in locus for assigment
75         in simple WHERE statement.
76         (gfc_match_where):  Likewise.
78 2016-10-31  Thomas Koenig  <tkoenig@gcc.gnu.org>
80         Backport from trunk
81         PR fortran/71902
82         * frontend-passes.c (realloc_string_callback): Also check for the
83         lhs being deferred.  Name temporary variable "realloc_string".
85 2016-10-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
87         Backport from trunk
88         PR fortran/67219
89         * arith.c (gfc_int2real):  Change gfc_warning_now
90         to gfc_warning.
91         * primary.c (match_complex_constant):  If there
92         is no comma, throw away any warning which might have
93         been issued by gfc_int2real.
95 2016-10-28  Steven G. Kargl <kargl@gcc.gnu.org>
97         PR fortran/71891
98         * symbol.c (gfc_type_compatible): Fix typo.
100 2016-10-26  Steven G. Kargl <kargl@gcc.gnu.org>
102         PR fortran/78092
103         * trans-intrinsic.c (gfc_conv_intrinsic_sizeof):  Fix reference to an
104         array element of type CLASS.
106 2016-10-26  Paul Thomas  <pault@gcc.gnu.org>
108         Backport from trunk
109         PR fortran/78108
110         * resolve.c (resolve_typebound_intrinsic_op): For submodules
111         suppress the error and return if the same procedure symbol
112         is added more than once to the interface.
114 2016-10-24  Steven G. Kargl  <kargl@gcc.gnu.org>
116         PR fortran/71895
117         * interface.c (gfc_compare_derived_types):  Convert gcc_assert()
118         to a gfc_internal_error() to prevent an ICE.
120 2016-10-23  Steven G. Kargl  <kargl@gcc.gnu.org>
122         PR fortran/77763
123         * parse.c (parse_spec): Allow STRUCTURE in BLOCK DATA.  Sort
124         case labels.
126 2016-10-23  Paul Thomas  <pault@gcc.gnu.org>
128         Backport from trunk
129         PR fortran/61420
130         PR fortran/78013
131         * resolve.c (resolve_variable): Obtain the typespec for a
132         variable expression, when the variable is a function result
133         that is a procedure pointer.
135 2016-10-23  Thomas Koenig  <tkoenig@gcc.gnu.org>
137         Backport from trunk
138         PR fortran/78021
139         * gfc_compare_functions:  Strings with different lengths in
140         argument lists compare unequal.
142 2016-10-23  Andre Vehreschild  <vehre@gcc.gnu.org>
144         Backported from trunk
145         PR fortran/72832
146         * trans-expr.c (gfc_copy_class_to_class): Add generation of
147         runtime array bounds check.
148         * trans-intrinsic.c (gfc_conv_intrinsic_size): Add a crutch to
149         get the descriptor of a function returning a class object.
150         * trans-stmt.c (gfc_trans_allocate): Use the array spec on the
151         array to allocate instead of the array spec from source=.
153 2016-10-17  Steven G. Kargl  <kargl@gcc.gnu.org>
155         Backport from trunk
156         PR fortran/77978
157         * match.c (gfc_match_stopcode): Fix error reporting for several
158         deficiencies in matching stop-codes.
160 2016-10-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
162         Backport from trunk
163         PR fortran/77915
164         * frontend-passes.c (inline_matmul_assign):  Return early if
165         inside a FORALL statement.
167 2016-10-11  Steven G. Kargl  <kargl@gcc.gnu.org>
169         PR fortran/77942
170         * simplify.c (gfc_simplify_cshift): Check for zero.
172 2016-10-07  Steven G. Kargl  <kargl@gcc.gnu.org>
174         PR fortran/77406
175         * interface.c (gfc_compare_interfaces): Fix detection of ambiguous
176         interface involving alternate return.
177         (check_interface1): Improve error message and loci.
179 2016-10-05  Steven G. Kargl  <kargls@gcc.gnu.org>
181         PR fortran/58991
182         PR fortran/58992
183         * resolve.c (resolve_assoc_var):  Fix CHARACTER type-spec for a
184         selector in ASSOCIATE.
185         (resolve_fl_variable): Skip checks for an ASSOCIATE variable.
187 2016-09-28  Steven G. Kargl  <kargl@gcc.gnu.org>
189         Backport from trunk
190         PR fortran/41922
191         * target-memory.c (expr_to_char): Pass in locus and use it in error
192         messages.
193         (gfc_merge_initializers): Ditto.
194         * target-memory.h: Update prototype for gfc_merge_initializers ().
195         * trans-common.c (get_init_field): Use the correct locus.
197         PR fortran/60774
198         * parse.c (next_free,next_fixed): Issue error for statement label
199         without a statement.
201         PR fortran/61318
202         * interface.c (compare_parameter): Use better locus for error message.
204         PR fortran/68566
205         * check.c (gfc_check_reshape): Check for constant expression.
207         PR fortran/69514
208         * array.c (gfc_match_array_constructor):  If type-spec is present,
209         walk the array constructor performing possible conversions for
210         numeric types.
212         PR fortran/69867
213         * decl.c (build_struct): Ensure that pointers point to something.
215         PR fortran/69962
216         * decl.c (gfc_set_constant_character_len):  if expr is not
217         constant issue an error instead of an ICE.
219         PR fortran/70006
220         * io.c (gfc_resolve_dt): Use correct locus.
221         * resolve.c (resolve_branch): Ditto.
223         PR fortran/71067
224         * decl.c (match_data_constant): On error, set 'result' to NULL.
226         PR fortran/71730
227         * decl.c (char_len_param_value): Check return value of
228         gfc_reduce_init_expr().
230         PR fortran/71799
231         * resolve.c(gfc_resolve_iterator): Failure of type conversion need
232         not ICE.
234         PR fortran/71859
235         * check.c(numeric_check): Prevent ICE.  Issue error for invalid
236         subroutine as an actual argument when numeric argument is expected.
238         PR fortran/71862
239         * class.c: Remove assert.  Iterate over component only if non-null.
241         PR fortran/77260
242         * gcc/fortran/trans-decl.c (generate_local_decl): Suppress warning
243         for unused variable if symbol is entry point.
245         PR fortran/77351
246         * frontend-passes.c (remove_trim,combine_array_constructor): Check for
247         NULL pointer.
249         PR fortran/77372
250         simplify.c (simplify_ieee_selected_real_kind): Check for NULL pointers.
252         PR fortran/77380
253         * dependency.c (gfc_check_dependency): Do not assert with
254         -fcoarray=lib.
256         PR fortran/77391
257         * resolve.c (deferred_requirements): New function to check F2008:C402.
258         (resolve_fl_variable,resolve_fl_parameter): Use it.
260         PR fortran/77420
261         * trans-common.c:  Handle array elements in equivalence when
262         the lower and upper bounds of array spec are NULL.
264         PR fortran/77429
265         * dependency.c (gfc_check_dependency):  Convert gcc_assert() to
266         a conditional and possible call to  gfc_internal_error().
268         PR fortran/77460
269         * simplify.c (simplify_transformation_to_scalar):  On error, result
270         may be NULL, simply return.
272         PR fortran/77506
273         * array.c (gfc_match_array_constructor): CHARACTER(len=*) cannot
274         appear in an array constructor.
276         PR fortran/77507
277         * intrinsic.c (add_functions):  Use correct keyword.
279         PR fortran/77612
280         * decl.c (char_len_param_value): Check parent namespace for
281         seen_implicit_none.
283         PR fortran/77694
284         * frontend-passes.c (optimize_binop_array_assignment): Check pointer
285         for NULL.
287 2016-09-16  Jakub Jelinek  <jakub@redhat.com>
289         Backported from mainline
290         2016-09-08  Jakub Jelinek  <jakub@redhat.com>
292         PR fortran/77500
293         * trans-openmp.c (gfc_trans_omp_atomic): For atomic write or
294         swap, don't try to look through GFC_ISYM_CONVERSION.  In other cases,
295         check that value.function.isym is non-NULL before dereferencing it.
297 2016-09-01  Jakub Jelinek  <jakub@redhat.com>
299         Backported from mainline
300         2016-08-31  Jakub Jelinek  <jakub@redhat.com>
302         PR fortran/77352
303         * trans-openmp.c (gfc_trans_omp_parallel_workshare): Always add a
304         BIND_EXPR with BLOCK around what gfc_trans_omp_workshare returns.
306         PR fortran/77374
307         * parse.c (parse_omp_oacc_atomic): Copy over cp->ext.omp_atomic
308         to cp->block->ext.omp_atomic.
309         * resolve.c (gfc_resolve_blocks): Assert block with one or two
310         EXEC_ASSIGNs for EXEC_*_ATOMIC.
311         * openmp.c (resolve_omp_atomic): Don't assert one or two
312         EXEC_ASSIGNs, instead return quietly for EXEC_NOPs and otherwise
313         error unexpected statements.
315         2016-08-19  Jakub Jelinek  <jakub@redhat.com>
317         PR fortran/71014
318         * resolve.c (gfc_resolve): For ns->construct_entities don't save, clear
319         and restore omp state around the resolving.
321         PR fortran/69281
322         * trans-openmp.c (gfc_trans_omp_parallel, gfc_trans_omp_task,
323         gfc_trans_omp_target): Wrap gfc_trans_omp_code result in an extra
324         BIND_EXPR with its own forced BLOCK.
326 2016-08-24  Paul Thomas  <pault@gcc.gnu.org>
328         Backport from trunk
329         PR fortran/77358
330         * resolve.c (resolve_fl_procedure): Use the correct gfc_charlen
331         for deferred character length module procedures.
333 2016-08-22  Release Manager
335         * GCC 6.2.0 released.
337 2016-08-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
339         Backport from trunk
340         * frontend-passes.c (create_var):  Set ts.deferred for
341         deferred-length character variables.
342         * dump-parse-tree.c (show_typespec):  Also dump
343         is_c_interop, is_iso_c and deferred flags.
345 2016-08-15  Jakub Jelinek  <jakub@redhat.com>
347         PR debug/71906
348         * trans-decl.c (gfc_get_symbol_decl): Call gfc_finish_var_decl
349         for decl's character length before gfc_finish_var_decl on the
350         decl itself.
352 2016-08-11  Andre Vehreschild  <vehre@gcc.gnu.org>
354         Backport from trunk:
355         PR fortran/71936
356         * trans-array.c (gfc_array_allocate): When SOURCE= is a function
357         stick with the ref of the object to allocate.
359 2016-08-11  Andre Vehreschild  <vehre@gcc.gnu.org>
361         Backport from trunk
362         PR fortran/72698
363         * trans-stmt.c (gfc_trans_allocate): Prevent generating code for
364         copy of zero sized string and with it an ICE.
366 2016-08-08  Andre Vehreschild  <vehre@gcc.gnu.org>
368         Backport from trunk:
369         PR fortran/70524
370         * trans-array.c (gfc_trans_dummy_array_bias): Ensure that the
371         location information is correctly set.
372         * trans-decl.c (gfc_trans_deferred_vars): Set the locus of the
373         current construct early.
375 2016-08-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
377         PR fortran/71795
378         Backport from trunk
379         * frontend-passes.c (combine_array_constructor):  Don't
380         do anything if the expression is inside an array iterator.
382 2016-07-28  Steven G. Kargl  <kargl@gcc.gnu.org>
383             Thomas Koenig  <tkoenig@gcc.gnu.org>
385         Backported from trunk:
386         PR fortran/71883
387         * frontend-passes.c (gfc_run_passes): Bail out if there are any
388         errors.
389         * error.c (gfc_internal_error): If there are any errors in the
390         buffer, exit with EXIT_FAILURE.
392 2016-07-22  Andre Vehreschild  <vehre@gcc.gnu.org>
394         Backported from trunk:
395         PR fortran/71807
396         * trans-expr.c (gfc_trans_subcomponent_assign): Special casing
397         when allocatable component is set to null() in initializer.
399 2016-07-22  Andre Vehreschild  <vehre@gcc.gnu.org>
401         Backport from trunk:
402         PR fortran/70842
403         * simplify.c (gfc_simplify_len): Only for unlimited polymorphic
404         types replace the expression's _data ref with a _len ref.
406 2016-07-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
408         Backport from trunk:
409         PR fortran/71764
410         * trans-expr.c (gfc_trans_structure_assign): Remove assert.
412 2016-07-13  Andre Vehreschild  <vehre@gcc.gnu.org>
414         Backport from trunk:
415         PR fortran/71623
416         * trans-stmt.c (gfc_trans_allocate): Add code of pre block of typespec
417         in allocate to parent block.
419 2016-07-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
421         Backport from trunk:
422         PR fortran/71783
423         * frontend-passes.c (create_var):  Always allocate a charlen
424         for character variables.
426 2016-07-08  Cesar Philippidis  <cesar@codesourcery.com>
428         Backport from trunk:
429         2016-07-08  Cesar Philippidis  <cesar@codesourcery.com>
431         * parse.c (matcha): Define.
432         (decode_oacc_directive): Add spec_only local var and set it.  Use
433         matcha to parse acc directives except for routine and declare.  Return
434         ST_GET_FCN_CHARACTERISTICS if a non-declarative directive could be
435         matched.
437 2016-07-02  Jakub Jelinek  <jakub@redhat.com>
439         Backported from mainline
440         2016-07-01  Jakub Jelinek  <jakub@redhat.com>
442         PR fortran/71687
443         * f95-lang.c (struct binding_level): Add reversed field.
444         (clear_binding_level): Adjust initializer.
445         (getdecls): If reversed is clear, set it and nreverse the names
446         chain before returning it.
447         (poplevel): Use getdecls.
448         * trans-decl.c (gfc_generate_function_code, gfc_process_block_locals):
449         Use nreverse to pushdecl decls in the declaration order.
451         PR fortran/71717
452         * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
453         for GFC_DECL_ASSOCIATE_VAR_P with POINTER_TYPE.
455         2016-06-30  Jakub Jelinek  <jakub@redhat.com>
457         PR fortran/71704
458         * parse.c (matchs, matcho): Move right before decode_omp_directive.
459         If spec_only, only gfc_match the keyword and if successful, goto
460         do_spec_only.
461         (matchds, matchdo): Define.
462         (decode_omp_directive): Add spec_only local var and set it.
463         Use matchds or matchdo macros instead of matchs or matcho
464         for declare target, declare simd, declare reduction and threadprivate
465         directives.  Return ST_GET_FCN_CHARACTERISTICS if a non-declarative
466         directive could be matched.
467         (next_statement): For ST_GET_FCN_CHARACTERISTICS restore
468         gfc_current_locus from old_locus even if there is no label.
470         PR fortran/71705
471         * trans-openmp.c (gfc_trans_omp_clauses): Set TREE_ADDRESSABLE on
472         decls in to/from clauses.
474 2016-06-29  Cesar Philippidis  <cesar@codesourcery.com>
476         Back port from trunk
477         2016-06-29  Cesar Philippidis  <cesar@codesourcery.com>
479         * openmp.c (match_oacc_clause_gang): Rename to ...
480         (match_oacc_clause_gwv): this.  Add support for OpenACC worker and
481         vector clauses.
482         (gfc_match_omp_clauses): Use match_oacc_clause_gwv for
483         OMP_CLAUSE_{GANG,WORKER,VECTOR}.  Propagate any MATCH_ERRORs for
484         invalid OMP_CLAUSE_{ASYNC,WAIT,GANG,WORKER,VECTOR} clauses.
485         (gfc_match_oacc_wait): Propagate MATCH_ERROR for invalid
486         oacc_expr_lists.  Adjust the first and needs_space arguments to
487         gfc_match_omp_clauses.
489 2016-06-27  Paul Thomas  <pault@gcc.gnu.org>
491         PR fortran/70673
492         * frontend-passes.c (realloc_string_callback): Add a call to
493         gfc_dep_compare_expr.
495 2016-06-12  Dominique d'Humieres  <dominiq@lps.ens.fr>
497         PR fortran/60751
498         * io.c (gfc_resolve_dt): Replace GFC_STD_GNU with GFC_STD_LEGACY.
500 2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
502         PR c/71381
503         Backport from trunk r237290:
504         * openmp.c (gfc_match_oacc_cache): Add comment.
506 2016-06-05  Andre Vehreschild  <vehre@gcc.gnu.org>
508         PR fortran/69659
509         * trans-array.c (gfc_trans_dummy_array_bias): For class arrays use
510         the address of the _data component to reference the arrays data
511         component.
513 2016-06-01  Paul Thomas  <pault@gcc.gnu.org>
515         PR fortran/71156
516         * decl.c (copy_prefix): Add checks that the module procedure
517         declaration prefixes are compliant with the interface. Invert
518         order of existing elemental and pure checks.
519         * resolve.c (resolve_fl_procedure): Invert order of elemental
520         and pure errors.
522 2016-06-01  Jakub Jelinek  <jakub@redhat.com>
524         * parse.c (case_decl): Move ST_OMP_* to ...
525         (case_omp_decl): ... here, new macro.
526         (verify_st_order): For case_omp_decl, complain about
527         p->state >= ORDER_EXEC, but don't change p->state otherwise.
529 2016-05-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
531         Backport from trunk.
532         PR fortran/66461
533         * scanner.c (gfc_next_char_literal): Clear end_flag when adjusting
534         current locus back to old_locus.
536 2016-05-20  Jakub Jelinek  <jakub@redhat.com>
538         PR fortran/71204
539         * frontend-passes.c (realloc_string_callback): Clear inserted_block
540         and changed_statement before calling create_var.
542 2016-05-15  Harald Anlauf  <anlauf@gmx.de>
544         PR fortran/69603
545         * interface.c (compare_parameter): Check for non-NULL pointer.
547 2016-05-14  Fritz Reese  <fritzoreese@gmail.com>
549         Backport from trunk: r236242
550         * gfortran.texi: Update example of DEC UNION extension.
552         Backport from trunk: r236241
553         PR fortran/71047
554         * expr.c (gfc_default_initializer): Avoid extra component refs in
555         constructors for derived types and classes.
557         Backport from trunk: r235999
558         PR fortran/56226
559         * module.c (dt_upper_string): Rename to gfc_dt_upper_string
560         (dt_lower_string): Likewise.
561         * gfortran.h: Make new gfc_dt_upper/lower_string global.
562         * class.c: Use gfc_dt_upper_string.
563         * decl.c: Likewise.
564         * symbol.c: Likewise.
565         * resolve.c (resolve_component): New function.
566         (resolve_fl_derived0): Move component loop code to resolve_component.
567         * parse.c (check_component): New function.
568         (parse_derived): Move loop code to check_component.
569         * lang.opt, invoke.texi, options.c : New option -fdec-structure.
570         * libgfortran.h (bt): New basic type BT_UNION.
571         * gfortran.h (gfc_option): New option -fdec-structure.
572         (gfc_get_union_type, gfc_compare_union_types): New prototypes.
573         (gfc_bt_struct, gfc_fl_struct, case_bt_struct, case_fl_struct): New
574         macros.
575         (gfc_find_component): Change prototype.
576         * match.h (gfc_match_member_sep, gfc_match_map, gfc_match_union,
577         gfc_match_structure_decl): New prototypes.
578         * parse.h (gfc_comp_struct): New macro.
579         * symbol.c (gfc_find_component): Search for components in nested unions
580         * class.c (insert_component_ref, gfc_add_component_ref, add_proc_comp,
581         copy_vtab_proc_comps): Update calls to gfc_find_component.
582         * primary.c (gfc_convert_to_structure_constructor): Likewise.
583         * symbol.c (gfc_add_component): Likewise.
584         * resolve.c (resolve_typebound_function, resolve_typebound_subroutine,
585         resolve_typebound_procedure, resolve_component, resolve_fl_derived):
586         Likewise.
587         * expr.c (get_union_init, component_init): New functions.
588         * decl.c (match_clist_expr, match_record_decl, get_struct_decl,
589         gfc_match_map, gfc_match_union, gfc_match_structure_decl): Likewise.
590         * interface.c (compare_components, gfc_compare_union_types): Likewise.
591         * match.c (gfc_match_member_sep): Likewise.
592         * parse.c (check_component, parse_union, parse_struct_map): Likewise.
593         * resolve.c (resolve_fl_struct): Likewise.
594         * symbol.c (find_union_component): Likewise.
595         * trans-types.c (gfc_get_union_type): Likewise.
596         * parse.c (parse_derived): Use new functions.
597         * interface.c (gfc_compare_derived_types, gfc_compare_types): Likewise.
598         * expr.c (gfc_default_initializer): Likewise.
599         * gfortran.texi: Support for DEC structures, unions, and maps.
600         * gfortran.h (gfc_statement, sym_flavor): Likewise.
601         * check.c (gfc_check_kill_sub): Likewise.
602         * expr.c (gfc_copy_expr, simplify_const_ref,
603         gfc_has_default_initializer): Likewise.
604         * decl.c (build_sym, match_data_constant, add_init_expr_to_sym,
605         match_pointer_init, build_struct, variable_decl,
606         gfc_match_decl_type_spec, gfc_mach_data-decl, gfc_match_entry,
607         gfc_match_end, gfc_match_derived_decl): Likewise.
608         * interface.c (check_interface0, check_interface1,
609         gfc_search_interface): Likewise.
610         * misc.c (gfc_basic_typename, gfc_typename): Likewise.
611         * module.c (add_true_name, build_tnt, bt_types, mio_typespec,
612         fix_mio_expr, load_needed, mio_symbol, read_module, write_symbol,
613         gfc_get_module_backend_decl): Likewise.
614         * parse.h (gfc_compile_state): Likewise.
615         * parse.c (decode_specification_statement, decode_statement,
616         gfc_ascii_statement, verify_st_order, parse_spec): Likewise.
617         * primary.c (gfc_match_varspec, gfc_match_structure_constructor,
618         gfc_match_rvalue, match_variable): Likewise.
619         * resolve.c (find_arglists, resolve_structure_cons,
620         is_illegal_recursion, resolve_generic_f, get_declared_from_expr,
621         resolve_typebound_subroutine, resolve_allocate_expr,
622         nonscalar_typebound_assign, generate_component_assignments,
623         resolve_fl_variable_derived, check_defined_assignments,
624         resolve_component, resolve_symbol, resolve_equivalence_derived):
625         Likewise.
626         * symbol.c (flavors, check_conflict, gfc_add_flavor, gfc_use_derived,
627         gfc_restore_last_undo_checkpoint, gfc_type_compatible,
628         gfc_find_dt_in_generic): Likewise.
629         * trans-decl.c (gfc_get_module_backend_decl, create_function_arglist,
630         gfc_create_module_variable, check_constant_initializer): Likewise.
631         * trans-expr.c (gfc_conv_component_ref, gfc_conv_initializer,
632         gfc_trans_alloc_subarray_assign, gfc_trans_subcomponent_assign,
633         gfc_conv_structure, gfc_trans_scalar_assign, copyable_array_p):
634         Likewise.
635         * trans-io.c (transfer_namelist_element, transfer_expr,
636         gfc_trans_transfer): Likewise.
637         * trans-stmt.c (gfc_trans_deallocate): Likewise.
638         * trans-types.c (gfc_typenode_for_spec, gfc_copy_dt_decls_ifequal,
639         gfc_get_derived_type): Likewise.
641 2016-05-11  Jakub Jelinek  <jakub@redhat.com>
643         PR fortran/70855
644         * frontend-passes.c (inline_matmul_assign): Disable in !$omp workshare.
646 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
648         PR middle-end/70626
649         * trans-openmp.c (gfc_trans_oacc_combined_directive): Duplicate
650         the reduction clause in both parallel and loop directives.
652 2016-04-27  Release Manager
654         * GCC 6.1.0 released.
656 2016-04-13  Dominique d'Humieres  <dominiq@lps.ens.fr>
658         PR fortran/67039
659         * intrinsic.texi: Correct the documentation of pseudorandom
660         number intrinsics.
662 2016-04-13  Dominique d'Humieres  <dominiq@lps.ens.fr>
664         PR fortran/58000
665         * gfortran.texi: Document OPEN( ... NAME=) as not implemented
666         in GNU Fortran
668 2016-04-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
670         PR fortran/68566
671         * array.c (match_array_element_spec): Add check for non-integer.
672         * simplify.c (gfc_simplify_reshape): If source shape is NULL return.
674 2016-04-06  Patrick Palka  <ppalka@gcc.gnu.org>
676         PR c/70436
677         * openmp.c (gfc_find_omp_udr): Add explicit braces to resolve a
678         future -Wparentheses warning.
680 2016-04-04  Andre Vehreschild  <vehre@gcc.gnu.org>
682         PR fortran/67538
683         * resolve.c (resolve_allocate_expr): Emit error message when no
684         array spec and no array valued source= expression is given in an
685         F2008 allocate() for an array to allocate.
687 2016-04-04  Andre Vehreschild  <vehre@gcc.gnu.org>
689         PR fortran/65795
690         * trans-array.c (gfc_array_allocate): When the array is a coarray,
691         do not nullyfing its allocatable components in array_allocate, because
692         the nullify missed the array ref and nullifies the wrong component.
693         Cosmetics.
695 2016-03-29  Andre Vehreschild  <vehre@gcc.gnu.org>
697         PR fortran/70397
698         * trans-expr.c (gfc_class_len_or_zero_get): Add function to return a
699         constant zero tree, when the class to get the _len component from is
700         not unlimited polymorphic.
701         (gfc_copy_class_to_class): Use the new function.
702         * trans.h: Added interface of new function gfc_class_len_or_zero_get.
704 2016-03-28  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
706         * trans-decl.c (gfc_build_builtin_function_decls):
707         caf_stop_numeric and caf_stop_str definition.
708         * trans-stmt.c (gfc_trans_stop): invoke external functions
709         for stop and stop_str when coarrays are used.
710         * trans.h: extern for new functions.
712 2016-03-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
714         PR fortran/69043
715         * scanner.c (load_file): Update to use S_ISREG macro.
717 2016-03-17  Thomas Schwinge  <thomas@codesourcery.com>
719         * gfortran.h (enum gfc_omp_map_op): Rename OMP_MAP_FORCE_DEALLOC
720         to OMP_MAP_DELETE.  Adjust all users.
722 2016-03-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
723             Jim MacArthur  <jim.macarthur@codethink.co.uk>
725         PR fortran/69043
726         * scanner.c (load_file): Check that included file is regular.
728 2016-03-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
729             Harold Anlauf  <anlauf@gmx.de>
731         PR fortran/69520
732         * invoke.texi: Explain use of the 'no-' construct within the
733         -fcheck= option.
734         * options.c (gfc_handle_runtime_check_option): Enable use of
735         'no-' prefix for the various options with -fcheck= to allow
736         negating previously enabled check options.
738 2016-03-12  Paul Thomas  <pault@gcc.gnu.org>
740         PR fortran/70031
741         * decl.c (gfc_match_prefix): Treat the 'module' prefix in the
742         same way as the others, rather than fixing it to come last.
743         (gfc_match_function_decl, gfc_match_subroutine): After errors
744         in 'copy_prefix', emit them immediately in the case of module
745         procedures to prevent a later ICE.
747         PR fortran/69524
748         * decl.c (gfc_match_submod_proc): Permit 'module procedure'
749         declarations within the contains section of modules as well as
750         submodules.
751         * resolve.c (resolve_fl_procedure): Likewise.
752         *trans-decl.c (build_function_decl): Change the gcc_assert to
753         allow all forms of module procedure declarations within module
754         contains sections.
756 2016-02-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
758         PR fortran/68147
759         PR fortran/47674
760         * frontend-passes.c (realloc_string_callback): Don't set
761         walk_subtrees.
763 2016-02-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
765         * dump-parse-tree.c (show_code_node):  Print association
766         list of a block if present.  Handle EXEC_END_BLOCK.
768 2016-02-28  Harald Anlauf <anlauf@gmx.de>
769             Jerry DeLisle  <jvdelisle@gcc.gnu.org>
771         PR fortran/56007
772         * match.c (gfc_match_iterator): Add diagnostic for array variable
773         as do loop index.
775 2016-02-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
776             Steven G. Kargl  <kargl@gcc.gnu.org>
778         PR fortran/69910
779         * io.c (gfc_match_open): Check that open status is an expression
780         constant before comparing string to 'scratch' with NEWUNIT.
782 2016-02-27  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
784         * trans.c (gfc_allocate_allocatable): size conversion
785         from byte to number of elements for event variables.
786         * trans-types.c (gfc_get_derived_type): event variables
787         represented as a pointer (like lock variable).
789 2016-02-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
791         PR fortran/61156
792         * scanner.c (add_path_to_list): If include path is not a directory,
793         issue a fatal error.
795 2016-02-23  Andre Vehreschild  <vehre@gcc.gnu.org>
797         PR fortran/67451
798         * trans-array.c (gfc_array_allocate): Take the attributes from the
799         expression to allocate and not from the source=-expression.
801 2016-02-20  Paul Thomas  <pault@gcc.gnu.org>
803         PR fortran/69423
804         * trans-decl.c (create_function_arglist): Deferred character
805         length functions, with and without declared results, address
806         the passed reference type as '.result' and the local string
807         length as '..result'.
808         (gfc_null_and_pass_deferred_len): Helper function to null and
809         return deferred string lengths, as needed.
810         (gfc_trans_deferred_vars): Call it, thereby reducing repeated
811         code, add call for deferred arrays and reroute pointer function
812         results. Avoid using 'tmp' for anything other that a temporary
813         tree by introducing 'type_of_array' for the arrayspec type.
815 2015-02-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
817         PR fortran/69742
818         * frontend-passes.c (cfe-expr_0):  Don't register functions
819         from within an ASSOCIATE statement.
821 2016-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
823         PR fortran/60526
824         * decl.c (build_sym):  If the name has already been defined as a
825         type, it has a symtree with an upper case letter at the beginning.
826         If such a symtree exists, issue an error and exit.  Don't do
827         this if there is no corresponding upper case letter.
829 2016-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
831         PR fortran/60526
832         PR bootstrap/69816
833         * decl.c (build_sym):  Reverted previous patch.
835 2016-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
837         PR fortran/60526
838         * decl.c (build_sym):  If the name has already been defined as a
839         type, issue error and return false.
841 2016-02-12  David Malcolm  <dmalcolm@redhat.com>
843         PR other/69554
844         * error.c (gfc_diagnostic_start_span): New function.
845         (gfc_diagnostics_init): Initialize global_dc's start_span.
847 2016-02-11  Andre Vehreschild  <vehre@gcc.gnu.org>
849         PR fortran/69296
850         * gfortran.h: Added flag to gfc_association_list indicating that
851         the rank of an associate variable has been guessed only.
852         * parse.c (parse_associate): Set the guess flag mentioned above
853         when guessing the rank of an expression.
854         * resolve.c (resolve_assoc_var): When the rank has been guessed,
855         make sure, that the guess was correct else overwrite with the actual
856         rank.
857         * trans-stmt.c (trans_associate_var): For subref_array_pointers in
858         class objects, take the span from the _data component.
860 2016-02-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
862         PR fortran/50555
863         * primary.c (match_actual_arg): If symbol has attribute flavor of
864         namelist, generate an error. (gfc_match_rvalue): Likewise return
865         MATCH_ERROR.
866         * resolve.c (resolve_symbol): Scan arument list of procedures and
867         generate an error if a namelist is found.
869 2016-02-05  Mikael Morin  <mikael@gcc.gnu.org>
871         PR fortran/66089
872         * trans-expr.c (expr_is_variable, gfc_expr_is_variable): Rename
873         the former to the latter and make it non-static.  Update callers.
874         * gfortran.h (gfc_expr_is_variable): New declaration.
875         (struct gfc_ss_info): Add field needs_temporary.
876         * trans-array.c (gfc_scalar_elemental_arg_saved_as_argument):
877         Tighten the condition on aggregate expressions with a check
878         that the expression is a variable and doesn't need a temporary.
879         (gfc_conv_resolve_dependency): Add intermediary reference variable.
880         Set the needs_temporary field.
882 2016-02-03  Andre Vehreschild  <vehre@gcc.gnu.org>
884         PR fortran/67451
885         PR fortran/69418
886         * trans-expr.c (gfc_copy_class_to_class): For coarrays just the
887         pointer is passed.  Take it as is without trying to deref the
888         _data component.
889         * trans-stmt.c (gfc_trans_allocate): Take care of coarrays as
890         argument to source=-expression.
892 2016-02-02  Nathan Sidwell  <nathan@codesourcery.com>
894         * lang.opt (fopenacc-dim=): New option.
896 2016-01-31  Paul Thomas  <pault@gcc.gnu.org>
898         PR fortran/67564
899         * trans-expr.c (gfc_conv_procedure_call): For the vtable copy
900         subroutines, add a string length argument, when the actual
901         argument is an unlimited polymorphic class object.
903 2016-01-30  Paul Thomas  <pault@gcc.gnu.org>
905         PR fortran/69566
906         * trans-expr.c (gfc_conv_procedure_call): Correct expression
907         for 'ulim_copy', which was missing a test for 'comp'.
909 2016-01-28  Andre Vehreschild  <vehre@gcc.gnu.org>
911         PR fortran/62536
912         * decl.c (gfc_match_end): Only unnest and remove BLOCK namespaces
913         when the END encountered does not match a BLOCK's end.
915 2016-01-27  Janus Weil  <janus@gcc.gnu.org>
917         PR fortran/69484
918         * invoke.texi: Fix documentation of -Wall with respect to -Wtabs.
920 2016-01-27  Paul Thomas  <pault@gcc.gnu.org>
922         PR fortran/69422
923         * trans-expr.c (is_scalar_reallocatable_lhs): Remove the check
924         for allocatable components, whilst checking if the symbol is a
925         derived or class entity..
927 2016-01-26  Paul Thomas  <pault@gcc.gnu.org>
929         PR fortran/69385
930         * trans-expr.c (gfc_trans_assignment_1): Exclude initialization
931         assignments from check on assignment of scalars to unassigned
932         arrays and correct wrong code within the corresponding block.
934 2016-01-26  David Malcolm  <dmalcolm@redhat.com>
936         PR other/69006
937         * error.c (gfc_diagnostic_starter): Delete use of pp_newline.
939 2016-01-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
941         PR fortran/69397
942         PR fortran/68442
943         * interface.c (gfc_arglist_matches_symbol): Replace assert with
944         a return false if not a procedure.
945         * resolve.c (resolve_generic_f): Test if we are resolving an
946         initialization expression and adjust error message accordingly.
948 2016-01-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
950         PR fortran/66094
951         * frontend-passes.c (matmul_lhs_realloc):  Add
952         forgotten break statement.
954 2016-01-24  Dominique d'Humieres <dominiq@lps.ens.fr>
956         PR fortran/68283
957         * primary.c (gfc_variable_attr): revert revision r221955,
958         call gfc_internal_error only if there is no error.
960 2016-01-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
962         PR fortran/66094
963         * frontend-passes.c (enum matrix_case):  Add case A2B2T for
964         MATMUL(A,TRANSPoSE(B)) where A and B are rank 2.
965         (inline_limit_check):  Also add A2B2T.
966         (matmul_lhs_realloc):  Handle A2B2T.
967         (check_conjg_variable):  Rename to
968         (check_conjg_transpose_variable):  and also count TRANSPOSE.
969         (inline_matmul_assign):  Handle A2B2T.
971 2016-01-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
973         PR fortran/65996
974         * error.c (gfc_error): Save the state of abort_on_error and set
975         it to false for buffered errors to allow normal processing.
976         Restore the state before leaving.
978 2016-01-19  Martin Jambor  <mjambor@suse.cz>
980         * types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New.
981         (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed.
982         (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): New.
984 2016-01-15  Paul Thomas  <pault@gcc.gnu.org>
986         PR fortran/64324
987         * resolve.c (check_uop_procedure): Prevent deferred length
988         characters from being trapped by assumed length error.
990         PR fortran/49630
991         PR fortran/54070
992         PR fortran/60593
993         PR fortran/60795
994         PR fortran/61147
995         PR fortran/64324
996         * trans-array.c (gfc_conv_scalarized_array_ref): Pass decl for
997         function as well as variable expressions.
998         (gfc_array_init_size): Add 'expr' as an argument. Use this to
999         correctly set the descriptor dtype for deferred characters.
1000         (gfc_array_allocate): Add 'expr' to the call to
1001         'gfc_array_init_size'.
1002         * trans.c (gfc_build_array_ref): Expand logic for setting span
1003         to include indirect references to character lengths.
1004         * trans-decl.c (gfc_get_symbol_decl): Ensure that deferred
1005         result char lengths that are PARM_DECLs are indirectly
1006         referenced both for directly passed and by reference.
1007         (create_function_arglist): If the length type is a pointer type
1008         then store the length as the 'passed_length' and make the char
1009         length an indirect reference to it.
1010         (gfc_trans_deferred_vars): If a character length has escaped
1011         being set as an indirect reference, return it via the 'passed
1012         length'.
1013         * trans-expr.c (gfc_conv_procedure_call): The length of
1014         deferred character length results is set TREE_STATIC and set to
1015         zero.
1016         (gfc_trans_assignment_1): Do not fix the rse string_length if
1017         it is a variable, a parameter or an indirect reference. Add the
1018         code to trap assignment of scalars to unallocated arrays.
1019         * trans-stmt.c (gfc_trans_allocate): Remove 'def_str_len' and
1020         all references to it. Instead, replicate the code to obtain a
1021         explicitly defined string length and provide a value before
1022         array allocation so that the dtype is correctly set.
1023         trans-types.c (gfc_get_character_type): If the character length
1024         is a pointer, use the indirect reference.
1026 2016-01-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
1028         PR fortran/69154
1029         * frontend-passes.c (in_where):  New variable.
1030         (inline_matmul_assign):  Don't try this if we are within
1031         a WHERE statement.
1032         (gfc_code_walker):  Keep track of in_where.
1034 2016-01-10  Paul Thomas  <pault@gcc.gnu.org>
1036         PR fortran/67779
1037         * trans_array.c (gfc_conv_scalarized_array_ref): Add missing
1038         se->use_offset from condition for calculation of 'base'.
1040 2016-01-08  Jakub Jelinek  <jakub@redhat.com>
1042         PR fortran/69128
1043         * trans.h (OMPWS_SCALARIZER_BODY): Define.
1044         (OMPWS_NOWAIT): Renumber.
1045         * trans-stmt.c (gfc_trans_where_3): Only set OMPWS_SCALARIZER_WS
1046         if OMPWS_SCALARIZER_BODY is not set already, and set also
1047         OMPWS_SCALARIZER_BODY until the final loop creation.
1048         * trans-expr.c (gfc_trans_assignment_1): Likewise.
1049         * trans-openmp.c (gfc_trans_omp_workshare): Also clear
1050         OMPWS_SCALARIZER_BODY.
1051         * trans-array.c (gfc_trans_scalarized_loop_end): Don't create
1052         OMP_FOR if OMPWS_SCALARIZER_BODY is set.
1054 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
1056         Update copyright years.
1058         * gfortranspec.c (lang_specific_driver): Update copyright notice
1059         dates.
1060         * gfc-internals.texi: Bump @copying's copyright year.
1061         * gfortran.texi: Ditto.
1062         * intrinsic.texi: Ditto.
1063         * invoke.texi: Ditto.
1065 2016-01-01  Paul Thomas  <pault@gcc.gnu.org>
1067         PR fortran/68864
1068         * trans-array.c (evaluate_bound): If deferred, test that 'desc'
1069         is an array descriptor before using gfc_conv_descriptor_xxx.
1071 Copyright (C) 2016 Free Software Foundation, Inc.
1073 Copying and distribution of this file, with or without modification,
1074 are permitted in any medium without royalty provided the copyright
1075 notice and this notice are preserved.