Update ChangeLog and version files for release
[official-gcc.git] / gcc / fortran / ChangeLog
blob5ad7e89e297712492e295aa4684e7ce2f90feb2f
1 2017-10-10  Release Manager
3         * GCC 5.5.0 released.
5 2017-09-02  Janus Weil  <janus@gcc.gnu.org>
7         Backport from trunk
8         PR fortran/81770
9         * expr.c (gfc_check_pointer_assign): Improve the check whether pointer
10         may outlive pointer target.
12 2017-06-09  Janus Weil  <janus@gcc.gnu.org>
14         Backport from trunk
15         PR fortran/70601
16         * trans-expr.c (gfc_conv_procedure_call): Fix detection of allocatable
17         function results.
19 2017-05-30  Jakub Jelinek  <jakub@redhat.com>
21         Backported from mainline
22         2016-12-21  Jakub Jelinek  <jakub@redhat.com>
24         PR fortran/78866
25         * openmp.c (resolve_omp_clauses): Diagnose assumed size arrays in
26         OpenMP map, to and from clauses.
27         * trans-openmp.c: Include diagnostic-core.h, temporarily redefining
28         GCC_DIAG_STYLE to __gcc_tdiag__.
29         (gfc_omp_finish_clause): Diagnose implicitly mapped assumed size
30         arrays.
32         2016-09-27  Jakub Jelinek  <jakub@redhat.com>
34         PR fortran/77666
35         * trans-openmp.c (gfc_omp_private_outer_ref): Return true even for
36         references to allocatable arrays.
38         2016-09-08  Jakub Jelinek  <jakub@redhat.com>
40         PR fortran/77500
41         * trans-openmp.c (gfc_trans_omp_atomic): For atomic write or
42         swap, don't try to look through GFC_ISYM_CONVERSION.  In other cases,
43         check that value.function.isym is non-NULL before dereferencing it.
45 2017-05-10  Richard Biener  <rguenther@suse.de>
47         Backport from mainline
48         2017-03-06  Richard Biener  <rguenther@suse.de>
50         PR fortran/79894
51         * trans.c (gfc_add_modify_loc): Weaken assert.
53 2017-05-01  Janus Weil  <janus@gcc.gnu.org>
55         Backport from trunk
56         PR fortran/80392
57         * trans-types.c (gfc_get_derived_type): Prevent an infinite loop when
58         building a derived type that includes a procedure pointer component
59         with a polymorphic result.
61 2017-04-21  Janus Weil  <janus@gcc.gnu.org>
63         Backport from trunk
64         PR fortran/80361
65         * class.c (generate_finalization_wrapper): Give the finalization wrapper
66         the recursive attribute.
68 2017-04-14  Dominique d'Humieres  <dominiq@lps.ens.fr>
70         Backport from trunk
71         2015-11-18  Steven G. Kargl  <kargl@gcc.gnu.org>
73         PR fortran/59910
74         PR fortran/80388
75         * primary.c (gfc_match_structure_constructor): Reduce a structure
76         constructor in a DATA statement.
78 2017-02-07  Steven G. Kargl  <kargl@gcc.gnu.org>
80         * trans-types.c (gfc_get_int_kind_from_width_isofortranen):  Choose
81         REAL type with the widest precision if two (or more) have the same
82         storage size.
84 2016-12-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
86         Backport from trunk
87         PR fortran/78239
88         * decl.c (char_len_param_value): Also check for -fimplicit-none
89         when determining if implicit none is in force.
91 2016-12-04  Janus Weil  <janus@gcc.gnu.org>
93         Backport from trunk
94         PR fortran/78443
95         * class.c (add_proc_comp): Add a vtype component for non-overridable
96         procedures that are overriding.
98 2016-12-01  Steven G. Kargl  <kargl@gcc.gnu.org>
100         PR fortran/78279
101         * dependency.c (identical_array_ref): Convert gcc_assert to conditional
102         and gfc_internal_error.
104 2016-11-24  Steven G. Kargl  <kargl@gcc.gnu.org>
106         PR fortran/78500
107         * expr.c (gfc_check_vardef_contextm): Fix NULL pointer dereference.
108         * interface.c (matching_typebound_op): Ditto.
110 2016-11-23  Steven G. Kargl  <kargl@gcc.gnu.org>
112         PR fortran/78297
113         * trans-common.c (finish_equivalences): Do not dereference a NULL pointer.
115 2016-11-23  Janus Weil  <janus@gcc.gnu.org>
117         Backport from trunk
118         PR fortran/66227
119         * simplify.c (gfc_simplify_extends_type_of): Fix missed optimization.
120         Prevent over-simplification. Fix a comment. Add a comment.
122 2016-11-20  Harald Anlauf  <anlauf@gmx.de>
124         PR fortran/69741
125         * resolve.c (gfc_resolve_forall): Check for nonscalar index variables.
127 2016-11-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
129         Backport from trunk
130         PR fortran/69544
131         PR fortran/78178
132         * match.c (match_simple_where):  Fill in locus for assigment
133         in simple WHERE statement.
134         (gfc_match_where):  Likewise.
136 2016-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
138         Backport from trunk
139         PR fortran/71902
140         * frontend-passes.c (realloc_string_callback): Also check for the
141         lhs being deferred.  Name temporary variable "realloc_string".
143 2016-10-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
145         Backport from trunk
146         PR fortran/78021
147         * gfc_compare_functions:  Strings with different lengths in
148         argument lists compare unequal.
150 2016-10-24  Steven G. Kargl  <kargl@gcc.gnu.org>
152         PR fortran/71895
153         * interface.c (gfc_compare_derived_types):  Convert gcc_assert()
154         to a gfc_internal_error() to prevent an ICE.
156 2016-10-24  Paul Thomas  <pault@gcc.gnu.org>
158         Backport from trunk
159         PR fortran/61420
160         PR fortran/78013
161         * resolve.c (resolve_variable): Obtain the typespec for a
162         variable expression, when the variable is a function result
163         that is a procedure pointer.
165 2016-10-17  Steven G. Kargl  <kargl@gcc.gnu.org>
167         Backport from trunk
168         PR fortran/77978
169         * match.c (gfc_match_stopcode): Fix error reporting for several
170         deficiencies in matching stop-codes.
172 2016-10-05  Steven G. Kargl  <kargls@gcc.gnu.org>
174         PR fortran/58991
175         PR fortran/58992
176         * resolve.c (resolve_assoc_var):  Fix CHARACTER type-spec for a
177         selector in ASSOCIATE.
178         (resolve_fl_variable): Skip checks for an ASSOCIATE variable.
180 2016-09-30  Steven G. Kargl  <kargl@gcc.gnu.org>
182         Backport from trunk
184         PR fortran/77391
185         * resolve.c (deferred_requirements): New function to check F2008:C402.
186         (resolve_fl_variable,resolve_fl_parameter): Use it.
188 2016-09-30  Steven G. Kargl  <kargl@gcc.gnu.org>
190         Backport from trunk
192         PR fortran/77380
193         * dependency.c (gfc_check_dependency): Do not assert with
194         -fcoarray=lib.
196 2016-09-30  Steven G. Kargl  <kargl@gcc.gnu.org>
198         Backport from trunk
200         PR fortran/61318
201         * interface.c (compare_parameter): Use better locus for error message.
203 2016-09-30  Steven G. Kargl  <kargl@gcc.gnu.org>
205         Backport from trunk
207         PR fortran/71859
208         * check.c(numeric_check): Prevent ICE.  Issue error for invalid
209         subroutine as an actual argument when numeric argument is expected.
211 2016-09-30  Steven G. Kargl  <kargl@gcc.gnu.org>
213         Backport of trunk
215         PR fortran/69867
216         * decl.c (build_struct): Ensure that pointers point to something.
218         PR fortran/69962
219         * decl.c (gfc_set_constant_character_len):  if expr is not
220         constant issue an error instead of an ICE.
222 2016-09-30  Steven g. Kargl  <kargl@gcc.gnu.org>
224         Backport of trunk
226         PR fortran/77351
227         * frontend-passes.c (remove_trim,combine_array_constructor): Check for
228         NULL pointer.
230 2016-09-30  Steven G. Kargl  <kargl@gcc.gnu.org>
232         Backport from trunk
234         PR fortran/68566
235         * check.c (gfc_check_reshape): Check for constant expression.
237 2016-09-30  Steven G. Kargl  <kargl@gcc.gnu.org>
239         Backport from trunk
241         PR fortran/71799
242         * resolve.c(gfc_resolve_iterator): Failure of type conversion need
243         not ICE.
245 2016-09-30  Steven G. Kargl  <kargl@gcc.gnu.org>
247         Backport from trunk
249         PR fortran/70006
250         * io.c (gfc_resolve_dt): Use correct locus.
251         * resolve.c (resolve_branch): Ditto.
253 2016-09-29  Steven G. Kargl  <kargl@gcc.gnu.org>
255         Backport from trunk
257         PR fortran/77420
258         * trans-common.c:  Handle array elements in equivalence when
259         the lower and upper bounds of array spec are NULL.
261         PR fortran/77460
262         * simplify.c (simplify_transformation_to_scalar):  On error, result
263         may be NULL, simply return.
265 2016-09-29  Steven G. Kargl  <kargl@gcc.gnu.org>
267         Backport from trunk
268         PR fortran/77506
269         * array.c (gfc_match_array_constructor): CHARACTER(len=*) cannot
270         appear in an array constructor.
272         PR fortran/77507
273         * intrinsic.c (add_functions):  Use correct keyword.
275 2016-09-29  Steven G. Kargl  <kargl@gcc.gnu.org>
277         Backport from trunk
278         PR fortran/71067
279         * decl.c (match_data_constant): On error, set 'result' to NULL.
281         PR fortran/77260
282         * gcc/fortran/trans-decl.c (generate_local_decl): Suppress warning
283         for unused variable if symbol is entry point.
285 2016-09-29  Steven G. Kargl  <kargl@gcc.gnu.org>
287         Backport from trunk
288         PR fortran/69514
289         * array.c (gfc_match_array_constructor):  If type-spec is present,
290         walk the array constructor performing possible conversions for
291         numeric types.
293 2016-09-28  Steven G. Kargl  <kargl@gcc.gnu.org>
295         backport from trunk
296         PR fortran/71730
297         * decl.c (char_len_param_value): Check return value of
298         gfc_reduce_init_expr().
300         PR fortran/77612
301         * decl.c (char_len_param_value): Check parent namespace for
302         seen_implicit_none.
304 2016-09-28  Steven G. Kargl  <kargl@gcc.gnu.org>
306         backport from trunk
307         PR fortran/77694
308         * frontend-passes.c (optimize_binop_array_assignment): Check pointer
309         for NULL.
311 2016-08-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
313         Backport from trunk
314         PR fortran/68147
315         * frontend-passes.c (realloc_string_callback): Don't set
316         walk_subtrees.
318 2016-08-11  Andre Vehreschild  <vehre@gcc.gnu.org>
320         Backport from trunk:
321         PR fortran/72698
322         * trans-stmt.c (gfc_trans_allocate): Prevent generating code for
323         copy of zero sized string and with it an ICE.
325 2016-08-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
327         Backport from trunk
328         PR fortran/71795
329         * frontend-passes.c (combine_array_constructor):  Don't
330         do anything if the expression is inside an array iterator.
332 2016-08-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
334         Backport from trunk
335         PR fortran/69742
336         * frontend-passes.c (cfe-expr_0):  Don't register functions
337         from within an ASSOCIATE statement.
339 2016-08-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
341         Backport from trunk
342         PR fortran/60526
343         * decl.c (build_sym):  If the name has already been defined as a
344         type, it has a symtree with an upper case letter at the beginning.
345         If such a symtree exists, issue an error and exit.  Don't do
346         this if there is no corresponding upper case letter.
348 2016-08-08  Andre Vehreschild  <vehre@gcc.gnu.org>
350         Backport from trunk:
351         PR fortran/70524
352         * trans-array.c (gfc_trans_dummy_array_bias): Ensure that the
353         location information is correctly set.
354         * trans-decl.c (gfc_trans_deferred_vars): Set the locus of the
355         current construct early.
357 2016-07-29  Steven G. Kargl  <kargl@gcc.gnu.org>
358             Thomas Koenig  <tkoenig@gcc.gnu.org>
360         Backport from trunk:
361         PR fortran/71883
362         * frontend-passes.c (gfc_run_passes): Bail out if there are any
363         errors.
364         * error.c (gfc_internal_error): If there are any errors in the
365         buffer, exit with EXIT_FAILURE.
367 2016-07-22  Andre Vehreschild  <vehre@gcc.gnu.org>
369         Backport from trunk:
370         PR fortran/71807
371         * trans-expr.c (gfc_trans_subcomponent_assign): Special casing
372         when allocatable component is set to null() in initializer.
374 2016-07-22  Andre Vehreschild  <vehre@gcc.gnu.org>
376         Backport from trunk:
377         PR fortran/70842
378         * simplify.c (gfc_simplify_len): Only for unlimited polymorphic
379         types replace the expression's _data ref with a _len ref.
381 2016-07-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
383         Backport from trunk:
384         PR fortran/71764
385         * trans-expr.c (gfc_trans_structure_assign): Remove assert.
387 2016-07-13  Andre Vehreschild  <vehre@gcc.gnu.org>
389         Backport from trunk:
390         PR fortran/71623
391         * trans-stmt.c (gfc_trans_allocate): Add code of pre block of typespec
392         in allocate to parent block.
394 2016-07-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
396         Backport from trunk:
397         PR fortran/71783
398         * frontend-passes.c (create_var):  Always allocate a charlen
399         for character variables.
401 2016-07-08  Cesar Philippidis  <cesar@codesourcery.com>
403         Backport from trunk:
404         2016-07-08  Cesar Philippidis  <cesar@codesourcery.com>
406         * parse.c (matcha): Define.
407         (decode_oacc_directive): Add spec_only local var and set it.  Use
408         matcha to parse acc directives except for routine and declare.  Return
409         ST_GET_FCN_CHARACTERISTICS if a non-declarative directive could be
410         matched.
412 2016-07-07  Jakub Jelinek  <jakub@redhat.com>
414         Backported from mainline
415         2016-07-01  Jakub Jelinek  <jakub@redhat.com>
417         PR fortran/71717
418         * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
419         for GFC_DECL_ASSOCIATE_VAR_P with POINTER_TYPE.
421         2016-06-30  Jakub Jelinek  <jakub@redhat.com>
423         PR fortran/71704
424         * parse.c (matchs, matcho): Move right before decode_omp_directive.
425         If spec_only, only gfc_match the keyword and if successful, goto
426         do_spec_only.
427         (matchds, matchdo): Define.
428         (decode_omp_directive): Add spec_only local var and set it.
429         Use matchds or matchdo macros instead of matchs or matcho
430         for declare target, declare simd, declare reduction and threadprivate
431         directives.  Return ST_GET_FCN_CHARACTERISTICS if a non-declarative
432         directive could be matched.
433         (next_statement): For ST_GET_FCN_CHARACTERISTICS restore
434         gfc_current_locus from old_locus even if there is no label.
436         PR fortran/71705
437         * trans-openmp.c (gfc_trans_omp_clauses): Set TREE_ADDRESSABLE on
438         decls in to/from clauses.
440 2016-06-27  Paul Thomas  <pault@gcc.gnu.org>
442         PR fortran/70673
443         * frontend-passes.c (realloc_string_callback): Add a call to
444         gfc_dep_compare_expr.
446 2016-06-12  Dominique d'Humieres  <dominiq@lps.ens.fr>
448         PR fortran/60751
449         * io.c (gfc_resolve_dt): Replace GFC_STD_GNU with GFC_STD_LEGACY.
451 2016-06-03  Release Manager
453         * GCC 5.4.0 released.
455 2016-06-02  Paul Thomas  <pault@gcc.gnu.org>
457         Backport from trunk.
458         PR fortran/70350
459         * trans-expr.c (gfc_trans_assignment_1): Exclude initialization
460         assignments from check on assignment of scalars to unassigned
461         arrays and correct wrong code within the corresponding block.
463 2016-05-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
465         Backport from trunk.
466         PR fortran/66461
467         * scanner.c (gfc_next_char_literal): Clear end_flag when adjusting
468         current locus back to old_locus.
470 2016-05-20  Jakub Jelinek  <jakub@redhat.com>
472         PR fortran/71204
473         * frontend-passes.c (realloc_string_callback): Clear inserted_block
474         and changed_statement before calling create_var.
476 2016-05-15  Harald Anlauf  <anlauf@gmx.de>
478         PR fortran/69603
479         * interface.c (compare_parameter): Check for non-NULL pointer.
481 2016-04-04  Andre Vehreschild  <vehre@gmx.de>
483         PR fortran/66911
484         * trans-stmt.c (gfc_trans_allocate): Get the deferred length of an
485         expression by converting the expression when the length is not set
486         in the symbol's ts.
488 2016-04-04  Andre Vehreschild  <vehre@gcc.gnu.org>
490         PR fortran/65795
491         * trans-array.c (gfc_array_allocate): When the array is a coarray,
492         do not nullyfing its allocatable components in array_allocate, because
493         the nullify missed the array ref and nullifies the wrong component.
494         Cosmetics.
496 2016-03-28  Andre Vehreschild  <vehre@gcc.gnu.org>
498         PR fortran/70397
499         * trans-expr.c (gfc_class_len_or_zero_get): Add function to return a
500         constant zero tree, when the class to get the _len component from is
501         not unlimited polymorphic.
502         (gfc_copy_class_to_class): Use the new function.
503         * trans.h: Added interface of new function gfc_class_len_or_zero_get.
505 2016-03-28  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
507         Backport from trunk.
508         * trans-decl.c (gfc_build_builtin_function_decls):
509         caf_stop_numeric and caf_stop_str definition.
510         * trans-stmt.c (gfc_trans_stop): invoke external functions
511         for stop and stop_str when coarrays are used.
512         * trans.h: extern for new functions.
514 2016-03-09  Paul Thomas  <pault@gcc.gnu.org>
516         Backport from trunk.
517         PR fortran/69423
518         * trans-decl.c (create_function_arglist): Deferred character
519         length functions, with and without declared results, address
520         the passed reference type as '.result' and the local string
521         length as '..result'.
522         (gfc_null_and_pass_deferred_len): Helper function to null and
523         return deferred string lengths, as needed.
524         (gfc_trans_deferred_vars): Call it, thereby reducing repeated
525         code, add call for deferred arrays and reroute pointer function
526         results. Avoid using 'tmp' for anything other that a temporary
527         tree by introducing 'type_of_array' for the arrayspec type.
529 2016-03-09  Paul Thomas  <pault@gcc.gnu.org>
531         Backport from trunk.
532         PR fortran/64324
533         * resolve.c (check_uop_procedure): Prevent deferred length
534         characters from being trapped by assumed length error.
536         Backport from trunk.
537         PR fortran/49630
538         PR fortran/54070
539         PR fortran/60593
540         PR fortran/60795
541         PR fortran/61147
542         PR fortran/64324
543         * trans-array.c (gfc_conv_scalarized_array_ref): Pass decl for
544         function as well as variable expressions.
545         (gfc_array_init_size): Add 'expr' as an argument. Use this to
546         correctly set the descriptor dtype for deferred characters.
547         (gfc_array_allocate): Add 'expr' to the call to
548         'gfc_array_init_size'.
549         * trans.c (gfc_build_array_ref): Expand logic for setting span
550         to include indirect references to character lengths.
551         * trans-decl.c (gfc_get_symbol_decl): Ensure that deferred
552         result char lengths that are PARM_DECLs are indirectly
553         referenced both for directly passed and by reference.
554         (create_function_arglist): If the length type is a pointer type
555         then store the length as the 'passed_length' and make the char
556         length an indirect reference to it.
557         (gfc_trans_deferred_vars): If a character length has escaped
558         being set as an indirect reference, return it via the 'passed
559         length'.
560         * trans-expr.c (gfc_conv_procedure_call): The length of
561         deferred character length results is set TREE_STATIC and set to
562         zero.
563         (gfc_trans_assignment_1): Do not fix the rse string_length if
564         it is a variable, a parameter or an indirect reference. Add the
565         code to trap assignment of scalars to unallocated arrays.
566         * trans-stmt.c (gfc_trans_allocate): Remove 'def_str_len' and
567         all references to it. Instead, replicate the code to obtain a
568         explicitly defined string length and provide a value before
569         array allocation so that the dtype is correctly set.
570         trans-types.c (gfc_get_character_type): If the character length
571         is a pointer, use the indirect reference.
573 2016-02-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
575         Backported from mainline
576         PR fortran/61156
577         * scanner.c (add_path_to_list): If include path is not a directory,
578         issue a fatal error.
580 2016-02-27  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
582         Backported from mainline
583         * trans.c (gfc_allocate_allocatable): size conversion
584         from byte to number of elements for event variables.
585         * trans-types.c (gfc_get_derived_type): event variables
586         represented as a pointer (like lock variable).
588 2016-02-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
590         Backported from mainline
591         PR fortran/65996
592         * error.c (gfc_error): Save the state of abort_on_error and set
593         it to false for buffered errors to allow normal processing.
594         Restore the state before leaving.
596 2016-02-12  Tobias Burnus  <burnus@net-b.de>
597             Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
599         Backported from mainline
600         2015-12-02  Tobias Burnus  <burnus@net-b.de>
601         Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
603         * check.c (gfc_check_event_query): New function.
604         * dump-parse-tree.c (show_code_node): Handle EXEC_EVENT_POST,
605         EXEC_EVENT_WAIT.
606         * expr.c (gfc_check_vardef_context): New check for event variables
607         definition.
608         * gfortran.h (gfc_statement): Add ST_EVENT_POST, ST_EVENT_WAIT.
609         (gfc_isym_id): GFC_ISYM_EVENT_QUERY.
610         (struct symbol_attribute): New field.
611         (gfc_exec_op): Add EXEC_EVENT_POST and EXEC_EVENT_WAIT.
612         * gfortran.texi: Document about new events functions and minor
613         changes.
614         * interface.c (compare_parameter): New check.
615         (gfc_procedure_use): New check for explicit procedure interface.
616         (add_subroutines): Add event_query.
617         * intrinsic.h (gfc_check_event_query,gfc_resolve_event_query):
618         New prototypes.
619         * iresolve.c (gfc_resolve_event_query): New function.
620         * iso-fortran-env.def (event_type): New type.
621         * match.c (event_statement,gfc_match_event_post,gfc_match_event_wait):
622         New functions.
623         (gfc_match_name): New event post and event wait.
624         * match.h (gfc_match_event_post,gfc_match_event_wait):
625         New prototypes.
626         * module.c (ab_attribute): Add AB_EVENT_COMP.
627         (attr_bits): Likewise.
628         (mio_symbol_attribute): Handle event_comp attribute.
629         * parse.c (decode_statement): Add ST_EVENT_POST, ST_EVENT_WAIT.
630         (next_statement): Add ST_EVENT_POST, ST_EVENT_WAIT.
631         (gfc_ascii_statement): Add ST_EVENT_POST, ST_EVENT_WAIT.
632         (parse_derived): Check for event_type components.
633         * resolve.c (resolve_allocate_expr): Check for event variable def.
634         (resolve_lock_unlock): Renamed to resolve_lock_unlock_event. It
635         includes logic for locks and events.
636         (gfc_resolve_code): Call it.
637         (gfc_resolve_symbol): New check for event variable to be a corray.
638         * st.c (gfc_free_statement): Handle new EXEC_EVENT_POST and
639         EXEC_EVENT_WAIT.
640         * trans-decl.c (gfor_fndecl_caf_event_post,gfor_fndecl_caf_event_wait,
641         gfor_fndecl_caf_event_query): New global variables.
642         (generate_coarray_sym_init): Checking for event_type.
643         (gfc_conv_procedure_call): Check for C bind attribute.
644         * trans-intrinsic.c (conv_intrinsic_event_query): New function.
645         (conv_intrinsic_move_alloc): Call it.
646         * trans-stmt.c (gfc_trans_lock_unlock): Passing address
647         of actual argument.
648         (gfc_trans_sync): Likewise.
649         (gfc_trans_event_post_wait): New function.
650         * trans-stmt.h (gfc_trans_event_post_wait): New prototype.
651         * trans-types.c (gfc_get_derived_type): Integer_kind as event_type.
652         * trans.c (gfc_allocate_using_lib): New argument and logic for events.
653         (gfc_allocate_allocatable): Passing new argument.
654         (trans_code): Handle EXEC_EVENT_POST, EXEC_EVENT_WAIT.
655         * trans.h (gfc_coarray_type): New elements.
656         (gfor_fndecl_caf_event_post,gfor_fndecl_caf_event_wait,
657         gfor_fndecl_caf_event_query): Declare them.
659 2016-02-10  Jakub Jelinek  <jakub@redhat.com>
661         Backported from mainline
662         2016-01-08  Jakub Jelinek  <jakub@redhat.com>
664         PR fortran/69128
665         * trans.h (OMPWS_SCALARIZER_BODY): Define.
666         (OMPWS_NOWAIT): Renumber.
667         * trans-stmt.c (gfc_trans_where_3): Only set OMPWS_SCALARIZER_WS
668         if OMPWS_SCALARIZER_BODY is not set already, and set also
669         OMPWS_SCALARIZER_BODY until the final loop creation.
670         * trans-expr.c (gfc_trans_assignment_1): Likewise.
671         * trans-openmp.c (gfc_trans_omp_workshare): Also clear
672         OMPWS_SCALARIZER_BODY.
673         * trans-array.c (gfc_trans_scalarized_loop_end): Don't create
674         OMP_FOR if OMPWS_SCALARIZER_BODY is set.
676 2016-02-03  Andre Vehreschild  <vehre@gcc.gnu.org>
678         PR fortran/67451
679         PR fortran/69418
680         * trans-expr.c (gfc_copy_class_to_class): For coarrays just the
681         pointer is passed.  Take it as is without trying to deref the
682         _data component.
683         * trans-stmt.c (gfc_trans_allocate): Take care of coarrays as
684         argument to source=-expression.
686 2016-01-30  Bud Davis  <jmdavis@link.com>
687             Mikael Morin  <mikael@gcc.gnu.org>
689         Backport from trunk.
690         PR fortran/59746
691         * symbol.c (gfc_restore_last_undo_checkpoint): Delete
692         a common block symbol if it was put in the list.
694 2016-01-28  Janus Weil  <janus@gcc.gnu.org>
696         PR fortran/69484
697         * invoke.texi: Fix documentation of -Wall with respect to -Wtabs.
699 2016-01-28  Andre Vehreschild  <vehre@gcc.gnu.org>
701         PR fortran/62536
702         * decl.c: Prevent setting gfc_current_ns to NULL when block statement's
703         nesting is incomplete.  There is already an error conditon, so having
704         gfc_current_ns pointing to an eventually wrong namespace does not matter
705         that much.
707 2016-01-27  Andre Vehreschild  <vehre@gcc.gnu.org>
709         PR fortran/p69268
710         * trans-stmt.c (gfc_trans_allocate): Make sure the source=
711         expression is evaluated once only. Use gfc_trans_assignment ()
712         instead of explicitly calling gfc_trans_string_copy () to
713         reduce the code complexity in trans_allocate.
715 2016-01-25  Dominique d'Humieres <dominiq@lps.ens.fr>
717         PR fortran/68283
718         * primary.c (gfc_variable_attr): revert revision r221955,
719         call gfc_internal_error only if there is no error.
721 2016-01-17  Mikael Morin  <mikael@gcc.gnu.org>
722             Dominique d'Humieres  <dominiq@lps.ens.fr>
724         Backport from trunk.
725         PR fortran/61831
726         * trans-array.c (gfc_conv_array_parameter): Guard allocatable
727         component deallocation code generation with descriptorless
728         calling convention flag.
729         * trans-expr.c (gfc_conv_expr_reference): Remove allocatable
730         component deallocation code generation from revision 212329.
731         (expr_may_alias_variables): New function.
732         (gfc_conv_procedure_call): New boolean elemental_proc to factor
733         check for procedure elemental-ness.  Rename boolean f to nodesc_arg
734         and declare it in the outer scope.  Use expr_may_alias_variables,
735         elemental_proc and nodesc_arg to decide whether generate allocatable
736         component deallocation code.
737         (gfc_trans_subarray_assign): Set deep copy flag.
739 2016-01-17  Paul Thomas  <pault@gcc.gnu.org>
741         Backport from trunk.
742         PR fortran/66082
743         * trans-array.c (gfc_conv_array_parameter): Ensure that all
744         non-variable arrays with allocatable components have the
745         components deallocated after the procedure call.
747 2016-01-10  Paul Thomas  <pault@gcc.gnu.org>
749         Update copyright years in updated files.
751         PR fortran/50221
752         PR fortran/68216
753         PR fortran/63932
754         PR fortran/66408
755         * trans_array.c (gfc_conv_scalarized_array_ref): Pass the
756         symbol decl for deferred character length array references.
757         * trans-stmt.c (gfc_trans_allocate): Keep the string lengths
758         to update deferred length character string lengths.
759         * trans-types.c (gfc_get_dtype_rank_type); Use the string
760         length of deferred character types for the dtype size.
761         * trans.c (gfc_build_array_ref): For references to deferred
762         character arrays, use the domain max value, if it is a variable
763         to set the 'span' and use pointer arithmetic for acces to the
764         element.
765         (trans_code): Set gfc_current_locus for diagnostic purposes.
767         PR fortran/67674
768         * trans-expr.c (gfc_conv_procedure_call): Do not fix deferred
769         string lengths of components.
771         PR fortran/49954
772         * resolve.c (deferred_op_assign): New function.
773         (gfc_resolve_code): Call it.
774         * trans-array.c (concat_str_length): New function.
775         (gfc_alloc_allocatable_for_assignment): Jump directly to alloc/
776         realloc blocks for deferred character length arrays because the
777         string length might change, even if the shape is the same. Call
778         concat_str_length to obtain the string length for concatenation
779         since it is needed to compute the lhs string length.
780         Set the descriptor dtype appropriately for the new string
781         length.
782         * trans-expr.c (gfc_trans_assignment_1): Fix the rse string
783         length for all characters, other than deferred types. For
784         concatenation operators, push the rse.pre block to the inner
785         most loop so that the temporary pointer and the assignments
786         are properly placed.
788         PR fortran/67779
789         * trans_array.c (gfc_conv_scalarized_array_ref): Add missing
790         se->use_offset from condition for calculation of 'base'.
793 Copyright (C) 2015 Free Software Foundation, Inc.
795 Copying and distribution of this file, with or without modification,
796 are permitted in any medium without royalty provided the copyright
797 notice and this notice are preserved.