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