Update ChangeLog and version files for release
[official-gcc.git] / gcc / fortran / ChangeLog
blobc61d9f03bea4c42cdcc39fdc9344eba87730e0d6
1 2015-12-04  Release Manager
3         * GCC 5.3.0 released.
5 2015-11-27  Andre Vehreschild  <vehre@gcc.gnu.org>
7         PR fortran/68218
8         * trans-array.c (gfc_array_init_size): Add gfc_evaluate_now() when
9         array spec in allocate is a function call.
11 2015-11-24  Paul Thomas  <pault@gcc.gnu.org>
13         Backport from trunk.
14         PR fortran/68196
15         * class.c (has_finalizer_component): Prevent infinite recursion
16         through this function if the derived type and that of its
17         component are the same.
18         * trans-types.c (gfc_get_derived_type): Do the same for proc
19         pointers by ignoring the explicit interface for the component.
21         PR fortran/66465
22         * check.c (same_type_check): If either of the expressions is
23         BT_PROCEDURE, use the typespec from the symbol, rather than the
24         expression.
26 2015-11-18  Dominique d'Humieres <dominiq@lps.ens.fr>
28         PR fortran/65751
29         * expr.c (gfc_check_pointer_assign): Fix error message.
31 2015-11-16  Steven G. Kargl  <kargl@gcc.gnu.org>
33         PR fortran/58027
34         PR fortran/60993
35         * expr.c (gfc_check_init_expr): Prevent a redundant check when a
36         __convert_* function was inserted into an array constructor.
37         (gfc_check_assign_symbol): Check for an initialization expression
38         when a __convert_* was inserted.
40 2015-11-14  Steven G. Kargl  <kargl@gcc.gnu.org>
42         PR fortran/67803
43         * array.c (gfc_match_array_constructor): If array constructor included
44         a CHARACTER typespec, check array elements for compatible type.
46 2015-11-13  Steven G. Kargl  <kargl@gccc.gnu.org>
48         PR fortran/68319
49         * decl.c (gfc_match_data, gfc_match_entry): Enforce F2008:C1206.
50         * io.c (gfc_match_format): Ditto.
51         * match.c (gfc_match_st_function): Ditto.
53 2015-11-12  Steven G. Kargl  <kargl@gcc.gnu.org>
55         PR fortran/68318
56         * decl.c (get_proc_name): Increment reference count for ENTRY.
57         While here, fix comment and use postfix ++ for consistency.
59 2015-11-08  Steven g. Kargl  <kargl@gcc.gnu.org>
61         PR fortran/68053
62         * decl.c (add_init_expr_to_sym):  Try to reduce initialization expression
63         before testing for a constant value.
65 2015-11-08  Steven G. Kargl  <kargl@gcc.gnu.org>
67         PR fortran/68224
68         * array.c (match_array_element_spec): Check of invalid NULL().
69         While here, fix nearby comments.
71 2015-11-08  Steven G. Kargl  <kargl@gcc.gnu.org>
73         PR fortran/68153
74         * check.c (gfc_check_reshape): Improve check for valid SHAPE argument.
76 2015-11-08  Steven G. Kargl  <kargl@gcc.gnu.org>
78         PR fortran/68151
79         * match.c (match_case_selector):  Check for invalid type.
81 2015-01-25  Paul Thomas  <pault@gcc.gnu.org>
83         Backported from trunk.
84         PR fortran/67171
85         * trans-array.c (structure_alloc_comps): On deallocation of
86         class components, reset the vptr to the declared type vtable
87         and reset the _len field of unlimited polymorphic components.
88         *trans-expr.c (gfc_find_and_cut_at_last_class_ref): Bail out on
89         allocatable component references to the right of part reference
90         with non-zero rank and return NULL.
91         (gfc_reset_vptr): Simplify this function by using the function
92         gfc_get_vptr_from_expr. Return if the vptr is NULL_TREE.
93         (gfc_reset_len): If gfc_find_and_cut_at_last_class_ref returns
94         NULL return.
96 2015-10-30  Steven G. Kargl  <kargl@gcc.gnu.org>
98         PR fortran/51993
99         * decl.c (gfc_set_constant_character_len): Convert gcc_assert into an
100         if-statement causing an early return leads to valid error message.
102 2015-10-30  Steven G. Kargl  <kargl@gcc.gnu.org>
104         PR fortran/68154
105         * decl.c (add_init_expr_to_sym): if the char length in the typespec
106         is NULL, check for and use a constructor.
108 2015-10-30  Steven G. Kargl  <kargl@gcc.gnu.org>
110         PR fortran/36192
111         * interface.c (get_expr_storage_size):  Check for INTEGER type before
112         calling gmp routines.
114 2015-10-29  Steven G. Kargl  <kargl@gcc.gnu.org>
116         PR fortran/68055
117         * decl.c (gfc_match_decl_type_spec): Check for valid kind in old-style
118         declarations.
120 2015-10-29  Steven G. Kargl  <kargl@gcc.gnu.org>
122         PR fortran/68054
123         * decl.c (match_attr_spec): PROTECTED can only be a module.
125 2015-10-29  Steven G. Kargl  <kargl@gcc.gnu.org>
127         PR fortran/67939
128         * data.c (create_character_initializer): Deal with zero length string.
130 2015-10-29  Steven G. Kargl  <kargl@gcc.gnu.org>
132         PR fortran/67885
133         * trans-decl.c (generate_local_decl): Mark PARAMETER entities in
134         BLOCK construct.
136 2015-10-29  Steven G. Kargl  <kargl@gcc.gnu.org>
138         PR fortran/67805
139         PR fortran/68108
140         * array.c (gfc_match_array_constructor): Check for error from type
141         spec matching.
142         * decl.c (char_len_param_value): Check for valid of charlen parameter.
143         Check for REF_ARRAY.  Reap dead code dating to 2008.
144         match.c (gfc_match_type_spec): Special case the keyword use in REAL.
146 2015-10-26  Paul Thomas  <pault@gcc.gnu.org>
148         PR fortran/67177
149         PR fortran/67977
150         Backport from mainline r228940:
151         * primary.c (match_substring): Add an argument 'deferred' to
152         flag that a substring reference with null start and end should
153         not be optimized away for deferred length strings.
154         (match_string_constant, gfc_match_rvalue): Set the argument.
155         * trans-expr.c (alloc_scalar_allocatable_for_assignment): If
156         there is a substring reference return.
157         * trans-intrinsic.c (conv_intrinsic_move_alloc): For deferred
158         characters, assign the 'from' string length to the 'to' string
159         length. If the 'from' expression is deferred, set its string
160         length to zero. If the 'to' expression has allocatable
161         components, deallocate them.
163 2015-10-22  Paul Thomas  <pault@gcc.gnu.org>
165         PR fortran/58754
166         * trans-stmt.c (gfc_trans_allocate): Do not use the scalar
167         character assignment if the allocate expression is an array
168         descriptor.
170 2015-10-19  Steven G. Kargl  <kargl@gcc.gnu.org>
172         PR fortran/67900
173         * resolve.c (gfc_verify_binding_labels): Check for NULL pointer.
175 2015-10-19  Steven G. Kargl  <kargl@gcc.gnu.org>
177         PR fortran/68019
178         * decl.c (add_init_expr_to_sym): Remove an assert() to allow an error
179         message to be issued.
181 2015-10-19  Steven G. Kargl  <kargl@gcc.gnu.org>
183         PR fortran/67987
184         * decl.c (char_len_param_value): Unwrap unlong line.  If LEN < 0,
185         force it to zero per the Fortran 90, 95, 2003, and 2008 Standards.
186         * resolve.c (gfc_resolve_substring_charlen): Unwrap unlong line.
187         If 'start' is larger than 'end', length of substring is negative,
188         so explicitly set it to zero.
189         (resolve_charlen): Remove -Wsurprising warning.  Update comment to
190         reflect that the text is from the F2008 standard.
192 2015-10-18  Paul Thomas  <pault@gcc.gnu.org>
194         PR fortran/66079
195         Backport from mainline r224383:
197         * trans-expr.c (gfc_conv_procedure_call): Allocatable scalar
198         function results must be freed and nullified after use. Create
199         a temporary to hold the result to prevent duplicate calls.
200         * trans-stmt.c (gfc_trans_allocate): Rename temporary variable
201         as 'source'. Deallocate allocatable components of non-variable
202         'source's.
204 2015-10-18  Mikael Morin  <mikael@gcc.gnu.org>
206         PR fortran/67721
207         PR fortran/67818
208         Backport from mainline r222477:
210         2015-04-27  Andre Vehreschild  <vehre@gmx.de>
212         PR fortran/59678
213         PR fortran/65841
214         * trans-array.c (duplicate_allocatable): Fixed deep copy of
215         allocatable components, which are liable for copy only, when
216         they are allocated.
217         (gfc_duplicate_allocatable): Add deep-copy code into if
218         component allocated block. Needed interface change for that.
219         (gfc_copy_allocatable_data): Supplying NULL_TREE for code to
220         add into if-block for checking whether a component was
221         allocated.
222         (gfc_duplicate_allocatable_nocopy): Likewise.
223         (structure_alloc_comps): Likewise.
224         * trans-array.h: Likewise.
225         * trans-expr.c (gfc_trans_alloc_subarray_assign): Likewise.
226         * trans-openmp.c (gfc_walk_alloc_comps): Likewise.
228 2015-10-02  Steven G. Kargl  <kargl@gcc.gnu.org>
230         PR fortran/67802
231         * decl.c (add_init_expr_to_sym): Numeric constant for character
232         length must be an INTEGER.
234 2015-10-02  Steven G. Kargl  <kargl@gcc.gnu.org>
236         PR fortran/67616
237         * primary.c (gfc_match_structure_constructor): Use a possibly
238         host-associated symtree to prevent ICE.
240 2015-10-02  Steven G. Kargl  <kargl@gcc.gnu.org>
242         PR fortran/66979
243         * io.c (gfc_resolve_filepos): Check for a UNIT number.  Add a nearby
244         missing 'return false'.
246 2015-10-01  Mikael Morin  <mikael@gcc.gnu.org>
248         PR fortran/67721
249         * trans-expr.c (gfc_trans_assignment_1): Remove the non-constantness
250         condition guarding deep copy.
252 2015-09-25  Steven G. Kargl  <kargl@gcc.gnu.org>
254         PR fortran/67614
255         * resolve.c (gfc_resolve_code): Prevent ICE for invalid EXPR_NULL.
257 2015-09-25  Steven G. Kargl  <kargl@gcc.gnu.org>
259         PR fortran/67525
260         * parse.c (match_deferred_characteristics): Remove an assert, which
261         allows an invalid SELECT TYPE selector to be detected.
263 2015-09-21  Steven G. Kargl  <kargl@gcc.gnu.org>
265         PR fortran/67615
266         * resolve.c (gfc_resolve_code): Check for scalar expression in
267         arithmetic-if.
269 2015-09-10  Steven G. Kargl  <kargl@gcc.gnu.org>
271         PR fortran/67526
272         * expr.c (gfc_check_init_expr): Do not dereference a NULL pointer.
274 2015-09-04  Manuel López-Ibáñez  <manu@gcc.gnu.org>
276         PR fortran/67429
277         * error.c (gfc_clear_pp_buffer): Reset last_location, otherwise
278         caret lines might be skipped when actually giving a diagnostic.
280 2015-08-07  Mikael Morin  <mikael@gcc.gnu.org>
282         PR fortran/66929
283         * trans-array.c (gfc_get_proc_ifc_for_expr): Use esym as procedure
284         symbol if available.
286 2015-08-05  Mikael Morin  <mikael@gcc.gnu.org>
288         PR fortran/64921
289         * class.c (generate_finalization_wrapper): Set finalization
290         procedure symbol's always_explicit attribute.
292 2015-08-03  Steven G. Kargl  <kargl@gcc.gnu.org>
294         PR fortran/66942
295         * trans-expr.c (gfc_conv_procedure_call): Avoid NULL pointer reference
297 2015-07-25  Mikael Morin  <mikael@gcc.gnu.org>
299         PR fortran/64986
300         * trans-expr.c (gfc_trans_assignment_1): Put component deallocation
301         code at the beginning of the block.
303 2015-07-21  Andre Vehreschild  <vehre@gcc.gnu.org>
305         PR fortran/66035
306         * trans-expr.c (alloc_scalar_allocatable_for_subcomponent_assignment):
307         Compute the size to allocate for class and derived type objects
308         correclty.
309         (gfc_trans_subcomponent_assign): Only allocate memory for a
310         component when the object to assign is not an allocatable class
311         object (the memory is already present for allocatable class objects).
312         Furthermore use copy_class_to_class for assigning the rhs to the
313         component (may happen for dummy class objects on the rhs).
315 2015-07-17  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
317         * trans-intrinsic.c (conv_co_collective): Remove redundant address
318         operator in the generated code.
320 2015-07-16  Steven G. Kargl  <kargl@gcc.gnu.org>
322         PR fortran/66724
323         PR fortran/66724
324         * io.c (is_char_type): Call gfc_resolve_expr ().
325         (match_open_element, match_dt_element, match_inquire_element): Fix
326         ASYNCHRONOUS case.
328 2015-07-16  Steven G. Kargl  <kargl@gcc.gnu.org>
330         PR fortran/66864
331         * simplify.c (gfc_simplify_floor): Set precision of temporary to
332         that of arg.
334 2015-07-16  Steven G. Kargl   <kargl@gcc.gnu.org>
336         PR fortran/66545
337         * primary.c (match_sym_complex_part): Do not dereference NULL pointer.
339 2015-07-16  Steven G. Kargl  <kargl@gcc.gnu.org>
341         PR fortran/56520
342         * match.c (gfc_match_name): Special case unary minus and plus.
344 2015-07-16  Steven G. Kargl  <kargl@gcc.gnu.org>
346         * io.c (check_char_variable): New function.
347         (match_open_element, match_close_element, match_file_element,
348         match_dt_element, match_inquire_element, match_wait_element): Use it.
350 2015-07-16  Steven G. Kargl  <kargl@gcc.gnu.org>
352         PR fortran/66725
353         * io.c (is_char_type): New function to test for BT_CHARACTER
354         (gfc_match_open, gfc_match_close, match_dt_element): Use it.
356 2015-07-16  Release Manager
358         * GCC 5.2.0 released.
360 2015-06-24  Mikael Morin  <mikael@gcc.gnu.org>
362         PR fortran/66549
363         * resolve.c (resolve_global_procedure): Don't save and restore
364         OpenMP state around the call to gfc_resolve.
365         (gfc_resolve): Save OpenMP state on entry and restore it on return.
367 2015-06-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
369         PR fortran/66385
370         Backport from trunk
371         * frontend-passes.c (combine_array_constructor): Return early if
372         inside a FORALL loop.
374 2015-06-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
376         * intrinsic.texi:  Change \leq to < in descrition of imaginary
377         part in argument to log.
379 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
381         * f95-lang.c (gfc_create_decls): Register the main translation unit
382         through the new debug hook.
384 2015-06-08  Steven G. Kargl  <kargl@gcc.gnu.org>
386         PR fortran/66245
387         * match.c (gfc_match_type_is, gfc_match_class_is):  Check if the
388         return type spec or derived type spec is validate.
390 2015-06-05  Steven G. Kargl  <kargl@gcc.gnu.org>
392         PR fortran/66347
393         * resolve.c (apply_default_init_local): Do not dereference a NULL
394         pointer.
396 2015-06-05  Russell Whitesides  <russelldub@gmail.com>
397             Steven G. Kargl  <kargl@gcc.gnu.org>
399         PR fortran/40958
400         PR fortran/60780
401         PR fortran/66377
402         * module.c (load_equiv): Add check for loading duplicate EQUIVALENCEs
403         from different modules.  Eliminate the pruning of unused
404         equivalence-objects
407 2015-06-02  Steven G. Kargl  <kargl@gcc.gnu.org>
409         PR fortran/66380
410         * simplify.c (gfc_simplify_reshape): Convert assert into returning
411         NULL, which triggers an error condition.
413 2015-05-29  Mikael Morin  <mikael@gcc.gnu.org>
415         PR fortran/66257
416         * resolve.c (resolve_actual_arglist): Don't throw an error
417         if the argument with procedure pointer component is not a variable.
419 2015-05-22  Jakub Jelinek  <jakub@redhat.com>
421         Backported from mainline
422         2015-05-19  Jakub Jelinek  <jakub@redhat.com>
424         PR middle-end/66199
425         * trans-openmp.c (gfc_trans_omp_teams): Set OMP_TEAMS_COMBINED for
426         combined constructs.
427         (gfc_trans_omp_target): Make sure BIND_EXPR has non-NULL
428         BIND_EXPR_BLOCK.
430 2015-05-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
432         PR fortran/65903
433         * io.c (format_lex): Change to NONSTRING when checking for
434         possible doubled quote.
435         * scanner.c (gfc_next_char_literal): Revert change from 64506
436         and add a check for quotes and return.
438 2015-05-19  Steven G. Kargl  <kargl@gcc.gnu.org>
440         PR fortran/66106
441         * interface.c(gfc_match_end_interface): Enforce F2008 C1202 (R1201).
442         * match.c(gfc_op2string): Return 'none' for INTRINSIC_NONE.
444 2015-05-19  Steven G. Kargl  <kargl@gcc.gnu.org>
446         PR fortran/66057
447         * decl.c(gfc_match_generic):  Detected a malformed GENERIC statement.
449 2015-05-19  Steven G. Kargl  <kargl@gcc.gnu.org>
451         PR fortran/66052
452         * decl.c(gfc_match_protected): Prevent dereference of NULL pointer.
454 2015-05-19  Steven G. Kargl  <kargl@gcc.gnu.org>
456         PR fortran/66045
457         * expr.c (gfc_check_assign):  Check for assignment of NULL() instead
458         of the (intended) pointer assignment.
460 2015-05-19  Steven G. Kargl  <kargl@gcc.gnu.org>
462         PR fortran/66044
463         * decl.c(gfc_match_entry):  Change a gfc_internal_error() into
464         a gfc_error()
466 2015-05-19  Steven G. Kargl  <kargl@gcc.gnu.org>
468         PR fortran/66043
469         * check.c (gfc_check_storage_size): Prevent the direct use of NULL()
470         in STORAGE_SIZE() reference.
472 2015-05-19  Steven G. Kargl  <kargl@gcc.gnu.org>
474         PR fortran/66040
475         * parse.c(verify_st_order): Replace a gfc_internal_error with your
476         generic gfc_error.
478 2015-05-19  Steven G. Kargl  <kargl@gcc.gnu.org>
480         PR fortran/66039
481         * io.c (match_filepos): Check for incomplete/mangled REWIND, FLUSH,
482         BACKSPACE, and ENDFILE statements
484 2015-05-19  Steven G. Kargl  <kargl@gcc.gnu.org>
486         PR fortran/64925
487         * symbol.c(check_conflict):  Check for a conflict between a dummy
488         argument and an internal procedure name.
490 2015-05-02  Steven G. Kargl  <kargl@gcc.gnu.org>
492         PR fortran/65976
493         * invoke.texi:  Remove 'no-' in '-fno-fixed-form'
495 2015-04-22  Release Manager
497         * GCC 5.1.0 released.
499 2015-04-22  Steven G. Kargl  <kargl@gcc.gnu.org>
501         PR fortran/65429
502         * decl.c (add_init_expr_to_sym): Set the length type parameter.
504 2015-04-10  Tobias Burnus  <burnus@net-b.de>
506         * trans-stmt.c (gfc_trans_lock_unlock): Implement -fcoarray=lib
507         version; reject not-yet-implemented variants.
508         * trans-types.c (gfc_get_derived_type): For lock_type with
509         -fcoarray=lib, use a void pointer as type.
510         * trans.c (gfc_allocate_using_lib, gfc_allocate_allocatable):
511         Handle lock_type with -fcoarray=lib.
513 2015-04-10  Mikael Morin  <mikael@gcc.gnu.org>
515         PR fortran/56674
516         PR fortran/58813
517         PR fortran/59016
518         PR fortran/59024
519         * symbol.c (save_symbol_data, gfc_save_symbol_data): Rename the
520         former to the latter and make it non-static.  Update callers.
521         * gfortran.h (gfc_save_symbol_data): New prototype.
522         * decl.c (gfc_match_decl_type_spec): Call 'gfc_save_symbol_data'
523         before modifying symbols 'sym' and 'dt_sym'.
525 2013-04-09  Paul Thomas  <pault@gcc.gnu.org>
527         PR fortran/56852
528         * primary.c (gfc_variable_attr): Avoid ICE on AR_UNKNOWN if any
529         of the index variables are untyped and errors are present.
531 2015-04-07  Andre Vehreschild  <vehre@gmx.de>
533         PR fortran/65548
534         * trans-stmt.c (gfc_trans_allocate): For intrinsic functions
535         use conv_expr_descriptor() instead of conv_expr_reference().
537 2015-03-30  Jakub Jelinek  <jakub@redhat.com>
539         PR fortran/65597
540         * trans-openmp.c (gfc_trans_omp_do): For !simple simd with explicit
541         linear clause for the iterator set OMP_CLAUSE_LINEAR_NO_COPYIN.
542         For implcitly added !simple OMP_CLAUSE_LINEAR set it too.  Use step 1
543         instead of the original step on the new iterator - count.
545 2015-03-25  Mikael Morin  <mikael@gcc.gnu.org>
547         PR fortran/64952
548         PR fortran/65532
549         * gfortran.h (struct gfc_namespace): New field 'types_resolved'.
550         * resolve.c (resolve_types): Return early if field 'types_resolved'
551         is set.  Set 'types_resolved' at the end.
553 2015-03-24  Andre Vehreschild  <vehre@gmx.de>
555         PR fortran/55901
556         * trans-expr.c (gfc_conv_structure): Fixed indendation.
557         Using integer_zero_node now instead of explicitly
558         constructing a integer constant zero node.
559         (gfc_conv_derived_to_class): Add handling of _len component,
560         i.e., when the rhs has a string_length then assign that to
561         class' _len, else assign 0.
562         (gfc_conv_intrinsic_to_class): Likewise.
564 2015-03-24  Andre Vehreschild  <vehre@gmx.de>
566         PR fortran/64787
567         PR fortran/57456
568         PR fortran/63230
569         * class.c (gfc_add_component_ref):  Free no longer needed
570         ref-chains to prevent memory loss.
571         (find_intrinsic_vtab): For deferred length char arrays or
572         unlimited polymorphic objects, store the size in bytes of one
573         character in the size component of the vtab.
574         * gfortran.h: Added gfc_add_len_component () define.
575         * trans-array.c (gfc_trans_create_temp_array): Switched to new
576         function name for getting a class' vtab's field.
577         (build_class_array_ref): Likewise.
578         (gfc_array_init_size): Using the size information from allocate
579         more consequently now, i.e., the typespec of the entity to
580         allocate is no longer needed.  This is to address the last open
581         comment in PR fortran/57456.
582         (gfc_array_allocate): Likewise.
583         (structure_alloc_comps): gfc_copy_class_to_class () needs to
584         know whether the class is unlimited polymorphic.
585         * trans-array.h: Changed interface of gfc_array_allocate () to
586         reflect the no longer needed typespec.
587         * trans-expr.c (gfc_find_and_cut_at_last_class_ref): New.
588         (gfc_reset_len): New.
589         (gfc_get_class_array_ref): Switch to new function name for
590         getting a class' vtab's field.
591         (gfc_copy_class_to_class):  Added flag to know whether the class
592         to copy is unlimited polymorphic.  Adding _len dependent code
593         then, which calls ->vptr->copy () with four arguments adding
594         the length information ->vptr->copy(from, to, from_len, to_cap).
595         (gfc_conv_procedure_call): Switch to new function name for
596         getting a class' vtab's field.
597         (alloc_scalar_allocatable_for_assignment): Use the string_length
598         as computed by gfc_conv_expr and not the statically backend_decl
599         which may be incorrect when ref-ing.
600         (gfc_trans_assignment_1): Use the string_length variable and
601         not the rse.string_length.  The former has been computed more
602         generally.
603         * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Switch to new
604         function name for getting a class' vtab's field.
605         (gfc_conv_intrinsic_storage_size): Likewise.
606         (gfc_conv_intrinsic_transfer): Likewise.
607         * trans-stmt.c (gfc_trans_allocate): Restructured to evaluate
608         source=expr3 only once before the loop over the objects to
609         allocate, when the objects are not arrays. Doing correct _len
610         initialization and calling of vptr->copy () fixing PR 64787.
611         (gfc_trans_deallocate): Reseting _len to 0, preventing future
612         errors.
613         * trans.c (gfc_build_array_ref): Switch to new function name
614         for getting a class' vtab's field.
615         (gfc_add_comp_finalizer_call): Likewise.
616         * trans.h: Define the prototypes for the gfc_class_vtab_*_get ()
617         and gfc_vptr_*_get () functions.
618         Added gfc_find_and_cut_at_last_class_ref () and
619         gfc_reset_len () routine prototype.  Added flag to
620         gfc_copy_class_to_class () prototype to signal an unlimited
621         polymorphic entity to copy.
623 2015-03-24  Iain Sandoe  <iain@codesourcery.com>
624             Tobias Burnus  <burnus@net-b.de>
626         * gfortran.texi (_gfortran_caf_sync_memory): Improve wording.
628 2015-03-23  Paul Thomas  <pault@gcc.gnu.org>
629             Mikael Morin  <mikael@gcc.gnu.org>
631         PR fortran/64952
632         * gfortran.h (struct symbol_attribute) : New field
633         'array_outer_dependency'.
634         * trans.h (struct gfc_ss_info): New field 'array_outer_dependency'.
635         * module.c (enum ab_attribute): New value AB_ARRAY_OUTER_DEPENDENCY.
636         (attr_bits): Append same value to initializer.
637         (mio_symbol_attribute): Handle 'array_outer_dependency' attr
638         in module read and write.
639         * resolve.c (update_current_proc_outer_array_dependency): New function.
640         (resolve_function, resolve_call): Add code to update current procedure's
641         'array_outer_dependency' attribute.
642         (resolve_variable): Mark current procedure with attribute
643         array_outer_dependency if the variable is an array coming from outside
644         the current namespace.
645         (resolve_fl_procedure): Mark a procedure without body with attribute
646         'array_outer_dependency'.
647         * trans-array.c (gfc_conv_resolve_dependencies): If any ss is
648         marked as 'array_outer_dependency' generate a temporary.
649         (gfc_walk_function_expr): If the function may reference external arrays,
650         mark the head gfc_ss with flag 'array_outer_dependency'.
652 2015-03-22 Jerry DeLisle  <jvdelisle@gcc.gnu.org>
654         PR libgfortran/59513
655         * gfortran.texi (Read/Write after EOF marker): New information.
657 2015-03-21  H.J. Lu  <hongjiu.lu@intel.com>
659         * gfortran.texi (_gfortran_caf_sync_memory): Put @{xxx} in one
660         line.
662 2015-03-21  Tobias Burnus  <burnus@net-b.de>
664         * gfortran.texi (_gfortran_caf_sync_all, _gfortran_caf_sync_images,
665         _gfortran_caf_sync_memory, _gfortran_caf_error_stop,
666         _gfortran_caf_error_stop_str, _gfortran_caf_atomic_define,
667         _gfortran_caf_atomic_ref, _gfortran_caf_atomic_cas,
668         _gfortran_caf_atomic_op): New sections.
670 2015-03-21  Tobias Burnus  <burnus@net-b.de>
672         * trans-expr.c (gfc_get_tree_for_caf_expr): Reject unimplemented
673         coindexed coarray accesses.
675 2015-03-17  Paul Thomas  <pault@gcc.gnu.org>
677         PR fortran/59198
678         * trans-types.c (gfc_get_derived_type): If an abstract derived
679         type with procedure pointer components has no other type of
680         component, return the backend_decl. Otherwise build the
681         components if any of the non-procedure pointer components have
682         no backend_decl.
684 2015-03-16  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
686         PR fortran/64432
687         *trans-intrinisic.c (conv_intrinsic_system_clock): Check the
688         smallest kind passed in user arguments and hardcode tesults for
689         KIND=1 or KIND=2 to indicate no clock available.
691 2015-03-16  Andre Vehreschild  <vehre@gmx.de>
693         * resolve.c: Prevent segfault on illegal input.
695 2015-03-14  Mikael Morin  <mikael@gcc.gnu.org>
697         PR fortran/61138
698         * trans-expr.c (gfc_trans_pointer_assignment): Clear DESCRIPTOR_ONLY
699         field before reusing LSE.
701 2015-03-11  Janne Blomqvist  <jb@gcc.gnu.org>
703         PR libfortran/65200
704         * gfortran.texi: Document behavior when opening files without
705         explicit ACTION= specifier.
707 2015-03-10  Paul Thomas  <pault@gcc.gnu.org>
709         PR fortran/65024
710         * trans-expr.c (gfc_conv_component_ref): If the component
711         backend declaration is missing and the derived type symbol is
712         available in the reference, call gfc_build_derived_type.
714 2015-03-10  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
715             Tobias Burnus  <burnus@net-b.de>
717         * trans.h (caf_sync_memory): New function decl tree.
718         * trans-decl.c (gfc_build_builtin_function_decls): Define it.
719         (create_main_function): Don't call sync_synchronize and leave
720         it to the CAF library.
721         * trans-stmt.c (gfc_trans_stop): Ditto.
722         (gfc_trans_sync): Ditto; add call library call for sync memory.
724 2015-03-08  Mikael Morin  <mikael@gcc.gnu.org>
726         PR fortran/60898
727         * resolve.c (resolve_symbol): Check that the symbol found by
728         name lookup really is the current symbol being resolved.
730 2015-03-02  Tobias Burnus  <burnus@net-b.de>
732         * check.c (gfc_check_atomic): Properly check for coarrayness
733         and for being coindexed.
735 2015-02-26  Martin Liska  <mliska@suse.cz>
737         * resolve.c: Rename enum 'comparison' to 'compare_result' as
738         solution for -Wodr issue.
740 2015-02-24  Thomas Schwinge  <thomas@codesourcery.com>
742         PR libgomp/64625
743         * f95-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
744         Remove macros.
745         (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
746         * types.def (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
747         (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
748         Remove function types.
749         (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR)
750         (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_INT_INT_VAR)
751         (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
752         New function types.
754 2015-02-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
756         PR fortran/64980
757         PR fortran/61960
758         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Remove mapping
759         for component references to class objects.
760         (gfc_conv_procedure_call): Compare the class by name.
762 2015-02-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
764         PR fortran/64506
765         * scanner.c (gfc_next_char_literal): For free form source,
766         check for '!' and if found, clear the comment and go back
767         and get the next character. For fixed form source, skip the
768         rest of the line.
770 2015-02-12  Paul Thomas  <pault@gcc.gnu.org>
772         PR fortran/64932
773         * trans-stmt.c (gfc_trans_deallocate): If a component array
774         expression is not a descriptor type and it is a derived type
775         that has allocatable components and is not finalizable, then
776         deallocate the allocatable components.
778 2015-02-08  Mikael Morin  <mikael@gcc.gnu.org>
780         PR fortran/63744
781         * module.c (check_for_ambiguous): Change argument type
782         from gfc_symbol to gfc_symtree.  Check local (symtree) name
783         instead of original (symbol) name.
784         (read_module): Update caller.
786 2015-02-06  Paul Thomas  <pault@gcc.gnu.org>
788         PR fortran/63205
789         * gfortran.h: Add 'must finalize' field to gfc_expr and
790         prototypes for gfc_is_alloc_class_scalar_function and for
791         gfc_is_alloc_class_array_function.
792         * expr.c (gfc_is_alloc_class_scalar_function,
793         gfc_is_alloc_class_array_function): New functions.
794         * trans-array.c (gfc_add_loop_ss_code): Do not move the
795         expression for allocatable class scalar functions outside the
796         loop.
797         (conv_array_index_offset): Cope with deltas being NULL_TREE.
798         (build_class_array_ref): Do not return with allocatable class
799         array functions. Add code to pick out the returned class array.
800         Dereference if necessary and return if not a class object.
801         (gfc_conv_scalarized_array_ref): Cope with offsets being NULL.
802         (gfc_walk_function_expr): Return an array ss for the result of
803         an allocatable class array function.
804         * trans-expr.c (gfc_conv_subref_array_arg): Remove the assert
805         that the argument should be a variable. If an allocatable class
806         array function, set the offset to zero and skip the write-out
807         loop in this case.
808         (gfc_conv_procedure_call): Add allocatable class array function
809         to the assert. Call gfc_conv_subref_array_arg for allocatable
810         class array function arguments with derived type formal arg..
811         Add the code for handling allocatable class functions, including
812         finalization calls to prevent memory leaks.
813         (arrayfunc_assign_needs_temporary): Return if an allocatable
814         class array function.
815         (gfc_trans_assignment_1): Set must_finalize to rhs expression
816         for allocatable class functions. Set scalar_to_array as needed
817         for scalar class allocatable functions assigned to an array.
818         Nullify the allocatable components corresponding the the lhs
819         derived type so that the finalization does not free them.
821 2015-01-29  Andre Vehreschild  <vehre@gmx.de>
822             Janus Weil  <janus@gcc.gnu.org>
824         PR fortran/60289
825         Initial patch by Janus Weil
826         * resolve.c (resolve_allocate_expr): Add check for comp. only
827         when target is not unlimited polymorphic.
828         * trans-stmt.c (gfc_trans_allocate): Assign correct value to
829         _len component of unlimited polymorphic entities.
831 2015-02-05  Tobias Burnus  <burnus@net-b.de>
833         PR fortran/64943
834         * resolve.c (resolve_transfer): Also check structure
835         constructors.
837 2015-02-05  Paul Thomas  <pault@gcc.gnu.org>
839         PR fortran/64757
840         * resolve.c (resolve_structure_cons): Obtain the rank of class
841         components.
842         * trans-expr.c (gfc_trans_alloc_subarray_assign): Do the
843         assignment to allocatable class array components.
844         (alloc_scalar_allocatable_for_subcomponent_assignment): If comp
845         is a class component, allocate to the _data field.
846         (gfc_trans_subcomponent_assign): If a class component with a
847         derived type expression set the _vptr field and for array
848         components, call gfc_trans_alloc_subarray_assign. For scalars,
849         the assignment is performed here.
851 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
853         * options.c: Include langhooks.h.
854         (gfc_post_options): Change lang_hooks.name based on
855         selected -std= mode.
857 2015-02-03  Steven G. Kargl  <kargl@gcc.gnu.org>
859         * intrinsic.texi (CO_ASSOCIATED): c_prt_1 should be c_ptr_1.
861 2015-01-30  Andre Vehreschild  <vehre@gmx.de>
863         * trans-decl.c (gfc_get_symbol_decl): Removed duplicate code.
864         * trans-expr.c (gfc_conv_intrinsic_to_class): Fixed indentation.
865         Fixed datatype of charlen to be a 32-bit int.
867 2015-02-01  Joseph Myers  <joseph@codesourcery.com>
869         * error.c (gfc_warning (const char *, ...), gfc_warning_now (const
870         char *, ...)): Remove functions.
871         * gfortran.h (gfc_warning (const char *, ...), gfc_warning_now
872         (const char *, ...)): Remove declarations.
873         * arith.c, check.c, data.c, decl.c, frontend-passes.c,
874         interface.c, intrinsic.c, io.c, matchexp.c, module.c, openmp.c,
875         options.c, parse.c, primary.c, resolve.c, scanner.c, symbol.c,
876         trans-common.c, trans-const.c, trans-stmt.c: All callers of
877         gfc_warning and gfc_warning_now changed to pass 0 or option number
878         as first argument.
880 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
882         * f95-lang.c, gfortranspec.c, trans-const.c, trans-expr.c: All
883         callers of fatal_error changed to pass input_location as first
884         argument.
886 2015-01-28  Tobias Burnus  <burnus@net-b.de>
888         * intrinsic.texi (CO_BROADCAST): Correct argument description.
890 2015-01-27  Tobias Burnus  <burnus@net-b.de>
892         PR fortran/63861
893         * trans-openmp.c (gfc_has_alloc_comps, gfc_trans_omp_clauses):
894         Fix handling for scalar coarrays.
895         * trans-types.c (gfc_get_element_type): Add comment.
897 2015-01-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
899         PR fortran/64771
900         * interface.c: Remove <algorithm>.
901         (check_dummy_characteristics): Use MAX instead of std::max.
903 2015-01-26  Paul Thomas  <pault@gcc.gnu.org>
905         PR fortran/62044
906         * resolve.c (resolve_allocate_expr): If the default initializer
907         is NULL, keep the original MOLD expression so that the correct
908         typespec is available.
910 2015-01-26  Tobias Burnus  <burnus@net-b.de>
912         PR fortran/64771
913         * interface.c (check_dummy_characteristics): Fix coarray handling.
915 2015-01-26  Tobias Burnus  <burnus@net-b.de>
917         * io.c (gfc_match_inquire): Replace "-1" by a defined constant.
919 2015-01-26  Janus Weil  <janus@gcc.gnu.org>
921         PR fortran/64230
922         * class.c (finalize_component): New argument 'sub_ns'. Insert code to
923         check if 'expr' is associated.
924         (generate_finalization_wrapper): Rename 'ptr' symbols to 'ptr1' and
925         'ptr2'. Pass 'sub_ns' to finalize_component.
927 2015-01-25  Mikael Morin  <mikael@gcc.gnu.org>
929         PR fortran/62044
930         * decl.c (gfc_match_derived_decl): Don't insert a new symtree element.
931         * module.c (MOD_VERSION): Bump.
932         (write_module): Don't write list of extensions.
933         (read_module): Don't jump over list of extensions;
934         don't load list of extensions.
935         (load_derived_extensions, write_dt_extensions,
936          write_derived_extensions): Remove.
938 2015-01-24  Tobias Burnus  <burnus@net-b.de>
940         * parse.c (gfc_parse_file): Fix two-location gfc_error call.
942 2015-01-23  Martin Liska  <mliska@suse.cz>
944         * decl.c (attr_decl1): Workaround -Wmaybe-uninitialized
945         false positive during profiledbootstrap by initializing them.
946         * matchexp.c (match_mult_operand): Likewise.
947         * module.c (write_atom): Likewise.
948         (read_module): Likewise.
950 2015-01-23  Tom de Vries  <tom@codesourcery.com>
952         PR libgomp/64672
953         * lang.opt (fopenacc): Mark as LTO option.
955 2015-01-23  Tom de Vries  <tom@codesourcery.com>
957         PR libgomp/64707
958         * lang.opt (fopenmp): Mark as LTO option.
960 2015-01-23  Andre Vehreschild  <vehre@gmx.de>
962         * trans-decl.c (gfc_finish_var_decl): Fixed moved comment.
963         * trans-stmt.c (gfc_trans_allocate): Fixed indentation.
965 2015-01-23  Jakub Jelinek  <jakub@redhat.com>
967         * gfc-diagnostic.def (DK_ICE_NOBT): New kind.
969 2015-01-23  Janus Weil  <janus@gcc.gnu.org>
971         PR fortran/60922
972         * class.c (finalize_component): Apply the check for 'fini_coarray' only
973         to coarray components.
975 2015-01-23  Tobias Burnus  <burnus@net-b.de>
977         PR fortran/64726
978         * trans-openmp.c (gfc_trans_oacc_combined_directive): Fix
979         loop generation.
981 2015-01-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
983         PR fortran/61933
984         * libgfortran.h:
985         * trans-io.c (set_parameter_value): Delete use of has_iostat.
986         Redefine to not generate any runtime error check calls.
987         (set_parameter_value_chk): Rename of the former
988         set_parameter_value with the runtime error checks and fix
989         whitespace. (set_parameter_value_inquire): New function that
990         builds a runtime conditional block to set the INQUIRE
991         common parameter block unit number to -2 when unit numbers
992         exceed positive KIND=4 limits. (gfc_trans_open): Whitespace.
993         For unit, use the renamed set_parameter_value_chk.
994         (gfc_trans_close): Likewise use renamed function.
995         (build_filepos): Whitespace and use renamed function.
996         (gfc_trans_inquire): Whitespace and for unit use
997         set_parameter_value and set_parameter_value_inquire.
998         (gfc_trans_wait): Remove p->iostat from call to
999         set_parameter_value. Use new set_parameter_value_chk for unit.
1000         (build_dt): Use the new set_parameter_value without p->iostat
1001         and fix whitespace. Use set_parameter_value_chk for unit.
1003 2015-01-21  Thomas Koenig  <tkoenig@netcologne.de>
1005         PR fortran/57023
1006         * dependency.c (callback_dummy_intent_not_int):  New function.
1007         (dummy_intent_not_in):  New function.
1008         (gfc_full_array_ref_p):  Use dummy_intent_not_in.
1010 2015-01-18  Andre Vehreschild  <vehre@gmx.de>
1011             Janus Weil <janus@gcc.gnu.org>
1013         PR fortran/60255
1014         * class.c (gfc_get_len_component): New.
1015         (gfc_build_class_symbol): Add _len component to unlimited
1016         polymorphic entities.
1017         (find_intrinsic_vtab): Removed emitting of error message.
1018         * gfortran.h: Added prototype for gfc_get_len_component.
1019         * simplify.c (gfc_simplify_len): Use _len component where
1020         available.
1021         * trans-expr.c (gfc_class_len_get): New.
1022         (gfc_conv_intrinsic_to_class): Add handling for deferred
1023         character arrays.
1024         (gfc_conv_structure): Treat _len component correctly.
1025         (gfc_conv_expr): Prevent bind_c handling when not required.
1026         (gfc_trans_pointer_assignment): Propagate _len component.
1027         * trans-stmt.c (class_has_len_component): New.
1028         (trans_associate_var): _len component treatment for associate
1029         context.
1030         (gfc_trans_allocate): Same as for trans_associate_var()
1031         * trans.h: Added prototype for gfc_class_len_get.
1033 2015-01-18  Paul Thomas  <pault@gcc.gnu.org>
1035         PR fortran/57959
1036         * trans-expr.c (gfc_trans_subcomponent_assign): Use a deep copy
1037         for allocatable components, where the source is a variable.
1039 2015-01-18  Paul Thomas  <pault@gcc.gnu.org>
1041         PR fortran/55901
1042         * primary.c (gfc_match_varspec): Exclude dangling associate-
1043         names with dimension 0 from being counted as arrays.
1044         * resolve.c (resolve_assoc_var): Sub-strings are permissible
1045         for associate-names, so exclude characters from the test for
1046         misuse as arrays.
1047         * trans-decl.c (gfc_get_symbol_decl): Associate-names can use
1048         the hidden string length variable of their associated target.
1049         Signal this by setting 'length' to a constant, if the decl for
1050         the string length is a variable.
1052 2015-01-17  Paul Thomas  <pault@gcc.gnu.org>
1054         PR fortran/64578
1055         * trans-expr.c (gfc_trans_pointer_assignment): Make sure that
1056         before reinitializing rse, to add the rse.pre to block before
1057         creating 'ptrtemp'.
1058         * trans-intrinsic.c (gfc_conv_associated): Deal with the class
1059         data being a descriptor.
1061 2015-01-17  Andre Vehreschild  <vehre@gmx.de>
1063         PR fortran/60357
1064         * primary.c (build_actual_constructor): Prevent warning.
1065         * trans-expr.c (alloc_scalar_allocatable_for_subcomponent_
1066         assignment): New function encapsulates treatment of allocatable
1067         components.
1068         (gfc_trans_subcomponent_assign): Needed to distinguish between
1069         regular assignment and initilization.
1070         (gfc_trans_structure_assign): Same.
1071         (gfc_conv_structure): Same.
1073         PR fortran/61275
1074         * gfortran.h: deferred_parameter is not needed, because
1075         it artificial does the trick completely.
1076         * primary.c (build_actual_constructor): Same.
1077         (gfc_convert_to_structure_constructor): Same.
1078         * resolve.c (resolve_fl_derived0): Same.
1079         * trans-expr.c (gfc_conv_component_ref): Prevent treating
1080         allocatable deferred length char arrays here.
1081         (gfc_trans_subcomponent_assign): Same as above.
1082         * trans-types.c (gfc_sym_type): This is done in
1083         gfc_get_derived_type already.
1085 2015-01-17  Andre Vehreschild  <vehre@gmx.de>
1087         PR fortran/60334
1088         * trans-decl.c (gfc_get_symbol_decl):Use a ref on the string
1089         length when the symbol is declared to be a result.
1090         * trans-expr.c (gfc_conv_procedure_call): Strip deref on the
1091         string length when functions are nested and the string length
1092         is a reference already.
1094 2015-01-16  Janus Weil  <janus@gcc.gnu.org>
1096         PR fortran/45290
1097         * decl.c (match_pointer_init): Error out if resolution of init expr
1098         failed.
1100 2015-01-15  Tobias Burnus  <burnus@net-b.de>
1102         * openmp.c (check_symbol_not_pointer, resolve_oacc_data_clauses,
1103         resolve_oacc_deviceptr_clause, resolve_omp_clauses,
1104         gfc_resolve_oacc_declare): Replace '%s' by %qs.
1106 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
1107             Cesar Philippidis  <cesar@codesourcery.com>
1108             James Norris  <jnorris@codesourcery.com>
1109             Ilmir Usmanov  <i.usmanov@samsung.com>
1110             Tobias Burnus  <burnus@net-b.de>
1112         * lang.opt (fopenacc): New option.
1113         * cpp.c (cpp_define_builtins): Conditionally define _OPENACC.
1114         * dump-parse-tree.c (show_omp_node): Split part of it into...
1115         (show_omp_clauses): ... this new function.
1116         (show_omp_node, show_code_node): Handle EXEC_OACC_PARALLEL_LOOP,
1117         EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
1118         EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
1119         EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
1120         EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
1121         (show_namespace): Update for OpenACC.
1122         * f95-lang.c (DEF_FUNCTION_TYPE_VAR_2, DEF_FUNCTION_TYPE_VAR_8)
1123         (DEF_FUNCTION_TYPE_VAR_12, DEF_GOACC_BUILTIN)
1124         (DEF_GOACC_BUILTIN_COMPILER): New macros.
1125         * types.def (BT_FN_VOID_INT_INT_VAR)
1126         (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
1127         (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
1128         New function types.
1129         * gfortran.h (gfc_statement): Add ST_OACC_PARALLEL_LOOP,
1130         ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
1131         ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_DATA,
1132         ST_OACC_END_DATA, ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA,
1133         ST_OACC_LOOP, ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE,
1134         ST_OACC_WAIT, ST_OACC_CACHE, ST_OACC_KERNELS_LOOP,
1135         ST_OACC_END_KERNELS_LOOP, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
1136         ST_OACC_ROUTINE.
1137         (struct gfc_expr_list): New data type.
1138         (gfc_get_expr_list): New macro.
1139         (gfc_omp_map_op): Add OMP_MAP_FORCE_ALLOC, OMP_MAP_FORCE_DEALLOC,
1140         OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM, OMP_MAP_FORCE_TOFROM,
1141         OMP_MAP_FORCE_PRESENT, OMP_MAP_FORCE_DEVICEPTR.
1142         (OMP_LIST_FIRST, OMP_LIST_DEVICE_RESIDENT, OMP_LIST_USE_DEVICE)
1143         (OMP_LIST_CACHE): New enumerators.
1144         (struct gfc_omp_clauses): Add async_expr, gang_expr, worker_expr,
1145         vector_expr, num_gangs_expr, num_workers_expr, vector_length_expr,
1146         wait_list, tile_list, async, gang, worker, vector, seq,
1147         independent, wait, par_auto, gang_static, and loc members.
1148         (struct gfc_namespace): Add oacc_declare_clauses member.
1149         (gfc_exec_op): Add EXEC_OACC_KERNELS_LOOP,
1150         EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS,
1151         EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
1152         EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
1153         EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
1154         (gfc_free_expr_list, gfc_resolve_oacc_directive)
1155         (gfc_resolve_oacc_declare, gfc_resolve_oacc_parallel_loop_blocks)
1156         (gfc_resolve_oacc_blocks): New prototypes.
1157         * match.c (match_exit_cycle): Handle EXEC_OACC_LOOP and
1158         EXEC_OACC_PARALLEL_LOOP.
1159         * match.h (gfc_match_oacc_cache, gfc_match_oacc_wait)
1160         (gfc_match_oacc_update, gfc_match_oacc_declare)
1161         (gfc_match_oacc_loop, gfc_match_oacc_host_data)
1162         (gfc_match_oacc_data, gfc_match_oacc_kernels)
1163         (gfc_match_oacc_kernels_loop, gfc_match_oacc_parallel)
1164         (gfc_match_oacc_parallel_loop, gfc_match_oacc_enter_data)
1165         (gfc_match_oacc_exit_data, gfc_match_oacc_routine): New
1166         prototypes.
1167         * openmp.c: Include "diagnostic.h" and "gomp-constants.h".
1168         (gfc_free_omp_clauses): Update for members added to struct
1169         gfc_omp_clauses.
1170         (gfc_match_omp_clauses): Change mask paramter to uint64_t.  Add
1171         openacc parameter.
1172         (resolve_omp_clauses): Add openacc parameter.  Update for OpenACC.
1173         (struct fortran_omp_context): Add is_openmp member.
1174         (gfc_resolve_omp_parallel_blocks): Initialize it.
1175         (gfc_resolve_do_iterator): Update for OpenACC.
1176         (gfc_resolve_omp_directive): Call
1177         resolve_omp_directive_inside_oacc_region.
1178         (OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE)
1179         (OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_COPYPRIVATE)
1180         (OMP_CLAUSE_SHARED, OMP_CLAUSE_COPYIN, OMP_CLAUSE_REDUCTION)
1181         (OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_SCHEDULE)
1182         (OMP_CLAUSE_DEFAULT, OMP_CLAUSE_ORDERED, OMP_CLAUSE_COLLAPSE)
1183         (OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE)
1184         (OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH)
1185         (OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND)
1186         (OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM)
1187         (OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP, OMP_CLAUSE_TO)
1188         (OMP_CLAUSE_FROM, OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_THREAD_LIMIT)
1189         (OMP_CLAUSE_DIST_SCHEDULE): Use uint64_t.
1190         (OMP_CLAUSE_ASYNC, OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS)
1191         (OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_COPY, OMP_CLAUSE_COPYOUT)
1192         (OMP_CLAUSE_CREATE, OMP_CLAUSE_PRESENT)
1193         (OMP_CLAUSE_PRESENT_OR_COPY, OMP_CLAUSE_PRESENT_OR_COPYIN)
1194         (OMP_CLAUSE_PRESENT_OR_COPYOUT, OMP_CLAUSE_PRESENT_OR_CREATE)
1195         (OMP_CLAUSE_DEVICEPTR, OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER)
1196         (OMP_CLAUSE_VECTOR, OMP_CLAUSE_SEQ, OMP_CLAUSE_INDEPENDENT)
1197         (OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE_DEVICE_RESIDENT)
1198         (OMP_CLAUSE_HOST_SELF, OMP_CLAUSE_OACC_DEVICE, OMP_CLAUSE_WAIT)
1199         (OMP_CLAUSE_DELETE, OMP_CLAUSE_AUTO, OMP_CLAUSE_TILE): New macros.
1200         (gfc_match_omp_clauses): Handle those.
1201         (OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES)
1202         (OACC_LOOP_CLAUSES, OACC_PARALLEL_LOOP_CLAUSES)
1203         (OACC_KERNELS_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES)
1204         (OACC_DECLARE_CLAUSES, OACC_UPDATE_CLAUSES)
1205         (OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES)
1206         (OACC_WAIT_CLAUSES): New macros.
1207         (gfc_free_expr_list, match_oacc_expr_list, match_oacc_clause_gang)
1208         (gfc_match_omp_map_clause, gfc_match_oacc_parallel_loop)
1209         (gfc_match_oacc_parallel, gfc_match_oacc_kernels_loop)
1210         (gfc_match_oacc_kernels, gfc_match_oacc_data)
1211         (gfc_match_oacc_host_data, gfc_match_oacc_loop)
1212         (gfc_match_oacc_declare, gfc_match_oacc_update)
1213         (gfc_match_oacc_enter_data, gfc_match_oacc_exit_data)
1214         (gfc_match_oacc_wait, gfc_match_oacc_cache)
1215         (gfc_match_oacc_routine, oacc_is_loop)
1216         (resolve_oacc_scalar_int_expr, resolve_oacc_positive_int_expr)
1217         (check_symbol_not_pointer, check_array_not_assumed)
1218         (resolve_oacc_data_clauses, resolve_oacc_deviceptr_clause)
1219         (oacc_compatible_clauses, oacc_is_parallel, oacc_is_kernels)
1220         (omp_code_to_statement, oacc_code_to_statement)
1221         (resolve_oacc_directive_inside_omp_region)
1222         (resolve_omp_directive_inside_oacc_region)
1223         (resolve_oacc_nested_loops, resolve_oacc_params_in_parallel)
1224         (resolve_oacc_loop_blocks, gfc_resolve_oacc_blocks)
1225         (resolve_oacc_loop, resolve_oacc_cache, gfc_resolve_oacc_declare)
1226         (gfc_resolve_oacc_directive): New functions.
1227         * parse.c (next_free): Update for OpenACC.  Move some code into...
1228         (verify_token_free): ... this new function.
1229         (next_fixed): Update for OpenACC.  Move some code into...
1230         (verify_token_fixed): ... this new function.
1231         (case_executable): Add ST_OACC_UPDATE, ST_OACC_WAIT,
1232         ST_OACC_CACHE, ST_OACC_ENTER_DATA, and ST_OACC_EXIT_DATA.
1233         (case_exec_markers): Add ST_OACC_PARALLEL_LOOP, ST_OACC_PARALLEL,
1234         ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA, ST_OACC_LOOP,
1235         ST_OACC_KERNELS_LOOP.
1236         (case_decl): Add ST_OACC_ROUTINE.
1237         (push_state, parse_critical_block, parse_progunit): Update for
1238         OpenACC.
1239         (gfc_ascii_statement): Handle ST_OACC_PARALLEL_LOOP,
1240         ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
1241         ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_KERNELS_LOOP,
1242         ST_OACC_END_KERNELS_LOOP, ST_OACC_DATA, ST_OACC_END_DATA,
1243         ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA, ST_OACC_LOOP,
1244         ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE, ST_OACC_WAIT,
1245         ST_OACC_CACHE, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
1246         ST_OACC_ROUTINE.
1247         (verify_st_order, parse_spec): Handle ST_OACC_DECLARE.
1248         (parse_executable): Handle ST_OACC_PARALLEL_LOOP,
1249         ST_OACC_KERNELS_LOOP, ST_OACC_LOOP, ST_OACC_PARALLEL,
1250         ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA.
1251         (decode_oacc_directive, parse_oacc_structured_block)
1252         (parse_oacc_loop, is_oacc): New functions.
1253         * parse.h (struct gfc_state_data): Add oacc_declare_clauses
1254         member.
1255         (is_oacc): New prototype.
1256         * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Handle
1257         EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL,
1258         EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS, EXEC_OACC_DATA,
1259         EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP, EXEC_OACC_UPDATE,
1260         EXEC_OACC_WAIT, EXEC_OACC_CACHE, EXEC_OACC_ENTER_DATA,
1261         EXEC_OACC_EXIT_DATA.
1262         (resolve_codes): Call gfc_resolve_oacc_declare.
1263         * scanner.c (openacc_flag, openacc_locus): New variables.
1264         (skip_free_comments): Update for OpenACC.  Move some code into...
1265         (skip_omp_attribute): ... this new function.
1266         (skip_oacc_attribute): New function.
1267         (skip_fixed_comments, gfc_next_char_literal): Update for OpenACC.
1268         * st.c (gfc_free_statement): Handle EXEC_OACC_PARALLEL_LOOP,
1269         EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
1270         EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
1271         EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
1272         EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
1273         * trans-decl.c (gfc_generate_function_code): Update for OpenACC.
1274         * trans-openmp.c: Include "gomp-constants.h".
1275         (gfc_omp_finish_clause, gfc_trans_omp_clauses): Use GOMP_MAP_*
1276         instead of OMP_CLAUSE_MAP_*.  Use OMP_CLAUSE_SET_MAP_KIND.
1277         (gfc_trans_omp_clauses): Handle OMP_LIST_USE_DEVICE,
1278         OMP_LIST_DEVICE_RESIDENT, OMP_LIST_CACHE, and OMP_MAP_FORCE_ALLOC,
1279         OMP_MAP_FORCE_DEALLOC, OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM,
1280         OMP_MAP_FORCE_TOFROM, OMP_MAP_FORCE_PRESENT,
1281         OMP_MAP_FORCE_DEVICEPTR, and gfc_omp_clauses' async, seq,
1282         independent, wait_list, num_gangs_expr, num_workers_expr,
1283         vector_length_expr, vector, vector_expr, worker, worker_expr,
1284         gang, gang_expr members.
1285         (gfc_trans_omp_do): Handle EXEC_OACC_LOOP.
1286         (gfc_convert_expr_to_tree, gfc_trans_oacc_construct)
1287         (gfc_trans_oacc_executable_directive)
1288         (gfc_trans_oacc_wait_directive, gfc_trans_oacc_combined_directive)
1289         (gfc_trans_oacc_declare, gfc_trans_oacc_directive): New functions.
1290         * trans-stmt.c (gfc_trans_block_construct): Update for OpenACC.
1291         * trans-stmt.h (gfc_trans_oacc_directive, gfc_trans_oacc_declare):
1292         New prototypes.
1293         * trans.c (tranc_code): Handle EXEC_OACC_CACHE, EXEC_OACC_WAIT,
1294         EXEC_OACC_UPDATE, EXEC_OACC_LOOP, EXEC_OACC_HOST_DATA,
1295         EXEC_OACC_DATA, EXEC_OACC_KERNELS, EXEC_OACC_KERNELS_LOOP,
1296         EXEC_OACC_PARALLEL, EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_ENTER_DATA,
1297         EXEC_OACC_EXIT_DATA.
1298         * gfortran.texi: Update for OpenACC.
1299         * intrinsic.texi: Likewise.
1300         * invoke.texi: Likewise.
1302 2015-01-15  Janus Weil  <janus@gcc.gnu.org>
1304         PR fortran/58023
1305         * resolve.c (resolve_fl_derived0): Continue resolving next component
1306         after error.
1308 2015-01-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1310         PR fortran/61933
1311         * io.c (gfc_match_inquire): Generate error if unit number in
1312         inquire statement is a constant -1.  All other values allowed.
1313         * trans-io.c (gfc_trans_inquire): Delete dummy iostat variable.
1314         (create_dummy_iostat): Delete function no longer used.
1316 2015-01-13  Jakub Jelinek  <jakub@redhat.com>
1318         PR fortran/64528
1319         * trans-decl.c (create_function_arglist): Don't set TREE_READONLY
1320         on dummy args with VALUE attribute.
1322 2015-01-11  Janus Weil  <janus@gcc.gnu.org>
1324         PR fortran/63733
1325         * interface.c (gfc_extend_expr): Look for type-bound operators before
1326         non-typebound ones.
1328 2015-01-11  Janus Weil  <janus@gcc.gnu.org>
1330         PR fortran/58023
1331         * resolve.c (resolve_fl_derived0): Set error flag if problems with the
1332         interface of a procedure-pointer component were detected.
1334 2015-01-11  Janus Weil  <janus@gcc.gnu.org>
1336         PR fortran/64508
1337         * interface.c (compare_parameter): Interface check for
1338         procedure-pointer component as actual argument.
1340 2015-01-10  Thomas Schwinge  <thomas@codesourcery.com>
1342         * gfortran.texi: Update for libgomp being renamed from "GNU OpenMP
1343         Runtime Library" to "GNU Offloading and Multi Processing Runtime
1344         Library".
1345         * intrinsic.texi: Likewise.
1347 2015-01-10  Tobias Burnus  <burnus@net-b.de>
1349         PR fortran/64522
1350         * invoke.texi (Wline-truncation): Document new behaviour.
1351         * lang.opt (Wline-truncation): Add Init(-1).
1352         * options.c (gfc_post_options): If -Wline-truncation is unset,
1353         enable it for free-form source files; for the latter, also use
1354         -Werror=line-truncation, unless -Wno-error has been specified.
1356 2015-01-09  Michael Collison  <michael.collison@linaro.org>
1358         * convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1359         input.h, alias.h, symtab.h, options.h, fold-const.h,
1360         wide-int.h, and inchash.h due to flattening of tree.h.
1361         * cpp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1362         input.h, alias.h, symtab.h, fold-const.h,
1363         wide-int.h, and inchash.h due to flattening of tree.h.
1364         * decl.c: Ditto.
1365         * f95.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1366         input.h, alias.h, symtab.h, options.h, fold-const.h,
1367         wide-int.h, and inchash.h due to flattening of tree.h.
1368         * iresolve.c: Ditto.
1369         * match.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1370         input.h, alias.h, symtab.h, fold-const.h,
1371         wide-int.h, and inchash.h due to flattening of tree.h.
1372         * module.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1373         input.h, alias.h, symtab.h, options.h, fold-const.h,
1374         wide-int.h, and inchash.h due to flattening of tree.h.
1375         * options.c: Ditto.
1376         * target-memory.c: Include hash-set.h, vec.h,
1377         double-int.h, input.h, alias.h, symtab.h, fold-const.h,
1378         wide-int.h, and inchash.h due to flattening of tree.h.
1379         * trans-array.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1380         input.h, alias.h, symtab.h, options.h, fold-const.h,
1381         wide-int.h, and inchash.h due to flattening of tree.h.
1382         * trans.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1383         input.h, alias.h, symtab.h, options.h, fold-const.h,
1384         wide-int.h, and inchash.h due to flattening of tree.h.
1385         * trans-common.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1386         input.h, alias.h, symtab.h, fold-const.h,
1387         wide-int.h, and inchash.h due to flattening of tree.h.
1388         * trans-const.c: Ditto.
1389         * trans-decl.c: Ditto.
1390         * trans-expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1391         input.h, alias.h, symtab.h, options.h, fold-const.h,
1392         wide-int.h, and inchash.h due to flattening of tree.h.
1393         * trans-intrinsic.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1394         input.h, alias.h, symtab.h, fold-const.h,
1395         wide-int.h, inchash.h and real.h due to flattening of tree.h.
1396         * trans-io.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1397         input.h, alias.h, symtab.h, options.h, fold-const.h,
1398         wide-int.h, and inchash.h due to flattening of tree.h.
1399         * trans-openmp.c: Ditto.
1400         * trans-stmt.c: Ditto.
1401         * trans-types.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1402         input.h, alias.h, symtab.h, fold-const.h,
1403         wide-int.h, inchash.h and real.h due to flattening of tree.h.
1405 2015-01-08  Tobias Burnus  <burnus@net-b.de>
1407         * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
1408         for module coarrays with -fcoarray=lib.
1409         (get_proc_pointer_decl): As module variable, make only public
1410         when not marked as private.
1412 2015-01-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
1414         PR fortran/47674
1415         * dependency.h:  Actually commit changes.
1417 2015-01-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
1419         PR fortran/47674
1420         * dependency.c:  Update copyright years.
1421         (gfc_discard_nops):  Add prototype.
1422         * dependency.c (discard_nops):  Rename to gfc_discard_nops,
1423         make non-static.
1424         (gfc_discard_nops):  Use gfc_discard_nops.
1425         (gfc_dep_difference):  Likewise.
1426         * frontend-passes.c  Update copyright years.
1427         (realloc_strings):  New function.  Add prototype.
1428         (gfc_run_passes):  Call realloc_strings.
1429         (realloc_string_callback):  New function.
1430         (create_var):  Add prototype.  Handle case of a
1431         scalar character variable.
1432         (optimize_trim):  Do not handle allocatable variables.
1434 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
1436         Update copyright years.
1438         * gfortranspec.c (lang_specific_driver): Update copyright notice
1439         dates.
1440         * gfc-internals.texi: Bump @copying's copyright year.
1441         * gfortran.texi: Ditto.
1442         * intrinsic.texi: Ditto.
1443         * invoke.texi: Ditto.
1445 2015-01-02  Janus Weil  <janus@gcc.gnu.org>
1447         PR fortran/57562
1448         * expr.c (find_component_ref): Deal with extended types.
1450 2015-01-02  Tobias Burnus  <burnus@net-b.de>
1452         * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
1453         for module coarrays with -fcoarray=lib.
1455 2015-01-02  Janus Weil  <janus@gcc.gnu.org>
1457         PR fortran/60507
1458         * interface.c (is_procptr_result): New function to check if an
1459         expression is a procedure-pointer result.
1460         (compare_actual_formal): Use it.
1462 Copyright (C) 2015 Free Software Foundation, Inc.
1464 Copying and distribution of this file, with or without modification,
1465 are permitted in any medium without royalty provided the copyright
1466 notice and this notice are preserved.