2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
[official-gcc.git] / gcc / fortran / ChangeLog
blob6913d881b0941e57745b2523f0f09958baa09f6f
1 2015-05-18  Steven G. Kargl  <kargl@gcc.gnu.org>
3         PR fortran/64925
4         * symbol.c(check_conflict):  Check for a conflict between a dummy
5         argument and an internal procedure name.
7 2015-05-16  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
9         PR fortran/65903
10         * io.c (format_lex): Change to NONSTRING when checking for
11         possible doubled quote.
12         * scanner.c (gfc_next_char_literal): Revert change from 64506
13         and add a check for quotes and return.
15 2015-05-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
17         PR fortran/66113
18         * expr.c (is_parent_of_current_ns):  New function.
19         (check_restricted):  Use it.
21 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
23         PR fortran/44054
25         Replace all calls to gfc_notify_std_1 with gfc_notify_std and
26         gfc_warning_1 with gfc_warning.
27         * decl.c (gfc_verify_c_interop_param): Here.
28         * resolve.c (resolve_branch): Here.
29         (resolve_fl_derived): Here.
30         * dependency.c (gfc_check_argument_var_dependency):
31         * scanner.c (preprocessor_line): Use gfc_warning_now_at. Fix line
32         counter and locations before and after warning.
33         * gfortran.h (gfc_warning_1, gfc_warning_now_1, gfc_notify_std_1):
34         Delete.
35         (gfc_warning_now_at): Declare.
36         * error.c (gfc_warning_1): Delete.
37         (gfc_notify_std_1): Delete.
38         (gfc_warning_now_1): Delete.
39         (gfc_format_decoder): Handle two locations.
40         (gfc_diagnostic_build_prefix): Rename as
41         gfc_diagnostic_build_kind_prefix.
42         (gfc_diagnostic_build_locus_prefix): Take an expanded_location
43         instead of diagnostic_info.
44         (gfc_diagnostic_build_locus_prefix): Add overload that takes two
45         expanded_location.
46         (gfc_diagnostic_starter): Handle two locations.
47         (gfc_warning_now_at): New.
48         (gfc_diagnostics_init): Initialize caret_chars array.
49         (gfc_diagnostics_finish): Reset caret_chars array to default.
51 2015-05-16  Mikael Morin  <mikael@gcc.gnu.org>
52             Paul Thomas  <pault@gcc.gnu.org>
54         PR fortran/65792
55         * trans-expr.c (gfc_trans_subcomponent_assign): Always assign
56         the expression component to the destination. In addition, if
57         the component has allocatable components, copy them and
58         deallocate those of the expression, if it is not a variable.
59         The expression is fixed if not a variable to prevent multiple
60         evaluations.
62 2015-05-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
64         PR fortran/66111
65         * frontend-passes.c (has_dimen_vector_ref):  New function.
66         (inline_matmul_assign):  Use it to return early in case
67         of unhandled vector subscripts.
69 2015-05-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
71         PR fortran/66041
72         PR fortran/37131
73         * gfortran.h (gfc_array_spec):  Add field resolved.
74         * array.c (gfc_resolve_array_spec):  Resolve array spec
75         only once.
77 2015-05-11  Mikael Morin  <mikael@gcc.gnu.org>
79         PR fortran/66100
80         * simplify.c (simplify_bound): Fix assert to accept subobject arrays.
82 2015-05-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
84         PR fortran/66041
85         * frontend-passes.c (scalarized_expr): Set correct dimension and
86         shape for the expression to be passed to lbound. Remove trailing
87         references after array refrence.
88         (inline_matmul_assign):  Remove gfc_copy_expr from calls
89         to scalarized_expr().
91 2015-05-10  Mikael Morin  <mikael@gcc.gnu.org>
93         * simplify.c (simplify_bound_dim): Don't check for emptyness
94         in the case of cobound simplification.  Factor lower/upper
95         bound differenciation before the actual simplification.
96         (simplify_bound): Remove assumed shape specific simplification.
97         Don't give up early for the lbound of an assumed shape.
99 2015-05-09  Mikael Morin  <mikael@gcc.gnu.org>
101         PR fortran/65894
102         * trans-array.h (gfc_scalar_elemental_arg_saved_as_reference):
103         New prototype.
104         * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
105         New function.
106         (gfc_add_loop_ss_code): Use gfc_scalar_elemental_arg_saved_as_reference
107         as conditional.
108         (gfc_walk_elemental_function_args): Set the dummy_arg field.
109         * trans.h (gfc_ss_info): New subfield dummy_arg.
110         * trans-expr.c (gfc_conv_procedure_call): Revert the change
111         of revision 222361.
112         (gfc_conv_expr): Use gfc_scalar_elemental_arg_saved_as_reference
113         as conditional.
115 2015-05-08  Mikael Morin  <mikael@gcc.gnu.org>
117         * trans-array.c (gfc_walk_elemental_function_args):
118         Don't skip the advance to the next dummy argument when skipping
119         absent optional args.
121 2015-05-05  David Malcolm  <dmalcolm@redhat.com>
123         * expr.c (check_inquiry): Fix indentation so that it reflects the
124         block structure.
125         * interface.c (compare_parameter): Likewise.
126         * parse.c (parse_oacc_structured_block): Likewise.
127         * target-memory.c (expr_to_char): Likewise.
128         * trans-types.c (gfc_init_kinds): Likewise.
130 2015-05-02  Steven G. Kargl  <kargl@gcc.gnu.org>
132         PR fortran/65976
133         * invoke.texi:  Remove 'no-' in '-fno-fixed-form'
135 2015-05-01  Mikael Morin  <mikael@gcc.gnu.org>
137         * simplify.c (simplify_bound_dim): Tighten the check for array fullness
138         by also checking for absence of subreference.
139         (simplify_bound): Don't skip simplification if the array
140         has subreferences.
141         (simplify_cobound): Same.
143 2015-04-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
145         PR fortran/37131
146         * simplify.c (simplify_bound): Get constant lower bounds of one
147         from array spec for assumed and explicit shape shape arrays if
148         the lower bounds are indeed one.
150 2015-04-30  David Malcolm  <dmalcolm@redhat.com>
152         * options.c (gfc_init_options): Remove spurious second
153         semicolon.
154         * trans-stmt.c (gfc_trans_allocate): Likewise.
156 2015-04-28  Andre Vehreschild  <vehre@gmx.de>
158         * interface.c (gfc_compare_types): Check for unlimited
159         polymorphism flag in the correct position indepent of the _data
160         component being present or not.  This prevents a segfault, when
161         the _data component is not present.
162         * symbol.c (gfc_type_compatible): Same.
164 2015-04-27  Jim Wilson  <jim.wilson@linaro.org>
166         * Make-lang.in (fortran.mostlyclean): Remove gfortran and
167         gfortran-cross.
169 2015-04-27  Andre Vehreschild  <vehre@gmx.de>
171         PR fortran/59678
172         PR fortran/65841
173         * trans-array.c (duplicate_allocatable): Fixed deep copy of
174         allocatable components, which are liable for copy only, when
175         they are allocated.
176         (gfc_duplicate_allocatable): Add deep-copy code into if
177         component allocated block. Needed interface change for that.
178         (gfc_copy_allocatable_data): Supplying NULL_TREE for code to
179         add into if-block for checking whether a component was
180         allocated.
181         (gfc_duplicate_allocatable_nocopy): Likewise.
182         (structure_alloc_comps): Likewise.
183         * trans-array.h: Likewise.
184         * trans-expr.c (gfc_trans_alloc_subarray_assign): Likewise.
185         * trans-openmp.c (gfc_walk_alloc_comps): Likewise.
187 2015-04-23  Andre Vehreschild  <vehre@gmx.de>
189         PR fortran/60322
190         * expr.c (gfc_lval_expr_from_sym): Code to select the regular
191         or class array added.
192         * gfortran.h: Add IS_CLASS_ARRAY macro.
193         * trans-array.c (gfc_add_loop_ss_code): Treat class objects
194         to be referenced always.
195         (build_class_array_ref): Adapt retrieval of array descriptor.
196         (build_array_ref): Likewise.
197         (gfc_conv_array_ref): Hand the vptr or the descriptor to
198         build_array_ref depending whether the sym is class or not.
199         (gfc_trans_array_cobounds):  Select correct gfc_array_spec for
200         regular and class arrays.
201         (gfc_trans_array_bounds): Likewise.
202         (gfc_trans_dummy_array_bias): Likewise.
203         (gfc_get_dataptr_offset): Correcting call of build_array_ref.
204         (gfc_conv_expr_descriptor): Set the array's offset to -1 when
205         lbound in inner most dim is 1 and symbol non-pointer/assoc.
206         * trans-decl.c (gfc_build_qualified_array): Select correct
207         gfc_array_spec for regular and class arrays.
208         (gfc_build_dummy_array_decl): Likewise.
209         (gfc_get_symbol_decl): Get a dummy array for class arrays.
210         (gfc_trans_deferred_vars): Tell conv_expr that the descriptor
211         is desired.
212         * trans-expr.c (gfc_class_vptr_get): Get the class descriptor
213         from the correct location for class arrays.
214         (gfc_class_len_get): Likewise.
215         (gfc_conv_intrinsic_to_class): Add handling of _len component.
216         (gfc_conv_class_to_class):  Prevent access to unset array data
217         when the array is an optional argument. Add handling of _len
218         component.
219         (gfc_copy_class_to_class): Check that _def_init is non-NULL
220         when used in _vptr->copy()
221         (gfc_trans_class_init_assign): Ensure that the rank of
222         _def_init is zero.
223         (gfc_conv_component_ref): Get the _vptr along with _data refs.
224         (gfc_conv_variable): Make sure the temp array descriptor is
225         returned for class arrays, too, and that class arrays are
226         dereferenced correctly.
227         (gfc_conv_procedure_call): For polymorphic type initialization
228         the initializer has to be a pointer to _def_init stored in a
229         dummy variable, which then needs to be used by value.
230         * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Use the
231         temporary array descriptor for class arrays, too.
232         (gfc_conv_intrinsic_storage_size): Likewise.
233         (gfc_conv_intrinsic_loc): Add ref to _data for BT_CLASS
234         expressions.
235         * trans-stmt.c (trans_associate_var): Use a temporary array for
236         the associate variable of class arrays, too, making the array
237         one-based (lbound == 1).
238         * trans-types.c (gfc_is_nodesc_array): Use the correct
239         array data.
240         * trans.c (gfc_build_array_ref): Use the dummy array descriptor
241         when present.
242         * trans.h: Add class_vptr to gfc_se for storing a class ref's
243         vptr.
245 2015-04-22  Steven G. Kargl  <kargl@gcc.gnu.org>
247         PR fortran/65429
248         * decl.c (add_init_expr_to_sym): Set the length type parameter.
250 2015-04-10  Tobias Burnus  <burnus@net-b.de>
252         * trans-stmt.c (gfc_trans_lock_unlock): Implement -fcoarray=lib
253         version; reject not-yet-implemented variants.
254         * trans-types.c (gfc_get_derived_type): For lock_type with
255         -fcoarray=lib, use a void pointer as type.
256         * trans.c (gfc_allocate_using_lib, gfc_allocate_allocatable):
257         Handle lock_type with -fcoarray=lib.
259 2015-04-10  Mikael Morin  <mikael@gcc.gnu.org>
261         PR fortran/56674
262         PR fortran/58813
263         PR fortran/59016
264         PR fortran/59024
265         * symbol.c (save_symbol_data, gfc_save_symbol_data): Rename the
266         former to the latter and make it non-static.  Update callers.
267         * gfortran.h (gfc_save_symbol_data): New prototype.
268         * decl.c (gfc_match_decl_type_spec): Call 'gfc_save_symbol_data'
269         before modifying symbols 'sym' and 'dt_sym'.
271 2013-04-09  Paul Thomas  <pault@gcc.gnu.org>
273         PR fortran/56852
274         * primary.c (gfc_variable_attr): Avoid ICE on AR_UNKNOWN if any
275         of the index variables are untyped and errors are present.
277 2015-04-07  Andre Vehreschild  <vehre@gmx.de>
279         PR fortran/65548
280         * trans-stmt.c (gfc_trans_allocate): For intrinsic functions
281         use conv_expr_descriptor() instead of conv_expr_reference().
283 2015-03-30  Jakub Jelinek  <jakub@redhat.com>
285         PR fortran/65597
286         * trans-openmp.c (gfc_trans_omp_do): For !simple simd with explicit
287         linear clause for the iterator set OMP_CLAUSE_LINEAR_NO_COPYIN.
288         For implcitly added !simple OMP_CLAUSE_LINEAR set it too.  Use step 1
289         instead of the original step on the new iterator - count.
291 2015-03-25  Mikael Morin  <mikael@gcc.gnu.org>
293         PR fortran/64952
294         PR fortran/65532
295         * gfortran.h (struct gfc_namespace): New field 'types_resolved'.
296         * resolve.c (resolve_types): Return early if field 'types_resolved'
297         is set.  Set 'types_resolved' at the end.
299 2015-03-24  Andre Vehreschild  <vehre@gmx.de>
301         PR fortran/55901
302         * trans-expr.c (gfc_conv_structure): Fixed indendation.
303         Using integer_zero_node now instead of explicitly
304         constructing a integer constant zero node.
305         (gfc_conv_derived_to_class): Add handling of _len component,
306         i.e., when the rhs has a string_length then assign that to
307         class' _len, else assign 0.
308         (gfc_conv_intrinsic_to_class): Likewise.
310 2015-03-24  Andre Vehreschild  <vehre@gmx.de>
312         PR fortran/64787
313         PR fortran/57456
314         PR fortran/63230
315         * class.c (gfc_add_component_ref):  Free no longer needed
316         ref-chains to prevent memory loss.
317         (find_intrinsic_vtab): For deferred length char arrays or
318         unlimited polymorphic objects, store the size in bytes of one
319         character in the size component of the vtab.
320         * gfortran.h: Added gfc_add_len_component () define.
321         * trans-array.c (gfc_trans_create_temp_array): Switched to new
322         function name for getting a class' vtab's field.
323         (build_class_array_ref): Likewise.
324         (gfc_array_init_size): Using the size information from allocate
325         more consequently now, i.e., the typespec of the entity to
326         allocate is no longer needed.  This is to address the last open
327         comment in PR fortran/57456.
328         (gfc_array_allocate): Likewise.
329         (structure_alloc_comps): gfc_copy_class_to_class () needs to
330         know whether the class is unlimited polymorphic.
331         * trans-array.h: Changed interface of gfc_array_allocate () to
332         reflect the no longer needed typespec.
333         * trans-expr.c (gfc_find_and_cut_at_last_class_ref): New.
334         (gfc_reset_len): New.
335         (gfc_get_class_array_ref): Switch to new function name for
336         getting a class' vtab's field.
337         (gfc_copy_class_to_class):  Added flag to know whether the class
338         to copy is unlimited polymorphic.  Adding _len dependent code
339         then, which calls ->vptr->copy () with four arguments adding
340         the length information ->vptr->copy(from, to, from_len, to_cap).
341         (gfc_conv_procedure_call): Switch to new function name for
342         getting a class' vtab's field.
343         (alloc_scalar_allocatable_for_assignment): Use the string_length
344         as computed by gfc_conv_expr and not the statically backend_decl
345         which may be incorrect when ref-ing.
346         (gfc_trans_assignment_1): Use the string_length variable and
347         not the rse.string_length.  The former has been computed more
348         generally.
349         * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Switch to new
350         function name for getting a class' vtab's field.
351         (gfc_conv_intrinsic_storage_size): Likewise.
352         (gfc_conv_intrinsic_transfer): Likewise.
353         * trans-stmt.c (gfc_trans_allocate): Restructured to evaluate
354         source=expr3 only once before the loop over the objects to
355         allocate, when the objects are not arrays. Doing correct _len
356         initialization and calling of vptr->copy () fixing PR 64787.
357         (gfc_trans_deallocate): Reseting _len to 0, preventing future
358         errors.
359         * trans.c (gfc_build_array_ref): Switch to new function name
360         for getting a class' vtab's field.
361         (gfc_add_comp_finalizer_call): Likewise.
362         * trans.h: Define the prototypes for the gfc_class_vtab_*_get ()
363         and gfc_vptr_*_get () functions.
364         Added gfc_find_and_cut_at_last_class_ref () and
365         gfc_reset_len () routine prototype.  Added flag to
366         gfc_copy_class_to_class () prototype to signal an unlimited
367         polymorphic entity to copy.
369 2015-03-24  Iain Sandoe  <iain@codesourcery.com>
370             Tobias Burnus  <burnus@net-b.de>
372         * gfortran.texi (_gfortran_caf_sync_memory): Improve wording.
374 2015-03-23  Paul Thomas  <pault@gcc.gnu.org>
375             Mikael Morin  <mikael@gcc.gnu.org>
377         PR fortran/64952
378         * gfortran.h (struct symbol_attribute) : New field
379         'array_outer_dependency'.
380         * trans.h (struct gfc_ss_info): New field 'array_outer_dependency'.
381         * module.c (enum ab_attribute): New value AB_ARRAY_OUTER_DEPENDENCY.
382         (attr_bits): Append same value to initializer.
383         (mio_symbol_attribute): Handle 'array_outer_dependency' attr
384         in module read and write.
385         * resolve.c (update_current_proc_outer_array_dependency): New function.
386         (resolve_function, resolve_call): Add code to update current procedure's
387         'array_outer_dependency' attribute.
388         (resolve_variable): Mark current procedure with attribute
389         array_outer_dependency if the variable is an array coming from outside
390         the current namespace.
391         (resolve_fl_procedure): Mark a procedure without body with attribute
392         'array_outer_dependency'.
393         * trans-array.c (gfc_conv_resolve_dependencies): If any ss is
394         marked as 'array_outer_dependency' generate a temporary.
395         (gfc_walk_function_expr): If the function may reference external arrays,
396         mark the head gfc_ss with flag 'array_outer_dependency'.
398 2015-03-22 Jerry DeLisle  <jvdelisle@gcc.gnu.org>
400         PR libgfortran/59513
401         * gfortran.texi (Read/Write after EOF marker): New information.
403 2015-03-21  H.J. Lu  <hongjiu.lu@intel.com>
405         * gfortran.texi (_gfortran_caf_sync_memory): Put @{xxx} in one
406         line.
408 2015-03-21  Tobias Burnus  <burnus@net-b.de>
410         * gfortran.texi (_gfortran_caf_sync_all, _gfortran_caf_sync_images,
411         _gfortran_caf_sync_memory, _gfortran_caf_error_stop,
412         _gfortran_caf_error_stop_str, _gfortran_caf_atomic_define,
413         _gfortran_caf_atomic_ref, _gfortran_caf_atomic_cas,
414         _gfortran_caf_atomic_op): New sections.
416 2015-03-21  Tobias Burnus  <burnus@net-b.de>
418         * trans-expr.c (gfc_get_tree_for_caf_expr): Reject unimplemented
419         coindexed coarray accesses.
421 2015-03-17  Paul Thomas  <pault@gcc.gnu.org>
423         PR fortran/59198
424         * trans-types.c (gfc_get_derived_type): If an abstract derived
425         type with procedure pointer components has no other type of
426         component, return the backend_decl. Otherwise build the
427         components if any of the non-procedure pointer components have
428         no backend_decl.
430 2015-03-16  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
432         PR fortran/64432
433         *trans-intrinisic.c (conv_intrinsic_system_clock): Check the
434         smallest kind passed in user arguments and hardcode tesults for
435         KIND=1 or KIND=2 to indicate no clock available.
437 2015-03-16  Andre Vehreschild  <vehre@gmx.de>
439         * resolve.c: Prevent segfault on illegal input.
441 2015-03-14  Mikael Morin  <mikael@gcc.gnu.org>
443         PR fortran/61138
444         * trans-expr.c (gfc_trans_pointer_assignment): Clear DESCRIPTOR_ONLY
445         field before reusing LSE.
447 2015-03-11  Janne Blomqvist  <jb@gcc.gnu.org>
449         PR libfortran/65200
450         * gfortran.texi: Document behavior when opening files without
451         explicit ACTION= specifier.
453 2015-03-10  Paul Thomas  <pault@gcc.gnu.org>
455         PR fortran/65024
456         * trans-expr.c (gfc_conv_component_ref): If the component
457         backend declaration is missing and the derived type symbol is
458         available in the reference, call gfc_build_derived_type.
460 2015-03-10  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
461             Tobias Burnus  <burnus@net-b.de>
463         * trans.h (caf_sync_memory): New function decl tree.
464         * trans-decl.c (gfc_build_builtin_function_decls): Define it.
465         (create_main_function): Don't call sync_synchronize and leave
466         it to the CAF library.
467         * trans-stmt.c (gfc_trans_stop): Ditto.
468         (gfc_trans_sync): Ditto; add call library call for sync memory.
470 2015-03-08  Mikael Morin  <mikael@gcc.gnu.org>
472         PR fortran/60898
473         * resolve.c (resolve_symbol): Check that the symbol found by
474         name lookup really is the current symbol being resolved.
476 2015-03-02  Tobias Burnus  <burnus@net-b.de>
478         * check.c (gfc_check_atomic): Properly check for coarrayness
479         and for being coindexed.
481 2015-02-26  Martin Liska  <mliska@suse.cz>
483         * resolve.c: Rename enum 'comparison' to 'compare_result' as
484         solution for -Wodr issue.
486 2015-02-24  Thomas Schwinge  <thomas@codesourcery.com>
488         PR libgomp/64625
489         * f95-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
490         Remove macros.
491         (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
492         * types.def (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
493         (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
494         Remove function types.
495         (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR)
496         (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_INT_INT_VAR)
497         (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
498         New function types.
500 2015-02-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
502         PR fortran/64980
503         PR fortran/61960
504         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Remove mapping
505         for component references to class objects.
506         (gfc_conv_procedure_call): Compare the class by name.
508 2015-02-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
510         PR fortran/64506
511         * scanner.c (gfc_next_char_literal): For free form source,
512         check for '!' and if found, clear the comment and go back
513         and get the next character. For fixed form source, skip the
514         rest of the line.
516 2015-02-12  Paul Thomas  <pault@gcc.gnu.org>
518         PR fortran/64932
519         * trans-stmt.c (gfc_trans_deallocate): If a component array
520         expression is not a descriptor type and it is a derived type
521         that has allocatable components and is not finalizable, then
522         deallocate the allocatable components.
524 2015-02-08  Mikael Morin  <mikael@gcc.gnu.org>
526         PR fortran/63744
527         * module.c (check_for_ambiguous): Change argument type
528         from gfc_symbol to gfc_symtree.  Check local (symtree) name
529         instead of original (symbol) name.
530         (read_module): Update caller.
532 2015-02-06  Paul Thomas  <pault@gcc.gnu.org>
534         PR fortran/63205
535         * gfortran.h: Add 'must finalize' field to gfc_expr and
536         prototypes for gfc_is_alloc_class_scalar_function and for
537         gfc_is_alloc_class_array_function.
538         * expr.c (gfc_is_alloc_class_scalar_function,
539         gfc_is_alloc_class_array_function): New functions.
540         * trans-array.c (gfc_add_loop_ss_code): Do not move the
541         expression for allocatable class scalar functions outside the
542         loop.
543         (conv_array_index_offset): Cope with deltas being NULL_TREE.
544         (build_class_array_ref): Do not return with allocatable class
545         array functions. Add code to pick out the returned class array.
546         Dereference if necessary and return if not a class object.
547         (gfc_conv_scalarized_array_ref): Cope with offsets being NULL.
548         (gfc_walk_function_expr): Return an array ss for the result of
549         an allocatable class array function.
550         * trans-expr.c (gfc_conv_subref_array_arg): Remove the assert
551         that the argument should be a variable. If an allocatable class
552         array function, set the offset to zero and skip the write-out
553         loop in this case.
554         (gfc_conv_procedure_call): Add allocatable class array function
555         to the assert. Call gfc_conv_subref_array_arg for allocatable
556         class array function arguments with derived type formal arg..
557         Add the code for handling allocatable class functions, including
558         finalization calls to prevent memory leaks.
559         (arrayfunc_assign_needs_temporary): Return if an allocatable
560         class array function.
561         (gfc_trans_assignment_1): Set must_finalize to rhs expression
562         for allocatable class functions. Set scalar_to_array as needed
563         for scalar class allocatable functions assigned to an array.
564         Nullify the allocatable components corresponding the the lhs
565         derived type so that the finalization does not free them.
567 2015-01-29  Andre Vehreschild  <vehre@gmx.de>
568             Janus Weil  <janus@gcc.gnu.org>
570         PR fortran/60289
571         Initial patch by Janus Weil
572         * resolve.c (resolve_allocate_expr): Add check for comp. only
573         when target is not unlimited polymorphic.
574         * trans-stmt.c (gfc_trans_allocate): Assign correct value to
575         _len component of unlimited polymorphic entities.
577 2015-02-05  Tobias Burnus  <burnus@net-b.de>
579         PR fortran/64943
580         * resolve.c (resolve_transfer): Also check structure
581         constructors.
583 2015-02-05  Paul Thomas  <pault@gcc.gnu.org>
585         PR fortran/64757
586         * resolve.c (resolve_structure_cons): Obtain the rank of class
587         components.
588         * trans-expr.c (gfc_trans_alloc_subarray_assign): Do the
589         assignment to allocatable class array components.
590         (alloc_scalar_allocatable_for_subcomponent_assignment): If comp
591         is a class component, allocate to the _data field.
592         (gfc_trans_subcomponent_assign): If a class component with a
593         derived type expression set the _vptr field and for array
594         components, call gfc_trans_alloc_subarray_assign. For scalars,
595         the assignment is performed here.
597 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
599         * options.c: Include langhooks.h.
600         (gfc_post_options): Change lang_hooks.name based on
601         selected -std= mode.
603 2015-02-03  Steven G. Kargl  <kargl@gcc.gnu.org>
605         * intrinsic.texi (CO_ASSOCIATED): c_prt_1 should be c_ptr_1.
607 2015-01-30  Andre Vehreschild  <vehre@gmx.de>
609         * trans-decl.c (gfc_get_symbol_decl): Removed duplicate code.
610         * trans-expr.c (gfc_conv_intrinsic_to_class): Fixed indentation.
611         Fixed datatype of charlen to be a 32-bit int.
613 2015-02-01  Joseph Myers  <joseph@codesourcery.com>
615         * error.c (gfc_warning (const char *, ...), gfc_warning_now (const
616         char *, ...)): Remove functions.
617         * gfortran.h (gfc_warning (const char *, ...), gfc_warning_now
618         (const char *, ...)): Remove declarations.
619         * arith.c, check.c, data.c, decl.c, frontend-passes.c,
620         interface.c, intrinsic.c, io.c, matchexp.c, module.c, openmp.c,
621         options.c, parse.c, primary.c, resolve.c, scanner.c, symbol.c,
622         trans-common.c, trans-const.c, trans-stmt.c: All callers of
623         gfc_warning and gfc_warning_now changed to pass 0 or option number
624         as first argument.
626 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
628         * f95-lang.c, gfortranspec.c, trans-const.c, trans-expr.c: All
629         callers of fatal_error changed to pass input_location as first
630         argument.
632 2015-01-28  Tobias Burnus  <burnus@net-b.de>
634         * intrinsic.texi (CO_BROADCAST): Correct argument description.
636 2015-01-27  Tobias Burnus  <burnus@net-b.de>
638         PR fortran/63861
639         * trans-openmp.c (gfc_has_alloc_comps, gfc_trans_omp_clauses):
640         Fix handling for scalar coarrays.
641         * trans-types.c (gfc_get_element_type): Add comment.
643 2015-01-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
645         PR fortran/64771
646         * interface.c: Remove <algorithm>.
647         (check_dummy_characteristics): Use MAX instead of std::max.
649 2015-01-26  Paul Thomas  <pault@gcc.gnu.org>
651         PR fortran/62044
652         * resolve.c (resolve_allocate_expr): If the default initializer
653         is NULL, keep the original MOLD expression so that the correct
654         typespec is available.
656 2015-01-26  Tobias Burnus  <burnus@net-b.de>
658         PR fortran/64771
659         * interface.c (check_dummy_characteristics): Fix coarray handling.
661 2015-01-26  Tobias Burnus  <burnus@net-b.de>
663         * io.c (gfc_match_inquire): Replace "-1" by a defined constant.
665 2015-01-26  Janus Weil  <janus@gcc.gnu.org>
667         PR fortran/64230
668         * class.c (finalize_component): New argument 'sub_ns'. Insert code to
669         check if 'expr' is associated.
670         (generate_finalization_wrapper): Rename 'ptr' symbols to 'ptr1' and
671         'ptr2'. Pass 'sub_ns' to finalize_component.
673 2015-01-25  Mikael Morin  <mikael@gcc.gnu.org>
675         PR fortran/62044
676         * decl.c (gfc_match_derived_decl): Don't insert a new symtree element.
677         * module.c (MOD_VERSION): Bump.
678         (write_module): Don't write list of extensions.
679         (read_module): Don't jump over list of extensions;
680         don't load list of extensions.
681         (load_derived_extensions, write_dt_extensions,
682          write_derived_extensions): Remove.
684 2015-01-24  Tobias Burnus  <burnus@net-b.de>
686         * parse.c (gfc_parse_file): Fix two-location gfc_error call.
688 2015-01-23  Martin Liska  <mliska@suse.cz>
690         * decl.c (attr_decl1): Workaround -Wmaybe-uninitialized
691         false positive during profiledbootstrap by initializing them.
692         * matchexp.c (match_mult_operand): Likewise.
693         * module.c (write_atom): Likewise.
694         (read_module): Likewise.
696 2015-01-23  Tom de Vries  <tom@codesourcery.com>
698         PR libgomp/64672
699         * lang.opt (fopenacc): Mark as LTO option.
701 2015-01-23  Tom de Vries  <tom@codesourcery.com>
703         PR libgomp/64707
704         * lang.opt (fopenmp): Mark as LTO option.
706 2015-01-23  Andre Vehreschild  <vehre@gmx.de>
708         * trans-decl.c (gfc_finish_var_decl): Fixed moved comment.
709         * trans-stmt.c (gfc_trans_allocate): Fixed indentation.
711 2015-01-23  Jakub Jelinek  <jakub@redhat.com>
713         * gfc-diagnostic.def (DK_ICE_NOBT): New kind.
715 2015-01-23  Janus Weil  <janus@gcc.gnu.org>
717         PR fortran/60922
718         * class.c (finalize_component): Apply the check for 'fini_coarray' only
719         to coarray components.
721 2015-01-23  Tobias Burnus  <burnus@net-b.de>
723         PR fortran/64726
724         * trans-openmp.c (gfc_trans_oacc_combined_directive): Fix
725         loop generation.
727 2015-01-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
729         PR fortran/61933
730         * libgfortran.h:
731         * trans-io.c (set_parameter_value): Delete use of has_iostat.
732         Redefine to not generate any runtime error check calls.
733         (set_parameter_value_chk): Rename of the former
734         set_parameter_value with the runtime error checks and fix
735         whitespace. (set_parameter_value_inquire): New function that
736         builds a runtime conditional block to set the INQUIRE
737         common parameter block unit number to -2 when unit numbers
738         exceed positive KIND=4 limits. (gfc_trans_open): Whitespace.
739         For unit, use the renamed set_parameter_value_chk.
740         (gfc_trans_close): Likewise use renamed function.
741         (build_filepos): Whitespace and use renamed function.
742         (gfc_trans_inquire): Whitespace and for unit use
743         set_parameter_value and set_parameter_value_inquire.
744         (gfc_trans_wait): Remove p->iostat from call to
745         set_parameter_value. Use new set_parameter_value_chk for unit.
746         (build_dt): Use the new set_parameter_value without p->iostat
747         and fix whitespace. Use set_parameter_value_chk for unit.
749 2015-01-21  Thomas Koenig  <tkoenig@netcologne.de>
751         PR fortran/57023
752         * dependency.c (callback_dummy_intent_not_int):  New function.
753         (dummy_intent_not_in):  New function.
754         (gfc_full_array_ref_p):  Use dummy_intent_not_in.
756 2015-01-18  Andre Vehreschild  <vehre@gmx.de>
757             Janus Weil <janus@gcc.gnu.org>
759         PR fortran/60255
760         * class.c (gfc_get_len_component): New.
761         (gfc_build_class_symbol): Add _len component to unlimited
762         polymorphic entities.
763         (find_intrinsic_vtab): Removed emitting of error message.
764         * gfortran.h: Added prototype for gfc_get_len_component.
765         * simplify.c (gfc_simplify_len): Use _len component where
766         available.
767         * trans-expr.c (gfc_class_len_get): New.
768         (gfc_conv_intrinsic_to_class): Add handling for deferred
769         character arrays.
770         (gfc_conv_structure): Treat _len component correctly.
771         (gfc_conv_expr): Prevent bind_c handling when not required.
772         (gfc_trans_pointer_assignment): Propagate _len component.
773         * trans-stmt.c (class_has_len_component): New.
774         (trans_associate_var): _len component treatment for associate
775         context.
776         (gfc_trans_allocate): Same as for trans_associate_var()
777         * trans.h: Added prototype for gfc_class_len_get.
779 2015-01-18  Paul Thomas  <pault@gcc.gnu.org>
781         PR fortran/57959
782         * trans-expr.c (gfc_trans_subcomponent_assign): Use a deep copy
783         for allocatable components, where the source is a variable.
785 2015-01-18  Paul Thomas  <pault@gcc.gnu.org>
787         PR fortran/55901
788         * primary.c (gfc_match_varspec): Exclude dangling associate-
789         names with dimension 0 from being counted as arrays.
790         * resolve.c (resolve_assoc_var): Sub-strings are permissible
791         for associate-names, so exclude characters from the test for
792         misuse as arrays.
793         * trans-decl.c (gfc_get_symbol_decl): Associate-names can use
794         the hidden string length variable of their associated target.
795         Signal this by setting 'length' to a constant, if the decl for
796         the string length is a variable.
798 2015-01-17  Paul Thomas  <pault@gcc.gnu.org>
800         PR fortran/64578
801         * trans-expr.c (gfc_trans_pointer_assignment): Make sure that
802         before reinitializing rse, to add the rse.pre to block before
803         creating 'ptrtemp'.
804         * trans-intrinsic.c (gfc_conv_associated): Deal with the class
805         data being a descriptor.
807 2015-01-17  Andre Vehreschild  <vehre@gmx.de>
809         PR fortran/60357
810         * primary.c (build_actual_constructor): Prevent warning.
811         * trans-expr.c (alloc_scalar_allocatable_for_subcomponent_
812         assignment): New function encapsulates treatment of allocatable
813         components.
814         (gfc_trans_subcomponent_assign): Needed to distinguish between
815         regular assignment and initilization.
816         (gfc_trans_structure_assign): Same.
817         (gfc_conv_structure): Same.
819         PR fortran/61275
820         * gfortran.h: deferred_parameter is not needed, because
821         it artificial does the trick completely.
822         * primary.c (build_actual_constructor): Same.
823         (gfc_convert_to_structure_constructor): Same.
824         * resolve.c (resolve_fl_derived0): Same.
825         * trans-expr.c (gfc_conv_component_ref): Prevent treating
826         allocatable deferred length char arrays here.
827         (gfc_trans_subcomponent_assign): Same as above.
828         * trans-types.c (gfc_sym_type): This is done in
829         gfc_get_derived_type already.
831 2015-01-17  Andre Vehreschild  <vehre@gmx.de>
833         PR fortran/60334
834         * trans-decl.c (gfc_get_symbol_decl):Use a ref on the string
835         length when the symbol is declared to be a result.
836         * trans-expr.c (gfc_conv_procedure_call): Strip deref on the
837         string length when functions are nested and the string length
838         is a reference already.
840 2015-01-16  Janus Weil  <janus@gcc.gnu.org>
842         PR fortran/45290
843         * decl.c (match_pointer_init): Error out if resolution of init expr
844         failed.
846 2015-01-15  Tobias Burnus  <burnus@net-b.de>
848         * openmp.c (check_symbol_not_pointer, resolve_oacc_data_clauses,
849         resolve_oacc_deviceptr_clause, resolve_omp_clauses,
850         gfc_resolve_oacc_declare): Replace '%s' by %qs.
852 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
853             Cesar Philippidis  <cesar@codesourcery.com>
854             James Norris  <jnorris@codesourcery.com>
855             Ilmir Usmanov  <i.usmanov@samsung.com>
856             Tobias Burnus  <burnus@net-b.de>
858         * lang.opt (fopenacc): New option.
859         * cpp.c (cpp_define_builtins): Conditionally define _OPENACC.
860         * dump-parse-tree.c (show_omp_node): Split part of it into...
861         (show_omp_clauses): ... this new function.
862         (show_omp_node, show_code_node): Handle EXEC_OACC_PARALLEL_LOOP,
863         EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
864         EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
865         EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
866         EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
867         (show_namespace): Update for OpenACC.
868         * f95-lang.c (DEF_FUNCTION_TYPE_VAR_2, DEF_FUNCTION_TYPE_VAR_8)
869         (DEF_FUNCTION_TYPE_VAR_12, DEF_GOACC_BUILTIN)
870         (DEF_GOACC_BUILTIN_COMPILER): New macros.
871         * types.def (BT_FN_VOID_INT_INT_VAR)
872         (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
873         (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
874         New function types.
875         * gfortran.h (gfc_statement): Add ST_OACC_PARALLEL_LOOP,
876         ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
877         ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_DATA,
878         ST_OACC_END_DATA, ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA,
879         ST_OACC_LOOP, ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE,
880         ST_OACC_WAIT, ST_OACC_CACHE, ST_OACC_KERNELS_LOOP,
881         ST_OACC_END_KERNELS_LOOP, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
882         ST_OACC_ROUTINE.
883         (struct gfc_expr_list): New data type.
884         (gfc_get_expr_list): New macro.
885         (gfc_omp_map_op): Add OMP_MAP_FORCE_ALLOC, OMP_MAP_FORCE_DEALLOC,
886         OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM, OMP_MAP_FORCE_TOFROM,
887         OMP_MAP_FORCE_PRESENT, OMP_MAP_FORCE_DEVICEPTR.
888         (OMP_LIST_FIRST, OMP_LIST_DEVICE_RESIDENT, OMP_LIST_USE_DEVICE)
889         (OMP_LIST_CACHE): New enumerators.
890         (struct gfc_omp_clauses): Add async_expr, gang_expr, worker_expr,
891         vector_expr, num_gangs_expr, num_workers_expr, vector_length_expr,
892         wait_list, tile_list, async, gang, worker, vector, seq,
893         independent, wait, par_auto, gang_static, and loc members.
894         (struct gfc_namespace): Add oacc_declare_clauses member.
895         (gfc_exec_op): Add EXEC_OACC_KERNELS_LOOP,
896         EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS,
897         EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
898         EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
899         EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
900         (gfc_free_expr_list, gfc_resolve_oacc_directive)
901         (gfc_resolve_oacc_declare, gfc_resolve_oacc_parallel_loop_blocks)
902         (gfc_resolve_oacc_blocks): New prototypes.
903         * match.c (match_exit_cycle): Handle EXEC_OACC_LOOP and
904         EXEC_OACC_PARALLEL_LOOP.
905         * match.h (gfc_match_oacc_cache, gfc_match_oacc_wait)
906         (gfc_match_oacc_update, gfc_match_oacc_declare)
907         (gfc_match_oacc_loop, gfc_match_oacc_host_data)
908         (gfc_match_oacc_data, gfc_match_oacc_kernels)
909         (gfc_match_oacc_kernels_loop, gfc_match_oacc_parallel)
910         (gfc_match_oacc_parallel_loop, gfc_match_oacc_enter_data)
911         (gfc_match_oacc_exit_data, gfc_match_oacc_routine): New
912         prototypes.
913         * openmp.c: Include "diagnostic.h" and "gomp-constants.h".
914         (gfc_free_omp_clauses): Update for members added to struct
915         gfc_omp_clauses.
916         (gfc_match_omp_clauses): Change mask paramter to uint64_t.  Add
917         openacc parameter.
918         (resolve_omp_clauses): Add openacc parameter.  Update for OpenACC.
919         (struct fortran_omp_context): Add is_openmp member.
920         (gfc_resolve_omp_parallel_blocks): Initialize it.
921         (gfc_resolve_do_iterator): Update for OpenACC.
922         (gfc_resolve_omp_directive): Call
923         resolve_omp_directive_inside_oacc_region.
924         (OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE)
925         (OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_COPYPRIVATE)
926         (OMP_CLAUSE_SHARED, OMP_CLAUSE_COPYIN, OMP_CLAUSE_REDUCTION)
927         (OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_SCHEDULE)
928         (OMP_CLAUSE_DEFAULT, OMP_CLAUSE_ORDERED, OMP_CLAUSE_COLLAPSE)
929         (OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE)
930         (OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH)
931         (OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND)
932         (OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM)
933         (OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP, OMP_CLAUSE_TO)
934         (OMP_CLAUSE_FROM, OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_THREAD_LIMIT)
935         (OMP_CLAUSE_DIST_SCHEDULE): Use uint64_t.
936         (OMP_CLAUSE_ASYNC, OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS)
937         (OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_COPY, OMP_CLAUSE_COPYOUT)
938         (OMP_CLAUSE_CREATE, OMP_CLAUSE_PRESENT)
939         (OMP_CLAUSE_PRESENT_OR_COPY, OMP_CLAUSE_PRESENT_OR_COPYIN)
940         (OMP_CLAUSE_PRESENT_OR_COPYOUT, OMP_CLAUSE_PRESENT_OR_CREATE)
941         (OMP_CLAUSE_DEVICEPTR, OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER)
942         (OMP_CLAUSE_VECTOR, OMP_CLAUSE_SEQ, OMP_CLAUSE_INDEPENDENT)
943         (OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE_DEVICE_RESIDENT)
944         (OMP_CLAUSE_HOST_SELF, OMP_CLAUSE_OACC_DEVICE, OMP_CLAUSE_WAIT)
945         (OMP_CLAUSE_DELETE, OMP_CLAUSE_AUTO, OMP_CLAUSE_TILE): New macros.
946         (gfc_match_omp_clauses): Handle those.
947         (OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES)
948         (OACC_LOOP_CLAUSES, OACC_PARALLEL_LOOP_CLAUSES)
949         (OACC_KERNELS_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES)
950         (OACC_DECLARE_CLAUSES, OACC_UPDATE_CLAUSES)
951         (OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES)
952         (OACC_WAIT_CLAUSES): New macros.
953         (gfc_free_expr_list, match_oacc_expr_list, match_oacc_clause_gang)
954         (gfc_match_omp_map_clause, gfc_match_oacc_parallel_loop)
955         (gfc_match_oacc_parallel, gfc_match_oacc_kernels_loop)
956         (gfc_match_oacc_kernels, gfc_match_oacc_data)
957         (gfc_match_oacc_host_data, gfc_match_oacc_loop)
958         (gfc_match_oacc_declare, gfc_match_oacc_update)
959         (gfc_match_oacc_enter_data, gfc_match_oacc_exit_data)
960         (gfc_match_oacc_wait, gfc_match_oacc_cache)
961         (gfc_match_oacc_routine, oacc_is_loop)
962         (resolve_oacc_scalar_int_expr, resolve_oacc_positive_int_expr)
963         (check_symbol_not_pointer, check_array_not_assumed)
964         (resolve_oacc_data_clauses, resolve_oacc_deviceptr_clause)
965         (oacc_compatible_clauses, oacc_is_parallel, oacc_is_kernels)
966         (omp_code_to_statement, oacc_code_to_statement)
967         (resolve_oacc_directive_inside_omp_region)
968         (resolve_omp_directive_inside_oacc_region)
969         (resolve_oacc_nested_loops, resolve_oacc_params_in_parallel)
970         (resolve_oacc_loop_blocks, gfc_resolve_oacc_blocks)
971         (resolve_oacc_loop, resolve_oacc_cache, gfc_resolve_oacc_declare)
972         (gfc_resolve_oacc_directive): New functions.
973         * parse.c (next_free): Update for OpenACC.  Move some code into...
974         (verify_token_free): ... this new function.
975         (next_fixed): Update for OpenACC.  Move some code into...
976         (verify_token_fixed): ... this new function.
977         (case_executable): Add ST_OACC_UPDATE, ST_OACC_WAIT,
978         ST_OACC_CACHE, ST_OACC_ENTER_DATA, and ST_OACC_EXIT_DATA.
979         (case_exec_markers): Add ST_OACC_PARALLEL_LOOP, ST_OACC_PARALLEL,
980         ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA, ST_OACC_LOOP,
981         ST_OACC_KERNELS_LOOP.
982         (case_decl): Add ST_OACC_ROUTINE.
983         (push_state, parse_critical_block, parse_progunit): Update for
984         OpenACC.
985         (gfc_ascii_statement): Handle ST_OACC_PARALLEL_LOOP,
986         ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
987         ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_KERNELS_LOOP,
988         ST_OACC_END_KERNELS_LOOP, ST_OACC_DATA, ST_OACC_END_DATA,
989         ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA, ST_OACC_LOOP,
990         ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE, ST_OACC_WAIT,
991         ST_OACC_CACHE, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
992         ST_OACC_ROUTINE.
993         (verify_st_order, parse_spec): Handle ST_OACC_DECLARE.
994         (parse_executable): Handle ST_OACC_PARALLEL_LOOP,
995         ST_OACC_KERNELS_LOOP, ST_OACC_LOOP, ST_OACC_PARALLEL,
996         ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA.
997         (decode_oacc_directive, parse_oacc_structured_block)
998         (parse_oacc_loop, is_oacc): New functions.
999         * parse.h (struct gfc_state_data): Add oacc_declare_clauses
1000         member.
1001         (is_oacc): New prototype.
1002         * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Handle
1003         EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL,
1004         EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS, EXEC_OACC_DATA,
1005         EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP, EXEC_OACC_UPDATE,
1006         EXEC_OACC_WAIT, EXEC_OACC_CACHE, EXEC_OACC_ENTER_DATA,
1007         EXEC_OACC_EXIT_DATA.
1008         (resolve_codes): Call gfc_resolve_oacc_declare.
1009         * scanner.c (openacc_flag, openacc_locus): New variables.
1010         (skip_free_comments): Update for OpenACC.  Move some code into...
1011         (skip_omp_attribute): ... this new function.
1012         (skip_oacc_attribute): New function.
1013         (skip_fixed_comments, gfc_next_char_literal): Update for OpenACC.
1014         * st.c (gfc_free_statement): Handle EXEC_OACC_PARALLEL_LOOP,
1015         EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
1016         EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
1017         EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
1018         EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
1019         * trans-decl.c (gfc_generate_function_code): Update for OpenACC.
1020         * trans-openmp.c: Include "gomp-constants.h".
1021         (gfc_omp_finish_clause, gfc_trans_omp_clauses): Use GOMP_MAP_*
1022         instead of OMP_CLAUSE_MAP_*.  Use OMP_CLAUSE_SET_MAP_KIND.
1023         (gfc_trans_omp_clauses): Handle OMP_LIST_USE_DEVICE,
1024         OMP_LIST_DEVICE_RESIDENT, OMP_LIST_CACHE, and OMP_MAP_FORCE_ALLOC,
1025         OMP_MAP_FORCE_DEALLOC, OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM,
1026         OMP_MAP_FORCE_TOFROM, OMP_MAP_FORCE_PRESENT,
1027         OMP_MAP_FORCE_DEVICEPTR, and gfc_omp_clauses' async, seq,
1028         independent, wait_list, num_gangs_expr, num_workers_expr,
1029         vector_length_expr, vector, vector_expr, worker, worker_expr,
1030         gang, gang_expr members.
1031         (gfc_trans_omp_do): Handle EXEC_OACC_LOOP.
1032         (gfc_convert_expr_to_tree, gfc_trans_oacc_construct)
1033         (gfc_trans_oacc_executable_directive)
1034         (gfc_trans_oacc_wait_directive, gfc_trans_oacc_combined_directive)
1035         (gfc_trans_oacc_declare, gfc_trans_oacc_directive): New functions.
1036         * trans-stmt.c (gfc_trans_block_construct): Update for OpenACC.
1037         * trans-stmt.h (gfc_trans_oacc_directive, gfc_trans_oacc_declare):
1038         New prototypes.
1039         * trans.c (tranc_code): Handle EXEC_OACC_CACHE, EXEC_OACC_WAIT,
1040         EXEC_OACC_UPDATE, EXEC_OACC_LOOP, EXEC_OACC_HOST_DATA,
1041         EXEC_OACC_DATA, EXEC_OACC_KERNELS, EXEC_OACC_KERNELS_LOOP,
1042         EXEC_OACC_PARALLEL, EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_ENTER_DATA,
1043         EXEC_OACC_EXIT_DATA.
1044         * gfortran.texi: Update for OpenACC.
1045         * intrinsic.texi: Likewise.
1046         * invoke.texi: Likewise.
1048 2015-01-15  Janus Weil  <janus@gcc.gnu.org>
1050         PR fortran/58023
1051         * resolve.c (resolve_fl_derived0): Continue resolving next component
1052         after error.
1054 2015-01-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1056         PR fortran/61933
1057         * io.c (gfc_match_inquire): Generate error if unit number in
1058         inquire statement is a constant -1.  All other values allowed.
1059         * trans-io.c (gfc_trans_inquire): Delete dummy iostat variable.
1060         (create_dummy_iostat): Delete function no longer used.
1062 2015-01-13  Jakub Jelinek  <jakub@redhat.com>
1064         PR fortran/64528
1065         * trans-decl.c (create_function_arglist): Don't set TREE_READONLY
1066         on dummy args with VALUE attribute.
1068 2015-01-11  Janus Weil  <janus@gcc.gnu.org>
1070         PR fortran/63733
1071         * interface.c (gfc_extend_expr): Look for type-bound operators before
1072         non-typebound ones.
1074 2015-01-11  Janus Weil  <janus@gcc.gnu.org>
1076         PR fortran/58023
1077         * resolve.c (resolve_fl_derived0): Set error flag if problems with the
1078         interface of a procedure-pointer component were detected.
1080 2015-01-11  Janus Weil  <janus@gcc.gnu.org>
1082         PR fortran/64508
1083         * interface.c (compare_parameter): Interface check for
1084         procedure-pointer component as actual argument.
1086 2015-01-10  Thomas Schwinge  <thomas@codesourcery.com>
1088         * gfortran.texi: Update for libgomp being renamed from "GNU OpenMP
1089         Runtime Library" to "GNU Offloading and Multi Processing Runtime
1090         Library".
1091         * intrinsic.texi: Likewise.
1093 2015-01-10  Tobias Burnus  <burnus@net-b.de>
1095         PR fortran/64522
1096         * invoke.texi (Wline-truncation): Document new behaviour.
1097         * lang.opt (Wline-truncation): Add Init(-1).
1098         * options.c (gfc_post_options): If -Wline-truncation is unset,
1099         enable it for free-form source files; for the latter, also use
1100         -Werror=line-truncation, unless -Wno-error has been specified.
1102 2015-01-09  Michael Collison  <michael.collison@linaro.org>
1104         * convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1105         input.h, alias.h, symtab.h, options.h, fold-const.h,
1106         wide-int.h, and inchash.h due to flattening of tree.h.
1107         * cpp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1108         input.h, alias.h, symtab.h, fold-const.h,
1109         wide-int.h, and inchash.h due to flattening of tree.h.
1110         * decl.c: Ditto.
1111         * f95.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1112         input.h, alias.h, symtab.h, options.h, fold-const.h,
1113         wide-int.h, and inchash.h due to flattening of tree.h.
1114         * iresolve.c: Ditto.
1115         * match.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1116         input.h, alias.h, symtab.h, fold-const.h,
1117         wide-int.h, and inchash.h due to flattening of tree.h.
1118         * module.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1119         input.h, alias.h, symtab.h, options.h, fold-const.h,
1120         wide-int.h, and inchash.h due to flattening of tree.h.
1121         * options.c: Ditto.
1122         * target-memory.c: Include hash-set.h, vec.h,
1123         double-int.h, input.h, alias.h, symtab.h, fold-const.h,
1124         wide-int.h, and inchash.h due to flattening of tree.h.
1125         * trans-array.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1126         input.h, alias.h, symtab.h, options.h, fold-const.h,
1127         wide-int.h, and inchash.h due to flattening of tree.h.
1128         * trans.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1129         input.h, alias.h, symtab.h, options.h, fold-const.h,
1130         wide-int.h, and inchash.h due to flattening of tree.h.
1131         * trans-common.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1132         input.h, alias.h, symtab.h, fold-const.h,
1133         wide-int.h, and inchash.h due to flattening of tree.h.
1134         * trans-const.c: Ditto.
1135         * trans-decl.c: Ditto.
1136         * trans-expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1137         input.h, alias.h, symtab.h, options.h, fold-const.h,
1138         wide-int.h, and inchash.h due to flattening of tree.h.
1139         * trans-intrinsic.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1140         input.h, alias.h, symtab.h, fold-const.h,
1141         wide-int.h, inchash.h and real.h due to flattening of tree.h.
1142         * trans-io.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1143         input.h, alias.h, symtab.h, options.h, fold-const.h,
1144         wide-int.h, and inchash.h due to flattening of tree.h.
1145         * trans-openmp.c: Ditto.
1146         * trans-stmt.c: Ditto.
1147         * trans-types.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1148         input.h, alias.h, symtab.h, fold-const.h,
1149         wide-int.h, inchash.h and real.h due to flattening of tree.h.
1151 2015-01-08  Tobias Burnus  <burnus@net-b.de>
1153         * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
1154         for module coarrays with -fcoarray=lib.
1155         (get_proc_pointer_decl): As module variable, make only public
1156         when not marked as private.
1158 2015-01-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
1160         PR fortran/47674
1161         * dependency.h:  Actually commit changes.
1163 2015-01-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
1165         PR fortran/47674
1166         * dependency.c:  Update copyright years.
1167         (gfc_discard_nops):  Add prototype.
1168         * dependency.c (discard_nops):  Rename to gfc_discard_nops,
1169         make non-static.
1170         (gfc_discard_nops):  Use gfc_discard_nops.
1171         (gfc_dep_difference):  Likewise.
1172         * frontend-passes.c  Update copyright years.
1173         (realloc_strings):  New function.  Add prototype.
1174         (gfc_run_passes):  Call realloc_strings.
1175         (realloc_string_callback):  New function.
1176         (create_var):  Add prototype.  Handle case of a
1177         scalar character variable.
1178         (optimize_trim):  Do not handle allocatable variables.
1180 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
1182         Update copyright years.
1184         * gfortranspec.c (lang_specific_driver): Update copyright notice
1185         dates.
1186         * gfc-internals.texi: Bump @copying's copyright year.
1187         * gfortran.texi: Ditto.
1188         * intrinsic.texi: Ditto.
1189         * invoke.texi: Ditto.
1191 2015-01-02  Janus Weil  <janus@gcc.gnu.org>
1193         PR fortran/57562
1194         * expr.c (find_component_ref): Deal with extended types.
1196 2015-01-02  Tobias Burnus  <burnus@net-b.de>
1198         * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
1199         for module coarrays with -fcoarray=lib.
1201 2015-01-02  Janus Weil  <janus@gcc.gnu.org>
1203         PR fortran/60507
1204         * interface.c (is_procptr_result): New function to check if an
1205         expression is a procedure-pointer result.
1206         (compare_actual_formal): Use it.
1208 Copyright (C) 2015 Free Software Foundation, Inc.
1210 Copying and distribution of this file, with or without modification,
1211 are permitted in any medium without royalty provided the copyright
1212 notice and this notice are preserved.