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