1 2015-07-17 Paul Thomas <pault@gcc.gnu.org>
4 * decl.c (gfc_match_end): Pick out declared submodule name from
5 the composite identifier.
6 * gfortran.h : Add 'submodule_name' to gfc_use_list structure.
7 * module.c (gfc_match_submodule): Define submodule_name and add
8 static 'submodule_name'.
9 (gfc_match_submodule): Build up submodule filenames, using '@'
10 as a delimiter. Store the output filename in 'submodule_name'.
11 Similarly, the submodule identifier is built using '.' as an
13 (gfc_dump_module): If current state is COMP_SUBMODULE, write
14 to file 'submodule_name', using SUBMODULE_EXTENSION.
15 (gfc_use_module): Similarly, use the 'submodule_name' field in
16 the gfc_use_list structure and SUBMODULE_EXTENSION to read the
17 implicitly used submodule files.
19 2015-07-17 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
21 * trans-intrinsic.c (conv_co_collective): Remove redundant address
22 operator in the generated code.
24 2015-07-17 Andre Vehreschild <vehre@gcc.gnu.org>
27 * trans-expr.c (alloc_scalar_allocatable_for_subcomponent_assignment):
28 Compute the size to allocate for class and derived type objects
30 (gfc_trans_subcomponent_assign): Only allocate memory for a
31 component when the object to assign is not an allocatable class
32 object (the memory is already present for allocatable class objects).
33 Furthermore use copy_class_to_class for assigning the rhs to the
34 component (may happen for dummy class objects on the rhs).
36 2015-07-17 Mikael Morin <mikael@gcc.gnu.org>
37 Dominique d'Humieres <dominiq@lps.ens.fr>
40 * trans-array.c (gfc_conv_array_parameter): Guard allocatable
41 component deallocation code generation with descriptorless
42 calling convention flag.
43 * trans-expr.c (gfc_conv_expr_reference): Remove allocatable
44 component deallocation code generation from revision 212329.
45 (expr_may_alias_variables): New function.
46 (gfc_conv_procedure_call): New boolean elemental_proc to factor
47 check for procedure elemental-ness. Rename boolean f to nodesc_arg
48 and declare it in the outer scope. Use expr_may_alias_variables,
49 elemental_proc and nodesc_arg to decide whether generate allocatable
50 component deallocation code.
51 (gfc_trans_subarray_assign): Set deep copy flag.
53 2015-07-16 Steven G. Kargl <kargl@gcc.gnu.org>
57 * io.c (is_char_type): Call gfc_resolve_expr ().
58 (match_open_element, match_dt_element, match_inquire_element): Fix
61 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
63 * trans-types.c: Remove multiline #include comment.
65 2015-07-14 Steven G. Kargl <kargl@gcc.gnu.org>
67 * simplify.c (gfc_simplify_floor): Set precision of temporary to
70 2015-07-13 Andre Vehreschild <vehre@gcc.gnu.org>
73 * class.c (find_intrinsic_vtab): Put/Search vtabs for intrinsic
74 types in the top-level namespace.
76 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
78 * trans-stmt.c: Fix double word typos.
80 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
82 * arith.c: Adjust includes for flags.h changes.
88 * frontend-passes.c: Likewise.
89 * interface.c: Likewise.
90 * intrinsic.c: Likewise.
95 * primary.c: Likewise.
96 * resolve.c: Likewise.
97 * scanner.c: Likewise.
98 * simplify.c: Likewise.
100 * target-memory.c: Likewise.
102 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
104 * convert.c: Adjust includes.
107 * f95-lang.c: Likewise.
108 * iresolve.c: Likewise.
110 * module.c: Likewise.
111 * options.c: Likewise.
112 * target-memory.c: Likewise.
113 * trans-array.c: Likewise.
114 * trans-common.c: Likewise.
115 * trans-const.c: Likewise.
116 * trans-decl.c: Likewise.
117 * trans-expr.c: Likewise.
118 * trans-intrinsic.c: Likewise.
119 * trans-io.c: Likewise.
120 * trans-openmp.c: Likewise.
121 * trans-stmt.c: Likewise.
122 * trans-types.c: Likewise.
125 2015-07-07 Andre Vehreschild <vehre@gmx.de>
128 * trans-array.c (gfc_conv_expr_descriptor): Ensure array descriptor
129 is one-based for non-full array refs. Correct the offset when a
132 2015-07-06 Steven G. Kargl <kargl@gcc.gnu.org>
134 * io.c (check_char_variable): New function.
135 (match_open_element, match_close_element, match_file_element,
136 match_dt_element, match_inquire_element, match_wait_element): Use it.
138 2015-07-06 Andre Vehreschild <vehre@gmx.de>
141 * resolve.c (resolve_symbol): Non-private functions in modules
142 with allocatable or pointer components are marked referenced
143 now. Furthermore is the default init especially for those
144 components now done in gfc_conf_procedure_call preventing
146 * trans-decl.c (gfc_generate_function_code): Generate a fake
147 result decl for functions returning an object with allocatable
148 components and initialize them.
149 * trans-expr.c (gfc_conv_procedure_call): For value typed trees
150 use the tree without indirect ref. And for non-decl trees
151 add a temporary variable to prevent evaluating the tree
152 multiple times (prevent multiple function evaluations).
153 * trans.h: Made gfc_trans_structure_assign () protoype
154 available, which is now needed by trans-decl.c:gfc_generate_
155 function_code(), too.
157 2015-07-04 Steven G. Kargl <kargl@gcc.gnu.org>
160 * io.c (is_char_type): New function to test for BT_CHARACTER
161 (gfc_match_open, gfc_match_close, match_dt_element): Use it.
163 2015-07-02 David Edelsohn <dje.gcc@gmail.com>
165 * trans-common.c: Include <map> after system.h.
167 2015-07-02 Paul Thomas <pault@gcc.gnu.org>
170 * decl.c (get_proc_name): Make a partially populated interface
171 symbol to carry the characteristics of a module procedure and
173 (variable_decl): Declarations of dummies or results in the
174 abreviated form of module procedure is an error.
175 (gfc_match_import): IMPORT is not permitted in the interface
176 declaration of module procedures.
177 (match_attr_spec): Submodule variables have implicit save
178 attribute for F2008 onwards.
179 (gfc_match_prefix): Add 'module' as the a prefix and set the
180 module_procedure attribute.
181 (gfc_match_formal_arglist): For a module procedure keep the
182 interface formal_arglist from the interface, match new the
183 formal arguments and then compare the number and names of each.
184 (gfc_match_procedure): Add case COMP_SUBMODULE.
185 (gfc_match_function_decl, gfc_match_subroutine_decl): Set the
186 module_procedure attribute.
187 (gfc_match_entry, gfc_match_end): Add case COMP_SUBMODULE. If
188 attr abr_modproc_decl is set, switch the message accordingly
189 for subroutines and functions.
190 (gfc_match_submod_proc): New function to match the abbreviated
191 style of submodule declaration.
192 * gfortran.h : Add ST_SUBMODULE and ST_END_SUBMODULE. Add the
193 attribute bits 'used_in_submodule' and 'module_procedure'. Add
194 the bit field 'abr_modproc_decl' to gfc_symbol. Add prototypes
195 for 'gfc_copy_dummy_sym', 'gfc_check_dummy_characteristics' and
196 'gfc_check_result_characteristics'.
197 * interface.c : Add the prefix 'gfc_' to the names of functions
198 'check_dummy(result)_characteristics' and all their references.
199 * match.h : Add prototype for 'gfc_match_submod_proc' and
200 'gfc_match_submodule'.
201 (check_sym_interfaces): A module procedure is not an error in
202 a module procedure statment in a generic interface.
203 * module.c (gfc_match_submodule): New function. Add handling
204 for the 'module_procedure' attribute bit.
205 (gfc_use_module): Make sure that a submodule cannot use itself.
206 * parse.c (decode_statement): Set attr has_'import_set' for
207 the interface declaration of module procedures. Handle a match
208 occurring in 'gfc_match_submod_proc' and a match for
210 (gfc_enclosing_unit): Include the state COMP_SUBMODULE.
211 (gfc_ascii_statement): Add END SUBMODULE.
212 (accept_statement): Add ST_SUBMODULE.
213 (parse_spec): Disallow statement functions in a submodule
215 (parse_contained): Add ST_END_SUBMODULE and COMP_SUBMODULE
217 (get_modproc_result): Copy the result symbol of the interface.
218 (parse_progunit): Call it.
219 (set_syms_host_assoc): Make symbols from the ancestor module
220 and submodules use associated, as required by the standard and
221 set all private components public. Module procedures 'external'
222 attribute bit is reset and the 'used_in_submodule' bit is set.
223 (parse_module): If this is a submodule, use the ancestor module
224 and submodules. Traverse the namespace, calling
225 'set_syms_host_assoc'. Add ST_END_SUBMODULE and COMP_SUBMODULE.
226 * parse.h : Add COMP_SUBMODULE.
227 * primary.c (match_variable): Add COMP_SUBMODULE.
228 * resolve.c (compare_fsyms): New function to compare the dummy
229 characteristics of a module procedure with its interface.
230 (resolve_fl_procedure): Compare the procedure, result and dummy
231 characteristics of a module_procedure with its interface, using
232 'compare_fsyms' for the dummy arguments.
233 * symbol.c (gfc_add_procedure): Suppress the check for existing
234 procedures in the case of a module procedure.
235 (gfc_add_explicit_interface): Skip checks that must fail for
237 (gfc_add_type): Allow a new type to be added to module
238 procedures, their results or their dummy arguments.
239 (gfc_copy_dummy_sym): New function to generate new dummy args
240 and copy the characteristics from the interface.
241 * trans-decl.c (gfc_sym_mangled_function_id): Module procedures
242 must always have their names mangled as if they are symbols
243 coming from a declaration in a module.
244 (gfc_get_symbol_decl): Add 'used_in_submodule' to the assert.
245 (gfc_finish_var_decl): Symbols with the 'used_in_submodule' bit
246 set are set DECL_EXTERNAL as if they were use associated.
248 2015-07-02 Steven G. Kargl <kargl@gcc.gnu.org>
251 * match.c (gfc_match_name): Special case unary minus and plus.
253 2015-07-02 Steven G. Kargl <kargl@gcc.gnu.org>
256 * primary.c (match_sym_complex_part): Do not dereference NULL pointer.
258 2015-07-01 Thomas Koenig <tkoenig@gcc.gnu.org>
260 * arith.c (gfc_arith_divide): With -Winteger-division,
261 warn about contant integer division if there is a non-zero
263 * invoke.texi: Document -Winteger-division.
264 * lang.opt: Add -Winteger-division.
266 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
268 * f95-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
269 * trans-decl.c: Likewise.
271 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
273 * trans-decl.c (module_hasher): Likewise.
274 * trans.h (module_decl_hasher): Likewise.
276 2015-06-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
279 * error.c (gfc_warning_check): Restore the default output_buffer
280 before calling diagnostic_action_after_output.
281 (gfc_error_check): Likewise.
282 (gfc_diagnostics_init): Add comment.
284 2015-06-23 Andre Vehreschild <vehre@gmx.de>
287 * parse.c (parse_associate): Figure the rank and as of a
288 class array in an associate early.
289 * primary.c (gfc_match_varspec): Prevent setting the
290 dimension attribute on the sym for classes.
291 * resolve.c (resolve_variable): Correct the component
292 ref's type for associated variables. Add a full array ref
293 when class array's are associated.
294 (resolve_assoc_var): Correct the type of the symbol,
295 when in the associate the expression's rank becomes scalar.
296 * trans-expr.c (gfc_conv_variable): Indirect ref needed for
297 allocatable associated objects.
299 2015-06-19 Mikael Morin <mikael@gcc.gnu.org>
302 * resolve.c (resolve_global_procedure): Don't save and restore
303 OpenMP state around the call to gfc_resolve.
304 (gfc_resolve): Save OpenMP state on entry and restore it on return.
306 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
308 * convert.c: Do not include input.h, line-map.h or is-a.h.
311 * f95-lang.c: Likewise.
312 * gfortran.h: Likewise.
313 * iresolve.c: Likewise.
315 * module.c: Likewise.
316 * options.c: Likewise.
317 * target-memory.c: Likewise.
318 * trans-array.c: Likewise.
319 * trans-common.c: Likewise.
320 * trans-const.c: Likewise.
321 * trans-decl.c: Likewise.
322 * trans-expr.c: Likewise.
323 * trans-intrinsic.c: Likewise.
324 * trans-io.c: Likewise.
325 * trans-openmp.c: Likewise.
326 * trans-stmt.c: Likewise.
327 * trans-types.c: Likewise.
330 2015-06-15 Andre Vehreschild <vehre@gmx.de>
335 * gfortran.h: Extend gfc_code.ext.alloc to carry a
336 flag indicating that the array specification has to be
338 * resolve.c (resolve_allocate_expr): Add F2008 notify
339 and flag indicating source driven array spec.
340 (resolve_allocate_deallocate): Check for source driven
341 array spec, when array to allocate has no explicit
343 * trans-array.c (gfc_array_init_size): Get lower and
344 upper bound from a tree array descriptor, except when
345 the source expression is an array-constructor which is
346 fixed to be one-based.
347 (retrieve_last_ref): Extracted from gfc_array_allocate().
348 (gfc_array_allocate): Enable allocate(array, source=
349 array_expression) as specified by F2008:C633.
350 (gfc_conv_expr_descriptor): Add class tree expression
351 into the saved descriptor for class arrays.
352 * trans-array.h: Add temporary array descriptor to
353 gfc_array_allocate ().
354 * trans-expr.c (gfc_conv_procedure_call): Special handling
355 for _copy() routine translation, that comes without an
356 interface. Third and fourth argument are now passed by value.
357 * trans-stmt.c (gfc_trans_allocate): Get expr3 array
358 descriptor for temporary arrays to allow allocate(array,
359 source = array_expression) for array without array
362 2015-06-14 Thomas Koenig <tkoenig@gcc.gnu.org>
364 * intrinsic.texi: Change \leq to < in descrition of imaginary
365 part in argument to log.
367 2015-06-11 Paul Thomas <pault@gcc.gnu.org>
370 * trans-expr.c (gfc_conv_procedure_call): Allocatable scalar
371 function results must be freed and nullified after use. Create
372 a temporary to hold the result to prevent duplicate calls.
373 * trans-stmt.c (gfc_trans_allocate): Rename temporary variable
374 as 'source'. Deallocate allocatable components of non-variable
377 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
379 * f95-lang.c (gfc_create_decls): Register the main translation unit
380 through the new debug hook.
382 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
384 * convert.c : Adjust include files.
387 * f95-lang.c : Likewise.
388 * gfortran.h : Likewise.
389 * iresolve.c : Likewise.
390 * match.c : Likewise.
391 * module.c : Likewise.
392 * openmp.c : Likewise.
393 * options.c : Likewise.
394 * target-memory.c : Likewise.
395 * trans-array.c : Likewise.
396 * trans-common.c : Likewise.
397 * trans-const.c : Likewise.
398 * trans-decl.c : Likewise.
399 * trans-expr.c : Likewise.
400 * trans-intrinsic.c : Likewise.
401 * trans-io.c : Likewise.
402 * trans-openmp.c : Likewise.
403 * trans-stmt.c : Likewise.
404 * trans-types.c : Likewise.
405 * trans.c : Likewise.
407 2015-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
410 * match.c (gfc_match_type_is, gfc_match_class_is): Check if the
411 return type spec or derived type spec is validate.
413 2015-06-06 Thomas Koenig <tkoenig@netcologne.de>
416 * arith.c (eval_intrinsic_op): Set warn flag for
417 gfc_type_convert_binary if -Wconversion or -Wconversion-extra
419 (wprecision_real_real): New function.
420 (wprecision_int_real): New function.
421 (gfc_int2int): If -fno-range-check and -Wconversion are specified
422 and it is a narrowing conversion, warn.
423 (gfc_int2real): If there is a change in value for the conversion,
425 (gfc_int2complex): Likewise.
426 (gfc_real2int): If there is a fractional part to the real number,
427 warn with -Wconversion, otherwise warn with -Wconversion-extra.
428 (gfc_real2real): Emit warning if the constant was changed by
429 conversion with either -Wconversion or -Wconversion-extra. With
430 -Wconversion-extra, warn if no warning was issued earlier.
431 (gfc_real2complex): Likewise.
432 (gfc_complex2int): For -Wconversion or -Wconversion-extra, if
433 there was an imaginary part, warn; otherwise, warn for change in
434 value. Warn with -Wconversion-extra if no other warning was
436 (gfc_complex2real): For -Wconversion or -Wconversion-extra, if
437 there was an imaginary part, warn; otherwise, warn for change in
438 value. Warn with -Wconversion-extra if no other warning was
440 (gfc_complex2complex): For -Wconversion, warn if the value of
441 either the real or the imaginary part was changed. Warn for
442 -Wconversion-extra if no prior warning was issued.
443 * expr.c (gfc_check_assign): Remove check for change in value.
444 * primary.c (match_real_constant): For -Wconversion-extra, check
445 against a number in which the last non-zero digit has been
446 replaced with a zero. If the number compares equal, warn.
447 * intrinsic.c (gfc_convert_type_warn): Do not warn about constant
450 2015-06-05 Steven G. Kargl <kargl@gcc.gnu.org>
453 * resolve.c (apply_default_init_local): Do not dereference a NULL
456 2015-06-05 Thomas Koenig <tkoenig@gcc.gnu.org>
459 * frontend-passes.c (combine_array_constructor): Return early if
460 inside a FORALL loop.
462 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
464 * f95-lang.c (gfc_write_global_declarations): Remove.
465 (LANG_HOOKS_WRITE_GLOBALS): Remove.
466 (gfc_write_global_declarations): Move code from here to...
467 (gfc_be_parse_file): ...here.
468 Call global_decl_processing.
469 * trans-decl.c (gfc_emit_parameter_debug_info): Rename global_decl
470 to early_global_decl.
472 2015-06-05 Russell Whitesides <russelldub@gmail.com>
473 Steven G. Kargl <kargl@gcc.gnu.org>
478 * module.c (load_equiv): Add check for loading duplicate EQUIVALENCEs
479 from different modules. Eliminate the pruning of unused
482 2015-06-04 Thomas Koenig <tkoenig@netcologne.de>
485 * iresolve.c (gfc_resolve_adjustl): If string has a charlen,
486 copy it to the function.
487 (gfc_resolve_adjustr): Likewise.
489 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
491 * convert.c: Adjust includes for restructured coretypes.h.
494 * f95-lang.c: Likewise.
495 * iresolve.c: Likewise.
497 * module.c: Likewise.
498 * options.c: Likewise.
499 * target-memory.c: Likewise.
500 * trans-array.c: Likewise.
501 * trans-common.c: Likewise.
502 * trans-const.c: Likewise.
503 * trans-decl.c: Likewise.
504 * trans-expr.c: Likewise.
505 * trans-intrinsic.c: Likewise.
506 * trans-io.c: Likewise.
507 * trans-openmp.c: Likewise.
508 * trans-stmt.c: Likewise.
509 * trans-types.c: Likewise.
512 2015-06-02 Steven G. Kargl <kargl@gcc.gnu.org>
515 * simplify.c (gfc_simplify_reshape): Convert assert into returning
516 NULL, which triggers an error condition.
518 2015-05-27 Andre Vehreschild <vehre@gmx.de>
521 * trans-stmt.c (gfc_trans_allocate): Add missing location
522 information for e3rhs.
524 2015-05-26 Paul Thomas <pault@gcc.gnu.org>
527 * trans-array.c (gfc_conv_array_parameter): Ensure that all
528 non-variable arrays with allocatable components have the
529 components deallocated after the procedure call.
531 2015-05-24 Mikael Morin <mikael@gcc.gnu.org>
534 * resolve.c (resolve_actual_arglist): Don't throw an error
535 if the argument with procedure pointer component is not a variable.
537 2015-05-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
540 * gfortran.h (struct gfc_error_buf): Rename as
541 gfc_error_buffer. Move closer to push, pop and free
542 methods. Reimplement using an output_buffer.
543 * error.c (errors, warnings, warning_buffer, cur_error_buffer):
544 Delete everywhere in this file.
545 (error_char): Delete all contents.
546 (gfc_increment_error_count): Delete.
547 (gfc_error_now): Update comment. Set error_buffer.flag.
548 (gfc_warning_check): Do not handle warning_buffer.
549 (gfc_error_1): Delete.
550 (gfc_error_now_1): Delete.
551 (gfc_error_check): Simplify.
552 (gfc_move_error_buffer_from_to): Renamed from
553 gfc_move_output_buffer_from_to.
554 (gfc_push_error): Handle only gfc_error_buffer.
555 (gfc_pop_error): Likewise.
556 (gfc_free_error): Likewise.
557 (gfc_get_errors): Remove warnings and errors.
558 (gfc_diagnostics_init): Use static error_buffer.
559 (gfc_error_1,gfc_error_now_1): Delete declarations.
560 * symbol.c, decl.c, trans-common.c, data.c, expr.c, expr.c,
561 frontend-passes.c, resolve.c, match.c, parse.c: Replace
562 gfc_error_1 with gfc_error and gfc_error_now_1 with gfc_error_1
564 * f95-lang.c (gfc_be_parse_file): Do not update errorcount and
566 * primary.c (match_complex_constant): Replace gfc_error_buf and
567 output_buffer with gfc_error_buffer.
569 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
571 * Make-lang.in (check_gfortran_parallelize): Update comment.
573 2015-05-21 Thomas Koenig <tkoenig@gcc.gnu.org>
576 * frontend-passes.c (check_conjg_variable): New function.
577 (inline_matmul_assign): Use it to keep track of conjugated
580 2015-05-20 Andre Vehreschild <vehre@gmx.de>
583 * trans-stmt.c (gfc_trans_allocate): Always retrieve the
584 descriptor or a reference to a source= expression for
585 arrays and non-arrays, respectively. Use a temporary
586 symbol and gfc_trans_assignment for all source=
587 assignments to allocated objects besides for class and
590 2015-05-19 Jakub Jelinek <jakub@redhat.com>
593 * trans-openmp.c (gfc_trans_omp_teams): Set OMP_TEAMS_COMBINED for
595 (gfc_trans_omp_target): Make sure BIND_EXPR has non-NULL
598 2015-05-19 David Malcolm <dmalcolm@redhat.com>
600 * cpp.c (maybe_print_line): Strengthen local "map" from
601 const line_map * to const line_map_ordinary *.
602 (cb_file_change): Likewise for param "map" and local "from".
603 (cb_line_change): Likewise for local "map".
605 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
607 * interface.c (compare_actual_formal): Use std::swap instead of
609 * trans-array.c (gfc_trans_scalarized_loop_end): Likewise.
610 * trans-intrinsic.c (walk_inline_intrinsic_transpose): Likewise.
612 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
615 * interface.c(gfc_match_end_interface): Enforce F2008 C1202 (R1201).
616 * match.c(gfc_op2string): Return 'none' for INTRINSIC_NONE.
618 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
621 * decl.c(gfc_match_generic): Detected a malformed GENERIC statement.
623 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
626 * gfortran.dg/storage_size_6.f90: New tests.
628 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
631 * gfortran.dg/storage_size_6.f90: New tests.
633 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
636 * decl.c(gfc_match_entry): Change a gfc_internal_error() into
639 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
642 * gfortran.dg/storage_size_6.f90: New tests.
644 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
647 * parse.c(verify_st_order): Replace a gfc_internal_error with your
650 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
653 * io.c (match_filepos): Check for incomplete/mangled REWIND, FLUSH,
654 BACKSPACE, and ENDFILE statements
656 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
659 * symbol.c(check_conflict): Check for a conflict between a dummy
660 argument and an internal procedure name.
662 2015-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
665 * io.c (format_lex): Change to NONSTRING when checking for
666 possible doubled quote.
667 * scanner.c (gfc_next_char_literal): Revert change from 64506
668 and add a check for quotes and return.
670 2015-05-16 Thomas Koenig <tkoenig@gcc.gnu.org>
673 * expr.c (is_parent_of_current_ns): New function.
674 (check_restricted): Use it.
676 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
680 Replace all calls to gfc_notify_std_1 with gfc_notify_std and
681 gfc_warning_1 with gfc_warning.
682 * decl.c (gfc_verify_c_interop_param): Here.
683 * resolve.c (resolve_branch): Here.
684 (resolve_fl_derived): Here.
685 * dependency.c (gfc_check_argument_var_dependency):
686 * scanner.c (preprocessor_line): Use gfc_warning_now_at. Fix line
687 counter and locations before and after warning.
688 * gfortran.h (gfc_warning_1, gfc_warning_now_1, gfc_notify_std_1):
690 (gfc_warning_now_at): Declare.
691 * error.c (gfc_warning_1): Delete.
692 (gfc_notify_std_1): Delete.
693 (gfc_warning_now_1): Delete.
694 (gfc_format_decoder): Handle two locations.
695 (gfc_diagnostic_build_prefix): Rename as
696 gfc_diagnostic_build_kind_prefix.
697 (gfc_diagnostic_build_locus_prefix): Take an expanded_location
698 instead of diagnostic_info.
699 (gfc_diagnostic_build_locus_prefix): Add overload that takes two
701 (gfc_diagnostic_starter): Handle two locations.
702 (gfc_warning_now_at): New.
703 (gfc_diagnostics_init): Initialize caret_chars array.
704 (gfc_diagnostics_finish): Reset caret_chars array to default.
706 2015-05-16 Mikael Morin <mikael@gcc.gnu.org>
707 Paul Thomas <pault@gcc.gnu.org>
710 * trans-expr.c (gfc_trans_subcomponent_assign): Always assign
711 the expression component to the destination. In addition, if
712 the component has allocatable components, copy them and
713 deallocate those of the expression, if it is not a variable.
714 The expression is fixed if not a variable to prevent multiple
717 2015-05-12 Thomas Koenig <tkoenig@gcc.gnu.org>
720 * frontend-passes.c (has_dimen_vector_ref): New function.
721 (inline_matmul_assign): Use it to return early in case
722 of unhandled vector subscripts.
724 2015-05-12 Thomas Koenig <tkoenig@gcc.gnu.org>
728 * gfortran.h (gfc_array_spec): Add field resolved.
729 * array.c (gfc_resolve_array_spec): Resolve array spec
732 2015-05-11 Mikael Morin <mikael@gcc.gnu.org>
735 * simplify.c (simplify_bound): Fix assert to accept subobject arrays.
737 2015-05-10 Thomas Koenig <tkoenig@gcc.gnu.org>
740 * frontend-passes.c (scalarized_expr): Set correct dimension and
741 shape for the expression to be passed to lbound. Remove trailing
742 references after array refrence.
743 (inline_matmul_assign): Remove gfc_copy_expr from calls
744 to scalarized_expr().
746 2015-05-10 Mikael Morin <mikael@gcc.gnu.org>
748 * simplify.c (simplify_bound_dim): Don't check for emptyness
749 in the case of cobound simplification. Factor lower/upper
750 bound differenciation before the actual simplification.
751 (simplify_bound): Remove assumed shape specific simplification.
752 Don't give up early for the lbound of an assumed shape.
754 2015-05-09 Mikael Morin <mikael@gcc.gnu.org>
757 * trans-array.h (gfc_scalar_elemental_arg_saved_as_reference):
759 * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
761 (gfc_add_loop_ss_code): Use gfc_scalar_elemental_arg_saved_as_reference
763 (gfc_walk_elemental_function_args): Set the dummy_arg field.
764 * trans.h (gfc_ss_info): New subfield dummy_arg.
765 * trans-expr.c (gfc_conv_procedure_call): Revert the change
767 (gfc_conv_expr): Use gfc_scalar_elemental_arg_saved_as_reference
770 2015-05-08 Mikael Morin <mikael@gcc.gnu.org>
772 * trans-array.c (gfc_walk_elemental_function_args):
773 Don't skip the advance to the next dummy argument when skipping
774 absent optional args.
776 2015-05-05 David Malcolm <dmalcolm@redhat.com>
778 * expr.c (check_inquiry): Fix indentation so that it reflects the
780 * interface.c (compare_parameter): Likewise.
781 * parse.c (parse_oacc_structured_block): Likewise.
782 * target-memory.c (expr_to_char): Likewise.
783 * trans-types.c (gfc_init_kinds): Likewise.
785 2015-05-02 Steven G. Kargl <kargl@gcc.gnu.org>
788 * invoke.texi: Remove 'no-' in '-fno-fixed-form'
790 2015-05-01 Mikael Morin <mikael@gcc.gnu.org>
792 * simplify.c (simplify_bound_dim): Tighten the check for array fullness
793 by also checking for absence of subreference.
794 (simplify_bound): Don't skip simplification if the array
796 (simplify_cobound): Same.
798 2015-04-30 Thomas Koenig <tkoenig@gcc.gnu.org>
801 * simplify.c (simplify_bound): Get constant lower bounds of one
802 from array spec for assumed and explicit shape shape arrays if
803 the lower bounds are indeed one.
805 2015-04-30 David Malcolm <dmalcolm@redhat.com>
807 * options.c (gfc_init_options): Remove spurious second
809 * trans-stmt.c (gfc_trans_allocate): Likewise.
811 2015-04-28 Andre Vehreschild <vehre@gmx.de>
813 * interface.c (gfc_compare_types): Check for unlimited
814 polymorphism flag in the correct position indepent of the _data
815 component being present or not. This prevents a segfault, when
816 the _data component is not present.
817 * symbol.c (gfc_type_compatible): Same.
819 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
821 * Make-lang.in (fortran.mostlyclean): Remove gfortran and
824 2015-04-27 Andre Vehreschild <vehre@gmx.de>
828 * trans-array.c (duplicate_allocatable): Fixed deep copy of
829 allocatable components, which are liable for copy only, when
831 (gfc_duplicate_allocatable): Add deep-copy code into if
832 component allocated block. Needed interface change for that.
833 (gfc_copy_allocatable_data): Supplying NULL_TREE for code to
834 add into if-block for checking whether a component was
836 (gfc_duplicate_allocatable_nocopy): Likewise.
837 (structure_alloc_comps): Likewise.
838 * trans-array.h: Likewise.
839 * trans-expr.c (gfc_trans_alloc_subarray_assign): Likewise.
840 * trans-openmp.c (gfc_walk_alloc_comps): Likewise.
842 2015-04-23 Andre Vehreschild <vehre@gmx.de>
845 * expr.c (gfc_lval_expr_from_sym): Code to select the regular
846 or class array added.
847 * gfortran.h: Add IS_CLASS_ARRAY macro.
848 * trans-array.c (gfc_add_loop_ss_code): Treat class objects
849 to be referenced always.
850 (build_class_array_ref): Adapt retrieval of array descriptor.
851 (build_array_ref): Likewise.
852 (gfc_conv_array_ref): Hand the vptr or the descriptor to
853 build_array_ref depending whether the sym is class or not.
854 (gfc_trans_array_cobounds): Select correct gfc_array_spec for
855 regular and class arrays.
856 (gfc_trans_array_bounds): Likewise.
857 (gfc_trans_dummy_array_bias): Likewise.
858 (gfc_get_dataptr_offset): Correcting call of build_array_ref.
859 (gfc_conv_expr_descriptor): Set the array's offset to -1 when
860 lbound in inner most dim is 1 and symbol non-pointer/assoc.
861 * trans-decl.c (gfc_build_qualified_array): Select correct
862 gfc_array_spec for regular and class arrays.
863 (gfc_build_dummy_array_decl): Likewise.
864 (gfc_get_symbol_decl): Get a dummy array for class arrays.
865 (gfc_trans_deferred_vars): Tell conv_expr that the descriptor
867 * trans-expr.c (gfc_class_vptr_get): Get the class descriptor
868 from the correct location for class arrays.
869 (gfc_class_len_get): Likewise.
870 (gfc_conv_intrinsic_to_class): Add handling of _len component.
871 (gfc_conv_class_to_class): Prevent access to unset array data
872 when the array is an optional argument. Add handling of _len
874 (gfc_copy_class_to_class): Check that _def_init is non-NULL
875 when used in _vptr->copy()
876 (gfc_trans_class_init_assign): Ensure that the rank of
878 (gfc_conv_component_ref): Get the _vptr along with _data refs.
879 (gfc_conv_variable): Make sure the temp array descriptor is
880 returned for class arrays, too, and that class arrays are
881 dereferenced correctly.
882 (gfc_conv_procedure_call): For polymorphic type initialization
883 the initializer has to be a pointer to _def_init stored in a
884 dummy variable, which then needs to be used by value.
885 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Use the
886 temporary array descriptor for class arrays, too.
887 (gfc_conv_intrinsic_storage_size): Likewise.
888 (gfc_conv_intrinsic_loc): Add ref to _data for BT_CLASS
890 * trans-stmt.c (trans_associate_var): Use a temporary array for
891 the associate variable of class arrays, too, making the array
892 one-based (lbound == 1).
893 * trans-types.c (gfc_is_nodesc_array): Use the correct
895 * trans.c (gfc_build_array_ref): Use the dummy array descriptor
897 * trans.h: Add class_vptr to gfc_se for storing a class ref's
900 2015-04-22 Steven G. Kargl <kargl@gcc.gnu.org>
903 * decl.c (add_init_expr_to_sym): Set the length type parameter.
905 2015-04-10 Tobias Burnus <burnus@net-b.de>
907 * trans-stmt.c (gfc_trans_lock_unlock): Implement -fcoarray=lib
908 version; reject not-yet-implemented variants.
909 * trans-types.c (gfc_get_derived_type): For lock_type with
910 -fcoarray=lib, use a void pointer as type.
911 * trans.c (gfc_allocate_using_lib, gfc_allocate_allocatable):
912 Handle lock_type with -fcoarray=lib.
914 2015-04-10 Mikael Morin <mikael@gcc.gnu.org>
920 * symbol.c (save_symbol_data, gfc_save_symbol_data): Rename the
921 former to the latter and make it non-static. Update callers.
922 * gfortran.h (gfc_save_symbol_data): New prototype.
923 * decl.c (gfc_match_decl_type_spec): Call 'gfc_save_symbol_data'
924 before modifying symbols 'sym' and 'dt_sym'.
926 2013-04-09 Paul Thomas <pault@gcc.gnu.org>
929 * primary.c (gfc_variable_attr): Avoid ICE on AR_UNKNOWN if any
930 of the index variables are untyped and errors are present.
932 2015-04-07 Andre Vehreschild <vehre@gmx.de>
935 * trans-stmt.c (gfc_trans_allocate): For intrinsic functions
936 use conv_expr_descriptor() instead of conv_expr_reference().
938 2015-03-30 Jakub Jelinek <jakub@redhat.com>
941 * trans-openmp.c (gfc_trans_omp_do): For !simple simd with explicit
942 linear clause for the iterator set OMP_CLAUSE_LINEAR_NO_COPYIN.
943 For implcitly added !simple OMP_CLAUSE_LINEAR set it too. Use step 1
944 instead of the original step on the new iterator - count.
946 2015-03-25 Mikael Morin <mikael@gcc.gnu.org>
950 * gfortran.h (struct gfc_namespace): New field 'types_resolved'.
951 * resolve.c (resolve_types): Return early if field 'types_resolved'
952 is set. Set 'types_resolved' at the end.
954 2015-03-24 Andre Vehreschild <vehre@gmx.de>
957 * trans-expr.c (gfc_conv_structure): Fixed indendation.
958 Using integer_zero_node now instead of explicitly
959 constructing a integer constant zero node.
960 (gfc_conv_derived_to_class): Add handling of _len component,
961 i.e., when the rhs has a string_length then assign that to
962 class' _len, else assign 0.
963 (gfc_conv_intrinsic_to_class): Likewise.
965 2015-03-24 Andre Vehreschild <vehre@gmx.de>
970 * class.c (gfc_add_component_ref): Free no longer needed
971 ref-chains to prevent memory loss.
972 (find_intrinsic_vtab): For deferred length char arrays or
973 unlimited polymorphic objects, store the size in bytes of one
974 character in the size component of the vtab.
975 * gfortran.h: Added gfc_add_len_component () define.
976 * trans-array.c (gfc_trans_create_temp_array): Switched to new
977 function name for getting a class' vtab's field.
978 (build_class_array_ref): Likewise.
979 (gfc_array_init_size): Using the size information from allocate
980 more consequently now, i.e., the typespec of the entity to
981 allocate is no longer needed. This is to address the last open
982 comment in PR fortran/57456.
983 (gfc_array_allocate): Likewise.
984 (structure_alloc_comps): gfc_copy_class_to_class () needs to
985 know whether the class is unlimited polymorphic.
986 * trans-array.h: Changed interface of gfc_array_allocate () to
987 reflect the no longer needed typespec.
988 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): New.
989 (gfc_reset_len): New.
990 (gfc_get_class_array_ref): Switch to new function name for
991 getting a class' vtab's field.
992 (gfc_copy_class_to_class): Added flag to know whether the class
993 to copy is unlimited polymorphic. Adding _len dependent code
994 then, which calls ->vptr->copy () with four arguments adding
995 the length information ->vptr->copy(from, to, from_len, to_cap).
996 (gfc_conv_procedure_call): Switch to new function name for
997 getting a class' vtab's field.
998 (alloc_scalar_allocatable_for_assignment): Use the string_length
999 as computed by gfc_conv_expr and not the statically backend_decl
1000 which may be incorrect when ref-ing.
1001 (gfc_trans_assignment_1): Use the string_length variable and
1002 not the rse.string_length. The former has been computed more
1004 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Switch to new
1005 function name for getting a class' vtab's field.
1006 (gfc_conv_intrinsic_storage_size): Likewise.
1007 (gfc_conv_intrinsic_transfer): Likewise.
1008 * trans-stmt.c (gfc_trans_allocate): Restructured to evaluate
1009 source=expr3 only once before the loop over the objects to
1010 allocate, when the objects are not arrays. Doing correct _len
1011 initialization and calling of vptr->copy () fixing PR 64787.
1012 (gfc_trans_deallocate): Reseting _len to 0, preventing future
1014 * trans.c (gfc_build_array_ref): Switch to new function name
1015 for getting a class' vtab's field.
1016 (gfc_add_comp_finalizer_call): Likewise.
1017 * trans.h: Define the prototypes for the gfc_class_vtab_*_get ()
1018 and gfc_vptr_*_get () functions.
1019 Added gfc_find_and_cut_at_last_class_ref () and
1020 gfc_reset_len () routine prototype. Added flag to
1021 gfc_copy_class_to_class () prototype to signal an unlimited
1022 polymorphic entity to copy.
1024 2015-03-24 Iain Sandoe <iain@codesourcery.com>
1025 Tobias Burnus <burnus@net-b.de>
1027 * gfortran.texi (_gfortran_caf_sync_memory): Improve wording.
1029 2015-03-23 Paul Thomas <pault@gcc.gnu.org>
1030 Mikael Morin <mikael@gcc.gnu.org>
1033 * gfortran.h (struct symbol_attribute) : New field
1034 'array_outer_dependency'.
1035 * trans.h (struct gfc_ss_info): New field 'array_outer_dependency'.
1036 * module.c (enum ab_attribute): New value AB_ARRAY_OUTER_DEPENDENCY.
1037 (attr_bits): Append same value to initializer.
1038 (mio_symbol_attribute): Handle 'array_outer_dependency' attr
1039 in module read and write.
1040 * resolve.c (update_current_proc_outer_array_dependency): New function.
1041 (resolve_function, resolve_call): Add code to update current procedure's
1042 'array_outer_dependency' attribute.
1043 (resolve_variable): Mark current procedure with attribute
1044 array_outer_dependency if the variable is an array coming from outside
1045 the current namespace.
1046 (resolve_fl_procedure): Mark a procedure without body with attribute
1047 'array_outer_dependency'.
1048 * trans-array.c (gfc_conv_resolve_dependencies): If any ss is
1049 marked as 'array_outer_dependency' generate a temporary.
1050 (gfc_walk_function_expr): If the function may reference external arrays,
1051 mark the head gfc_ss with flag 'array_outer_dependency'.
1053 2015-03-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1055 PR libgfortran/59513
1056 * gfortran.texi (Read/Write after EOF marker): New information.
1058 2015-03-21 H.J. Lu <hongjiu.lu@intel.com>
1060 * gfortran.texi (_gfortran_caf_sync_memory): Put @{xxx} in one
1063 2015-03-21 Tobias Burnus <burnus@net-b.de>
1065 * gfortran.texi (_gfortran_caf_sync_all, _gfortran_caf_sync_images,
1066 _gfortran_caf_sync_memory, _gfortran_caf_error_stop,
1067 _gfortran_caf_error_stop_str, _gfortran_caf_atomic_define,
1068 _gfortran_caf_atomic_ref, _gfortran_caf_atomic_cas,
1069 _gfortran_caf_atomic_op): New sections.
1071 2015-03-21 Tobias Burnus <burnus@net-b.de>
1073 * trans-expr.c (gfc_get_tree_for_caf_expr): Reject unimplemented
1074 coindexed coarray accesses.
1076 2015-03-17 Paul Thomas <pault@gcc.gnu.org>
1079 * trans-types.c (gfc_get_derived_type): If an abstract derived
1080 type with procedure pointer components has no other type of
1081 component, return the backend_decl. Otherwise build the
1082 components if any of the non-procedure pointer components have
1085 2015-03-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1088 *trans-intrinisic.c (conv_intrinsic_system_clock): Check the
1089 smallest kind passed in user arguments and hardcode tesults for
1090 KIND=1 or KIND=2 to indicate no clock available.
1092 2015-03-16 Andre Vehreschild <vehre@gmx.de>
1094 * resolve.c: Prevent segfault on illegal input.
1096 2015-03-14 Mikael Morin <mikael@gcc.gnu.org>
1099 * trans-expr.c (gfc_trans_pointer_assignment): Clear DESCRIPTOR_ONLY
1100 field before reusing LSE.
1102 2015-03-11 Janne Blomqvist <jb@gcc.gnu.org>
1105 * gfortran.texi: Document behavior when opening files without
1106 explicit ACTION= specifier.
1108 2015-03-10 Paul Thomas <pault@gcc.gnu.org>
1111 * trans-expr.c (gfc_conv_component_ref): If the component
1112 backend declaration is missing and the derived type symbol is
1113 available in the reference, call gfc_build_derived_type.
1115 2015-03-10 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
1116 Tobias Burnus <burnus@net-b.de>
1118 * trans.h (caf_sync_memory): New function decl tree.
1119 * trans-decl.c (gfc_build_builtin_function_decls): Define it.
1120 (create_main_function): Don't call sync_synchronize and leave
1121 it to the CAF library.
1122 * trans-stmt.c (gfc_trans_stop): Ditto.
1123 (gfc_trans_sync): Ditto; add call library call for sync memory.
1125 2015-03-08 Mikael Morin <mikael@gcc.gnu.org>
1128 * resolve.c (resolve_symbol): Check that the symbol found by
1129 name lookup really is the current symbol being resolved.
1131 2015-03-02 Tobias Burnus <burnus@net-b.de>
1133 * check.c (gfc_check_atomic): Properly check for coarrayness
1134 and for being coindexed.
1136 2015-02-26 Martin Liska <mliska@suse.cz>
1138 * resolve.c: Rename enum 'comparison' to 'compare_result' as
1139 solution for -Wodr issue.
1141 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
1144 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1146 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1147 * types.def (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
1148 (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
1149 Remove function types.
1150 (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR)
1151 (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_INT_INT_VAR)
1152 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
1155 2015-02-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
1159 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Remove mapping
1160 for component references to class objects.
1161 (gfc_conv_procedure_call): Compare the class by name.
1163 2015-02-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1166 * scanner.c (gfc_next_char_literal): For free form source,
1167 check for '!' and if found, clear the comment and go back
1168 and get the next character. For fixed form source, skip the
1171 2015-02-12 Paul Thomas <pault@gcc.gnu.org>
1174 * trans-stmt.c (gfc_trans_deallocate): If a component array
1175 expression is not a descriptor type and it is a derived type
1176 that has allocatable components and is not finalizable, then
1177 deallocate the allocatable components.
1179 2015-02-08 Mikael Morin <mikael@gcc.gnu.org>
1182 * module.c (check_for_ambiguous): Change argument type
1183 from gfc_symbol to gfc_symtree. Check local (symtree) name
1184 instead of original (symbol) name.
1185 (read_module): Update caller.
1187 2015-02-06 Paul Thomas <pault@gcc.gnu.org>
1190 * gfortran.h: Add 'must finalize' field to gfc_expr and
1191 prototypes for gfc_is_alloc_class_scalar_function and for
1192 gfc_is_alloc_class_array_function.
1193 * expr.c (gfc_is_alloc_class_scalar_function,
1194 gfc_is_alloc_class_array_function): New functions.
1195 * trans-array.c (gfc_add_loop_ss_code): Do not move the
1196 expression for allocatable class scalar functions outside the
1198 (conv_array_index_offset): Cope with deltas being NULL_TREE.
1199 (build_class_array_ref): Do not return with allocatable class
1200 array functions. Add code to pick out the returned class array.
1201 Dereference if necessary and return if not a class object.
1202 (gfc_conv_scalarized_array_ref): Cope with offsets being NULL.
1203 (gfc_walk_function_expr): Return an array ss for the result of
1204 an allocatable class array function.
1205 * trans-expr.c (gfc_conv_subref_array_arg): Remove the assert
1206 that the argument should be a variable. If an allocatable class
1207 array function, set the offset to zero and skip the write-out
1209 (gfc_conv_procedure_call): Add allocatable class array function
1210 to the assert. Call gfc_conv_subref_array_arg for allocatable
1211 class array function arguments with derived type formal arg..
1212 Add the code for handling allocatable class functions, including
1213 finalization calls to prevent memory leaks.
1214 (arrayfunc_assign_needs_temporary): Return if an allocatable
1215 class array function.
1216 (gfc_trans_assignment_1): Set must_finalize to rhs expression
1217 for allocatable class functions. Set scalar_to_array as needed
1218 for scalar class allocatable functions assigned to an array.
1219 Nullify the allocatable components corresponding the the lhs
1220 derived type so that the finalization does not free them.
1222 2015-01-29 Andre Vehreschild <vehre@gmx.de>
1223 Janus Weil <janus@gcc.gnu.org>
1226 Initial patch by Janus Weil
1227 * resolve.c (resolve_allocate_expr): Add check for comp. only
1228 when target is not unlimited polymorphic.
1229 * trans-stmt.c (gfc_trans_allocate): Assign correct value to
1230 _len component of unlimited polymorphic entities.
1232 2015-02-05 Tobias Burnus <burnus@net-b.de>
1235 * resolve.c (resolve_transfer): Also check structure
1238 2015-02-05 Paul Thomas <pault@gcc.gnu.org>
1241 * resolve.c (resolve_structure_cons): Obtain the rank of class
1243 * trans-expr.c (gfc_trans_alloc_subarray_assign): Do the
1244 assignment to allocatable class array components.
1245 (alloc_scalar_allocatable_for_subcomponent_assignment): If comp
1246 is a class component, allocate to the _data field.
1247 (gfc_trans_subcomponent_assign): If a class component with a
1248 derived type expression set the _vptr field and for array
1249 components, call gfc_trans_alloc_subarray_assign. For scalars,
1250 the assignment is performed here.
1252 2015-02-04 Jakub Jelinek <jakub@redhat.com>
1254 * options.c: Include langhooks.h.
1255 (gfc_post_options): Change lang_hooks.name based on
1256 selected -std= mode.
1258 2015-02-03 Steven G. Kargl <kargl@gcc.gnu.org>
1260 * intrinsic.texi (CO_ASSOCIATED): c_prt_1 should be c_ptr_1.
1262 2015-01-30 Andre Vehreschild <vehre@gmx.de>
1264 * trans-decl.c (gfc_get_symbol_decl): Removed duplicate code.
1265 * trans-expr.c (gfc_conv_intrinsic_to_class): Fixed indentation.
1266 Fixed datatype of charlen to be a 32-bit int.
1268 2015-02-01 Joseph Myers <joseph@codesourcery.com>
1270 * error.c (gfc_warning (const char *, ...), gfc_warning_now (const
1271 char *, ...)): Remove functions.
1272 * gfortran.h (gfc_warning (const char *, ...), gfc_warning_now
1273 (const char *, ...)): Remove declarations.
1274 * arith.c, check.c, data.c, decl.c, frontend-passes.c,
1275 interface.c, intrinsic.c, io.c, matchexp.c, module.c, openmp.c,
1276 options.c, parse.c, primary.c, resolve.c, scanner.c, symbol.c,
1277 trans-common.c, trans-const.c, trans-stmt.c: All callers of
1278 gfc_warning and gfc_warning_now changed to pass 0 or option number
1281 2015-01-30 Joseph Myers <joseph@codesourcery.com>
1283 * f95-lang.c, gfortranspec.c, trans-const.c, trans-expr.c: All
1284 callers of fatal_error changed to pass input_location as first
1287 2015-01-28 Tobias Burnus <burnus@net-b.de>
1289 * intrinsic.texi (CO_BROADCAST): Correct argument description.
1291 2015-01-27 Tobias Burnus <burnus@net-b.de>
1294 * trans-openmp.c (gfc_has_alloc_comps, gfc_trans_omp_clauses):
1295 Fix handling for scalar coarrays.
1296 * trans-types.c (gfc_get_element_type): Add comment.
1298 2015-01-27 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1301 * interface.c: Remove <algorithm>.
1302 (check_dummy_characteristics): Use MAX instead of std::max.
1304 2015-01-26 Paul Thomas <pault@gcc.gnu.org>
1307 * resolve.c (resolve_allocate_expr): If the default initializer
1308 is NULL, keep the original MOLD expression so that the correct
1309 typespec is available.
1311 2015-01-26 Tobias Burnus <burnus@net-b.de>
1314 * interface.c (check_dummy_characteristics): Fix coarray handling.
1316 2015-01-26 Tobias Burnus <burnus@net-b.de>
1318 * io.c (gfc_match_inquire): Replace "-1" by a defined constant.
1320 2015-01-26 Janus Weil <janus@gcc.gnu.org>
1323 * class.c (finalize_component): New argument 'sub_ns'. Insert code to
1324 check if 'expr' is associated.
1325 (generate_finalization_wrapper): Rename 'ptr' symbols to 'ptr1' and
1326 'ptr2'. Pass 'sub_ns' to finalize_component.
1328 2015-01-25 Mikael Morin <mikael@gcc.gnu.org>
1331 * decl.c (gfc_match_derived_decl): Don't insert a new symtree element.
1332 * module.c (MOD_VERSION): Bump.
1333 (write_module): Don't write list of extensions.
1334 (read_module): Don't jump over list of extensions;
1335 don't load list of extensions.
1336 (load_derived_extensions, write_dt_extensions,
1337 write_derived_extensions): Remove.
1339 2015-01-24 Tobias Burnus <burnus@net-b.de>
1341 * parse.c (gfc_parse_file): Fix two-location gfc_error call.
1343 2015-01-23 Martin Liska <mliska@suse.cz>
1345 * decl.c (attr_decl1): Workaround -Wmaybe-uninitialized
1346 false positive during profiledbootstrap by initializing them.
1347 * matchexp.c (match_mult_operand): Likewise.
1348 * module.c (write_atom): Likewise.
1349 (read_module): Likewise.
1351 2015-01-23 Tom de Vries <tom@codesourcery.com>
1354 * lang.opt (fopenacc): Mark as LTO option.
1356 2015-01-23 Tom de Vries <tom@codesourcery.com>
1359 * lang.opt (fopenmp): Mark as LTO option.
1361 2015-01-23 Andre Vehreschild <vehre@gmx.de>
1363 * trans-decl.c (gfc_finish_var_decl): Fixed moved comment.
1364 * trans-stmt.c (gfc_trans_allocate): Fixed indentation.
1366 2015-01-23 Jakub Jelinek <jakub@redhat.com>
1368 * gfc-diagnostic.def (DK_ICE_NOBT): New kind.
1370 2015-01-23 Janus Weil <janus@gcc.gnu.org>
1373 * class.c (finalize_component): Apply the check for 'fini_coarray' only
1374 to coarray components.
1376 2015-01-23 Tobias Burnus <burnus@net-b.de>
1379 * trans-openmp.c (gfc_trans_oacc_combined_directive): Fix
1382 2015-01-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1386 * trans-io.c (set_parameter_value): Delete use of has_iostat.
1387 Redefine to not generate any runtime error check calls.
1388 (set_parameter_value_chk): Rename of the former
1389 set_parameter_value with the runtime error checks and fix
1390 whitespace. (set_parameter_value_inquire): New function that
1391 builds a runtime conditional block to set the INQUIRE
1392 common parameter block unit number to -2 when unit numbers
1393 exceed positive KIND=4 limits. (gfc_trans_open): Whitespace.
1394 For unit, use the renamed set_parameter_value_chk.
1395 (gfc_trans_close): Likewise use renamed function.
1396 (build_filepos): Whitespace and use renamed function.
1397 (gfc_trans_inquire): Whitespace and for unit use
1398 set_parameter_value and set_parameter_value_inquire.
1399 (gfc_trans_wait): Remove p->iostat from call to
1400 set_parameter_value. Use new set_parameter_value_chk for unit.
1401 (build_dt): Use the new set_parameter_value without p->iostat
1402 and fix whitespace. Use set_parameter_value_chk for unit.
1404 2015-01-21 Thomas Koenig <tkoenig@netcologne.de>
1407 * dependency.c (callback_dummy_intent_not_int): New function.
1408 (dummy_intent_not_in): New function.
1409 (gfc_full_array_ref_p): Use dummy_intent_not_in.
1411 2015-01-18 Andre Vehreschild <vehre@gmx.de>
1412 Janus Weil <janus@gcc.gnu.org>
1415 * class.c (gfc_get_len_component): New.
1416 (gfc_build_class_symbol): Add _len component to unlimited
1417 polymorphic entities.
1418 (find_intrinsic_vtab): Removed emitting of error message.
1419 * gfortran.h: Added prototype for gfc_get_len_component.
1420 * simplify.c (gfc_simplify_len): Use _len component where
1422 * trans-expr.c (gfc_class_len_get): New.
1423 (gfc_conv_intrinsic_to_class): Add handling for deferred
1425 (gfc_conv_structure): Treat _len component correctly.
1426 (gfc_conv_expr): Prevent bind_c handling when not required.
1427 (gfc_trans_pointer_assignment): Propagate _len component.
1428 * trans-stmt.c (class_has_len_component): New.
1429 (trans_associate_var): _len component treatment for associate
1431 (gfc_trans_allocate): Same as for trans_associate_var()
1432 * trans.h: Added prototype for gfc_class_len_get.
1434 2015-01-18 Paul Thomas <pault@gcc.gnu.org>
1437 * trans-expr.c (gfc_trans_subcomponent_assign): Use a deep copy
1438 for allocatable components, where the source is a variable.
1440 2015-01-18 Paul Thomas <pault@gcc.gnu.org>
1443 * primary.c (gfc_match_varspec): Exclude dangling associate-
1444 names with dimension 0 from being counted as arrays.
1445 * resolve.c (resolve_assoc_var): Sub-strings are permissible
1446 for associate-names, so exclude characters from the test for
1448 * trans-decl.c (gfc_get_symbol_decl): Associate-names can use
1449 the hidden string length variable of their associated target.
1450 Signal this by setting 'length' to a constant, if the decl for
1451 the string length is a variable.
1453 2015-01-17 Paul Thomas <pault@gcc.gnu.org>
1456 * trans-expr.c (gfc_trans_pointer_assignment): Make sure that
1457 before reinitializing rse, to add the rse.pre to block before
1459 * trans-intrinsic.c (gfc_conv_associated): Deal with the class
1460 data being a descriptor.
1462 2015-01-17 Andre Vehreschild <vehre@gmx.de>
1465 * primary.c (build_actual_constructor): Prevent warning.
1466 * trans-expr.c (alloc_scalar_allocatable_for_subcomponent_
1467 assignment): New function encapsulates treatment of allocatable
1469 (gfc_trans_subcomponent_assign): Needed to distinguish between
1470 regular assignment and initilization.
1471 (gfc_trans_structure_assign): Same.
1472 (gfc_conv_structure): Same.
1475 * gfortran.h: deferred_parameter is not needed, because
1476 it artificial does the trick completely.
1477 * primary.c (build_actual_constructor): Same.
1478 (gfc_convert_to_structure_constructor): Same.
1479 * resolve.c (resolve_fl_derived0): Same.
1480 * trans-expr.c (gfc_conv_component_ref): Prevent treating
1481 allocatable deferred length char arrays here.
1482 (gfc_trans_subcomponent_assign): Same as above.
1483 * trans-types.c (gfc_sym_type): This is done in
1484 gfc_get_derived_type already.
1486 2015-01-17 Andre Vehreschild <vehre@gmx.de>
1489 * trans-decl.c (gfc_get_symbol_decl):Use a ref on the string
1490 length when the symbol is declared to be a result.
1491 * trans-expr.c (gfc_conv_procedure_call): Strip deref on the
1492 string length when functions are nested and the string length
1493 is a reference already.
1495 2015-01-16 Janus Weil <janus@gcc.gnu.org>
1498 * decl.c (match_pointer_init): Error out if resolution of init expr
1501 2015-01-15 Tobias Burnus <burnus@net-b.de>
1503 * openmp.c (check_symbol_not_pointer, resolve_oacc_data_clauses,
1504 resolve_oacc_deviceptr_clause, resolve_omp_clauses,
1505 gfc_resolve_oacc_declare): Replace '%s' by %qs.
1507 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1508 Cesar Philippidis <cesar@codesourcery.com>
1509 James Norris <jnorris@codesourcery.com>
1510 Ilmir Usmanov <i.usmanov@samsung.com>
1511 Tobias Burnus <burnus@net-b.de>
1513 * lang.opt (fopenacc): New option.
1514 * cpp.c (cpp_define_builtins): Conditionally define _OPENACC.
1515 * dump-parse-tree.c (show_omp_node): Split part of it into...
1516 (show_omp_clauses): ... this new function.
1517 (show_omp_node, show_code_node): Handle EXEC_OACC_PARALLEL_LOOP,
1518 EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
1519 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
1520 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
1521 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
1522 (show_namespace): Update for OpenACC.
1523 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_2, DEF_FUNCTION_TYPE_VAR_8)
1524 (DEF_FUNCTION_TYPE_VAR_12, DEF_GOACC_BUILTIN)
1525 (DEF_GOACC_BUILTIN_COMPILER): New macros.
1526 * types.def (BT_FN_VOID_INT_INT_VAR)
1527 (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
1528 (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
1530 * gfortran.h (gfc_statement): Add ST_OACC_PARALLEL_LOOP,
1531 ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
1532 ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_DATA,
1533 ST_OACC_END_DATA, ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA,
1534 ST_OACC_LOOP, ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE,
1535 ST_OACC_WAIT, ST_OACC_CACHE, ST_OACC_KERNELS_LOOP,
1536 ST_OACC_END_KERNELS_LOOP, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
1538 (struct gfc_expr_list): New data type.
1539 (gfc_get_expr_list): New macro.
1540 (gfc_omp_map_op): Add OMP_MAP_FORCE_ALLOC, OMP_MAP_FORCE_DEALLOC,
1541 OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM, OMP_MAP_FORCE_TOFROM,
1542 OMP_MAP_FORCE_PRESENT, OMP_MAP_FORCE_DEVICEPTR.
1543 (OMP_LIST_FIRST, OMP_LIST_DEVICE_RESIDENT, OMP_LIST_USE_DEVICE)
1544 (OMP_LIST_CACHE): New enumerators.
1545 (struct gfc_omp_clauses): Add async_expr, gang_expr, worker_expr,
1546 vector_expr, num_gangs_expr, num_workers_expr, vector_length_expr,
1547 wait_list, tile_list, async, gang, worker, vector, seq,
1548 independent, wait, par_auto, gang_static, and loc members.
1549 (struct gfc_namespace): Add oacc_declare_clauses member.
1550 (gfc_exec_op): Add EXEC_OACC_KERNELS_LOOP,
1551 EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS,
1552 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
1553 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
1554 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
1555 (gfc_free_expr_list, gfc_resolve_oacc_directive)
1556 (gfc_resolve_oacc_declare, gfc_resolve_oacc_parallel_loop_blocks)
1557 (gfc_resolve_oacc_blocks): New prototypes.
1558 * match.c (match_exit_cycle): Handle EXEC_OACC_LOOP and
1559 EXEC_OACC_PARALLEL_LOOP.
1560 * match.h (gfc_match_oacc_cache, gfc_match_oacc_wait)
1561 (gfc_match_oacc_update, gfc_match_oacc_declare)
1562 (gfc_match_oacc_loop, gfc_match_oacc_host_data)
1563 (gfc_match_oacc_data, gfc_match_oacc_kernels)
1564 (gfc_match_oacc_kernels_loop, gfc_match_oacc_parallel)
1565 (gfc_match_oacc_parallel_loop, gfc_match_oacc_enter_data)
1566 (gfc_match_oacc_exit_data, gfc_match_oacc_routine): New
1568 * openmp.c: Include "diagnostic.h" and "gomp-constants.h".
1569 (gfc_free_omp_clauses): Update for members added to struct
1571 (gfc_match_omp_clauses): Change mask paramter to uint64_t. Add
1573 (resolve_omp_clauses): Add openacc parameter. Update for OpenACC.
1574 (struct fortran_omp_context): Add is_openmp member.
1575 (gfc_resolve_omp_parallel_blocks): Initialize it.
1576 (gfc_resolve_do_iterator): Update for OpenACC.
1577 (gfc_resolve_omp_directive): Call
1578 resolve_omp_directive_inside_oacc_region.
1579 (OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE)
1580 (OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_COPYPRIVATE)
1581 (OMP_CLAUSE_SHARED, OMP_CLAUSE_COPYIN, OMP_CLAUSE_REDUCTION)
1582 (OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_SCHEDULE)
1583 (OMP_CLAUSE_DEFAULT, OMP_CLAUSE_ORDERED, OMP_CLAUSE_COLLAPSE)
1584 (OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE)
1585 (OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH)
1586 (OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND)
1587 (OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM)
1588 (OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP, OMP_CLAUSE_TO)
1589 (OMP_CLAUSE_FROM, OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_THREAD_LIMIT)
1590 (OMP_CLAUSE_DIST_SCHEDULE): Use uint64_t.
1591 (OMP_CLAUSE_ASYNC, OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS)
1592 (OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_COPY, OMP_CLAUSE_COPYOUT)
1593 (OMP_CLAUSE_CREATE, OMP_CLAUSE_PRESENT)
1594 (OMP_CLAUSE_PRESENT_OR_COPY, OMP_CLAUSE_PRESENT_OR_COPYIN)
1595 (OMP_CLAUSE_PRESENT_OR_COPYOUT, OMP_CLAUSE_PRESENT_OR_CREATE)
1596 (OMP_CLAUSE_DEVICEPTR, OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER)
1597 (OMP_CLAUSE_VECTOR, OMP_CLAUSE_SEQ, OMP_CLAUSE_INDEPENDENT)
1598 (OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE_DEVICE_RESIDENT)
1599 (OMP_CLAUSE_HOST_SELF, OMP_CLAUSE_OACC_DEVICE, OMP_CLAUSE_WAIT)
1600 (OMP_CLAUSE_DELETE, OMP_CLAUSE_AUTO, OMP_CLAUSE_TILE): New macros.
1601 (gfc_match_omp_clauses): Handle those.
1602 (OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES)
1603 (OACC_LOOP_CLAUSES, OACC_PARALLEL_LOOP_CLAUSES)
1604 (OACC_KERNELS_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES)
1605 (OACC_DECLARE_CLAUSES, OACC_UPDATE_CLAUSES)
1606 (OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES)
1607 (OACC_WAIT_CLAUSES): New macros.
1608 (gfc_free_expr_list, match_oacc_expr_list, match_oacc_clause_gang)
1609 (gfc_match_omp_map_clause, gfc_match_oacc_parallel_loop)
1610 (gfc_match_oacc_parallel, gfc_match_oacc_kernels_loop)
1611 (gfc_match_oacc_kernels, gfc_match_oacc_data)
1612 (gfc_match_oacc_host_data, gfc_match_oacc_loop)
1613 (gfc_match_oacc_declare, gfc_match_oacc_update)
1614 (gfc_match_oacc_enter_data, gfc_match_oacc_exit_data)
1615 (gfc_match_oacc_wait, gfc_match_oacc_cache)
1616 (gfc_match_oacc_routine, oacc_is_loop)
1617 (resolve_oacc_scalar_int_expr, resolve_oacc_positive_int_expr)
1618 (check_symbol_not_pointer, check_array_not_assumed)
1619 (resolve_oacc_data_clauses, resolve_oacc_deviceptr_clause)
1620 (oacc_compatible_clauses, oacc_is_parallel, oacc_is_kernels)
1621 (omp_code_to_statement, oacc_code_to_statement)
1622 (resolve_oacc_directive_inside_omp_region)
1623 (resolve_omp_directive_inside_oacc_region)
1624 (resolve_oacc_nested_loops, resolve_oacc_params_in_parallel)
1625 (resolve_oacc_loop_blocks, gfc_resolve_oacc_blocks)
1626 (resolve_oacc_loop, resolve_oacc_cache, gfc_resolve_oacc_declare)
1627 (gfc_resolve_oacc_directive): New functions.
1628 * parse.c (next_free): Update for OpenACC. Move some code into...
1629 (verify_token_free): ... this new function.
1630 (next_fixed): Update for OpenACC. Move some code into...
1631 (verify_token_fixed): ... this new function.
1632 (case_executable): Add ST_OACC_UPDATE, ST_OACC_WAIT,
1633 ST_OACC_CACHE, ST_OACC_ENTER_DATA, and ST_OACC_EXIT_DATA.
1634 (case_exec_markers): Add ST_OACC_PARALLEL_LOOP, ST_OACC_PARALLEL,
1635 ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA, ST_OACC_LOOP,
1636 ST_OACC_KERNELS_LOOP.
1637 (case_decl): Add ST_OACC_ROUTINE.
1638 (push_state, parse_critical_block, parse_progunit): Update for
1640 (gfc_ascii_statement): Handle ST_OACC_PARALLEL_LOOP,
1641 ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
1642 ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_KERNELS_LOOP,
1643 ST_OACC_END_KERNELS_LOOP, ST_OACC_DATA, ST_OACC_END_DATA,
1644 ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA, ST_OACC_LOOP,
1645 ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE, ST_OACC_WAIT,
1646 ST_OACC_CACHE, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
1648 (verify_st_order, parse_spec): Handle ST_OACC_DECLARE.
1649 (parse_executable): Handle ST_OACC_PARALLEL_LOOP,
1650 ST_OACC_KERNELS_LOOP, ST_OACC_LOOP, ST_OACC_PARALLEL,
1651 ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA.
1652 (decode_oacc_directive, parse_oacc_structured_block)
1653 (parse_oacc_loop, is_oacc): New functions.
1654 * parse.h (struct gfc_state_data): Add oacc_declare_clauses
1656 (is_oacc): New prototype.
1657 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Handle
1658 EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL,
1659 EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS, EXEC_OACC_DATA,
1660 EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP, EXEC_OACC_UPDATE,
1661 EXEC_OACC_WAIT, EXEC_OACC_CACHE, EXEC_OACC_ENTER_DATA,
1662 EXEC_OACC_EXIT_DATA.
1663 (resolve_codes): Call gfc_resolve_oacc_declare.
1664 * scanner.c (openacc_flag, openacc_locus): New variables.
1665 (skip_free_comments): Update for OpenACC. Move some code into...
1666 (skip_omp_attribute): ... this new function.
1667 (skip_oacc_attribute): New function.
1668 (skip_fixed_comments, gfc_next_char_literal): Update for OpenACC.
1669 * st.c (gfc_free_statement): Handle EXEC_OACC_PARALLEL_LOOP,
1670 EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
1671 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
1672 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
1673 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
1674 * trans-decl.c (gfc_generate_function_code): Update for OpenACC.
1675 * trans-openmp.c: Include "gomp-constants.h".
1676 (gfc_omp_finish_clause, gfc_trans_omp_clauses): Use GOMP_MAP_*
1677 instead of OMP_CLAUSE_MAP_*. Use OMP_CLAUSE_SET_MAP_KIND.
1678 (gfc_trans_omp_clauses): Handle OMP_LIST_USE_DEVICE,
1679 OMP_LIST_DEVICE_RESIDENT, OMP_LIST_CACHE, and OMP_MAP_FORCE_ALLOC,
1680 OMP_MAP_FORCE_DEALLOC, OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM,
1681 OMP_MAP_FORCE_TOFROM, OMP_MAP_FORCE_PRESENT,
1682 OMP_MAP_FORCE_DEVICEPTR, and gfc_omp_clauses' async, seq,
1683 independent, wait_list, num_gangs_expr, num_workers_expr,
1684 vector_length_expr, vector, vector_expr, worker, worker_expr,
1685 gang, gang_expr members.
1686 (gfc_trans_omp_do): Handle EXEC_OACC_LOOP.
1687 (gfc_convert_expr_to_tree, gfc_trans_oacc_construct)
1688 (gfc_trans_oacc_executable_directive)
1689 (gfc_trans_oacc_wait_directive, gfc_trans_oacc_combined_directive)
1690 (gfc_trans_oacc_declare, gfc_trans_oacc_directive): New functions.
1691 * trans-stmt.c (gfc_trans_block_construct): Update for OpenACC.
1692 * trans-stmt.h (gfc_trans_oacc_directive, gfc_trans_oacc_declare):
1694 * trans.c (tranc_code): Handle EXEC_OACC_CACHE, EXEC_OACC_WAIT,
1695 EXEC_OACC_UPDATE, EXEC_OACC_LOOP, EXEC_OACC_HOST_DATA,
1696 EXEC_OACC_DATA, EXEC_OACC_KERNELS, EXEC_OACC_KERNELS_LOOP,
1697 EXEC_OACC_PARALLEL, EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_ENTER_DATA,
1698 EXEC_OACC_EXIT_DATA.
1699 * gfortran.texi: Update for OpenACC.
1700 * intrinsic.texi: Likewise.
1701 * invoke.texi: Likewise.
1703 2015-01-15 Janus Weil <janus@gcc.gnu.org>
1706 * resolve.c (resolve_fl_derived0): Continue resolving next component
1709 2015-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1712 * io.c (gfc_match_inquire): Generate error if unit number in
1713 inquire statement is a constant -1. All other values allowed.
1714 * trans-io.c (gfc_trans_inquire): Delete dummy iostat variable.
1715 (create_dummy_iostat): Delete function no longer used.
1717 2015-01-13 Jakub Jelinek <jakub@redhat.com>
1720 * trans-decl.c (create_function_arglist): Don't set TREE_READONLY
1721 on dummy args with VALUE attribute.
1723 2015-01-11 Janus Weil <janus@gcc.gnu.org>
1726 * interface.c (gfc_extend_expr): Look for type-bound operators before
1729 2015-01-11 Janus Weil <janus@gcc.gnu.org>
1732 * resolve.c (resolve_fl_derived0): Set error flag if problems with the
1733 interface of a procedure-pointer component were detected.
1735 2015-01-11 Janus Weil <janus@gcc.gnu.org>
1738 * interface.c (compare_parameter): Interface check for
1739 procedure-pointer component as actual argument.
1741 2015-01-10 Thomas Schwinge <thomas@codesourcery.com>
1743 * gfortran.texi: Update for libgomp being renamed from "GNU OpenMP
1744 Runtime Library" to "GNU Offloading and Multi Processing Runtime
1746 * intrinsic.texi: Likewise.
1748 2015-01-10 Tobias Burnus <burnus@net-b.de>
1751 * invoke.texi (Wline-truncation): Document new behaviour.
1752 * lang.opt (Wline-truncation): Add Init(-1).
1753 * options.c (gfc_post_options): If -Wline-truncation is unset,
1754 enable it for free-form source files; for the latter, also use
1755 -Werror=line-truncation, unless -Wno-error has been specified.
1757 2015-01-09 Michael Collison <michael.collison@linaro.org>
1759 * convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1760 input.h, alias.h, symtab.h, options.h, fold-const.h,
1761 wide-int.h, and inchash.h due to flattening of tree.h.
1762 * cpp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1763 input.h, alias.h, symtab.h, fold-const.h,
1764 wide-int.h, and inchash.h due to flattening of tree.h.
1766 * f95.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1767 input.h, alias.h, symtab.h, options.h, fold-const.h,
1768 wide-int.h, and inchash.h due to flattening of tree.h.
1769 * iresolve.c: Ditto.
1770 * match.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1771 input.h, alias.h, symtab.h, fold-const.h,
1772 wide-int.h, and inchash.h due to flattening of tree.h.
1773 * module.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1774 input.h, alias.h, symtab.h, options.h, fold-const.h,
1775 wide-int.h, and inchash.h due to flattening of tree.h.
1777 * target-memory.c: Include hash-set.h, vec.h,
1778 double-int.h, input.h, alias.h, symtab.h, fold-const.h,
1779 wide-int.h, and inchash.h due to flattening of tree.h.
1780 * trans-array.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1781 input.h, alias.h, symtab.h, options.h, fold-const.h,
1782 wide-int.h, and inchash.h due to flattening of tree.h.
1783 * trans.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1784 input.h, alias.h, symtab.h, options.h, fold-const.h,
1785 wide-int.h, and inchash.h due to flattening of tree.h.
1786 * trans-common.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1787 input.h, alias.h, symtab.h, fold-const.h,
1788 wide-int.h, and inchash.h due to flattening of tree.h.
1789 * trans-const.c: Ditto.
1790 * trans-decl.c: Ditto.
1791 * trans-expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1792 input.h, alias.h, symtab.h, options.h, fold-const.h,
1793 wide-int.h, and inchash.h due to flattening of tree.h.
1794 * trans-intrinsic.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1795 input.h, alias.h, symtab.h, fold-const.h,
1796 wide-int.h, inchash.h and real.h due to flattening of tree.h.
1797 * trans-io.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1798 input.h, alias.h, symtab.h, options.h, fold-const.h,
1799 wide-int.h, and inchash.h due to flattening of tree.h.
1800 * trans-openmp.c: Ditto.
1801 * trans-stmt.c: Ditto.
1802 * trans-types.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1803 input.h, alias.h, symtab.h, fold-const.h,
1804 wide-int.h, inchash.h and real.h due to flattening of tree.h.
1806 2015-01-08 Tobias Burnus <burnus@net-b.de>
1808 * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
1809 for module coarrays with -fcoarray=lib.
1810 (get_proc_pointer_decl): As module variable, make only public
1811 when not marked as private.
1813 2015-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
1816 * dependency.h: Actually commit changes.
1818 2015-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
1821 * dependency.c: Update copyright years.
1822 (gfc_discard_nops): Add prototype.
1823 * dependency.c (discard_nops): Rename to gfc_discard_nops,
1825 (gfc_discard_nops): Use gfc_discard_nops.
1826 (gfc_dep_difference): Likewise.
1827 * frontend-passes.c Update copyright years.
1828 (realloc_strings): New function. Add prototype.
1829 (gfc_run_passes): Call realloc_strings.
1830 (realloc_string_callback): New function.
1831 (create_var): Add prototype. Handle case of a
1832 scalar character variable.
1833 (optimize_trim): Do not handle allocatable variables.
1835 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1837 Update copyright years.
1839 * gfortranspec.c (lang_specific_driver): Update copyright notice
1841 * gfc-internals.texi: Bump @copying's copyright year.
1842 * gfortran.texi: Ditto.
1843 * intrinsic.texi: Ditto.
1844 * invoke.texi: Ditto.
1846 2015-01-02 Janus Weil <janus@gcc.gnu.org>
1849 * expr.c (find_component_ref): Deal with extended types.
1851 2015-01-02 Tobias Burnus <burnus@net-b.de>
1853 * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
1854 for module coarrays with -fcoarray=lib.
1856 2015-01-02 Janus Weil <janus@gcc.gnu.org>
1859 * interface.c (is_procptr_result): New function to check if an
1860 expression is a procedure-pointer result.
1861 (compare_actual_formal): Use it.
1863 Copyright (C) 2015 Free Software Foundation, Inc.
1865 Copying and distribution of this file, with or without modification,
1866 are permitted in any medium without royalty provided the copyright
1867 notice and this notice are preserved.