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