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