PR fortran/54656
[official-gcc.git] / gcc / fortran / ChangeLog
blob3a6387517478b226d9b8397235b888546fdb8fdc
1 2015-08-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3         PR fortran/54656
4         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Add decl
5         for quadruple precision BUILT_IN_SQRT.
7 2015-08-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
9         * trans-intrinsic.c (conv_intrinsic_ieee_is_negative): Use type
10         generic BUILT_IN_SIGNBIT.
11         (conv_intrinsic_ieee_copy_sign): Likewise.
12         * f95-lang.c (gfc_init_builtin_functions): Add BUILT_IN_ISINF,
13         BUILT_IN_ISINF_SIGN, BUILT_IN_SIGNBIT, BUILT_IN_ISLESS,
14         BUILT_IN_ISLESSGREATER, BUILT_IN_ISGREATER. Remove non-type generic
15         variants of BUILT_IN_SIGNBIT.
16         * mathbuiltins.def: Remove SIGNBIT.
18 2015-08-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
20         PR fortran/41387
21         * gfortran.texi: New section "File operations on symbolic links".
23 2015-08-08  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
25         PR fortran/67059
26         * gfortranspec.c (lang_specific_driver): Adjust --version output.
28 2015-08-08  Bud Davis  <jmdavis@link.com>
29             Mikael Morin  <mikael@gcc.gnu.org>
31         PR fortran/59746
32         * symbol.c (gfc_restore_last_undo_checkpoint): Delete a common block
33         symbol if it was put in the list.
35 2015-08-07  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
37         PR fortran/64104
38         * expr.c (gfc_check_init_expr): Allow some IEEE functions in
39         constant expressions.
40         (external_spec_function): Allow some IEEE functions in specification
41         expressions.
42         * simplify.c (gfc_simplify_ieee_selected_real_kind): Remove.
43         (simplify_ieee_selected_real_kind, simplify_ieee_support,
44         matches_ieee_function_name, gfc_simplify_ieee_functions): New
45         functions.
46         * gfortran.h (gfc_simplify_ieee_selected_real_kind): Remove
47         prototype.
48         (gfc_simplify_ieee_functions): Add prototype.
50 2015-08-06  Mikael Morin  <mikael@gcc.gnu.org>
52         * trans.h (gfc_trans_scalar_assign): Remove fourth argument.
53         * trans-expr.c (gfc_trans_scalar_assign): Merge fourth into sixth
54         argument.
55         (gfc_conv_subref_array_arg, gfc_trans_subarray_assign,
56          gfc_trans_subcomponent_assign, gfc_trans_assignment_1): Update callers.
57         * trans-array.c (gfc_conv_expr_descriptor): Ditto.
58         * trans-stmt.c (forall_make_variable_temp,
59         generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
60         gfc_trans_where_assign, gfc_trans_where_3): Ditto.
62 2015-08-05  Paul Thomas  <pault@gcc.gnu.org>
64         PR fortran/52846
65         * module.c (check_access): Return true if new static flag
66         'dump_smod' is true..
67         (gfc_dump_module): Rename original 'dump_module' and call from
68         new version. Use 'dump_smod' rather than the stack state to
69         determine if a submodule is being processed. The new version of
70         this procedure sets 'dump_smod' depending on the stack state and
71         then writes both the mod and smod files if a module is being
72         processed or just the smod for a submodule.
73         (gfc_use_module): Eliminate the check for module_name and
74         submodule_name being the same.
75         * trans-decl.c (gfc_finish_var_decl, gfc_build_qualified_array,
76         get_proc_pointer_decl): Set TREE_PUBLIC unconditionally and use
77         the conditions to set DECL_VISIBILITY as hidden and to set as
78         true DECL_VISIBILITY_SPECIFIED.
80 2015-08-04  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
82         PR fortran/64022
83         * simplify.c (gfc_simplify_ieee_selected_real_kind): Extend IEEE
84         support to all real kinds.
86 2015-08-03  Steven G. Kargl  <kargl@gcc.gnu.org>
88         PR fortran/66942
89         * trans-expr.c (gfc_conv_procedure_call): Avoid NULL pointer reference
91 2015-08-03  Mikael Morin  <mikael@gcc.gnu.org>
93         PR fortran/64921
94         * class.c (generate_finalization_wrapper): Set finalization
95         procedure symbol's always_explicit attribute.
97 2015-08-01  Paul Thomas  <pault@gcc.gnu.org>
99         PR fortran/67091
100         * trans-intrinsic.c (gfc_conv_associated): Add the pre and post
101         blocks for the second argument to se.
103 2015-07-27  Thomas Schwinge  <thomas@codesourcery.com>
105         * parse.c (parse_oacc_structured_block): Fix logic error.
106         Reported by Mikael Morin <mikael.morin@sfr.fr>.
108 2015-07-24  Mikael Morin  <mikael@gcc.gnu.org>
110         PR fortran/64986
111         * trans-expr.c (gfc_trans_assignment_1): Put component deallocation
112         code at the beginning of the block.
114 2015-07-22  Mikael Morin  <mikael@gcc.gnu.org>
116         PR fortran/61831
117         PR fortran/66929
118         * trans-array.c (gfc_get_proc_ifc_for_expr): Use esym as procedure
119         symbol if available.
121 2015-07-17  Paul Thomas  <pault@gcc.gnu.org>
123         PR fortran/52846
124         * decl.c (gfc_match_end): Pick out declared submodule name from
125         the composite identifier.
126         * gfortran.h : Add 'submodule_name' to gfc_use_list structure.
127         * module.c (gfc_match_submodule): Define submodule_name and add
128         static 'submodule_name'.
129         (gfc_match_submodule): Build up submodule filenames, using '@'
130         as a delimiter. Store the output filename in 'submodule_name'.
131         Similarly, the submodule identifier is built using '.' as an
132         identifier.
133         (gfc_dump_module): If current state is COMP_SUBMODULE, write
134         to file 'submodule_name', using SUBMODULE_EXTENSION.
135         (gfc_use_module): Similarly, use the 'submodule_name' field in
136         the gfc_use_list structure and SUBMODULE_EXTENSION to read the
137         implicitly used submodule files.
139 2015-07-17  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
141         * trans-intrinsic.c (conv_co_collective): Remove redundant address
142         operator in the generated code.
144 2015-07-17  Andre Vehreschild  <vehre@gcc.gnu.org>
146         PR fortran/66035
147         * trans-expr.c (alloc_scalar_allocatable_for_subcomponent_assignment):
148         Compute the size to allocate for class and derived type objects
149         correclty.
150         (gfc_trans_subcomponent_assign): Only allocate memory for a
151         component when the object to assign is not an allocatable class
152         object (the memory is already present for allocatable class objects).
153         Furthermore use copy_class_to_class for assigning the rhs to the
154         component (may happen for dummy class objects on the rhs).
156 2015-07-17  Mikael Morin  <mikael@gcc.gnu.org>
157             Dominique d'Humieres  <dominiq@lps.ens.fr>
159         PR fortran/61831
160         * trans-array.c (gfc_conv_array_parameter): Guard allocatable
161         component deallocation code generation with descriptorless
162         calling convention flag.
163         * trans-expr.c (gfc_conv_expr_reference): Remove allocatable
164         component deallocation code generation from revision 212329.
165         (expr_may_alias_variables): New function.
166         (gfc_conv_procedure_call): New boolean elemental_proc to factor
167         check for procedure elemental-ness.  Rename boolean f to nodesc_arg
168         and declare it in the outer scope.  Use expr_may_alias_variables,
169         elemental_proc and nodesc_arg to decide whether generate allocatable
170         component deallocation code.
171         (gfc_trans_subarray_assign): Set deep copy flag.
173 2015-07-16  Steven G. Kargl  <kargl@gcc.gnu.org>
175         PR fortran/66724
176         PR fortran/66724
177         * io.c (is_char_type): Call gfc_resolve_expr ().
178         (match_open_element, match_dt_element, match_inquire_element): Fix
179         ASYNCHRONOUS case.
181 2015-07-15  Andrew MacLeod  <amacleod@redhat.com>
183         * trans-types.c: Remove multiline #include comment.
185 2015-07-14  Steven G. Kargl  <kargl@gcc.gnu.org>
187         * simplify.c (gfc_simplify_floor): Set precision of temporary to
188         that of arg.
190 2015-07-13  Andre Vehreschild  <vehre@gcc.gnu.org>
192         PR fortran/64589
193         * class.c (find_intrinsic_vtab): Put/Search vtabs for intrinsic
194         types in the top-level namespace.
196 2015-07-12  Aldy Hernandez  <aldyh@redhat.com>
198         * trans-stmt.c: Fix double word typos.
200 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
202         * arith.c: Adjust includes for flags.h changes.
203         * array.c: Likewise.
204         * check.c: Likewise.
205         * decl.c: Likewise.
206         * error.c: Likewise.
207         * expr.c: Likewise.
208         * frontend-passes.c: Likewise.
209         * interface.c: Likewise.
210         * intrinsic.c: Likewise.
211         * io.c: Likewise.
212         * match.c: Likewise.
213         * openmp.c: Likewise.
214         * parse.c: Likewise.
215         * primary.c: Likewise.
216         * resolve.c: Likewise.
217         * scanner.c: Likewise.
218         * simplify.c: Likewise.
219         * symbol.c: Likewise.
220         * target-memory.c: Likewise.
222 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
224         * convert.c: Adjust includes.
225         * cpp.c: Likewise.
226         * decl.c: Likewise.
227         * f95-lang.c: Likewise.
228         * iresolve.c: Likewise.
229         * match.c: Likewise.
230         * module.c: Likewise.
231         * options.c: Likewise.
232         * target-memory.c: Likewise.
233         * trans-array.c: Likewise.
234         * trans-common.c: Likewise.
235         * trans-const.c: Likewise.
236         * trans-decl.c: Likewise.
237         * trans-expr.c: Likewise.
238         * trans-intrinsic.c: Likewise.
239         * trans-io.c: Likewise.
240         * trans-openmp.c: Likewise.
241         * trans-stmt.c: Likewise.
242         * trans-types.c: Likewise.
243         * trans.c: Likewise.
245 2015-07-07  Andre Vehreschild  <vehre@gmx.de>
247         PR fortran/66578
248         * trans-array.c (gfc_conv_expr_descriptor): Ensure array descriptor
249         is one-based for non-full array refs. Correct the offset when a
250         rank_remap occurs.
252 2015-07-06  Steven G. Kargl  <kargl@gcc.gnu.org>
254         * io.c (check_char_variable): New function.
255         (match_open_element, match_close_element, match_file_element,
256         match_dt_element, match_inquire_element, match_wait_element): Use it.
258 2015-07-06  Andre Vehreschild  <vehre@gmx.de>
260         PR fortran/58586
261         * resolve.c (resolve_symbol): Non-private functions in modules
262         with allocatable or pointer components are marked referenced
263         now. Furthermore is the default init especially for those
264         components now done in gfc_conf_procedure_call preventing
265         duplicate code.
266         * trans-decl.c (gfc_generate_function_code): Generate a fake
267         result decl for functions returning an object with allocatable
268         components and initialize them.
269         * trans-expr.c (gfc_conv_procedure_call): For value typed trees
270         use the tree without indirect ref. And for non-decl trees
271         add a temporary variable to prevent evaluating the tree
272         multiple times (prevent multiple function evaluations).
273         * trans.h: Made gfc_trans_structure_assign () protoype
274         available, which is now needed by trans-decl.c:gfc_generate_
275         function_code(), too.
277 2015-07-04  Steven G. Kargl  <kargl@gcc.gnu.org>
279         PR fortran/66725
280         * io.c (is_char_type): New function to test for BT_CHARACTER
281         (gfc_match_open, gfc_match_close, match_dt_element): Use it.
283 2015-07-02  David Edelsohn  <dje.gcc@gmail.com>
285         * trans-common.c: Include <map> after system.h.
287 2015-07-02  Paul Thomas  <pault@gcc.gnu.org>
289         PR fortran/52846
290         * decl.c (get_proc_name): Make a partially populated interface
291         symbol to carry the characteristics of a module procedure and
292         its result.
293         (variable_decl): Declarations of dummies or results in the
294         abreviated form of module procedure is an error.
295         (gfc_match_import): IMPORT is not permitted in the interface
296         declaration of module procedures.
297         (match_attr_spec): Submodule variables have implicit save
298         attribute for F2008 onwards.
299         (gfc_match_prefix): Add 'module' as the a prefix and set the
300         module_procedure attribute.
301         (gfc_match_formal_arglist): For a module procedure keep the
302         interface formal_arglist from the interface, match new the
303         formal arguments and then compare the number and names of each.
304         (gfc_match_procedure): Add case COMP_SUBMODULE.
305         (gfc_match_function_decl, gfc_match_subroutine_decl): Set the
306         module_procedure attribute.
307         (gfc_match_entry, gfc_match_end):  Add case COMP_SUBMODULE. If
308         attr abr_modproc_decl is set, switch the message accordingly
309         for subroutines and functions.
310         (gfc_match_submod_proc): New function to match the abbreviated
311         style of submodule declaration.
312         * gfortran.h : Add ST_SUBMODULE and ST_END_SUBMODULE. Add the
313         attribute bits 'used_in_submodule' and 'module_procedure'. Add
314         the bit field 'abr_modproc_decl' to gfc_symbol. Add prototypes
315         for 'gfc_copy_dummy_sym', 'gfc_check_dummy_characteristics' and
316         'gfc_check_result_characteristics'.
317         * interface.c : Add the prefix 'gfc_' to the names of functions
318         'check_dummy(result)_characteristics' and all their references.
319         * match.h : Add prototype for 'gfc_match_submod_proc' and
320         'gfc_match_submodule'.
321         (check_sym_interfaces): A module procedure is not an error in
322         a module procedure statment in a generic interface.
323         * module.c (gfc_match_submodule): New function. Add handling
324         for the 'module_procedure' attribute bit.
325         (gfc_use_module): Make sure that a submodule cannot use itself.
326         * parse.c (decode_statement): Set attr has_'import_set' for
327         the interface declaration of module procedures. Handle a match
328         occurring in 'gfc_match_submod_proc' and a match for
329         'submodule'.
330         (gfc_enclosing_unit): Include the state COMP_SUBMODULE.
331         (gfc_ascii_statement): Add END SUBMODULE.
332         (accept_statement): Add ST_SUBMODULE.
333         (parse_spec): Disallow statement functions in a submodule
334         specification part.
335         (parse_contained): Add ST_END_SUBMODULE and COMP_SUBMODULE
336         twice each.
337         (get_modproc_result): Copy the result symbol of the interface.
338         (parse_progunit): Call it.
339         (set_syms_host_assoc): Make symbols from the ancestor module
340         and submodules use associated, as required by the standard and
341         set all private components public. Module procedures 'external'
342         attribute bit is reset and the 'used_in_submodule' bit is set.
343         (parse_module): If this is a submodule, use the ancestor module
344         and submodules. Traverse the namespace, calling
345         'set_syms_host_assoc'. Add ST_END_SUBMODULE and COMP_SUBMODULE.
346         * parse.h : Add COMP_SUBMODULE.
347         * primary.c (match_variable): Add COMP_SUBMODULE.
348         * resolve.c (compare_fsyms): New function to compare the dummy
349         characteristics of a module procedure with its interface.
350         (resolve_fl_procedure): Compare the procedure, result and dummy
351         characteristics of a module_procedure with its interface, using
352         'compare_fsyms' for the dummy arguments.
353         * symbol.c (gfc_add_procedure): Suppress the check for existing
354         procedures in the case of a module procedure.
355         (gfc_add_explicit_interface): Skip checks that must fail for
356         module procedures.
357         (gfc_add_type): Allow a new type to be added to module
358         procedures, their results or their dummy arguments.
359         (gfc_copy_dummy_sym): New function to generate new dummy args
360         and copy the characteristics from the interface.
361         * trans-decl.c (gfc_sym_mangled_function_id): Module procedures
362         must always have their names mangled as if they are symbols
363         coming from a declaration in a module.
364         (gfc_get_symbol_decl): Add 'used_in_submodule' to the assert.
365         (gfc_finish_var_decl): Symbols with the 'used_in_submodule' bit
366         set are set DECL_EXTERNAL as if they were use associated.
368 2015-07-02  Steven G. Kargl  <kargl@gcc.gnu.org>
370         PR fortran/56520
371         * match.c (gfc_match_name): Special case unary minus and plus.
373 2015-07-02  Steven G. Kargl   <kargl@gcc.gnu.org>
375         PR fortran/66545
376         * primary.c (match_sym_complex_part): Do not dereference NULL pointer.
378 2015-07-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
380         * arith.c (gfc_arith_divide):  With -Winteger-division,
381         warn about contant integer division if there is a non-zero
382         remainder.
383         * invoke.texi:  Document -Winteger-division.
384         * lang.opt:  Add -Winteger-division.
386 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
388         * f95-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
389         * trans-decl.c: Likewise.
391 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
393         * trans-decl.c (module_hasher): Likewise.
394         * trans.h (module_decl_hasher): Likewise.
396 2015-06-24  Manuel López-Ibáñez  <manu@gcc.gnu.org>
398         PR fortran/66528
399         * error.c (gfc_warning_check): Restore the default output_buffer
400         before calling diagnostic_action_after_output.
401         (gfc_error_check): Likewise.
402         (gfc_diagnostics_init): Add comment.
404 2015-06-23  Andre Vehreschild  <vehre@gmx.de>
406         PR fortran/64674
407         * parse.c (parse_associate): Figure the rank and as of a
408         class array in an associate early.
409         * primary.c (gfc_match_varspec): Prevent setting the
410         dimension attribute on the sym for classes.
411         * resolve.c (resolve_variable): Correct the component
412         ref's type for associated variables.  Add a full array ref
413         when class array's are associated.
414         (resolve_assoc_var): Correct the type of the symbol,
415         when in the associate the expression's rank becomes scalar.
416         * trans-expr.c (gfc_conv_variable): Indirect ref needed for
417         allocatable associated objects.
419 2015-06-19  Mikael Morin  <mikael@gcc.gnu.org>
421         PR fortran/66549
422         * resolve.c (resolve_global_procedure): Don't save and restore
423         OpenMP state around the call to gfc_resolve.
424         (gfc_resolve): Save OpenMP state on entry and restore it on return.
426 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
428         * convert.c: Do not include input.h, line-map.h or is-a.h.
429         * cpp.c: Likewise.
430         * decl.c: Likewise.
431         * f95-lang.c: Likewise.
432         * gfortran.h: Likewise.
433         * iresolve.c: Likewise.
434         * match.c: Likewise.
435         * module.c: Likewise.
436         * options.c: Likewise.
437         * target-memory.c: Likewise.
438         * trans-array.c: Likewise.
439         * trans-common.c: Likewise.
440         * trans-const.c: Likewise.
441         * trans-decl.c: Likewise.
442         * trans-expr.c: Likewise.
443         * trans-intrinsic.c: Likewise.
444         * trans-io.c: Likewise.
445         * trans-openmp.c: Likewise.
446         * trans-stmt.c: Likewise.
447         * trans-types.c: Likewise.
448         * trans.c: Likewise.
450 2015-06-15  Andre Vehreschild  <vehre@gmx.de>
452         PR fortran/44672
453         PR fortran/45440
454         PR fortran/57307
455         * gfortran.h: Extend gfc_code.ext.alloc to carry a
456         flag indicating that the array specification has to be
457         taken from expr3.
458         * resolve.c (resolve_allocate_expr): Add F2008 notify
459         and flag indicating source driven array spec.
460         (resolve_allocate_deallocate): Check for source driven
461         array spec, when array to allocate has no explicit
462         array spec.
463         * trans-array.c (gfc_array_init_size): Get lower and
464         upper bound from a tree array descriptor, except when
465         the source expression is an array-constructor which is
466         fixed to be one-based.
467         (retrieve_last_ref): Extracted from gfc_array_allocate().
468         (gfc_array_allocate): Enable allocate(array, source=
469         array_expression) as specified by F2008:C633.
470         (gfc_conv_expr_descriptor): Add class tree expression
471         into the saved descriptor for class arrays.
472         * trans-array.h: Add temporary array descriptor to
473         gfc_array_allocate ().
474         * trans-expr.c (gfc_conv_procedure_call): Special handling
475         for _copy() routine translation, that comes without an
476         interface. Third and fourth argument are now passed by value.
477         * trans-stmt.c (gfc_trans_allocate): Get expr3 array
478         descriptor for temporary arrays to allow allocate(array,
479         source = array_expression) for array without array
480         specification.
482 2015-06-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
484         * intrinsic.texi:  Change \leq to < in descrition of imaginary
485         part in argument to log.
487 2015-06-11  Paul Thomas  <pault@gcc.gnu.org>
489         PR fortran/66079
490         * trans-expr.c (gfc_conv_procedure_call): Allocatable scalar
491         function results must be freed and nullified after use. Create
492         a temporary to hold the result to prevent duplicate calls.
493         * trans-stmt.c (gfc_trans_allocate): Rename temporary variable
494         as 'source'. Deallocate allocatable components of non-variable
495         'source's.
497 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
499         * f95-lang.c (gfc_create_decls): Register the main translation unit
500         through the new debug hook.
502 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
504         * convert.c : Adjust include files.
505         * cpp.c : Likewise.
506         * decl.c : Likewise.
507         * f95-lang.c : Likewise.
508         * gfortran.h : Likewise.
509         * iresolve.c : Likewise.
510         * match.c : Likewise.
511         * module.c : Likewise.
512         * openmp.c : Likewise.
513         * options.c : Likewise.
514         * target-memory.c : Likewise.
515         * trans-array.c : Likewise.
516         * trans-common.c : Likewise.
517         * trans-const.c : Likewise.
518         * trans-decl.c : Likewise.
519         * trans-expr.c : Likewise.
520         * trans-intrinsic.c : Likewise.
521         * trans-io.c : Likewise.
522         * trans-openmp.c : Likewise.
523         * trans-stmt.c : Likewise.
524         * trans-types.c : Likewise.
525         * trans.c : Likewise.
527 2015-06-08  Steven G. Kargl  <kargl@gcc.gnu.org>
529         PR fortran/66245
530         * match.c (gfc_match_type_is, gfc_match_class_is):  Check if the
531         return type spec or derived type spec is validate.
533 2015-06-06  Thomas Koenig  <tkoenig@netcologne.de>
535         PR fortran/47659
536         * arith.c (eval_intrinsic_op): Set warn flag for
537         gfc_type_convert_binary if -Wconversion or -Wconversion-extra
538         are set.
539         (wprecision_real_real): New function.
540         (wprecision_int_real): New function.
541         (gfc_int2int): If -fno-range-check and -Wconversion are specified
542         and it is a narrowing conversion, warn.
543         (gfc_int2real): If there is a change in value for the conversion,
544         warn.
545         (gfc_int2complex):  Likewise.
546         (gfc_real2int): If there is a fractional part to the real number,
547         warn with -Wconversion, otherwise warn with -Wconversion-extra.
548         (gfc_real2real): Emit warning if the constant was changed by
549         conversion with either -Wconversion or -Wconversion-extra.  With
550         -Wconversion-extra, warn if no warning was issued earlier.
551         (gfc_real2complex):  Likewise.
552         (gfc_complex2int): For -Wconversion or -Wconversion-extra, if
553         there was an imaginary part, warn; otherwise, warn for change in
554         value.  Warn with -Wconversion-extra if no other warning was
555         issued.
556         (gfc_complex2real): For -Wconversion or -Wconversion-extra, if
557         there was an imaginary part, warn; otherwise, warn for change in
558         value. Warn with -Wconversion-extra if no other warning was
559         issued.
560         (gfc_complex2complex):  For -Wconversion, warn if the value of
561         either the real or the imaginary part was changed.  Warn for
562         -Wconversion-extra if no prior warning was issued.
563         * expr.c (gfc_check_assign):  Remove check for change in value.
564         * primary.c (match_real_constant): For -Wconversion-extra, check
565         against a number in which the last non-zero digit has been
566         replaced with a zero.  If the number compares equal, warn.
567         * intrinsic.c (gfc_convert_type_warn):  Do not warn about constant
568         conversions.
570 2015-06-05  Steven G. Kargl  <kargl@gcc.gnu.org>
572         PR fortran/66347
573         * resolve.c (apply_default_init_local): Do not dereference a NULL
574         pointer.
576 2015-06-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
578         PR fortran/66385
579         * frontend-passes.c (combine_array_constructor): Return early if
580         inside a FORALL loop.
582 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
584         * f95-lang.c (gfc_write_global_declarations): Remove.
585         (LANG_HOOKS_WRITE_GLOBALS): Remove.
586         (gfc_write_global_declarations): Move code from here to...
587         (gfc_be_parse_file): ...here.
588         Call global_decl_processing.
589         * trans-decl.c (gfc_emit_parameter_debug_info): Rename global_decl
590         to early_global_decl.
592 2015-06-05  Russell Whitesides  <russelldub@gmail.com>
593             Steven G. Kargl  <kargl@gcc.gnu.org>
595         PR fortran/40958
596         PR fortran/60780
597         PR fortran/66377
598         * module.c (load_equiv): Add check for loading duplicate EQUIVALENCEs
599         from different modules.  Eliminate the pruning of unused
600         equivalence-objects
602 2015-06-04  Thomas Koenig  <tkoenig@netcologne.de>
604         PR fortran/58749
605         * iresolve.c (gfc_resolve_adjustl):  If string has a charlen,
606         copy it to the function.
607         (gfc_resolve_adjustr):  Likewise.
609 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
611         * convert.c: Adjust includes for restructured coretypes.h.
612         * cpp.c: Likewise.
613         * decl.c: Likewise.
614         * f95-lang.c: Likewise.
615         * iresolve.c: Likewise.
616         * match.c: Likewise.
617         * module.c: Likewise.
618         * options.c: Likewise.
619         * target-memory.c: Likewise.
620         * trans-array.c: Likewise.
621         * trans-common.c: Likewise.
622         * trans-const.c: Likewise.
623         * trans-decl.c: Likewise.
624         * trans-expr.c: Likewise.
625         * trans-intrinsic.c: Likewise.
626         * trans-io.c: Likewise.
627         * trans-openmp.c: Likewise.
628         * trans-stmt.c: Likewise.
629         * trans-types.c: Likewise.
630         * trans.c: Likewise.
632 2015-06-02  Steven G. Kargl  <kargl@gcc.gnu.org>
634         PR fortran/66380
635         * simplify.c (gfc_simplify_reshape): Convert assert into returning
636         NULL, which triggers an error condition.
638 2015-05-27  Andre Vehreschild  <vehre@gmx.de>
640         PR fortran/65548
641         * trans-stmt.c (gfc_trans_allocate): Add missing location
642         information for e3rhs.
644 2015-05-26  Paul Thomas  <pault@gcc.gnu.org>
646         PR fortran/66082
647         * trans-array.c (gfc_conv_array_parameter): Ensure that all
648         non-variable arrays with allocatable components have the
649         components deallocated after the procedure call.
651 2015-05-24  Mikael Morin  <mikael@gcc.gnu.org>
653         PR fortran/66257
654         * resolve.c (resolve_actual_arglist): Don't throw an error
655         if the argument with procedure pointer component is not a variable.
657 2015-05-24  Manuel López-Ibáñez  <manu@gcc.gnu.org>
659         PR fortran/44054
660         * gfortran.h (struct gfc_error_buf): Rename as
661         gfc_error_buffer. Move closer to push, pop and free
662         methods. Reimplement using an output_buffer.
663         * error.c (errors, warnings, warning_buffer, cur_error_buffer):
664         Delete everywhere in this file.
665         (error_char): Delete all contents.
666         (gfc_increment_error_count): Delete.
667         (gfc_error_now): Update comment. Set error_buffer.flag.
668         (gfc_warning_check): Do not handle warning_buffer.
669         (gfc_error_1): Delete.
670         (gfc_error_now_1): Delete.
671         (gfc_error_check): Simplify.
672         (gfc_move_error_buffer_from_to): Renamed from
673         gfc_move_output_buffer_from_to.
674         (gfc_push_error): Handle only gfc_error_buffer.
675         (gfc_pop_error): Likewise.
676         (gfc_free_error): Likewise.
677         (gfc_get_errors): Remove warnings and errors.
678         (gfc_diagnostics_init): Use static error_buffer.
679         (gfc_error_1,gfc_error_now_1): Delete declarations.
680         * symbol.c, decl.c, trans-common.c, data.c, expr.c, expr.c,
681         frontend-passes.c, resolve.c, match.c, parse.c: Replace
682         gfc_error_1 with gfc_error and gfc_error_now_1 with gfc_error_1
683         everywhere.
684         * f95-lang.c (gfc_be_parse_file): Do not update errorcount and
685         warningcount here.
686         * primary.c (match_complex_constant): Replace gfc_error_buf and
687         output_buffer with gfc_error_buffer.
689 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
691         * Make-lang.in (check_gfortran_parallelize): Update comment.
693 2015-05-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
695         PR fortran/66176
696         * frontend-passes.c (check_conjg_variable):  New function.
697         (inline_matmul_assign):  Use it to keep track of conjugated
698         variables.
700 2015-05-20  Andre Vehreschild  <vehre@gmx.de>
702         PR fortran/65548
703         * trans-stmt.c (gfc_trans_allocate): Always retrieve the
704         descriptor or a reference to a source= expression for
705         arrays and non-arrays, respectively.  Use a temporary
706         symbol and gfc_trans_assignment for all source=
707         assignments to allocated objects besides for class and
708         derived types.
710 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
712         PR middle-end/66199
713         * trans-openmp.c (gfc_trans_omp_teams): Set OMP_TEAMS_COMBINED for
714         combined constructs.
715         (gfc_trans_omp_target): Make sure BIND_EXPR has non-NULL
716         BIND_EXPR_BLOCK.
718 2015-05-19  David Malcolm  <dmalcolm@redhat.com>
720         * cpp.c (maybe_print_line): Strengthen local "map" from
721         const line_map * to const line_map_ordinary *.
722         (cb_file_change): Likewise for param "map" and local "from".
723         (cb_line_change): Likewise for local "map".
725 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
727         * interface.c (compare_actual_formal): Use std::swap instead of
728         explicit swaps.
729         * trans-array.c (gfc_trans_scalarized_loop_end): Likewise.
730         * trans-intrinsic.c (walk_inline_intrinsic_transpose): Likewise.
732 2015-05-18  Steven G. Kargl  <kargl@gcc.gnu.org>
734         PR fortran/66106
735         * interface.c(gfc_match_end_interface): Enforce F2008 C1202 (R1201).
736         * match.c(gfc_op2string): Return 'none' for INTRINSIC_NONE.
738 2015-05-18  Steven G. Kargl  <kargl@gcc.gnu.org>
740         PR fortran/66057
741         * decl.c(gfc_match_generic):  Detected a malformed GENERIC statement.
743 2015-05-18  Steven G. Kargl  <kargl@gcc.gnu.org>
745         PR fortran/66043
746         * gfortran.dg/storage_size_6.f90: New tests.
748 2015-05-18  Steven G. Kargl  <kargl@gcc.gnu.org>
750         PR fortran/66043
751         * gfortran.dg/storage_size_6.f90: New tests.
753 2015-05-18  Steven G. Kargl  <kargl@gcc.gnu.org>
755         PR fortran/66044
756         * decl.c(gfc_match_entry):  Change a gfc_internal_error() into
757         a gfc_error()
759 2015-05-18  Steven G. Kargl  <kargl@gcc.gnu.org>
761         PR fortran/66043
762         * gfortran.dg/storage_size_6.f90: New tests.
764 2015-05-18  Steven G. Kargl  <kargl@gcc.gnu.org>
766         PR fortran/66040
767         * parse.c(verify_st_order): Replace a gfc_internal_error with your
768         generic gfc_error.
770 2015-05-18  Steven G. Kargl  <kargl@gcc.gnu.org>
772         PR fortran/66039
773         * io.c (match_filepos): Check for incomplete/mangled REWIND, FLUSH,
774         BACKSPACE, and ENDFILE statements
776 2015-05-18  Steven G. Kargl  <kargl@gcc.gnu.org>
778         PR fortran/64925
779         * symbol.c(check_conflict):  Check for a conflict between a dummy
780         argument and an internal procedure name.
782 2015-05-16  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
784         PR fortran/65903
785         * io.c (format_lex): Change to NONSTRING when checking for
786         possible doubled quote.
787         * scanner.c (gfc_next_char_literal): Revert change from 64506
788         and add a check for quotes and return.
790 2015-05-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
792         PR fortran/66113
793         * expr.c (is_parent_of_current_ns):  New function.
794         (check_restricted):  Use it.
796 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
798         PR fortran/44054
800         Replace all calls to gfc_notify_std_1 with gfc_notify_std and
801         gfc_warning_1 with gfc_warning.
802         * decl.c (gfc_verify_c_interop_param): Here.
803         * resolve.c (resolve_branch): Here.
804         (resolve_fl_derived): Here.
805         * dependency.c (gfc_check_argument_var_dependency):
806         * scanner.c (preprocessor_line): Use gfc_warning_now_at. Fix line
807         counter and locations before and after warning.
808         * gfortran.h (gfc_warning_1, gfc_warning_now_1, gfc_notify_std_1):
809         Delete.
810         (gfc_warning_now_at): Declare.
811         * error.c (gfc_warning_1): Delete.
812         (gfc_notify_std_1): Delete.
813         (gfc_warning_now_1): Delete.
814         (gfc_format_decoder): Handle two locations.
815         (gfc_diagnostic_build_prefix): Rename as
816         gfc_diagnostic_build_kind_prefix.
817         (gfc_diagnostic_build_locus_prefix): Take an expanded_location
818         instead of diagnostic_info.
819         (gfc_diagnostic_build_locus_prefix): Add overload that takes two
820         expanded_location.
821         (gfc_diagnostic_starter): Handle two locations.
822         (gfc_warning_now_at): New.
823         (gfc_diagnostics_init): Initialize caret_chars array.
824         (gfc_diagnostics_finish): Reset caret_chars array to default.
826 2015-05-16  Mikael Morin  <mikael@gcc.gnu.org>
827             Paul Thomas  <pault@gcc.gnu.org>
829         PR fortran/65792
830         * trans-expr.c (gfc_trans_subcomponent_assign): Always assign
831         the expression component to the destination. In addition, if
832         the component has allocatable components, copy them and
833         deallocate those of the expression, if it is not a variable.
834         The expression is fixed if not a variable to prevent multiple
835         evaluations.
837 2015-05-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
839         PR fortran/66111
840         * frontend-passes.c (has_dimen_vector_ref):  New function.
841         (inline_matmul_assign):  Use it to return early in case
842         of unhandled vector subscripts.
844 2015-05-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
846         PR fortran/66041
847         PR fortran/37131
848         * gfortran.h (gfc_array_spec):  Add field resolved.
849         * array.c (gfc_resolve_array_spec):  Resolve array spec
850         only once.
852 2015-05-11  Mikael Morin  <mikael@gcc.gnu.org>
854         PR fortran/66100
855         * simplify.c (simplify_bound): Fix assert to accept subobject arrays.
857 2015-05-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
859         PR fortran/66041
860         * frontend-passes.c (scalarized_expr): Set correct dimension and
861         shape for the expression to be passed to lbound. Remove trailing
862         references after array refrence.
863         (inline_matmul_assign):  Remove gfc_copy_expr from calls
864         to scalarized_expr().
866 2015-05-10  Mikael Morin  <mikael@gcc.gnu.org>
868         * simplify.c (simplify_bound_dim): Don't check for emptyness
869         in the case of cobound simplification.  Factor lower/upper
870         bound differenciation before the actual simplification.
871         (simplify_bound): Remove assumed shape specific simplification.
872         Don't give up early for the lbound of an assumed shape.
874 2015-05-09  Mikael Morin  <mikael@gcc.gnu.org>
876         PR fortran/65894
877         * trans-array.h (gfc_scalar_elemental_arg_saved_as_reference):
878         New prototype.
879         * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
880         New function.
881         (gfc_add_loop_ss_code): Use gfc_scalar_elemental_arg_saved_as_reference
882         as conditional.
883         (gfc_walk_elemental_function_args): Set the dummy_arg field.
884         * trans.h (gfc_ss_info): New subfield dummy_arg.
885         * trans-expr.c (gfc_conv_procedure_call): Revert the change
886         of revision 222361.
887         (gfc_conv_expr): Use gfc_scalar_elemental_arg_saved_as_reference
888         as conditional.
890 2015-05-08  Mikael Morin  <mikael@gcc.gnu.org>
892         * trans-array.c (gfc_walk_elemental_function_args):
893         Don't skip the advance to the next dummy argument when skipping
894         absent optional args.
896 2015-05-05  David Malcolm  <dmalcolm@redhat.com>
898         * expr.c (check_inquiry): Fix indentation so that it reflects the
899         block structure.
900         * interface.c (compare_parameter): Likewise.
901         * parse.c (parse_oacc_structured_block): Likewise.
902         * target-memory.c (expr_to_char): Likewise.
903         * trans-types.c (gfc_init_kinds): Likewise.
905 2015-05-02  Steven G. Kargl  <kargl@gcc.gnu.org>
907         PR fortran/65976
908         * invoke.texi:  Remove 'no-' in '-fno-fixed-form'
910 2015-05-01  Mikael Morin  <mikael@gcc.gnu.org>
912         * simplify.c (simplify_bound_dim): Tighten the check for array fullness
913         by also checking for absence of subreference.
914         (simplify_bound): Don't skip simplification if the array
915         has subreferences.
916         (simplify_cobound): Same.
918 2015-04-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
920         PR fortran/37131
921         * simplify.c (simplify_bound): Get constant lower bounds of one
922         from array spec for assumed and explicit shape shape arrays if
923         the lower bounds are indeed one.
925 2015-04-30  David Malcolm  <dmalcolm@redhat.com>
927         * options.c (gfc_init_options): Remove spurious second
928         semicolon.
929         * trans-stmt.c (gfc_trans_allocate): Likewise.
931 2015-04-28  Andre Vehreschild  <vehre@gmx.de>
933         * interface.c (gfc_compare_types): Check for unlimited
934         polymorphism flag in the correct position indepent of the _data
935         component being present or not.  This prevents a segfault, when
936         the _data component is not present.
937         * symbol.c (gfc_type_compatible): Same.
939 2015-04-27  Jim Wilson  <jim.wilson@linaro.org>
941         * Make-lang.in (fortran.mostlyclean): Remove gfortran and
942         gfortran-cross.
944 2015-04-27  Andre Vehreschild  <vehre@gmx.de>
946         PR fortran/59678
947         PR fortran/65841
948         * trans-array.c (duplicate_allocatable): Fixed deep copy of
949         allocatable components, which are liable for copy only, when
950         they are allocated.
951         (gfc_duplicate_allocatable): Add deep-copy code into if
952         component allocated block. Needed interface change for that.
953         (gfc_copy_allocatable_data): Supplying NULL_TREE for code to
954         add into if-block for checking whether a component was
955         allocated.
956         (gfc_duplicate_allocatable_nocopy): Likewise.
957         (structure_alloc_comps): Likewise.
958         * trans-array.h: Likewise.
959         * trans-expr.c (gfc_trans_alloc_subarray_assign): Likewise.
960         * trans-openmp.c (gfc_walk_alloc_comps): Likewise.
962 2015-04-23  Andre Vehreschild  <vehre@gmx.de>
964         PR fortran/60322
965         * expr.c (gfc_lval_expr_from_sym): Code to select the regular
966         or class array added.
967         * gfortran.h: Add IS_CLASS_ARRAY macro.
968         * trans-array.c (gfc_add_loop_ss_code): Treat class objects
969         to be referenced always.
970         (build_class_array_ref): Adapt retrieval of array descriptor.
971         (build_array_ref): Likewise.
972         (gfc_conv_array_ref): Hand the vptr or the descriptor to
973         build_array_ref depending whether the sym is class or not.
974         (gfc_trans_array_cobounds):  Select correct gfc_array_spec for
975         regular and class arrays.
976         (gfc_trans_array_bounds): Likewise.
977         (gfc_trans_dummy_array_bias): Likewise.
978         (gfc_get_dataptr_offset): Correcting call of build_array_ref.
979         (gfc_conv_expr_descriptor): Set the array's offset to -1 when
980         lbound in inner most dim is 1 and symbol non-pointer/assoc.
981         * trans-decl.c (gfc_build_qualified_array): Select correct
982         gfc_array_spec for regular and class arrays.
983         (gfc_build_dummy_array_decl): Likewise.
984         (gfc_get_symbol_decl): Get a dummy array for class arrays.
985         (gfc_trans_deferred_vars): Tell conv_expr that the descriptor
986         is desired.
987         * trans-expr.c (gfc_class_vptr_get): Get the class descriptor
988         from the correct location for class arrays.
989         (gfc_class_len_get): Likewise.
990         (gfc_conv_intrinsic_to_class): Add handling of _len component.
991         (gfc_conv_class_to_class):  Prevent access to unset array data
992         when the array is an optional argument. Add handling of _len
993         component.
994         (gfc_copy_class_to_class): Check that _def_init is non-NULL
995         when used in _vptr->copy()
996         (gfc_trans_class_init_assign): Ensure that the rank of
997         _def_init is zero.
998         (gfc_conv_component_ref): Get the _vptr along with _data refs.
999         (gfc_conv_variable): Make sure the temp array descriptor is
1000         returned for class arrays, too, and that class arrays are
1001         dereferenced correctly.
1002         (gfc_conv_procedure_call): For polymorphic type initialization
1003         the initializer has to be a pointer to _def_init stored in a
1004         dummy variable, which then needs to be used by value.
1005         * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Use the
1006         temporary array descriptor for class arrays, too.
1007         (gfc_conv_intrinsic_storage_size): Likewise.
1008         (gfc_conv_intrinsic_loc): Add ref to _data for BT_CLASS
1009         expressions.
1010         * trans-stmt.c (trans_associate_var): Use a temporary array for
1011         the associate variable of class arrays, too, making the array
1012         one-based (lbound == 1).
1013         * trans-types.c (gfc_is_nodesc_array): Use the correct
1014         array data.
1015         * trans.c (gfc_build_array_ref): Use the dummy array descriptor
1016         when present.
1017         * trans.h: Add class_vptr to gfc_se for storing a class ref's
1018         vptr.
1020 2015-04-22  Steven G. Kargl  <kargl@gcc.gnu.org>
1022         PR fortran/65429
1023         * decl.c (add_init_expr_to_sym): Set the length type parameter.
1025 2015-04-10  Tobias Burnus  <burnus@net-b.de>
1027         * trans-stmt.c (gfc_trans_lock_unlock): Implement -fcoarray=lib
1028         version; reject not-yet-implemented variants.
1029         * trans-types.c (gfc_get_derived_type): For lock_type with
1030         -fcoarray=lib, use a void pointer as type.
1031         * trans.c (gfc_allocate_using_lib, gfc_allocate_allocatable):
1032         Handle lock_type with -fcoarray=lib.
1034 2015-04-10  Mikael Morin  <mikael@gcc.gnu.org>
1036         PR fortran/56674
1037         PR fortran/58813
1038         PR fortran/59016
1039         PR fortran/59024
1040         * symbol.c (save_symbol_data, gfc_save_symbol_data): Rename the
1041         former to the latter and make it non-static.  Update callers.
1042         * gfortran.h (gfc_save_symbol_data): New prototype.
1043         * decl.c (gfc_match_decl_type_spec): Call 'gfc_save_symbol_data'
1044         before modifying symbols 'sym' and 'dt_sym'.
1046 2013-04-09  Paul Thomas  <pault@gcc.gnu.org>
1048         PR fortran/56852
1049         * primary.c (gfc_variable_attr): Avoid ICE on AR_UNKNOWN if any
1050         of the index variables are untyped and errors are present.
1052 2015-04-07  Andre Vehreschild  <vehre@gmx.de>
1054         PR fortran/65548
1055         * trans-stmt.c (gfc_trans_allocate): For intrinsic functions
1056         use conv_expr_descriptor() instead of conv_expr_reference().
1058 2015-03-30  Jakub Jelinek  <jakub@redhat.com>
1060         PR fortran/65597
1061         * trans-openmp.c (gfc_trans_omp_do): For !simple simd with explicit
1062         linear clause for the iterator set OMP_CLAUSE_LINEAR_NO_COPYIN.
1063         For implcitly added !simple OMP_CLAUSE_LINEAR set it too.  Use step 1
1064         instead of the original step on the new iterator - count.
1066 2015-03-25  Mikael Morin  <mikael@gcc.gnu.org>
1068         PR fortran/64952
1069         PR fortran/65532
1070         * gfortran.h (struct gfc_namespace): New field 'types_resolved'.
1071         * resolve.c (resolve_types): Return early if field 'types_resolved'
1072         is set.  Set 'types_resolved' at the end.
1074 2015-03-24  Andre Vehreschild  <vehre@gmx.de>
1076         PR fortran/55901
1077         * trans-expr.c (gfc_conv_structure): Fixed indendation.
1078         Using integer_zero_node now instead of explicitly
1079         constructing a integer constant zero node.
1080         (gfc_conv_derived_to_class): Add handling of _len component,
1081         i.e., when the rhs has a string_length then assign that to
1082         class' _len, else assign 0.
1083         (gfc_conv_intrinsic_to_class): Likewise.
1085 2015-03-24  Andre Vehreschild  <vehre@gmx.de>
1087         PR fortran/64787
1088         PR fortran/57456
1089         PR fortran/63230
1090         * class.c (gfc_add_component_ref):  Free no longer needed
1091         ref-chains to prevent memory loss.
1092         (find_intrinsic_vtab): For deferred length char arrays or
1093         unlimited polymorphic objects, store the size in bytes of one
1094         character in the size component of the vtab.
1095         * gfortran.h: Added gfc_add_len_component () define.
1096         * trans-array.c (gfc_trans_create_temp_array): Switched to new
1097         function name for getting a class' vtab's field.
1098         (build_class_array_ref): Likewise.
1099         (gfc_array_init_size): Using the size information from allocate
1100         more consequently now, i.e., the typespec of the entity to
1101         allocate is no longer needed.  This is to address the last open
1102         comment in PR fortran/57456.
1103         (gfc_array_allocate): Likewise.
1104         (structure_alloc_comps): gfc_copy_class_to_class () needs to
1105         know whether the class is unlimited polymorphic.
1106         * trans-array.h: Changed interface of gfc_array_allocate () to
1107         reflect the no longer needed typespec.
1108         * trans-expr.c (gfc_find_and_cut_at_last_class_ref): New.
1109         (gfc_reset_len): New.
1110         (gfc_get_class_array_ref): Switch to new function name for
1111         getting a class' vtab's field.
1112         (gfc_copy_class_to_class):  Added flag to know whether the class
1113         to copy is unlimited polymorphic.  Adding _len dependent code
1114         then, which calls ->vptr->copy () with four arguments adding
1115         the length information ->vptr->copy(from, to, from_len, to_cap).
1116         (gfc_conv_procedure_call): Switch to new function name for
1117         getting a class' vtab's field.
1118         (alloc_scalar_allocatable_for_assignment): Use the string_length
1119         as computed by gfc_conv_expr and not the statically backend_decl
1120         which may be incorrect when ref-ing.
1121         (gfc_trans_assignment_1): Use the string_length variable and
1122         not the rse.string_length.  The former has been computed more
1123         generally.
1124         * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Switch to new
1125         function name for getting a class' vtab's field.
1126         (gfc_conv_intrinsic_storage_size): Likewise.
1127         (gfc_conv_intrinsic_transfer): Likewise.
1128         * trans-stmt.c (gfc_trans_allocate): Restructured to evaluate
1129         source=expr3 only once before the loop over the objects to
1130         allocate, when the objects are not arrays. Doing correct _len
1131         initialization and calling of vptr->copy () fixing PR 64787.
1132         (gfc_trans_deallocate): Reseting _len to 0, preventing future
1133         errors.
1134         * trans.c (gfc_build_array_ref): Switch to new function name
1135         for getting a class' vtab's field.
1136         (gfc_add_comp_finalizer_call): Likewise.
1137         * trans.h: Define the prototypes for the gfc_class_vtab_*_get ()
1138         and gfc_vptr_*_get () functions.
1139         Added gfc_find_and_cut_at_last_class_ref () and
1140         gfc_reset_len () routine prototype.  Added flag to
1141         gfc_copy_class_to_class () prototype to signal an unlimited
1142         polymorphic entity to copy.
1144 2015-03-24  Iain Sandoe  <iain@codesourcery.com>
1145             Tobias Burnus  <burnus@net-b.de>
1147         * gfortran.texi (_gfortran_caf_sync_memory): Improve wording.
1149 2015-03-23  Paul Thomas  <pault@gcc.gnu.org>
1150             Mikael Morin  <mikael@gcc.gnu.org>
1152         PR fortran/64952
1153         * gfortran.h (struct symbol_attribute) : New field
1154         'array_outer_dependency'.
1155         * trans.h (struct gfc_ss_info): New field 'array_outer_dependency'.
1156         * module.c (enum ab_attribute): New value AB_ARRAY_OUTER_DEPENDENCY.
1157         (attr_bits): Append same value to initializer.
1158         (mio_symbol_attribute): Handle 'array_outer_dependency' attr
1159         in module read and write.
1160         * resolve.c (update_current_proc_outer_array_dependency): New function.
1161         (resolve_function, resolve_call): Add code to update current procedure's
1162         'array_outer_dependency' attribute.
1163         (resolve_variable): Mark current procedure with attribute
1164         array_outer_dependency if the variable is an array coming from outside
1165         the current namespace.
1166         (resolve_fl_procedure): Mark a procedure without body with attribute
1167         'array_outer_dependency'.
1168         * trans-array.c (gfc_conv_resolve_dependencies): If any ss is
1169         marked as 'array_outer_dependency' generate a temporary.
1170         (gfc_walk_function_expr): If the function may reference external arrays,
1171         mark the head gfc_ss with flag 'array_outer_dependency'.
1173 2015-03-22 Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1175         PR libgfortran/59513
1176         * gfortran.texi (Read/Write after EOF marker): New information.
1178 2015-03-21  H.J. Lu  <hongjiu.lu@intel.com>
1180         * gfortran.texi (_gfortran_caf_sync_memory): Put @{xxx} in one
1181         line.
1183 2015-03-21  Tobias Burnus  <burnus@net-b.de>
1185         * gfortran.texi (_gfortran_caf_sync_all, _gfortran_caf_sync_images,
1186         _gfortran_caf_sync_memory, _gfortran_caf_error_stop,
1187         _gfortran_caf_error_stop_str, _gfortran_caf_atomic_define,
1188         _gfortran_caf_atomic_ref, _gfortran_caf_atomic_cas,
1189         _gfortran_caf_atomic_op): New sections.
1191 2015-03-21  Tobias Burnus  <burnus@net-b.de>
1193         * trans-expr.c (gfc_get_tree_for_caf_expr): Reject unimplemented
1194         coindexed coarray accesses.
1196 2015-03-17  Paul Thomas  <pault@gcc.gnu.org>
1198         PR fortran/59198
1199         * trans-types.c (gfc_get_derived_type): If an abstract derived
1200         type with procedure pointer components has no other type of
1201         component, return the backend_decl. Otherwise build the
1202         components if any of the non-procedure pointer components have
1203         no backend_decl.
1205 2015-03-16  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1207         PR fortran/64432
1208         *trans-intrinisic.c (conv_intrinsic_system_clock): Check the
1209         smallest kind passed in user arguments and hardcode tesults for
1210         KIND=1 or KIND=2 to indicate no clock available.
1212 2015-03-16  Andre Vehreschild  <vehre@gmx.de>
1214         * resolve.c: Prevent segfault on illegal input.
1216 2015-03-14  Mikael Morin  <mikael@gcc.gnu.org>
1218         PR fortran/61138
1219         * trans-expr.c (gfc_trans_pointer_assignment): Clear DESCRIPTOR_ONLY
1220         field before reusing LSE.
1222 2015-03-11  Janne Blomqvist  <jb@gcc.gnu.org>
1224         PR libfortran/65200
1225         * gfortran.texi: Document behavior when opening files without
1226         explicit ACTION= specifier.
1228 2015-03-10  Paul Thomas  <pault@gcc.gnu.org>
1230         PR fortran/65024
1231         * trans-expr.c (gfc_conv_component_ref): If the component
1232         backend declaration is missing and the derived type symbol is
1233         available in the reference, call gfc_build_derived_type.
1235 2015-03-10  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
1236             Tobias Burnus  <burnus@net-b.de>
1238         * trans.h (caf_sync_memory): New function decl tree.
1239         * trans-decl.c (gfc_build_builtin_function_decls): Define it.
1240         (create_main_function): Don't call sync_synchronize and leave
1241         it to the CAF library.
1242         * trans-stmt.c (gfc_trans_stop): Ditto.
1243         (gfc_trans_sync): Ditto; add call library call for sync memory.
1245 2015-03-08  Mikael Morin  <mikael@gcc.gnu.org>
1247         PR fortran/60898
1248         * resolve.c (resolve_symbol): Check that the symbol found by
1249         name lookup really is the current symbol being resolved.
1251 2015-03-02  Tobias Burnus  <burnus@net-b.de>
1253         * check.c (gfc_check_atomic): Properly check for coarrayness
1254         and for being coindexed.
1256 2015-02-26  Martin Liska  <mliska@suse.cz>
1258         * resolve.c: Rename enum 'comparison' to 'compare_result' as
1259         solution for -Wodr issue.
1261 2015-02-24  Thomas Schwinge  <thomas@codesourcery.com>
1263         PR libgomp/64625
1264         * f95-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1265         Remove macros.
1266         (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1267         * types.def (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
1268         (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
1269         Remove function types.
1270         (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR)
1271         (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_INT_INT_VAR)
1272         (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
1273         New function types.
1275 2015-02-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1277         PR fortran/64980
1278         PR fortran/61960
1279         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Remove mapping
1280         for component references to class objects.
1281         (gfc_conv_procedure_call): Compare the class by name.
1283 2015-02-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1285         PR fortran/64506
1286         * scanner.c (gfc_next_char_literal): For free form source,
1287         check for '!' and if found, clear the comment and go back
1288         and get the next character. For fixed form source, skip the
1289         rest of the line.
1291 2015-02-12  Paul Thomas  <pault@gcc.gnu.org>
1293         PR fortran/64932
1294         * trans-stmt.c (gfc_trans_deallocate): If a component array
1295         expression is not a descriptor type and it is a derived type
1296         that has allocatable components and is not finalizable, then
1297         deallocate the allocatable components.
1299 2015-02-08  Mikael Morin  <mikael@gcc.gnu.org>
1301         PR fortran/63744
1302         * module.c (check_for_ambiguous): Change argument type
1303         from gfc_symbol to gfc_symtree.  Check local (symtree) name
1304         instead of original (symbol) name.
1305         (read_module): Update caller.
1307 2015-02-06  Paul Thomas  <pault@gcc.gnu.org>
1309         PR fortran/63205
1310         * gfortran.h: Add 'must finalize' field to gfc_expr and
1311         prototypes for gfc_is_alloc_class_scalar_function and for
1312         gfc_is_alloc_class_array_function.
1313         * expr.c (gfc_is_alloc_class_scalar_function,
1314         gfc_is_alloc_class_array_function): New functions.
1315         * trans-array.c (gfc_add_loop_ss_code): Do not move the
1316         expression for allocatable class scalar functions outside the
1317         loop.
1318         (conv_array_index_offset): Cope with deltas being NULL_TREE.
1319         (build_class_array_ref): Do not return with allocatable class
1320         array functions. Add code to pick out the returned class array.
1321         Dereference if necessary and return if not a class object.
1322         (gfc_conv_scalarized_array_ref): Cope with offsets being NULL.
1323         (gfc_walk_function_expr): Return an array ss for the result of
1324         an allocatable class array function.
1325         * trans-expr.c (gfc_conv_subref_array_arg): Remove the assert
1326         that the argument should be a variable. If an allocatable class
1327         array function, set the offset to zero and skip the write-out
1328         loop in this case.
1329         (gfc_conv_procedure_call): Add allocatable class array function
1330         to the assert. Call gfc_conv_subref_array_arg for allocatable
1331         class array function arguments with derived type formal arg..
1332         Add the code for handling allocatable class functions, including
1333         finalization calls to prevent memory leaks.
1334         (arrayfunc_assign_needs_temporary): Return if an allocatable
1335         class array function.
1336         (gfc_trans_assignment_1): Set must_finalize to rhs expression
1337         for allocatable class functions. Set scalar_to_array as needed
1338         for scalar class allocatable functions assigned to an array.
1339         Nullify the allocatable components corresponding the the lhs
1340         derived type so that the finalization does not free them.
1342 2015-01-29  Andre Vehreschild  <vehre@gmx.de>
1343             Janus Weil  <janus@gcc.gnu.org>
1345         PR fortran/60289
1346         Initial patch by Janus Weil
1347         * resolve.c (resolve_allocate_expr): Add check for comp. only
1348         when target is not unlimited polymorphic.
1349         * trans-stmt.c (gfc_trans_allocate): Assign correct value to
1350         _len component of unlimited polymorphic entities.
1352 2015-02-05  Tobias Burnus  <burnus@net-b.de>
1354         PR fortran/64943
1355         * resolve.c (resolve_transfer): Also check structure
1356         constructors.
1358 2015-02-05  Paul Thomas  <pault@gcc.gnu.org>
1360         PR fortran/64757
1361         * resolve.c (resolve_structure_cons): Obtain the rank of class
1362         components.
1363         * trans-expr.c (gfc_trans_alloc_subarray_assign): Do the
1364         assignment to allocatable class array components.
1365         (alloc_scalar_allocatable_for_subcomponent_assignment): If comp
1366         is a class component, allocate to the _data field.
1367         (gfc_trans_subcomponent_assign): If a class component with a
1368         derived type expression set the _vptr field and for array
1369         components, call gfc_trans_alloc_subarray_assign. For scalars,
1370         the assignment is performed here.
1372 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
1374         * options.c: Include langhooks.h.
1375         (gfc_post_options): Change lang_hooks.name based on
1376         selected -std= mode.
1378 2015-02-03  Steven G. Kargl  <kargl@gcc.gnu.org>
1380         * intrinsic.texi (CO_ASSOCIATED): c_prt_1 should be c_ptr_1.
1382 2015-01-30  Andre Vehreschild  <vehre@gmx.de>
1384         * trans-decl.c (gfc_get_symbol_decl): Removed duplicate code.
1385         * trans-expr.c (gfc_conv_intrinsic_to_class): Fixed indentation.
1386         Fixed datatype of charlen to be a 32-bit int.
1388 2015-02-01  Joseph Myers  <joseph@codesourcery.com>
1390         * error.c (gfc_warning (const char *, ...), gfc_warning_now (const
1391         char *, ...)): Remove functions.
1392         * gfortran.h (gfc_warning (const char *, ...), gfc_warning_now
1393         (const char *, ...)): Remove declarations.
1394         * arith.c, check.c, data.c, decl.c, frontend-passes.c,
1395         interface.c, intrinsic.c, io.c, matchexp.c, module.c, openmp.c,
1396         options.c, parse.c, primary.c, resolve.c, scanner.c, symbol.c,
1397         trans-common.c, trans-const.c, trans-stmt.c: All callers of
1398         gfc_warning and gfc_warning_now changed to pass 0 or option number
1399         as first argument.
1401 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
1403         * f95-lang.c, gfortranspec.c, trans-const.c, trans-expr.c: All
1404         callers of fatal_error changed to pass input_location as first
1405         argument.
1407 2015-01-28  Tobias Burnus  <burnus@net-b.de>
1409         * intrinsic.texi (CO_BROADCAST): Correct argument description.
1411 2015-01-27  Tobias Burnus  <burnus@net-b.de>
1413         PR fortran/63861
1414         * trans-openmp.c (gfc_has_alloc_comps, gfc_trans_omp_clauses):
1415         Fix handling for scalar coarrays.
1416         * trans-types.c (gfc_get_element_type): Add comment.
1418 2015-01-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1420         PR fortran/64771
1421         * interface.c: Remove <algorithm>.
1422         (check_dummy_characteristics): Use MAX instead of std::max.
1424 2015-01-26  Paul Thomas  <pault@gcc.gnu.org>
1426         PR fortran/62044
1427         * resolve.c (resolve_allocate_expr): If the default initializer
1428         is NULL, keep the original MOLD expression so that the correct
1429         typespec is available.
1431 2015-01-26  Tobias Burnus  <burnus@net-b.de>
1433         PR fortran/64771
1434         * interface.c (check_dummy_characteristics): Fix coarray handling.
1436 2015-01-26  Tobias Burnus  <burnus@net-b.de>
1438         * io.c (gfc_match_inquire): Replace "-1" by a defined constant.
1440 2015-01-26  Janus Weil  <janus@gcc.gnu.org>
1442         PR fortran/64230
1443         * class.c (finalize_component): New argument 'sub_ns'. Insert code to
1444         check if 'expr' is associated.
1445         (generate_finalization_wrapper): Rename 'ptr' symbols to 'ptr1' and
1446         'ptr2'. Pass 'sub_ns' to finalize_component.
1448 2015-01-25  Mikael Morin  <mikael@gcc.gnu.org>
1450         PR fortran/62044
1451         * decl.c (gfc_match_derived_decl): Don't insert a new symtree element.
1452         * module.c (MOD_VERSION): Bump.
1453         (write_module): Don't write list of extensions.
1454         (read_module): Don't jump over list of extensions;
1455         don't load list of extensions.
1456         (load_derived_extensions, write_dt_extensions,
1457          write_derived_extensions): Remove.
1459 2015-01-24  Tobias Burnus  <burnus@net-b.de>
1461         * parse.c (gfc_parse_file): Fix two-location gfc_error call.
1463 2015-01-23  Martin Liska  <mliska@suse.cz>
1465         * decl.c (attr_decl1): Workaround -Wmaybe-uninitialized
1466         false positive during profiledbootstrap by initializing them.
1467         * matchexp.c (match_mult_operand): Likewise.
1468         * module.c (write_atom): Likewise.
1469         (read_module): Likewise.
1471 2015-01-23  Tom de Vries  <tom@codesourcery.com>
1473         PR libgomp/64672
1474         * lang.opt (fopenacc): Mark as LTO option.
1476 2015-01-23  Tom de Vries  <tom@codesourcery.com>
1478         PR libgomp/64707
1479         * lang.opt (fopenmp): Mark as LTO option.
1481 2015-01-23  Andre Vehreschild  <vehre@gmx.de>
1483         * trans-decl.c (gfc_finish_var_decl): Fixed moved comment.
1484         * trans-stmt.c (gfc_trans_allocate): Fixed indentation.
1486 2015-01-23  Jakub Jelinek  <jakub@redhat.com>
1488         * gfc-diagnostic.def (DK_ICE_NOBT): New kind.
1490 2015-01-23  Janus Weil  <janus@gcc.gnu.org>
1492         PR fortran/60922
1493         * class.c (finalize_component): Apply the check for 'fini_coarray' only
1494         to coarray components.
1496 2015-01-23  Tobias Burnus  <burnus@net-b.de>
1498         PR fortran/64726
1499         * trans-openmp.c (gfc_trans_oacc_combined_directive): Fix
1500         loop generation.
1502 2015-01-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1504         PR fortran/61933
1505         * libgfortran.h:
1506         * trans-io.c (set_parameter_value): Delete use of has_iostat.
1507         Redefine to not generate any runtime error check calls.
1508         (set_parameter_value_chk): Rename of the former
1509         set_parameter_value with the runtime error checks and fix
1510         whitespace. (set_parameter_value_inquire): New function that
1511         builds a runtime conditional block to set the INQUIRE
1512         common parameter block unit number to -2 when unit numbers
1513         exceed positive KIND=4 limits. (gfc_trans_open): Whitespace.
1514         For unit, use the renamed set_parameter_value_chk.
1515         (gfc_trans_close): Likewise use renamed function.
1516         (build_filepos): Whitespace and use renamed function.
1517         (gfc_trans_inquire): Whitespace and for unit use
1518         set_parameter_value and set_parameter_value_inquire.
1519         (gfc_trans_wait): Remove p->iostat from call to
1520         set_parameter_value. Use new set_parameter_value_chk for unit.
1521         (build_dt): Use the new set_parameter_value without p->iostat
1522         and fix whitespace. Use set_parameter_value_chk for unit.
1524 2015-01-21  Thomas Koenig  <tkoenig@netcologne.de>
1526         PR fortran/57023
1527         * dependency.c (callback_dummy_intent_not_int):  New function.
1528         (dummy_intent_not_in):  New function.
1529         (gfc_full_array_ref_p):  Use dummy_intent_not_in.
1531 2015-01-18  Andre Vehreschild  <vehre@gmx.de>
1532             Janus Weil <janus@gcc.gnu.org>
1534         PR fortran/60255
1535         * class.c (gfc_get_len_component): New.
1536         (gfc_build_class_symbol): Add _len component to unlimited
1537         polymorphic entities.
1538         (find_intrinsic_vtab): Removed emitting of error message.
1539         * gfortran.h: Added prototype for gfc_get_len_component.
1540         * simplify.c (gfc_simplify_len): Use _len component where
1541         available.
1542         * trans-expr.c (gfc_class_len_get): New.
1543         (gfc_conv_intrinsic_to_class): Add handling for deferred
1544         character arrays.
1545         (gfc_conv_structure): Treat _len component correctly.
1546         (gfc_conv_expr): Prevent bind_c handling when not required.
1547         (gfc_trans_pointer_assignment): Propagate _len component.
1548         * trans-stmt.c (class_has_len_component): New.
1549         (trans_associate_var): _len component treatment for associate
1550         context.
1551         (gfc_trans_allocate): Same as for trans_associate_var()
1552         * trans.h: Added prototype for gfc_class_len_get.
1554 2015-01-18  Paul Thomas  <pault@gcc.gnu.org>
1556         PR fortran/57959
1557         * trans-expr.c (gfc_trans_subcomponent_assign): Use a deep copy
1558         for allocatable components, where the source is a variable.
1560 2015-01-18  Paul Thomas  <pault@gcc.gnu.org>
1562         PR fortran/55901
1563         * primary.c (gfc_match_varspec): Exclude dangling associate-
1564         names with dimension 0 from being counted as arrays.
1565         * resolve.c (resolve_assoc_var): Sub-strings are permissible
1566         for associate-names, so exclude characters from the test for
1567         misuse as arrays.
1568         * trans-decl.c (gfc_get_symbol_decl): Associate-names can use
1569         the hidden string length variable of their associated target.
1570         Signal this by setting 'length' to a constant, if the decl for
1571         the string length is a variable.
1573 2015-01-17  Paul Thomas  <pault@gcc.gnu.org>
1575         PR fortran/64578
1576         * trans-expr.c (gfc_trans_pointer_assignment): Make sure that
1577         before reinitializing rse, to add the rse.pre to block before
1578         creating 'ptrtemp'.
1579         * trans-intrinsic.c (gfc_conv_associated): Deal with the class
1580         data being a descriptor.
1582 2015-01-17  Andre Vehreschild  <vehre@gmx.de>
1584         PR fortran/60357
1585         * primary.c (build_actual_constructor): Prevent warning.
1586         * trans-expr.c (alloc_scalar_allocatable_for_subcomponent_
1587         assignment): New function encapsulates treatment of allocatable
1588         components.
1589         (gfc_trans_subcomponent_assign): Needed to distinguish between
1590         regular assignment and initilization.
1591         (gfc_trans_structure_assign): Same.
1592         (gfc_conv_structure): Same.
1594         PR fortran/61275
1595         * gfortran.h: deferred_parameter is not needed, because
1596         it artificial does the trick completely.
1597         * primary.c (build_actual_constructor): Same.
1598         (gfc_convert_to_structure_constructor): Same.
1599         * resolve.c (resolve_fl_derived0): Same.
1600         * trans-expr.c (gfc_conv_component_ref): Prevent treating
1601         allocatable deferred length char arrays here.
1602         (gfc_trans_subcomponent_assign): Same as above.
1603         * trans-types.c (gfc_sym_type): This is done in
1604         gfc_get_derived_type already.
1606 2015-01-17  Andre Vehreschild  <vehre@gmx.de>
1608         PR fortran/60334
1609         * trans-decl.c (gfc_get_symbol_decl):Use a ref on the string
1610         length when the symbol is declared to be a result.
1611         * trans-expr.c (gfc_conv_procedure_call): Strip deref on the
1612         string length when functions are nested and the string length
1613         is a reference already.
1615 2015-01-16  Janus Weil  <janus@gcc.gnu.org>
1617         PR fortran/45290
1618         * decl.c (match_pointer_init): Error out if resolution of init expr
1619         failed.
1621 2015-01-15  Tobias Burnus  <burnus@net-b.de>
1623         * openmp.c (check_symbol_not_pointer, resolve_oacc_data_clauses,
1624         resolve_oacc_deviceptr_clause, resolve_omp_clauses,
1625         gfc_resolve_oacc_declare): Replace '%s' by %qs.
1627 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
1628             Cesar Philippidis  <cesar@codesourcery.com>
1629             James Norris  <jnorris@codesourcery.com>
1630             Ilmir Usmanov  <i.usmanov@samsung.com>
1631             Tobias Burnus  <burnus@net-b.de>
1633         * lang.opt (fopenacc): New option.
1634         * cpp.c (cpp_define_builtins): Conditionally define _OPENACC.
1635         * dump-parse-tree.c (show_omp_node): Split part of it into...
1636         (show_omp_clauses): ... this new function.
1637         (show_omp_node, show_code_node): Handle EXEC_OACC_PARALLEL_LOOP,
1638         EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
1639         EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
1640         EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
1641         EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
1642         (show_namespace): Update for OpenACC.
1643         * f95-lang.c (DEF_FUNCTION_TYPE_VAR_2, DEF_FUNCTION_TYPE_VAR_8)
1644         (DEF_FUNCTION_TYPE_VAR_12, DEF_GOACC_BUILTIN)
1645         (DEF_GOACC_BUILTIN_COMPILER): New macros.
1646         * types.def (BT_FN_VOID_INT_INT_VAR)
1647         (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
1648         (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
1649         New function types.
1650         * gfortran.h (gfc_statement): Add ST_OACC_PARALLEL_LOOP,
1651         ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
1652         ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_DATA,
1653         ST_OACC_END_DATA, ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA,
1654         ST_OACC_LOOP, ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE,
1655         ST_OACC_WAIT, ST_OACC_CACHE, ST_OACC_KERNELS_LOOP,
1656         ST_OACC_END_KERNELS_LOOP, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
1657         ST_OACC_ROUTINE.
1658         (struct gfc_expr_list): New data type.
1659         (gfc_get_expr_list): New macro.
1660         (gfc_omp_map_op): Add OMP_MAP_FORCE_ALLOC, OMP_MAP_FORCE_DEALLOC,
1661         OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM, OMP_MAP_FORCE_TOFROM,
1662         OMP_MAP_FORCE_PRESENT, OMP_MAP_FORCE_DEVICEPTR.
1663         (OMP_LIST_FIRST, OMP_LIST_DEVICE_RESIDENT, OMP_LIST_USE_DEVICE)
1664         (OMP_LIST_CACHE): New enumerators.
1665         (struct gfc_omp_clauses): Add async_expr, gang_expr, worker_expr,
1666         vector_expr, num_gangs_expr, num_workers_expr, vector_length_expr,
1667         wait_list, tile_list, async, gang, worker, vector, seq,
1668         independent, wait, par_auto, gang_static, and loc members.
1669         (struct gfc_namespace): Add oacc_declare_clauses member.
1670         (gfc_exec_op): Add EXEC_OACC_KERNELS_LOOP,
1671         EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS,
1672         EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
1673         EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
1674         EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
1675         (gfc_free_expr_list, gfc_resolve_oacc_directive)
1676         (gfc_resolve_oacc_declare, gfc_resolve_oacc_parallel_loop_blocks)
1677         (gfc_resolve_oacc_blocks): New prototypes.
1678         * match.c (match_exit_cycle): Handle EXEC_OACC_LOOP and
1679         EXEC_OACC_PARALLEL_LOOP.
1680         * match.h (gfc_match_oacc_cache, gfc_match_oacc_wait)
1681         (gfc_match_oacc_update, gfc_match_oacc_declare)
1682         (gfc_match_oacc_loop, gfc_match_oacc_host_data)
1683         (gfc_match_oacc_data, gfc_match_oacc_kernels)
1684         (gfc_match_oacc_kernels_loop, gfc_match_oacc_parallel)
1685         (gfc_match_oacc_parallel_loop, gfc_match_oacc_enter_data)
1686         (gfc_match_oacc_exit_data, gfc_match_oacc_routine): New
1687         prototypes.
1688         * openmp.c: Include "diagnostic.h" and "gomp-constants.h".
1689         (gfc_free_omp_clauses): Update for members added to struct
1690         gfc_omp_clauses.
1691         (gfc_match_omp_clauses): Change mask paramter to uint64_t.  Add
1692         openacc parameter.
1693         (resolve_omp_clauses): Add openacc parameter.  Update for OpenACC.
1694         (struct fortran_omp_context): Add is_openmp member.
1695         (gfc_resolve_omp_parallel_blocks): Initialize it.
1696         (gfc_resolve_do_iterator): Update for OpenACC.
1697         (gfc_resolve_omp_directive): Call
1698         resolve_omp_directive_inside_oacc_region.
1699         (OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE)
1700         (OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_COPYPRIVATE)
1701         (OMP_CLAUSE_SHARED, OMP_CLAUSE_COPYIN, OMP_CLAUSE_REDUCTION)
1702         (OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_SCHEDULE)
1703         (OMP_CLAUSE_DEFAULT, OMP_CLAUSE_ORDERED, OMP_CLAUSE_COLLAPSE)
1704         (OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE)
1705         (OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH)
1706         (OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND)
1707         (OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM)
1708         (OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP, OMP_CLAUSE_TO)
1709         (OMP_CLAUSE_FROM, OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_THREAD_LIMIT)
1710         (OMP_CLAUSE_DIST_SCHEDULE): Use uint64_t.
1711         (OMP_CLAUSE_ASYNC, OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS)
1712         (OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_COPY, OMP_CLAUSE_COPYOUT)
1713         (OMP_CLAUSE_CREATE, OMP_CLAUSE_PRESENT)
1714         (OMP_CLAUSE_PRESENT_OR_COPY, OMP_CLAUSE_PRESENT_OR_COPYIN)
1715         (OMP_CLAUSE_PRESENT_OR_COPYOUT, OMP_CLAUSE_PRESENT_OR_CREATE)
1716         (OMP_CLAUSE_DEVICEPTR, OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER)
1717         (OMP_CLAUSE_VECTOR, OMP_CLAUSE_SEQ, OMP_CLAUSE_INDEPENDENT)
1718         (OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE_DEVICE_RESIDENT)
1719         (OMP_CLAUSE_HOST_SELF, OMP_CLAUSE_OACC_DEVICE, OMP_CLAUSE_WAIT)
1720         (OMP_CLAUSE_DELETE, OMP_CLAUSE_AUTO, OMP_CLAUSE_TILE): New macros.
1721         (gfc_match_omp_clauses): Handle those.
1722         (OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES)
1723         (OACC_LOOP_CLAUSES, OACC_PARALLEL_LOOP_CLAUSES)
1724         (OACC_KERNELS_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES)
1725         (OACC_DECLARE_CLAUSES, OACC_UPDATE_CLAUSES)
1726         (OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES)
1727         (OACC_WAIT_CLAUSES): New macros.
1728         (gfc_free_expr_list, match_oacc_expr_list, match_oacc_clause_gang)
1729         (gfc_match_omp_map_clause, gfc_match_oacc_parallel_loop)
1730         (gfc_match_oacc_parallel, gfc_match_oacc_kernels_loop)
1731         (gfc_match_oacc_kernels, gfc_match_oacc_data)
1732         (gfc_match_oacc_host_data, gfc_match_oacc_loop)
1733         (gfc_match_oacc_declare, gfc_match_oacc_update)
1734         (gfc_match_oacc_enter_data, gfc_match_oacc_exit_data)
1735         (gfc_match_oacc_wait, gfc_match_oacc_cache)
1736         (gfc_match_oacc_routine, oacc_is_loop)
1737         (resolve_oacc_scalar_int_expr, resolve_oacc_positive_int_expr)
1738         (check_symbol_not_pointer, check_array_not_assumed)
1739         (resolve_oacc_data_clauses, resolve_oacc_deviceptr_clause)
1740         (oacc_compatible_clauses, oacc_is_parallel, oacc_is_kernels)
1741         (omp_code_to_statement, oacc_code_to_statement)
1742         (resolve_oacc_directive_inside_omp_region)
1743         (resolve_omp_directive_inside_oacc_region)
1744         (resolve_oacc_nested_loops, resolve_oacc_params_in_parallel)
1745         (resolve_oacc_loop_blocks, gfc_resolve_oacc_blocks)
1746         (resolve_oacc_loop, resolve_oacc_cache, gfc_resolve_oacc_declare)
1747         (gfc_resolve_oacc_directive): New functions.
1748         * parse.c (next_free): Update for OpenACC.  Move some code into...
1749         (verify_token_free): ... this new function.
1750         (next_fixed): Update for OpenACC.  Move some code into...
1751         (verify_token_fixed): ... this new function.
1752         (case_executable): Add ST_OACC_UPDATE, ST_OACC_WAIT,
1753         ST_OACC_CACHE, ST_OACC_ENTER_DATA, and ST_OACC_EXIT_DATA.
1754         (case_exec_markers): Add ST_OACC_PARALLEL_LOOP, ST_OACC_PARALLEL,
1755         ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA, ST_OACC_LOOP,
1756         ST_OACC_KERNELS_LOOP.
1757         (case_decl): Add ST_OACC_ROUTINE.
1758         (push_state, parse_critical_block, parse_progunit): Update for
1759         OpenACC.
1760         (gfc_ascii_statement): Handle ST_OACC_PARALLEL_LOOP,
1761         ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
1762         ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_KERNELS_LOOP,
1763         ST_OACC_END_KERNELS_LOOP, ST_OACC_DATA, ST_OACC_END_DATA,
1764         ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA, ST_OACC_LOOP,
1765         ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE, ST_OACC_WAIT,
1766         ST_OACC_CACHE, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
1767         ST_OACC_ROUTINE.
1768         (verify_st_order, parse_spec): Handle ST_OACC_DECLARE.
1769         (parse_executable): Handle ST_OACC_PARALLEL_LOOP,
1770         ST_OACC_KERNELS_LOOP, ST_OACC_LOOP, ST_OACC_PARALLEL,
1771         ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA.
1772         (decode_oacc_directive, parse_oacc_structured_block)
1773         (parse_oacc_loop, is_oacc): New functions.
1774         * parse.h (struct gfc_state_data): Add oacc_declare_clauses
1775         member.
1776         (is_oacc): New prototype.
1777         * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Handle
1778         EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL,
1779         EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS, EXEC_OACC_DATA,
1780         EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP, EXEC_OACC_UPDATE,
1781         EXEC_OACC_WAIT, EXEC_OACC_CACHE, EXEC_OACC_ENTER_DATA,
1782         EXEC_OACC_EXIT_DATA.
1783         (resolve_codes): Call gfc_resolve_oacc_declare.
1784         * scanner.c (openacc_flag, openacc_locus): New variables.
1785         (skip_free_comments): Update for OpenACC.  Move some code into...
1786         (skip_omp_attribute): ... this new function.
1787         (skip_oacc_attribute): New function.
1788         (skip_fixed_comments, gfc_next_char_literal): Update for OpenACC.
1789         * st.c (gfc_free_statement): Handle EXEC_OACC_PARALLEL_LOOP,
1790         EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
1791         EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
1792         EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
1793         EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
1794         * trans-decl.c (gfc_generate_function_code): Update for OpenACC.
1795         * trans-openmp.c: Include "gomp-constants.h".
1796         (gfc_omp_finish_clause, gfc_trans_omp_clauses): Use GOMP_MAP_*
1797         instead of OMP_CLAUSE_MAP_*.  Use OMP_CLAUSE_SET_MAP_KIND.
1798         (gfc_trans_omp_clauses): Handle OMP_LIST_USE_DEVICE,
1799         OMP_LIST_DEVICE_RESIDENT, OMP_LIST_CACHE, and OMP_MAP_FORCE_ALLOC,
1800         OMP_MAP_FORCE_DEALLOC, OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM,
1801         OMP_MAP_FORCE_TOFROM, OMP_MAP_FORCE_PRESENT,
1802         OMP_MAP_FORCE_DEVICEPTR, and gfc_omp_clauses' async, seq,
1803         independent, wait_list, num_gangs_expr, num_workers_expr,
1804         vector_length_expr, vector, vector_expr, worker, worker_expr,
1805         gang, gang_expr members.
1806         (gfc_trans_omp_do): Handle EXEC_OACC_LOOP.
1807         (gfc_convert_expr_to_tree, gfc_trans_oacc_construct)
1808         (gfc_trans_oacc_executable_directive)
1809         (gfc_trans_oacc_wait_directive, gfc_trans_oacc_combined_directive)
1810         (gfc_trans_oacc_declare, gfc_trans_oacc_directive): New functions.
1811         * trans-stmt.c (gfc_trans_block_construct): Update for OpenACC.
1812         * trans-stmt.h (gfc_trans_oacc_directive, gfc_trans_oacc_declare):
1813         New prototypes.
1814         * trans.c (tranc_code): Handle EXEC_OACC_CACHE, EXEC_OACC_WAIT,
1815         EXEC_OACC_UPDATE, EXEC_OACC_LOOP, EXEC_OACC_HOST_DATA,
1816         EXEC_OACC_DATA, EXEC_OACC_KERNELS, EXEC_OACC_KERNELS_LOOP,
1817         EXEC_OACC_PARALLEL, EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_ENTER_DATA,
1818         EXEC_OACC_EXIT_DATA.
1819         * gfortran.texi: Update for OpenACC.
1820         * intrinsic.texi: Likewise.
1821         * invoke.texi: Likewise.
1823 2015-01-15  Janus Weil  <janus@gcc.gnu.org>
1825         PR fortran/58023
1826         * resolve.c (resolve_fl_derived0): Continue resolving next component
1827         after error.
1829 2015-01-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1831         PR fortran/61933
1832         * io.c (gfc_match_inquire): Generate error if unit number in
1833         inquire statement is a constant -1.  All other values allowed.
1834         * trans-io.c (gfc_trans_inquire): Delete dummy iostat variable.
1835         (create_dummy_iostat): Delete function no longer used.
1837 2015-01-13  Jakub Jelinek  <jakub@redhat.com>
1839         PR fortran/64528
1840         * trans-decl.c (create_function_arglist): Don't set TREE_READONLY
1841         on dummy args with VALUE attribute.
1843 2015-01-11  Janus Weil  <janus@gcc.gnu.org>
1845         PR fortran/63733
1846         * interface.c (gfc_extend_expr): Look for type-bound operators before
1847         non-typebound ones.
1849 2015-01-11  Janus Weil  <janus@gcc.gnu.org>
1851         PR fortran/58023
1852         * resolve.c (resolve_fl_derived0): Set error flag if problems with the
1853         interface of a procedure-pointer component were detected.
1855 2015-01-11  Janus Weil  <janus@gcc.gnu.org>
1857         PR fortran/64508
1858         * interface.c (compare_parameter): Interface check for
1859         procedure-pointer component as actual argument.
1861 2015-01-10  Thomas Schwinge  <thomas@codesourcery.com>
1863         * gfortran.texi: Update for libgomp being renamed from "GNU OpenMP
1864         Runtime Library" to "GNU Offloading and Multi Processing Runtime
1865         Library".
1866         * intrinsic.texi: Likewise.
1868 2015-01-10  Tobias Burnus  <burnus@net-b.de>
1870         PR fortran/64522
1871         * invoke.texi (Wline-truncation): Document new behaviour.
1872         * lang.opt (Wline-truncation): Add Init(-1).
1873         * options.c (gfc_post_options): If -Wline-truncation is unset,
1874         enable it for free-form source files; for the latter, also use
1875         -Werror=line-truncation, unless -Wno-error has been specified.
1877 2015-01-09  Michael Collison  <michael.collison@linaro.org>
1879         * convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1880         input.h, alias.h, symtab.h, options.h, fold-const.h,
1881         wide-int.h, and inchash.h due to flattening of tree.h.
1882         * cpp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1883         input.h, alias.h, symtab.h, fold-const.h,
1884         wide-int.h, and inchash.h due to flattening of tree.h.
1885         * decl.c: Ditto.
1886         * f95.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1887         input.h, alias.h, symtab.h, options.h, fold-const.h,
1888         wide-int.h, and inchash.h due to flattening of tree.h.
1889         * iresolve.c: Ditto.
1890         * match.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1891         input.h, alias.h, symtab.h, fold-const.h,
1892         wide-int.h, and inchash.h due to flattening of tree.h.
1893         * module.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1894         input.h, alias.h, symtab.h, options.h, fold-const.h,
1895         wide-int.h, and inchash.h due to flattening of tree.h.
1896         * options.c: Ditto.
1897         * target-memory.c: Include hash-set.h, vec.h,
1898         double-int.h, input.h, alias.h, symtab.h, fold-const.h,
1899         wide-int.h, and inchash.h due to flattening of tree.h.
1900         * trans-array.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1901         input.h, alias.h, symtab.h, options.h, fold-const.h,
1902         wide-int.h, and inchash.h due to flattening of tree.h.
1903         * trans.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1904         input.h, alias.h, symtab.h, options.h, fold-const.h,
1905         wide-int.h, and inchash.h due to flattening of tree.h.
1906         * trans-common.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1907         input.h, alias.h, symtab.h, fold-const.h,
1908         wide-int.h, and inchash.h due to flattening of tree.h.
1909         * trans-const.c: Ditto.
1910         * trans-decl.c: Ditto.
1911         * trans-expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1912         input.h, alias.h, symtab.h, options.h, fold-const.h,
1913         wide-int.h, and inchash.h due to flattening of tree.h.
1914         * trans-intrinsic.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1915         input.h, alias.h, symtab.h, fold-const.h,
1916         wide-int.h, inchash.h and real.h due to flattening of tree.h.
1917         * trans-io.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1918         input.h, alias.h, symtab.h, options.h, fold-const.h,
1919         wide-int.h, and inchash.h due to flattening of tree.h.
1920         * trans-openmp.c: Ditto.
1921         * trans-stmt.c: Ditto.
1922         * trans-types.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1923         input.h, alias.h, symtab.h, fold-const.h,
1924         wide-int.h, inchash.h and real.h due to flattening of tree.h.
1926 2015-01-08  Tobias Burnus  <burnus@net-b.de>
1928         * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
1929         for module coarrays with -fcoarray=lib.
1930         (get_proc_pointer_decl): As module variable, make only public
1931         when not marked as private.
1933 2015-01-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
1935         PR fortran/47674
1936         * dependency.h:  Actually commit changes.
1938 2015-01-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
1940         PR fortran/47674
1941         * dependency.c:  Update copyright years.
1942         (gfc_discard_nops):  Add prototype.
1943         * dependency.c (discard_nops):  Rename to gfc_discard_nops,
1944         make non-static.
1945         (gfc_discard_nops):  Use gfc_discard_nops.
1946         (gfc_dep_difference):  Likewise.
1947         * frontend-passes.c  Update copyright years.
1948         (realloc_strings):  New function.  Add prototype.
1949         (gfc_run_passes):  Call realloc_strings.
1950         (realloc_string_callback):  New function.
1951         (create_var):  Add prototype.  Handle case of a
1952         scalar character variable.
1953         (optimize_trim):  Do not handle allocatable variables.
1955 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
1957         Update copyright years.
1959         * gfortranspec.c (lang_specific_driver): Update copyright notice
1960         dates.
1961         * gfc-internals.texi: Bump @copying's copyright year.
1962         * gfortran.texi: Ditto.
1963         * intrinsic.texi: Ditto.
1964         * invoke.texi: Ditto.
1966 2015-01-02  Janus Weil  <janus@gcc.gnu.org>
1968         PR fortran/57562
1969         * expr.c (find_component_ref): Deal with extended types.
1971 2015-01-02  Tobias Burnus  <burnus@net-b.de>
1973         * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
1974         for module coarrays with -fcoarray=lib.
1976 2015-01-02  Janus Weil  <janus@gcc.gnu.org>
1978         PR fortran/60507
1979         * interface.c (is_procptr_result): New function to check if an
1980         expression is a procedure-pointer result.
1981         (compare_actual_formal): Use it.
1983 Copyright (C) 2015 Free Software Foundation, Inc.
1985 Copying and distribution of this file, with or without modification,
1986 are permitted in any medium without royalty provided the copyright
1987 notice and this notice are preserved.