1 2015-09-25 Manuel López-Ibáñez <manu@gcc.gnu.org>
4 * resolve.c (resolve_fl_procedure): Work-around when iface->module
7 2015-09-21 Steven G. Kargl <kargl@gcc.gnu.org>
9 * resolve.c (nonscalar_typebound_assign): Fix typos in comment.
12 2015-09-21 Steven G. Kargl <kargl@gcc.gnu.org>
15 * resolve.c (gfc_resolve_code): Check for scalar expression in
18 2015-09-17 Paul Thomas <pault@gcc.gnu.org>
22 * module.c : Add static no_module_procedures.
23 (gfc_match_submodule): Correct memory leakage caused during the
25 (mio_symbol_attribute): Reset above if module procedure is
27 (gfc_dump_module): Set above and exit without writing smod file
29 * gfortran.texi : Add section on submodule support.
31 2015-09-10 Steven G. Kargl <kargl@gcc.gnu.org>
34 * expr.c (gfc_check_init_expr): Do not dereference a NULL pointer.
36 2015-09-10 Paul Thomas <pault@gcc.gnu.org>
39 * module.c (read_module): If a symtree exists and the symbol has
40 been associated in a submodule from a parent (sub)module, attach
41 the symbol to a 'unique symtree' and the new symbol to the
44 2015-09-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
46 * intrinsic.h (gfc_simplify_mvbits): Remove.
47 * simplify.c (gfc_simplify_mvbits): Remove.
48 * intrinsic.c (add_subroutines): Remove reference to
51 2015-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
54 * error.c (gfc_clear_pp_buffer): Reset last_location, otherwise
55 caret lines might be skipped when actually giving a diagnostic.
57 2015-08-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
60 * trans.c (gfc_call_free): Don't check if pointer is NULL.
61 * trans.h (gfc_call_free): Adjust comment.
63 2015-08-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
65 * trans.c (gfc_call_malloc, gfc_allocate_using_malloc,
66 gfc_allocate_using_lib, gfc_allocate_allocatable,
67 gfc_call_realloc): Simplify code.
68 * trans-array.c (gfc_trans_allocate_array_storage,
69 gfc_trans_auto_array_allocation, gfc_conv_array_parameter): Do not
70 convert gfc_call_free() argument.
71 * trans-expr.c (gfc_conv_string_tmp, gfc_conv_procedure_call,
72 fcncall_realloc_result): Likewise.
73 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Likewise.
75 2015-08-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
78 * intrinsic.c (add_functions, add_subroutines): Remove resolution
79 functions for FREE and MALLOC.
80 * intrinsic.h (gfc_resolve_malloc, gfc_resolve_free): Remove.
81 * iresolve.c (gfc_resolve_malloc, gfc_resolve_free): Remove.
82 * trans-intrinsic.c (conv_intrinsic_free,
83 gfc_conv_intrinsic_malloc): New functions.
85 2015-08-24 Louis Krupp <louis.krupp@zoho.com>
89 * decl.c (gfc_match_end): Clean up nested BLOCKs.
90 * parse.c (parse_block_construct): Deal gracefully with cleaned-up
93 2015-08-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
96 * config-lang.in: Add libbacktrace to target_libs.
98 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
100 * dependency.c, dependency.h, gfortran.h, io.c, module.c,
101 parse.h, resolve.c, trans-types.h, trans.h: remove useless typedefs.
103 2015-08-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
106 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Add decl
107 for quadruple precision BUILT_IN_SQRT.
109 2015-08-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
111 * trans-intrinsic.c (conv_intrinsic_ieee_is_negative): Use type
112 generic BUILT_IN_SIGNBIT.
113 (conv_intrinsic_ieee_copy_sign): Likewise.
114 * f95-lang.c (gfc_init_builtin_functions): Add BUILT_IN_ISINF,
115 BUILT_IN_ISINF_SIGN, BUILT_IN_SIGNBIT, BUILT_IN_ISLESS,
116 BUILT_IN_ISLESSGREATER, BUILT_IN_ISGREATER. Remove non-type generic
117 variants of BUILT_IN_SIGNBIT.
118 * mathbuiltins.def: Remove SIGNBIT.
120 2015-08-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
123 * gfortran.texi: New section "File operations on symbolic links".
125 2015-08-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
128 * gfortranspec.c (lang_specific_driver): Adjust --version output.
130 2015-08-08 Bud Davis <jmdavis@link.com>
131 Mikael Morin <mikael@gcc.gnu.org>
134 * symbol.c (gfc_restore_last_undo_checkpoint): Delete a common block
135 symbol if it was put in the list.
137 2015-08-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
140 * expr.c (gfc_check_init_expr): Allow some IEEE functions in
141 constant expressions.
142 (external_spec_function): Allow some IEEE functions in specification
144 * simplify.c (gfc_simplify_ieee_selected_real_kind): Remove.
145 (simplify_ieee_selected_real_kind, simplify_ieee_support,
146 matches_ieee_function_name, gfc_simplify_ieee_functions): New
148 * gfortran.h (gfc_simplify_ieee_selected_real_kind): Remove
150 (gfc_simplify_ieee_functions): Add prototype.
152 2015-08-06 Mikael Morin <mikael@gcc.gnu.org>
154 * trans.h (gfc_trans_scalar_assign): Remove fourth argument.
155 * trans-expr.c (gfc_trans_scalar_assign): Merge fourth into sixth
157 (gfc_conv_subref_array_arg, gfc_trans_subarray_assign,
158 gfc_trans_subcomponent_assign, gfc_trans_assignment_1): Update callers.
159 * trans-array.c (gfc_conv_expr_descriptor): Ditto.
160 * trans-stmt.c (forall_make_variable_temp,
161 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
162 gfc_trans_where_assign, gfc_trans_where_3): Ditto.
164 2015-08-05 Paul Thomas <pault@gcc.gnu.org>
167 * module.c (check_access): Return true if new static flag
168 'dump_smod' is true..
169 (gfc_dump_module): Rename original 'dump_module' and call from
170 new version. Use 'dump_smod' rather than the stack state to
171 determine if a submodule is being processed. The new version of
172 this procedure sets 'dump_smod' depending on the stack state and
173 then writes both the mod and smod files if a module is being
174 processed or just the smod for a submodule.
175 (gfc_use_module): Eliminate the check for module_name and
176 submodule_name being the same.
177 * trans-decl.c (gfc_finish_var_decl, gfc_build_qualified_array,
178 get_proc_pointer_decl): Set TREE_PUBLIC unconditionally and use
179 the conditions to set DECL_VISIBILITY as hidden and to set as
180 true DECL_VISIBILITY_SPECIFIED.
182 2015-08-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
185 * simplify.c (gfc_simplify_ieee_selected_real_kind): Extend IEEE
186 support to all real kinds.
188 2015-08-03 Steven G. Kargl <kargl@gcc.gnu.org>
191 * trans-expr.c (gfc_conv_procedure_call): Avoid NULL pointer reference
193 2015-08-03 Mikael Morin <mikael@gcc.gnu.org>
196 * class.c (generate_finalization_wrapper): Set finalization
197 procedure symbol's always_explicit attribute.
199 2015-08-01 Paul Thomas <pault@gcc.gnu.org>
202 * trans-intrinsic.c (gfc_conv_associated): Add the pre and post
203 blocks for the second argument to se.
205 2015-07-27 Thomas Schwinge <thomas@codesourcery.com>
207 * parse.c (parse_oacc_structured_block): Fix logic error.
208 Reported by Mikael Morin <mikael.morin@sfr.fr>.
210 2015-07-24 Mikael Morin <mikael@gcc.gnu.org>
213 * trans-expr.c (gfc_trans_assignment_1): Put component deallocation
214 code at the beginning of the block.
216 2015-07-22 Mikael Morin <mikael@gcc.gnu.org>
220 * trans-array.c (gfc_get_proc_ifc_for_expr): Use esym as procedure
223 2015-07-17 Paul Thomas <pault@gcc.gnu.org>
226 * decl.c (gfc_match_end): Pick out declared submodule name from
227 the composite identifier.
228 * gfortran.h : Add 'submodule_name' to gfc_use_list structure.
229 * module.c (gfc_match_submodule): Define submodule_name and add
230 static 'submodule_name'.
231 (gfc_match_submodule): Build up submodule filenames, using '@'
232 as a delimiter. Store the output filename in 'submodule_name'.
233 Similarly, the submodule identifier is built using '.' as an
235 (gfc_dump_module): If current state is COMP_SUBMODULE, write
236 to file 'submodule_name', using SUBMODULE_EXTENSION.
237 (gfc_use_module): Similarly, use the 'submodule_name' field in
238 the gfc_use_list structure and SUBMODULE_EXTENSION to read the
239 implicitly used submodule files.
241 2015-07-17 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
243 * trans-intrinsic.c (conv_co_collective): Remove redundant address
244 operator in the generated code.
246 2015-07-17 Andre Vehreschild <vehre@gcc.gnu.org>
249 * trans-expr.c (alloc_scalar_allocatable_for_subcomponent_assignment):
250 Compute the size to allocate for class and derived type objects
252 (gfc_trans_subcomponent_assign): Only allocate memory for a
253 component when the object to assign is not an allocatable class
254 object (the memory is already present for allocatable class objects).
255 Furthermore use copy_class_to_class for assigning the rhs to the
256 component (may happen for dummy class objects on the rhs).
258 2015-07-17 Mikael Morin <mikael@gcc.gnu.org>
259 Dominique d'Humieres <dominiq@lps.ens.fr>
262 * trans-array.c (gfc_conv_array_parameter): Guard allocatable
263 component deallocation code generation with descriptorless
264 calling convention flag.
265 * trans-expr.c (gfc_conv_expr_reference): Remove allocatable
266 component deallocation code generation from revision 212329.
267 (expr_may_alias_variables): New function.
268 (gfc_conv_procedure_call): New boolean elemental_proc to factor
269 check for procedure elemental-ness. Rename boolean f to nodesc_arg
270 and declare it in the outer scope. Use expr_may_alias_variables,
271 elemental_proc and nodesc_arg to decide whether generate allocatable
272 component deallocation code.
273 (gfc_trans_subarray_assign): Set deep copy flag.
275 2015-07-16 Steven G. Kargl <kargl@gcc.gnu.org>
279 * io.c (is_char_type): Call gfc_resolve_expr ().
280 (match_open_element, match_dt_element, match_inquire_element): Fix
283 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
285 * trans-types.c: Remove multiline #include comment.
287 2015-07-14 Steven G. Kargl <kargl@gcc.gnu.org>
289 * simplify.c (gfc_simplify_floor): Set precision of temporary to
292 2015-07-13 Andre Vehreschild <vehre@gcc.gnu.org>
295 * class.c (find_intrinsic_vtab): Put/Search vtabs for intrinsic
296 types in the top-level namespace.
298 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
300 * trans-stmt.c: Fix double word typos.
302 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
304 * arith.c: Adjust includes for flags.h changes.
310 * frontend-passes.c: Likewise.
311 * interface.c: Likewise.
312 * intrinsic.c: Likewise.
315 * openmp.c: Likewise.
317 * primary.c: Likewise.
318 * resolve.c: Likewise.
319 * scanner.c: Likewise.
320 * simplify.c: Likewise.
321 * symbol.c: Likewise.
322 * target-memory.c: Likewise.
324 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
326 * convert.c: Adjust includes.
329 * f95-lang.c: Likewise.
330 * iresolve.c: Likewise.
332 * module.c: Likewise.
333 * options.c: Likewise.
334 * target-memory.c: Likewise.
335 * trans-array.c: Likewise.
336 * trans-common.c: Likewise.
337 * trans-const.c: Likewise.
338 * trans-decl.c: Likewise.
339 * trans-expr.c: Likewise.
340 * trans-intrinsic.c: Likewise.
341 * trans-io.c: Likewise.
342 * trans-openmp.c: Likewise.
343 * trans-stmt.c: Likewise.
344 * trans-types.c: Likewise.
347 2015-07-07 Andre Vehreschild <vehre@gmx.de>
350 * trans-array.c (gfc_conv_expr_descriptor): Ensure array descriptor
351 is one-based for non-full array refs. Correct the offset when a
354 2015-07-06 Steven G. Kargl <kargl@gcc.gnu.org>
356 * io.c (check_char_variable): New function.
357 (match_open_element, match_close_element, match_file_element,
358 match_dt_element, match_inquire_element, match_wait_element): Use it.
360 2015-07-06 Andre Vehreschild <vehre@gmx.de>
363 * resolve.c (resolve_symbol): Non-private functions in modules
364 with allocatable or pointer components are marked referenced
365 now. Furthermore is the default init especially for those
366 components now done in gfc_conf_procedure_call preventing
368 * trans-decl.c (gfc_generate_function_code): Generate a fake
369 result decl for functions returning an object with allocatable
370 components and initialize them.
371 * trans-expr.c (gfc_conv_procedure_call): For value typed trees
372 use the tree without indirect ref. And for non-decl trees
373 add a temporary variable to prevent evaluating the tree
374 multiple times (prevent multiple function evaluations).
375 * trans.h: Made gfc_trans_structure_assign () protoype
376 available, which is now needed by trans-decl.c:gfc_generate_
377 function_code(), too.
379 2015-07-04 Steven G. Kargl <kargl@gcc.gnu.org>
382 * io.c (is_char_type): New function to test for BT_CHARACTER
383 (gfc_match_open, gfc_match_close, match_dt_element): Use it.
385 2015-07-02 David Edelsohn <dje.gcc@gmail.com>
387 * trans-common.c: Include <map> after system.h.
389 2015-07-02 Paul Thomas <pault@gcc.gnu.org>
392 * decl.c (get_proc_name): Make a partially populated interface
393 symbol to carry the characteristics of a module procedure and
395 (variable_decl): Declarations of dummies or results in the
396 abreviated form of module procedure is an error.
397 (gfc_match_import): IMPORT is not permitted in the interface
398 declaration of module procedures.
399 (match_attr_spec): Submodule variables have implicit save
400 attribute for F2008 onwards.
401 (gfc_match_prefix): Add 'module' as the a prefix and set the
402 module_procedure attribute.
403 (gfc_match_formal_arglist): For a module procedure keep the
404 interface formal_arglist from the interface, match new the
405 formal arguments and then compare the number and names of each.
406 (gfc_match_procedure): Add case COMP_SUBMODULE.
407 (gfc_match_function_decl, gfc_match_subroutine_decl): Set the
408 module_procedure attribute.
409 (gfc_match_entry, gfc_match_end): Add case COMP_SUBMODULE. If
410 attr abr_modproc_decl is set, switch the message accordingly
411 for subroutines and functions.
412 (gfc_match_submod_proc): New function to match the abbreviated
413 style of submodule declaration.
414 * gfortran.h : Add ST_SUBMODULE and ST_END_SUBMODULE. Add the
415 attribute bits 'used_in_submodule' and 'module_procedure'. Add
416 the bit field 'abr_modproc_decl' to gfc_symbol. Add prototypes
417 for 'gfc_copy_dummy_sym', 'gfc_check_dummy_characteristics' and
418 'gfc_check_result_characteristics'.
419 * interface.c : Add the prefix 'gfc_' to the names of functions
420 'check_dummy(result)_characteristics' and all their references.
421 * match.h : Add prototype for 'gfc_match_submod_proc' and
422 'gfc_match_submodule'.
423 (check_sym_interfaces): A module procedure is not an error in
424 a module procedure statment in a generic interface.
425 * module.c (gfc_match_submodule): New function. Add handling
426 for the 'module_procedure' attribute bit.
427 (gfc_use_module): Make sure that a submodule cannot use itself.
428 * parse.c (decode_statement): Set attr has_'import_set' for
429 the interface declaration of module procedures. Handle a match
430 occurring in 'gfc_match_submod_proc' and a match for
432 (gfc_enclosing_unit): Include the state COMP_SUBMODULE.
433 (gfc_ascii_statement): Add END SUBMODULE.
434 (accept_statement): Add ST_SUBMODULE.
435 (parse_spec): Disallow statement functions in a submodule
437 (parse_contained): Add ST_END_SUBMODULE and COMP_SUBMODULE
439 (get_modproc_result): Copy the result symbol of the interface.
440 (parse_progunit): Call it.
441 (set_syms_host_assoc): Make symbols from the ancestor module
442 and submodules use associated, as required by the standard and
443 set all private components public. Module procedures 'external'
444 attribute bit is reset and the 'used_in_submodule' bit is set.
445 (parse_module): If this is a submodule, use the ancestor module
446 and submodules. Traverse the namespace, calling
447 'set_syms_host_assoc'. Add ST_END_SUBMODULE and COMP_SUBMODULE.
448 * parse.h : Add COMP_SUBMODULE.
449 * primary.c (match_variable): Add COMP_SUBMODULE.
450 * resolve.c (compare_fsyms): New function to compare the dummy
451 characteristics of a module procedure with its interface.
452 (resolve_fl_procedure): Compare the procedure, result and dummy
453 characteristics of a module_procedure with its interface, using
454 'compare_fsyms' for the dummy arguments.
455 * symbol.c (gfc_add_procedure): Suppress the check for existing
456 procedures in the case of a module procedure.
457 (gfc_add_explicit_interface): Skip checks that must fail for
459 (gfc_add_type): Allow a new type to be added to module
460 procedures, their results or their dummy arguments.
461 (gfc_copy_dummy_sym): New function to generate new dummy args
462 and copy the characteristics from the interface.
463 * trans-decl.c (gfc_sym_mangled_function_id): Module procedures
464 must always have their names mangled as if they are symbols
465 coming from a declaration in a module.
466 (gfc_get_symbol_decl): Add 'used_in_submodule' to the assert.
467 (gfc_finish_var_decl): Symbols with the 'used_in_submodule' bit
468 set are set DECL_EXTERNAL as if they were use associated.
470 2015-07-02 Steven G. Kargl <kargl@gcc.gnu.org>
473 * match.c (gfc_match_name): Special case unary minus and plus.
475 2015-07-02 Steven G. Kargl <kargl@gcc.gnu.org>
478 * primary.c (match_sym_complex_part): Do not dereference NULL pointer.
480 2015-07-01 Thomas Koenig <tkoenig@gcc.gnu.org>
482 * arith.c (gfc_arith_divide): With -Winteger-division,
483 warn about contant integer division if there is a non-zero
485 * invoke.texi: Document -Winteger-division.
486 * lang.opt: Add -Winteger-division.
488 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
490 * f95-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
491 * trans-decl.c: Likewise.
493 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
495 * trans-decl.c (module_hasher): Likewise.
496 * trans.h (module_decl_hasher): Likewise.
498 2015-06-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
501 * error.c (gfc_warning_check): Restore the default output_buffer
502 before calling diagnostic_action_after_output.
503 (gfc_error_check): Likewise.
504 (gfc_diagnostics_init): Add comment.
506 2015-06-23 Andre Vehreschild <vehre@gmx.de>
509 * parse.c (parse_associate): Figure the rank and as of a
510 class array in an associate early.
511 * primary.c (gfc_match_varspec): Prevent setting the
512 dimension attribute on the sym for classes.
513 * resolve.c (resolve_variable): Correct the component
514 ref's type for associated variables. Add a full array ref
515 when class array's are associated.
516 (resolve_assoc_var): Correct the type of the symbol,
517 when in the associate the expression's rank becomes scalar.
518 * trans-expr.c (gfc_conv_variable): Indirect ref needed for
519 allocatable associated objects.
521 2015-06-19 Mikael Morin <mikael@gcc.gnu.org>
524 * resolve.c (resolve_global_procedure): Don't save and restore
525 OpenMP state around the call to gfc_resolve.
526 (gfc_resolve): Save OpenMP state on entry and restore it on return.
528 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
530 * convert.c: Do not include input.h, line-map.h or is-a.h.
533 * f95-lang.c: Likewise.
534 * gfortran.h: Likewise.
535 * iresolve.c: Likewise.
537 * module.c: Likewise.
538 * options.c: Likewise.
539 * target-memory.c: Likewise.
540 * trans-array.c: Likewise.
541 * trans-common.c: Likewise.
542 * trans-const.c: Likewise.
543 * trans-decl.c: Likewise.
544 * trans-expr.c: Likewise.
545 * trans-intrinsic.c: Likewise.
546 * trans-io.c: Likewise.
547 * trans-openmp.c: Likewise.
548 * trans-stmt.c: Likewise.
549 * trans-types.c: Likewise.
552 2015-06-15 Andre Vehreschild <vehre@gmx.de>
557 * gfortran.h: Extend gfc_code.ext.alloc to carry a
558 flag indicating that the array specification has to be
560 * resolve.c (resolve_allocate_expr): Add F2008 notify
561 and flag indicating source driven array spec.
562 (resolve_allocate_deallocate): Check for source driven
563 array spec, when array to allocate has no explicit
565 * trans-array.c (gfc_array_init_size): Get lower and
566 upper bound from a tree array descriptor, except when
567 the source expression is an array-constructor which is
568 fixed to be one-based.
569 (retrieve_last_ref): Extracted from gfc_array_allocate().
570 (gfc_array_allocate): Enable allocate(array, source=
571 array_expression) as specified by F2008:C633.
572 (gfc_conv_expr_descriptor): Add class tree expression
573 into the saved descriptor for class arrays.
574 * trans-array.h: Add temporary array descriptor to
575 gfc_array_allocate ().
576 * trans-expr.c (gfc_conv_procedure_call): Special handling
577 for _copy() routine translation, that comes without an
578 interface. Third and fourth argument are now passed by value.
579 * trans-stmt.c (gfc_trans_allocate): Get expr3 array
580 descriptor for temporary arrays to allow allocate(array,
581 source = array_expression) for array without array
584 2015-06-14 Thomas Koenig <tkoenig@gcc.gnu.org>
586 * intrinsic.texi: Change \leq to < in descrition of imaginary
587 part in argument to log.
589 2015-06-11 Paul Thomas <pault@gcc.gnu.org>
592 * trans-expr.c (gfc_conv_procedure_call): Allocatable scalar
593 function results must be freed and nullified after use. Create
594 a temporary to hold the result to prevent duplicate calls.
595 * trans-stmt.c (gfc_trans_allocate): Rename temporary variable
596 as 'source'. Deallocate allocatable components of non-variable
599 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
601 * f95-lang.c (gfc_create_decls): Register the main translation unit
602 through the new debug hook.
604 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
606 * convert.c : Adjust include files.
609 * f95-lang.c : Likewise.
610 * gfortran.h : Likewise.
611 * iresolve.c : Likewise.
612 * match.c : Likewise.
613 * module.c : Likewise.
614 * openmp.c : Likewise.
615 * options.c : Likewise.
616 * target-memory.c : Likewise.
617 * trans-array.c : Likewise.
618 * trans-common.c : Likewise.
619 * trans-const.c : Likewise.
620 * trans-decl.c : Likewise.
621 * trans-expr.c : Likewise.
622 * trans-intrinsic.c : Likewise.
623 * trans-io.c : Likewise.
624 * trans-openmp.c : Likewise.
625 * trans-stmt.c : Likewise.
626 * trans-types.c : Likewise.
627 * trans.c : Likewise.
629 2015-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
632 * match.c (gfc_match_type_is, gfc_match_class_is): Check if the
633 return type spec or derived type spec is validate.
635 2015-06-06 Thomas Koenig <tkoenig@netcologne.de>
638 * arith.c (eval_intrinsic_op): Set warn flag for
639 gfc_type_convert_binary if -Wconversion or -Wconversion-extra
641 (wprecision_real_real): New function.
642 (wprecision_int_real): New function.
643 (gfc_int2int): If -fno-range-check and -Wconversion are specified
644 and it is a narrowing conversion, warn.
645 (gfc_int2real): If there is a change in value for the conversion,
647 (gfc_int2complex): Likewise.
648 (gfc_real2int): If there is a fractional part to the real number,
649 warn with -Wconversion, otherwise warn with -Wconversion-extra.
650 (gfc_real2real): Emit warning if the constant was changed by
651 conversion with either -Wconversion or -Wconversion-extra. With
652 -Wconversion-extra, warn if no warning was issued earlier.
653 (gfc_real2complex): Likewise.
654 (gfc_complex2int): For -Wconversion or -Wconversion-extra, if
655 there was an imaginary part, warn; otherwise, warn for change in
656 value. Warn with -Wconversion-extra if no other warning was
658 (gfc_complex2real): For -Wconversion or -Wconversion-extra, if
659 there was an imaginary part, warn; otherwise, warn for change in
660 value. Warn with -Wconversion-extra if no other warning was
662 (gfc_complex2complex): For -Wconversion, warn if the value of
663 either the real or the imaginary part was changed. Warn for
664 -Wconversion-extra if no prior warning was issued.
665 * expr.c (gfc_check_assign): Remove check for change in value.
666 * primary.c (match_real_constant): For -Wconversion-extra, check
667 against a number in which the last non-zero digit has been
668 replaced with a zero. If the number compares equal, warn.
669 * intrinsic.c (gfc_convert_type_warn): Do not warn about constant
672 2015-06-05 Steven G. Kargl <kargl@gcc.gnu.org>
675 * resolve.c (apply_default_init_local): Do not dereference a NULL
678 2015-06-05 Thomas Koenig <tkoenig@gcc.gnu.org>
681 * frontend-passes.c (combine_array_constructor): Return early if
682 inside a FORALL loop.
684 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
686 * f95-lang.c (gfc_write_global_declarations): Remove.
687 (LANG_HOOKS_WRITE_GLOBALS): Remove.
688 (gfc_write_global_declarations): Move code from here to...
689 (gfc_be_parse_file): ...here.
690 Call global_decl_processing.
691 * trans-decl.c (gfc_emit_parameter_debug_info): Rename global_decl
692 to early_global_decl.
694 2015-06-05 Russell Whitesides <russelldub@gmail.com>
695 Steven G. Kargl <kargl@gcc.gnu.org>
700 * module.c (load_equiv): Add check for loading duplicate EQUIVALENCEs
701 from different modules. Eliminate the pruning of unused
704 2015-06-04 Thomas Koenig <tkoenig@netcologne.de>
707 * iresolve.c (gfc_resolve_adjustl): If string has a charlen,
708 copy it to the function.
709 (gfc_resolve_adjustr): Likewise.
711 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
713 * convert.c: Adjust includes for restructured coretypes.h.
716 * f95-lang.c: Likewise.
717 * iresolve.c: Likewise.
719 * module.c: Likewise.
720 * options.c: Likewise.
721 * target-memory.c: Likewise.
722 * trans-array.c: Likewise.
723 * trans-common.c: Likewise.
724 * trans-const.c: Likewise.
725 * trans-decl.c: Likewise.
726 * trans-expr.c: Likewise.
727 * trans-intrinsic.c: Likewise.
728 * trans-io.c: Likewise.
729 * trans-openmp.c: Likewise.
730 * trans-stmt.c: Likewise.
731 * trans-types.c: Likewise.
734 2015-06-02 Steven G. Kargl <kargl@gcc.gnu.org>
737 * simplify.c (gfc_simplify_reshape): Convert assert into returning
738 NULL, which triggers an error condition.
740 2015-05-27 Andre Vehreschild <vehre@gmx.de>
743 * trans-stmt.c (gfc_trans_allocate): Add missing location
744 information for e3rhs.
746 2015-05-26 Paul Thomas <pault@gcc.gnu.org>
749 * trans-array.c (gfc_conv_array_parameter): Ensure that all
750 non-variable arrays with allocatable components have the
751 components deallocated after the procedure call.
753 2015-05-24 Mikael Morin <mikael@gcc.gnu.org>
756 * resolve.c (resolve_actual_arglist): Don't throw an error
757 if the argument with procedure pointer component is not a variable.
759 2015-05-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
762 * gfortran.h (struct gfc_error_buf): Rename as
763 gfc_error_buffer. Move closer to push, pop and free
764 methods. Reimplement using an output_buffer.
765 * error.c (errors, warnings, warning_buffer, cur_error_buffer):
766 Delete everywhere in this file.
767 (error_char): Delete all contents.
768 (gfc_increment_error_count): Delete.
769 (gfc_error_now): Update comment. Set error_buffer.flag.
770 (gfc_warning_check): Do not handle warning_buffer.
771 (gfc_error_1): Delete.
772 (gfc_error_now_1): Delete.
773 (gfc_error_check): Simplify.
774 (gfc_move_error_buffer_from_to): Renamed from
775 gfc_move_output_buffer_from_to.
776 (gfc_push_error): Handle only gfc_error_buffer.
777 (gfc_pop_error): Likewise.
778 (gfc_free_error): Likewise.
779 (gfc_get_errors): Remove warnings and errors.
780 (gfc_diagnostics_init): Use static error_buffer.
781 (gfc_error_1,gfc_error_now_1): Delete declarations.
782 * symbol.c, decl.c, trans-common.c, data.c, expr.c, expr.c,
783 frontend-passes.c, resolve.c, match.c, parse.c: Replace
784 gfc_error_1 with gfc_error and gfc_error_now_1 with gfc_error_1
786 * f95-lang.c (gfc_be_parse_file): Do not update errorcount and
788 * primary.c (match_complex_constant): Replace gfc_error_buf and
789 output_buffer with gfc_error_buffer.
791 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
793 * Make-lang.in (check_gfortran_parallelize): Update comment.
795 2015-05-21 Thomas Koenig <tkoenig@gcc.gnu.org>
798 * frontend-passes.c (check_conjg_variable): New function.
799 (inline_matmul_assign): Use it to keep track of conjugated
802 2015-05-20 Andre Vehreschild <vehre@gmx.de>
805 * trans-stmt.c (gfc_trans_allocate): Always retrieve the
806 descriptor or a reference to a source= expression for
807 arrays and non-arrays, respectively. Use a temporary
808 symbol and gfc_trans_assignment for all source=
809 assignments to allocated objects besides for class and
812 2015-05-19 Jakub Jelinek <jakub@redhat.com>
815 * trans-openmp.c (gfc_trans_omp_teams): Set OMP_TEAMS_COMBINED for
817 (gfc_trans_omp_target): Make sure BIND_EXPR has non-NULL
820 2015-05-19 David Malcolm <dmalcolm@redhat.com>
822 * cpp.c (maybe_print_line): Strengthen local "map" from
823 const line_map * to const line_map_ordinary *.
824 (cb_file_change): Likewise for param "map" and local "from".
825 (cb_line_change): Likewise for local "map".
827 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
829 * interface.c (compare_actual_formal): Use std::swap instead of
831 * trans-array.c (gfc_trans_scalarized_loop_end): Likewise.
832 * trans-intrinsic.c (walk_inline_intrinsic_transpose): Likewise.
834 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
837 * interface.c(gfc_match_end_interface): Enforce F2008 C1202 (R1201).
838 * match.c(gfc_op2string): Return 'none' for INTRINSIC_NONE.
840 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
843 * decl.c(gfc_match_generic): Detected a malformed GENERIC statement.
845 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
848 * gfortran.dg/storage_size_6.f90: New tests.
850 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
853 * gfortran.dg/storage_size_6.f90: New tests.
855 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
858 * decl.c(gfc_match_entry): Change a gfc_internal_error() into
861 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
864 * gfortran.dg/storage_size_6.f90: New tests.
866 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
869 * parse.c(verify_st_order): Replace a gfc_internal_error with your
872 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
875 * io.c (match_filepos): Check for incomplete/mangled REWIND, FLUSH,
876 BACKSPACE, and ENDFILE statements
878 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
881 * symbol.c(check_conflict): Check for a conflict between a dummy
882 argument and an internal procedure name.
884 2015-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
887 * io.c (format_lex): Change to NONSTRING when checking for
888 possible doubled quote.
889 * scanner.c (gfc_next_char_literal): Revert change from 64506
890 and add a check for quotes and return.
892 2015-05-16 Thomas Koenig <tkoenig@gcc.gnu.org>
895 * expr.c (is_parent_of_current_ns): New function.
896 (check_restricted): Use it.
898 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
902 Replace all calls to gfc_notify_std_1 with gfc_notify_std and
903 gfc_warning_1 with gfc_warning.
904 * decl.c (gfc_verify_c_interop_param): Here.
905 * resolve.c (resolve_branch): Here.
906 (resolve_fl_derived): Here.
907 * dependency.c (gfc_check_argument_var_dependency):
908 * scanner.c (preprocessor_line): Use gfc_warning_now_at. Fix line
909 counter and locations before and after warning.
910 * gfortran.h (gfc_warning_1, gfc_warning_now_1, gfc_notify_std_1):
912 (gfc_warning_now_at): Declare.
913 * error.c (gfc_warning_1): Delete.
914 (gfc_notify_std_1): Delete.
915 (gfc_warning_now_1): Delete.
916 (gfc_format_decoder): Handle two locations.
917 (gfc_diagnostic_build_prefix): Rename as
918 gfc_diagnostic_build_kind_prefix.
919 (gfc_diagnostic_build_locus_prefix): Take an expanded_location
920 instead of diagnostic_info.
921 (gfc_diagnostic_build_locus_prefix): Add overload that takes two
923 (gfc_diagnostic_starter): Handle two locations.
924 (gfc_warning_now_at): New.
925 (gfc_diagnostics_init): Initialize caret_chars array.
926 (gfc_diagnostics_finish): Reset caret_chars array to default.
928 2015-05-16 Mikael Morin <mikael@gcc.gnu.org>
929 Paul Thomas <pault@gcc.gnu.org>
932 * trans-expr.c (gfc_trans_subcomponent_assign): Always assign
933 the expression component to the destination. In addition, if
934 the component has allocatable components, copy them and
935 deallocate those of the expression, if it is not a variable.
936 The expression is fixed if not a variable to prevent multiple
939 2015-05-12 Thomas Koenig <tkoenig@gcc.gnu.org>
942 * frontend-passes.c (has_dimen_vector_ref): New function.
943 (inline_matmul_assign): Use it to return early in case
944 of unhandled vector subscripts.
946 2015-05-12 Thomas Koenig <tkoenig@gcc.gnu.org>
950 * gfortran.h (gfc_array_spec): Add field resolved.
951 * array.c (gfc_resolve_array_spec): Resolve array spec
954 2015-05-11 Mikael Morin <mikael@gcc.gnu.org>
957 * simplify.c (simplify_bound): Fix assert to accept subobject arrays.
959 2015-05-10 Thomas Koenig <tkoenig@gcc.gnu.org>
962 * frontend-passes.c (scalarized_expr): Set correct dimension and
963 shape for the expression to be passed to lbound. Remove trailing
964 references after array refrence.
965 (inline_matmul_assign): Remove gfc_copy_expr from calls
966 to scalarized_expr().
968 2015-05-10 Mikael Morin <mikael@gcc.gnu.org>
970 * simplify.c (simplify_bound_dim): Don't check for emptyness
971 in the case of cobound simplification. Factor lower/upper
972 bound differenciation before the actual simplification.
973 (simplify_bound): Remove assumed shape specific simplification.
974 Don't give up early for the lbound of an assumed shape.
976 2015-05-09 Mikael Morin <mikael@gcc.gnu.org>
979 * trans-array.h (gfc_scalar_elemental_arg_saved_as_reference):
981 * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
983 (gfc_add_loop_ss_code): Use gfc_scalar_elemental_arg_saved_as_reference
985 (gfc_walk_elemental_function_args): Set the dummy_arg field.
986 * trans.h (gfc_ss_info): New subfield dummy_arg.
987 * trans-expr.c (gfc_conv_procedure_call): Revert the change
989 (gfc_conv_expr): Use gfc_scalar_elemental_arg_saved_as_reference
992 2015-05-08 Mikael Morin <mikael@gcc.gnu.org>
994 * trans-array.c (gfc_walk_elemental_function_args):
995 Don't skip the advance to the next dummy argument when skipping
996 absent optional args.
998 2015-05-05 David Malcolm <dmalcolm@redhat.com>
1000 * expr.c (check_inquiry): Fix indentation so that it reflects the
1002 * interface.c (compare_parameter): Likewise.
1003 * parse.c (parse_oacc_structured_block): Likewise.
1004 * target-memory.c (expr_to_char): Likewise.
1005 * trans-types.c (gfc_init_kinds): Likewise.
1007 2015-05-02 Steven G. Kargl <kargl@gcc.gnu.org>
1010 * invoke.texi: Remove 'no-' in '-fno-fixed-form'
1012 2015-05-01 Mikael Morin <mikael@gcc.gnu.org>
1014 * simplify.c (simplify_bound_dim): Tighten the check for array fullness
1015 by also checking for absence of subreference.
1016 (simplify_bound): Don't skip simplification if the array
1018 (simplify_cobound): Same.
1020 2015-04-30 Thomas Koenig <tkoenig@gcc.gnu.org>
1023 * simplify.c (simplify_bound): Get constant lower bounds of one
1024 from array spec for assumed and explicit shape shape arrays if
1025 the lower bounds are indeed one.
1027 2015-04-30 David Malcolm <dmalcolm@redhat.com>
1029 * options.c (gfc_init_options): Remove spurious second
1031 * trans-stmt.c (gfc_trans_allocate): Likewise.
1033 2015-04-28 Andre Vehreschild <vehre@gmx.de>
1035 * interface.c (gfc_compare_types): Check for unlimited
1036 polymorphism flag in the correct position indepent of the _data
1037 component being present or not. This prevents a segfault, when
1038 the _data component is not present.
1039 * symbol.c (gfc_type_compatible): Same.
1041 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
1043 * Make-lang.in (fortran.mostlyclean): Remove gfortran and
1046 2015-04-27 Andre Vehreschild <vehre@gmx.de>
1050 * trans-array.c (duplicate_allocatable): Fixed deep copy of
1051 allocatable components, which are liable for copy only, when
1053 (gfc_duplicate_allocatable): Add deep-copy code into if
1054 component allocated block. Needed interface change for that.
1055 (gfc_copy_allocatable_data): Supplying NULL_TREE for code to
1056 add into if-block for checking whether a component was
1058 (gfc_duplicate_allocatable_nocopy): Likewise.
1059 (structure_alloc_comps): Likewise.
1060 * trans-array.h: Likewise.
1061 * trans-expr.c (gfc_trans_alloc_subarray_assign): Likewise.
1062 * trans-openmp.c (gfc_walk_alloc_comps): Likewise.
1064 2015-04-23 Andre Vehreschild <vehre@gmx.de>
1067 * expr.c (gfc_lval_expr_from_sym): Code to select the regular
1068 or class array added.
1069 * gfortran.h: Add IS_CLASS_ARRAY macro.
1070 * trans-array.c (gfc_add_loop_ss_code): Treat class objects
1071 to be referenced always.
1072 (build_class_array_ref): Adapt retrieval of array descriptor.
1073 (build_array_ref): Likewise.
1074 (gfc_conv_array_ref): Hand the vptr or the descriptor to
1075 build_array_ref depending whether the sym is class or not.
1076 (gfc_trans_array_cobounds): Select correct gfc_array_spec for
1077 regular and class arrays.
1078 (gfc_trans_array_bounds): Likewise.
1079 (gfc_trans_dummy_array_bias): Likewise.
1080 (gfc_get_dataptr_offset): Correcting call of build_array_ref.
1081 (gfc_conv_expr_descriptor): Set the array's offset to -1 when
1082 lbound in inner most dim is 1 and symbol non-pointer/assoc.
1083 * trans-decl.c (gfc_build_qualified_array): Select correct
1084 gfc_array_spec for regular and class arrays.
1085 (gfc_build_dummy_array_decl): Likewise.
1086 (gfc_get_symbol_decl): Get a dummy array for class arrays.
1087 (gfc_trans_deferred_vars): Tell conv_expr that the descriptor
1089 * trans-expr.c (gfc_class_vptr_get): Get the class descriptor
1090 from the correct location for class arrays.
1091 (gfc_class_len_get): Likewise.
1092 (gfc_conv_intrinsic_to_class): Add handling of _len component.
1093 (gfc_conv_class_to_class): Prevent access to unset array data
1094 when the array is an optional argument. Add handling of _len
1096 (gfc_copy_class_to_class): Check that _def_init is non-NULL
1097 when used in _vptr->copy()
1098 (gfc_trans_class_init_assign): Ensure that the rank of
1100 (gfc_conv_component_ref): Get the _vptr along with _data refs.
1101 (gfc_conv_variable): Make sure the temp array descriptor is
1102 returned for class arrays, too, and that class arrays are
1103 dereferenced correctly.
1104 (gfc_conv_procedure_call): For polymorphic type initialization
1105 the initializer has to be a pointer to _def_init stored in a
1106 dummy variable, which then needs to be used by value.
1107 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Use the
1108 temporary array descriptor for class arrays, too.
1109 (gfc_conv_intrinsic_storage_size): Likewise.
1110 (gfc_conv_intrinsic_loc): Add ref to _data for BT_CLASS
1112 * trans-stmt.c (trans_associate_var): Use a temporary array for
1113 the associate variable of class arrays, too, making the array
1114 one-based (lbound == 1).
1115 * trans-types.c (gfc_is_nodesc_array): Use the correct
1117 * trans.c (gfc_build_array_ref): Use the dummy array descriptor
1119 * trans.h: Add class_vptr to gfc_se for storing a class ref's
1122 2015-04-22 Steven G. Kargl <kargl@gcc.gnu.org>
1125 * decl.c (add_init_expr_to_sym): Set the length type parameter.
1127 2015-04-10 Tobias Burnus <burnus@net-b.de>
1129 * trans-stmt.c (gfc_trans_lock_unlock): Implement -fcoarray=lib
1130 version; reject not-yet-implemented variants.
1131 * trans-types.c (gfc_get_derived_type): For lock_type with
1132 -fcoarray=lib, use a void pointer as type.
1133 * trans.c (gfc_allocate_using_lib, gfc_allocate_allocatable):
1134 Handle lock_type with -fcoarray=lib.
1136 2015-04-10 Mikael Morin <mikael@gcc.gnu.org>
1142 * symbol.c (save_symbol_data, gfc_save_symbol_data): Rename the
1143 former to the latter and make it non-static. Update callers.
1144 * gfortran.h (gfc_save_symbol_data): New prototype.
1145 * decl.c (gfc_match_decl_type_spec): Call 'gfc_save_symbol_data'
1146 before modifying symbols 'sym' and 'dt_sym'.
1148 2013-04-09 Paul Thomas <pault@gcc.gnu.org>
1151 * primary.c (gfc_variable_attr): Avoid ICE on AR_UNKNOWN if any
1152 of the index variables are untyped and errors are present.
1154 2015-04-07 Andre Vehreschild <vehre@gmx.de>
1157 * trans-stmt.c (gfc_trans_allocate): For intrinsic functions
1158 use conv_expr_descriptor() instead of conv_expr_reference().
1160 2015-03-30 Jakub Jelinek <jakub@redhat.com>
1163 * trans-openmp.c (gfc_trans_omp_do): For !simple simd with explicit
1164 linear clause for the iterator set OMP_CLAUSE_LINEAR_NO_COPYIN.
1165 For implcitly added !simple OMP_CLAUSE_LINEAR set it too. Use step 1
1166 instead of the original step on the new iterator - count.
1168 2015-03-25 Mikael Morin <mikael@gcc.gnu.org>
1172 * gfortran.h (struct gfc_namespace): New field 'types_resolved'.
1173 * resolve.c (resolve_types): Return early if field 'types_resolved'
1174 is set. Set 'types_resolved' at the end.
1176 2015-03-24 Andre Vehreschild <vehre@gmx.de>
1179 * trans-expr.c (gfc_conv_structure): Fixed indendation.
1180 Using integer_zero_node now instead of explicitly
1181 constructing a integer constant zero node.
1182 (gfc_conv_derived_to_class): Add handling of _len component,
1183 i.e., when the rhs has a string_length then assign that to
1184 class' _len, else assign 0.
1185 (gfc_conv_intrinsic_to_class): Likewise.
1187 2015-03-24 Andre Vehreschild <vehre@gmx.de>
1192 * class.c (gfc_add_component_ref): Free no longer needed
1193 ref-chains to prevent memory loss.
1194 (find_intrinsic_vtab): For deferred length char arrays or
1195 unlimited polymorphic objects, store the size in bytes of one
1196 character in the size component of the vtab.
1197 * gfortran.h: Added gfc_add_len_component () define.
1198 * trans-array.c (gfc_trans_create_temp_array): Switched to new
1199 function name for getting a class' vtab's field.
1200 (build_class_array_ref): Likewise.
1201 (gfc_array_init_size): Using the size information from allocate
1202 more consequently now, i.e., the typespec of the entity to
1203 allocate is no longer needed. This is to address the last open
1204 comment in PR fortran/57456.
1205 (gfc_array_allocate): Likewise.
1206 (structure_alloc_comps): gfc_copy_class_to_class () needs to
1207 know whether the class is unlimited polymorphic.
1208 * trans-array.h: Changed interface of gfc_array_allocate () to
1209 reflect the no longer needed typespec.
1210 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): New.
1211 (gfc_reset_len): New.
1212 (gfc_get_class_array_ref): Switch to new function name for
1213 getting a class' vtab's field.
1214 (gfc_copy_class_to_class): Added flag to know whether the class
1215 to copy is unlimited polymorphic. Adding _len dependent code
1216 then, which calls ->vptr->copy () with four arguments adding
1217 the length information ->vptr->copy(from, to, from_len, to_cap).
1218 (gfc_conv_procedure_call): Switch to new function name for
1219 getting a class' vtab's field.
1220 (alloc_scalar_allocatable_for_assignment): Use the string_length
1221 as computed by gfc_conv_expr and not the statically backend_decl
1222 which may be incorrect when ref-ing.
1223 (gfc_trans_assignment_1): Use the string_length variable and
1224 not the rse.string_length. The former has been computed more
1226 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Switch to new
1227 function name for getting a class' vtab's field.
1228 (gfc_conv_intrinsic_storage_size): Likewise.
1229 (gfc_conv_intrinsic_transfer): Likewise.
1230 * trans-stmt.c (gfc_trans_allocate): Restructured to evaluate
1231 source=expr3 only once before the loop over the objects to
1232 allocate, when the objects are not arrays. Doing correct _len
1233 initialization and calling of vptr->copy () fixing PR 64787.
1234 (gfc_trans_deallocate): Reseting _len to 0, preventing future
1236 * trans.c (gfc_build_array_ref): Switch to new function name
1237 for getting a class' vtab's field.
1238 (gfc_add_comp_finalizer_call): Likewise.
1239 * trans.h: Define the prototypes for the gfc_class_vtab_*_get ()
1240 and gfc_vptr_*_get () functions.
1241 Added gfc_find_and_cut_at_last_class_ref () and
1242 gfc_reset_len () routine prototype. Added flag to
1243 gfc_copy_class_to_class () prototype to signal an unlimited
1244 polymorphic entity to copy.
1246 2015-03-24 Iain Sandoe <iain@codesourcery.com>
1247 Tobias Burnus <burnus@net-b.de>
1249 * gfortran.texi (_gfortran_caf_sync_memory): Improve wording.
1251 2015-03-23 Paul Thomas <pault@gcc.gnu.org>
1252 Mikael Morin <mikael@gcc.gnu.org>
1255 * gfortran.h (struct symbol_attribute) : New field
1256 'array_outer_dependency'.
1257 * trans.h (struct gfc_ss_info): New field 'array_outer_dependency'.
1258 * module.c (enum ab_attribute): New value AB_ARRAY_OUTER_DEPENDENCY.
1259 (attr_bits): Append same value to initializer.
1260 (mio_symbol_attribute): Handle 'array_outer_dependency' attr
1261 in module read and write.
1262 * resolve.c (update_current_proc_outer_array_dependency): New function.
1263 (resolve_function, resolve_call): Add code to update current procedure's
1264 'array_outer_dependency' attribute.
1265 (resolve_variable): Mark current procedure with attribute
1266 array_outer_dependency if the variable is an array coming from outside
1267 the current namespace.
1268 (resolve_fl_procedure): Mark a procedure without body with attribute
1269 'array_outer_dependency'.
1270 * trans-array.c (gfc_conv_resolve_dependencies): If any ss is
1271 marked as 'array_outer_dependency' generate a temporary.
1272 (gfc_walk_function_expr): If the function may reference external arrays,
1273 mark the head gfc_ss with flag 'array_outer_dependency'.
1275 2015-03-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1277 PR libgfortran/59513
1278 * gfortran.texi (Read/Write after EOF marker): New information.
1280 2015-03-21 H.J. Lu <hongjiu.lu@intel.com>
1282 * gfortran.texi (_gfortran_caf_sync_memory): Put @{xxx} in one
1285 2015-03-21 Tobias Burnus <burnus@net-b.de>
1287 * gfortran.texi (_gfortran_caf_sync_all, _gfortran_caf_sync_images,
1288 _gfortran_caf_sync_memory, _gfortran_caf_error_stop,
1289 _gfortran_caf_error_stop_str, _gfortran_caf_atomic_define,
1290 _gfortran_caf_atomic_ref, _gfortran_caf_atomic_cas,
1291 _gfortran_caf_atomic_op): New sections.
1293 2015-03-21 Tobias Burnus <burnus@net-b.de>
1295 * trans-expr.c (gfc_get_tree_for_caf_expr): Reject unimplemented
1296 coindexed coarray accesses.
1298 2015-03-17 Paul Thomas <pault@gcc.gnu.org>
1301 * trans-types.c (gfc_get_derived_type): If an abstract derived
1302 type with procedure pointer components has no other type of
1303 component, return the backend_decl. Otherwise build the
1304 components if any of the non-procedure pointer components have
1307 2015-03-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1310 *trans-intrinisic.c (conv_intrinsic_system_clock): Check the
1311 smallest kind passed in user arguments and hardcode tesults for
1312 KIND=1 or KIND=2 to indicate no clock available.
1314 2015-03-16 Andre Vehreschild <vehre@gmx.de>
1316 * resolve.c: Prevent segfault on illegal input.
1318 2015-03-14 Mikael Morin <mikael@gcc.gnu.org>
1321 * trans-expr.c (gfc_trans_pointer_assignment): Clear DESCRIPTOR_ONLY
1322 field before reusing LSE.
1324 2015-03-11 Janne Blomqvist <jb@gcc.gnu.org>
1327 * gfortran.texi: Document behavior when opening files without
1328 explicit ACTION= specifier.
1330 2015-03-10 Paul Thomas <pault@gcc.gnu.org>
1333 * trans-expr.c (gfc_conv_component_ref): If the component
1334 backend declaration is missing and the derived type symbol is
1335 available in the reference, call gfc_build_derived_type.
1337 2015-03-10 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
1338 Tobias Burnus <burnus@net-b.de>
1340 * trans.h (caf_sync_memory): New function decl tree.
1341 * trans-decl.c (gfc_build_builtin_function_decls): Define it.
1342 (create_main_function): Don't call sync_synchronize and leave
1343 it to the CAF library.
1344 * trans-stmt.c (gfc_trans_stop): Ditto.
1345 (gfc_trans_sync): Ditto; add call library call for sync memory.
1347 2015-03-08 Mikael Morin <mikael@gcc.gnu.org>
1350 * resolve.c (resolve_symbol): Check that the symbol found by
1351 name lookup really is the current symbol being resolved.
1353 2015-03-02 Tobias Burnus <burnus@net-b.de>
1355 * check.c (gfc_check_atomic): Properly check for coarrayness
1356 and for being coindexed.
1358 2015-02-26 Martin Liska <mliska@suse.cz>
1360 * resolve.c: Rename enum 'comparison' to 'compare_result' as
1361 solution for -Wodr issue.
1363 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
1366 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1368 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1369 * types.def (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
1370 (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
1371 Remove function types.
1372 (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR)
1373 (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_INT_INT_VAR)
1374 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
1377 2015-02-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
1381 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Remove mapping
1382 for component references to class objects.
1383 (gfc_conv_procedure_call): Compare the class by name.
1385 2015-02-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1388 * scanner.c (gfc_next_char_literal): For free form source,
1389 check for '!' and if found, clear the comment and go back
1390 and get the next character. For fixed form source, skip the
1393 2015-02-12 Paul Thomas <pault@gcc.gnu.org>
1396 * trans-stmt.c (gfc_trans_deallocate): If a component array
1397 expression is not a descriptor type and it is a derived type
1398 that has allocatable components and is not finalizable, then
1399 deallocate the allocatable components.
1401 2015-02-08 Mikael Morin <mikael@gcc.gnu.org>
1404 * module.c (check_for_ambiguous): Change argument type
1405 from gfc_symbol to gfc_symtree. Check local (symtree) name
1406 instead of original (symbol) name.
1407 (read_module): Update caller.
1409 2015-02-06 Paul Thomas <pault@gcc.gnu.org>
1412 * gfortran.h: Add 'must finalize' field to gfc_expr and
1413 prototypes for gfc_is_alloc_class_scalar_function and for
1414 gfc_is_alloc_class_array_function.
1415 * expr.c (gfc_is_alloc_class_scalar_function,
1416 gfc_is_alloc_class_array_function): New functions.
1417 * trans-array.c (gfc_add_loop_ss_code): Do not move the
1418 expression for allocatable class scalar functions outside the
1420 (conv_array_index_offset): Cope with deltas being NULL_TREE.
1421 (build_class_array_ref): Do not return with allocatable class
1422 array functions. Add code to pick out the returned class array.
1423 Dereference if necessary and return if not a class object.
1424 (gfc_conv_scalarized_array_ref): Cope with offsets being NULL.
1425 (gfc_walk_function_expr): Return an array ss for the result of
1426 an allocatable class array function.
1427 * trans-expr.c (gfc_conv_subref_array_arg): Remove the assert
1428 that the argument should be a variable. If an allocatable class
1429 array function, set the offset to zero and skip the write-out
1431 (gfc_conv_procedure_call): Add allocatable class array function
1432 to the assert. Call gfc_conv_subref_array_arg for allocatable
1433 class array function arguments with derived type formal arg..
1434 Add the code for handling allocatable class functions, including
1435 finalization calls to prevent memory leaks.
1436 (arrayfunc_assign_needs_temporary): Return if an allocatable
1437 class array function.
1438 (gfc_trans_assignment_1): Set must_finalize to rhs expression
1439 for allocatable class functions. Set scalar_to_array as needed
1440 for scalar class allocatable functions assigned to an array.
1441 Nullify the allocatable components corresponding the the lhs
1442 derived type so that the finalization does not free them.
1444 2015-01-29 Andre Vehreschild <vehre@gmx.de>
1445 Janus Weil <janus@gcc.gnu.org>
1448 Initial patch by Janus Weil
1449 * resolve.c (resolve_allocate_expr): Add check for comp. only
1450 when target is not unlimited polymorphic.
1451 * trans-stmt.c (gfc_trans_allocate): Assign correct value to
1452 _len component of unlimited polymorphic entities.
1454 2015-02-05 Tobias Burnus <burnus@net-b.de>
1457 * resolve.c (resolve_transfer): Also check structure
1460 2015-02-05 Paul Thomas <pault@gcc.gnu.org>
1463 * resolve.c (resolve_structure_cons): Obtain the rank of class
1465 * trans-expr.c (gfc_trans_alloc_subarray_assign): Do the
1466 assignment to allocatable class array components.
1467 (alloc_scalar_allocatable_for_subcomponent_assignment): If comp
1468 is a class component, allocate to the _data field.
1469 (gfc_trans_subcomponent_assign): If a class component with a
1470 derived type expression set the _vptr field and for array
1471 components, call gfc_trans_alloc_subarray_assign. For scalars,
1472 the assignment is performed here.
1474 2015-02-04 Jakub Jelinek <jakub@redhat.com>
1476 * options.c: Include langhooks.h.
1477 (gfc_post_options): Change lang_hooks.name based on
1478 selected -std= mode.
1480 2015-02-03 Steven G. Kargl <kargl@gcc.gnu.org>
1482 * intrinsic.texi (CO_ASSOCIATED): c_prt_1 should be c_ptr_1.
1484 2015-01-30 Andre Vehreschild <vehre@gmx.de>
1486 * trans-decl.c (gfc_get_symbol_decl): Removed duplicate code.
1487 * trans-expr.c (gfc_conv_intrinsic_to_class): Fixed indentation.
1488 Fixed datatype of charlen to be a 32-bit int.
1490 2015-02-01 Joseph Myers <joseph@codesourcery.com>
1492 * error.c (gfc_warning (const char *, ...), gfc_warning_now (const
1493 char *, ...)): Remove functions.
1494 * gfortran.h (gfc_warning (const char *, ...), gfc_warning_now
1495 (const char *, ...)): Remove declarations.
1496 * arith.c, check.c, data.c, decl.c, frontend-passes.c,
1497 interface.c, intrinsic.c, io.c, matchexp.c, module.c, openmp.c,
1498 options.c, parse.c, primary.c, resolve.c, scanner.c, symbol.c,
1499 trans-common.c, trans-const.c, trans-stmt.c: All callers of
1500 gfc_warning and gfc_warning_now changed to pass 0 or option number
1503 2015-01-30 Joseph Myers <joseph@codesourcery.com>
1505 * f95-lang.c, gfortranspec.c, trans-const.c, trans-expr.c: All
1506 callers of fatal_error changed to pass input_location as first
1509 2015-01-28 Tobias Burnus <burnus@net-b.de>
1511 * intrinsic.texi (CO_BROADCAST): Correct argument description.
1513 2015-01-27 Tobias Burnus <burnus@net-b.de>
1516 * trans-openmp.c (gfc_has_alloc_comps, gfc_trans_omp_clauses):
1517 Fix handling for scalar coarrays.
1518 * trans-types.c (gfc_get_element_type): Add comment.
1520 2015-01-27 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1523 * interface.c: Remove <algorithm>.
1524 (check_dummy_characteristics): Use MAX instead of std::max.
1526 2015-01-26 Paul Thomas <pault@gcc.gnu.org>
1529 * resolve.c (resolve_allocate_expr): If the default initializer
1530 is NULL, keep the original MOLD expression so that the correct
1531 typespec is available.
1533 2015-01-26 Tobias Burnus <burnus@net-b.de>
1536 * interface.c (check_dummy_characteristics): Fix coarray handling.
1538 2015-01-26 Tobias Burnus <burnus@net-b.de>
1540 * io.c (gfc_match_inquire): Replace "-1" by a defined constant.
1542 2015-01-26 Janus Weil <janus@gcc.gnu.org>
1545 * class.c (finalize_component): New argument 'sub_ns'. Insert code to
1546 check if 'expr' is associated.
1547 (generate_finalization_wrapper): Rename 'ptr' symbols to 'ptr1' and
1548 'ptr2'. Pass 'sub_ns' to finalize_component.
1550 2015-01-25 Mikael Morin <mikael@gcc.gnu.org>
1553 * decl.c (gfc_match_derived_decl): Don't insert a new symtree element.
1554 * module.c (MOD_VERSION): Bump.
1555 (write_module): Don't write list of extensions.
1556 (read_module): Don't jump over list of extensions;
1557 don't load list of extensions.
1558 (load_derived_extensions, write_dt_extensions,
1559 write_derived_extensions): Remove.
1561 2015-01-24 Tobias Burnus <burnus@net-b.de>
1563 * parse.c (gfc_parse_file): Fix two-location gfc_error call.
1565 2015-01-23 Martin Liska <mliska@suse.cz>
1567 * decl.c (attr_decl1): Workaround -Wmaybe-uninitialized
1568 false positive during profiledbootstrap by initializing them.
1569 * matchexp.c (match_mult_operand): Likewise.
1570 * module.c (write_atom): Likewise.
1571 (read_module): Likewise.
1573 2015-01-23 Tom de Vries <tom@codesourcery.com>
1576 * lang.opt (fopenacc): Mark as LTO option.
1578 2015-01-23 Tom de Vries <tom@codesourcery.com>
1581 * lang.opt (fopenmp): Mark as LTO option.
1583 2015-01-23 Andre Vehreschild <vehre@gmx.de>
1585 * trans-decl.c (gfc_finish_var_decl): Fixed moved comment.
1586 * trans-stmt.c (gfc_trans_allocate): Fixed indentation.
1588 2015-01-23 Jakub Jelinek <jakub@redhat.com>
1590 * gfc-diagnostic.def (DK_ICE_NOBT): New kind.
1592 2015-01-23 Janus Weil <janus@gcc.gnu.org>
1595 * class.c (finalize_component): Apply the check for 'fini_coarray' only
1596 to coarray components.
1598 2015-01-23 Tobias Burnus <burnus@net-b.de>
1601 * trans-openmp.c (gfc_trans_oacc_combined_directive): Fix
1604 2015-01-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1608 * trans-io.c (set_parameter_value): Delete use of has_iostat.
1609 Redefine to not generate any runtime error check calls.
1610 (set_parameter_value_chk): Rename of the former
1611 set_parameter_value with the runtime error checks and fix
1612 whitespace. (set_parameter_value_inquire): New function that
1613 builds a runtime conditional block to set the INQUIRE
1614 common parameter block unit number to -2 when unit numbers
1615 exceed positive KIND=4 limits. (gfc_trans_open): Whitespace.
1616 For unit, use the renamed set_parameter_value_chk.
1617 (gfc_trans_close): Likewise use renamed function.
1618 (build_filepos): Whitespace and use renamed function.
1619 (gfc_trans_inquire): Whitespace and for unit use
1620 set_parameter_value and set_parameter_value_inquire.
1621 (gfc_trans_wait): Remove p->iostat from call to
1622 set_parameter_value. Use new set_parameter_value_chk for unit.
1623 (build_dt): Use the new set_parameter_value without p->iostat
1624 and fix whitespace. Use set_parameter_value_chk for unit.
1626 2015-01-21 Thomas Koenig <tkoenig@netcologne.de>
1629 * dependency.c (callback_dummy_intent_not_int): New function.
1630 (dummy_intent_not_in): New function.
1631 (gfc_full_array_ref_p): Use dummy_intent_not_in.
1633 2015-01-18 Andre Vehreschild <vehre@gmx.de>
1634 Janus Weil <janus@gcc.gnu.org>
1637 * class.c (gfc_get_len_component): New.
1638 (gfc_build_class_symbol): Add _len component to unlimited
1639 polymorphic entities.
1640 (find_intrinsic_vtab): Removed emitting of error message.
1641 * gfortran.h: Added prototype for gfc_get_len_component.
1642 * simplify.c (gfc_simplify_len): Use _len component where
1644 * trans-expr.c (gfc_class_len_get): New.
1645 (gfc_conv_intrinsic_to_class): Add handling for deferred
1647 (gfc_conv_structure): Treat _len component correctly.
1648 (gfc_conv_expr): Prevent bind_c handling when not required.
1649 (gfc_trans_pointer_assignment): Propagate _len component.
1650 * trans-stmt.c (class_has_len_component): New.
1651 (trans_associate_var): _len component treatment for associate
1653 (gfc_trans_allocate): Same as for trans_associate_var()
1654 * trans.h: Added prototype for gfc_class_len_get.
1656 2015-01-18 Paul Thomas <pault@gcc.gnu.org>
1659 * trans-expr.c (gfc_trans_subcomponent_assign): Use a deep copy
1660 for allocatable components, where the source is a variable.
1662 2015-01-18 Paul Thomas <pault@gcc.gnu.org>
1665 * primary.c (gfc_match_varspec): Exclude dangling associate-
1666 names with dimension 0 from being counted as arrays.
1667 * resolve.c (resolve_assoc_var): Sub-strings are permissible
1668 for associate-names, so exclude characters from the test for
1670 * trans-decl.c (gfc_get_symbol_decl): Associate-names can use
1671 the hidden string length variable of their associated target.
1672 Signal this by setting 'length' to a constant, if the decl for
1673 the string length is a variable.
1675 2015-01-17 Paul Thomas <pault@gcc.gnu.org>
1678 * trans-expr.c (gfc_trans_pointer_assignment): Make sure that
1679 before reinitializing rse, to add the rse.pre to block before
1681 * trans-intrinsic.c (gfc_conv_associated): Deal with the class
1682 data being a descriptor.
1684 2015-01-17 Andre Vehreschild <vehre@gmx.de>
1687 * primary.c (build_actual_constructor): Prevent warning.
1688 * trans-expr.c (alloc_scalar_allocatable_for_subcomponent_
1689 assignment): New function encapsulates treatment of allocatable
1691 (gfc_trans_subcomponent_assign): Needed to distinguish between
1692 regular assignment and initilization.
1693 (gfc_trans_structure_assign): Same.
1694 (gfc_conv_structure): Same.
1697 * gfortran.h: deferred_parameter is not needed, because
1698 it artificial does the trick completely.
1699 * primary.c (build_actual_constructor): Same.
1700 (gfc_convert_to_structure_constructor): Same.
1701 * resolve.c (resolve_fl_derived0): Same.
1702 * trans-expr.c (gfc_conv_component_ref): Prevent treating
1703 allocatable deferred length char arrays here.
1704 (gfc_trans_subcomponent_assign): Same as above.
1705 * trans-types.c (gfc_sym_type): This is done in
1706 gfc_get_derived_type already.
1708 2015-01-17 Andre Vehreschild <vehre@gmx.de>
1711 * trans-decl.c (gfc_get_symbol_decl):Use a ref on the string
1712 length when the symbol is declared to be a result.
1713 * trans-expr.c (gfc_conv_procedure_call): Strip deref on the
1714 string length when functions are nested and the string length
1715 is a reference already.
1717 2015-01-16 Janus Weil <janus@gcc.gnu.org>
1720 * decl.c (match_pointer_init): Error out if resolution of init expr
1723 2015-01-15 Tobias Burnus <burnus@net-b.de>
1725 * openmp.c (check_symbol_not_pointer, resolve_oacc_data_clauses,
1726 resolve_oacc_deviceptr_clause, resolve_omp_clauses,
1727 gfc_resolve_oacc_declare): Replace '%s' by %qs.
1729 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1730 Cesar Philippidis <cesar@codesourcery.com>
1731 James Norris <jnorris@codesourcery.com>
1732 Ilmir Usmanov <i.usmanov@samsung.com>
1733 Tobias Burnus <burnus@net-b.de>
1735 * lang.opt (fopenacc): New option.
1736 * cpp.c (cpp_define_builtins): Conditionally define _OPENACC.
1737 * dump-parse-tree.c (show_omp_node): Split part of it into...
1738 (show_omp_clauses): ... this new function.
1739 (show_omp_node, show_code_node): Handle EXEC_OACC_PARALLEL_LOOP,
1740 EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
1741 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
1742 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
1743 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
1744 (show_namespace): Update for OpenACC.
1745 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_2, DEF_FUNCTION_TYPE_VAR_8)
1746 (DEF_FUNCTION_TYPE_VAR_12, DEF_GOACC_BUILTIN)
1747 (DEF_GOACC_BUILTIN_COMPILER): New macros.
1748 * types.def (BT_FN_VOID_INT_INT_VAR)
1749 (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
1750 (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
1752 * gfortran.h (gfc_statement): Add ST_OACC_PARALLEL_LOOP,
1753 ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
1754 ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_DATA,
1755 ST_OACC_END_DATA, ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA,
1756 ST_OACC_LOOP, ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE,
1757 ST_OACC_WAIT, ST_OACC_CACHE, ST_OACC_KERNELS_LOOP,
1758 ST_OACC_END_KERNELS_LOOP, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
1760 (struct gfc_expr_list): New data type.
1761 (gfc_get_expr_list): New macro.
1762 (gfc_omp_map_op): Add OMP_MAP_FORCE_ALLOC, OMP_MAP_FORCE_DEALLOC,
1763 OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM, OMP_MAP_FORCE_TOFROM,
1764 OMP_MAP_FORCE_PRESENT, OMP_MAP_FORCE_DEVICEPTR.
1765 (OMP_LIST_FIRST, OMP_LIST_DEVICE_RESIDENT, OMP_LIST_USE_DEVICE)
1766 (OMP_LIST_CACHE): New enumerators.
1767 (struct gfc_omp_clauses): Add async_expr, gang_expr, worker_expr,
1768 vector_expr, num_gangs_expr, num_workers_expr, vector_length_expr,
1769 wait_list, tile_list, async, gang, worker, vector, seq,
1770 independent, wait, par_auto, gang_static, and loc members.
1771 (struct gfc_namespace): Add oacc_declare_clauses member.
1772 (gfc_exec_op): Add EXEC_OACC_KERNELS_LOOP,
1773 EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS,
1774 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
1775 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
1776 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
1777 (gfc_free_expr_list, gfc_resolve_oacc_directive)
1778 (gfc_resolve_oacc_declare, gfc_resolve_oacc_parallel_loop_blocks)
1779 (gfc_resolve_oacc_blocks): New prototypes.
1780 * match.c (match_exit_cycle): Handle EXEC_OACC_LOOP and
1781 EXEC_OACC_PARALLEL_LOOP.
1782 * match.h (gfc_match_oacc_cache, gfc_match_oacc_wait)
1783 (gfc_match_oacc_update, gfc_match_oacc_declare)
1784 (gfc_match_oacc_loop, gfc_match_oacc_host_data)
1785 (gfc_match_oacc_data, gfc_match_oacc_kernels)
1786 (gfc_match_oacc_kernels_loop, gfc_match_oacc_parallel)
1787 (gfc_match_oacc_parallel_loop, gfc_match_oacc_enter_data)
1788 (gfc_match_oacc_exit_data, gfc_match_oacc_routine): New
1790 * openmp.c: Include "diagnostic.h" and "gomp-constants.h".
1791 (gfc_free_omp_clauses): Update for members added to struct
1793 (gfc_match_omp_clauses): Change mask paramter to uint64_t. Add
1795 (resolve_omp_clauses): Add openacc parameter. Update for OpenACC.
1796 (struct fortran_omp_context): Add is_openmp member.
1797 (gfc_resolve_omp_parallel_blocks): Initialize it.
1798 (gfc_resolve_do_iterator): Update for OpenACC.
1799 (gfc_resolve_omp_directive): Call
1800 resolve_omp_directive_inside_oacc_region.
1801 (OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE)
1802 (OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_COPYPRIVATE)
1803 (OMP_CLAUSE_SHARED, OMP_CLAUSE_COPYIN, OMP_CLAUSE_REDUCTION)
1804 (OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_SCHEDULE)
1805 (OMP_CLAUSE_DEFAULT, OMP_CLAUSE_ORDERED, OMP_CLAUSE_COLLAPSE)
1806 (OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE)
1807 (OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH)
1808 (OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND)
1809 (OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM)
1810 (OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP, OMP_CLAUSE_TO)
1811 (OMP_CLAUSE_FROM, OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_THREAD_LIMIT)
1812 (OMP_CLAUSE_DIST_SCHEDULE): Use uint64_t.
1813 (OMP_CLAUSE_ASYNC, OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS)
1814 (OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_COPY, OMP_CLAUSE_COPYOUT)
1815 (OMP_CLAUSE_CREATE, OMP_CLAUSE_PRESENT)
1816 (OMP_CLAUSE_PRESENT_OR_COPY, OMP_CLAUSE_PRESENT_OR_COPYIN)
1817 (OMP_CLAUSE_PRESENT_OR_COPYOUT, OMP_CLAUSE_PRESENT_OR_CREATE)
1818 (OMP_CLAUSE_DEVICEPTR, OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER)
1819 (OMP_CLAUSE_VECTOR, OMP_CLAUSE_SEQ, OMP_CLAUSE_INDEPENDENT)
1820 (OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE_DEVICE_RESIDENT)
1821 (OMP_CLAUSE_HOST_SELF, OMP_CLAUSE_OACC_DEVICE, OMP_CLAUSE_WAIT)
1822 (OMP_CLAUSE_DELETE, OMP_CLAUSE_AUTO, OMP_CLAUSE_TILE): New macros.
1823 (gfc_match_omp_clauses): Handle those.
1824 (OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES)
1825 (OACC_LOOP_CLAUSES, OACC_PARALLEL_LOOP_CLAUSES)
1826 (OACC_KERNELS_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES)
1827 (OACC_DECLARE_CLAUSES, OACC_UPDATE_CLAUSES)
1828 (OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES)
1829 (OACC_WAIT_CLAUSES): New macros.
1830 (gfc_free_expr_list, match_oacc_expr_list, match_oacc_clause_gang)
1831 (gfc_match_omp_map_clause, gfc_match_oacc_parallel_loop)
1832 (gfc_match_oacc_parallel, gfc_match_oacc_kernels_loop)
1833 (gfc_match_oacc_kernels, gfc_match_oacc_data)
1834 (gfc_match_oacc_host_data, gfc_match_oacc_loop)
1835 (gfc_match_oacc_declare, gfc_match_oacc_update)
1836 (gfc_match_oacc_enter_data, gfc_match_oacc_exit_data)
1837 (gfc_match_oacc_wait, gfc_match_oacc_cache)
1838 (gfc_match_oacc_routine, oacc_is_loop)
1839 (resolve_oacc_scalar_int_expr, resolve_oacc_positive_int_expr)
1840 (check_symbol_not_pointer, check_array_not_assumed)
1841 (resolve_oacc_data_clauses, resolve_oacc_deviceptr_clause)
1842 (oacc_compatible_clauses, oacc_is_parallel, oacc_is_kernels)
1843 (omp_code_to_statement, oacc_code_to_statement)
1844 (resolve_oacc_directive_inside_omp_region)
1845 (resolve_omp_directive_inside_oacc_region)
1846 (resolve_oacc_nested_loops, resolve_oacc_params_in_parallel)
1847 (resolve_oacc_loop_blocks, gfc_resolve_oacc_blocks)
1848 (resolve_oacc_loop, resolve_oacc_cache, gfc_resolve_oacc_declare)
1849 (gfc_resolve_oacc_directive): New functions.
1850 * parse.c (next_free): Update for OpenACC. Move some code into...
1851 (verify_token_free): ... this new function.
1852 (next_fixed): Update for OpenACC. Move some code into...
1853 (verify_token_fixed): ... this new function.
1854 (case_executable): Add ST_OACC_UPDATE, ST_OACC_WAIT,
1855 ST_OACC_CACHE, ST_OACC_ENTER_DATA, and ST_OACC_EXIT_DATA.
1856 (case_exec_markers): Add ST_OACC_PARALLEL_LOOP, ST_OACC_PARALLEL,
1857 ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA, ST_OACC_LOOP,
1858 ST_OACC_KERNELS_LOOP.
1859 (case_decl): Add ST_OACC_ROUTINE.
1860 (push_state, parse_critical_block, parse_progunit): Update for
1862 (gfc_ascii_statement): Handle ST_OACC_PARALLEL_LOOP,
1863 ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
1864 ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_KERNELS_LOOP,
1865 ST_OACC_END_KERNELS_LOOP, ST_OACC_DATA, ST_OACC_END_DATA,
1866 ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA, ST_OACC_LOOP,
1867 ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE, ST_OACC_WAIT,
1868 ST_OACC_CACHE, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
1870 (verify_st_order, parse_spec): Handle ST_OACC_DECLARE.
1871 (parse_executable): Handle ST_OACC_PARALLEL_LOOP,
1872 ST_OACC_KERNELS_LOOP, ST_OACC_LOOP, ST_OACC_PARALLEL,
1873 ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA.
1874 (decode_oacc_directive, parse_oacc_structured_block)
1875 (parse_oacc_loop, is_oacc): New functions.
1876 * parse.h (struct gfc_state_data): Add oacc_declare_clauses
1878 (is_oacc): New prototype.
1879 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Handle
1880 EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL,
1881 EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS, EXEC_OACC_DATA,
1882 EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP, EXEC_OACC_UPDATE,
1883 EXEC_OACC_WAIT, EXEC_OACC_CACHE, EXEC_OACC_ENTER_DATA,
1884 EXEC_OACC_EXIT_DATA.
1885 (resolve_codes): Call gfc_resolve_oacc_declare.
1886 * scanner.c (openacc_flag, openacc_locus): New variables.
1887 (skip_free_comments): Update for OpenACC. Move some code into...
1888 (skip_omp_attribute): ... this new function.
1889 (skip_oacc_attribute): New function.
1890 (skip_fixed_comments, gfc_next_char_literal): Update for OpenACC.
1891 * st.c (gfc_free_statement): Handle EXEC_OACC_PARALLEL_LOOP,
1892 EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
1893 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
1894 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
1895 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
1896 * trans-decl.c (gfc_generate_function_code): Update for OpenACC.
1897 * trans-openmp.c: Include "gomp-constants.h".
1898 (gfc_omp_finish_clause, gfc_trans_omp_clauses): Use GOMP_MAP_*
1899 instead of OMP_CLAUSE_MAP_*. Use OMP_CLAUSE_SET_MAP_KIND.
1900 (gfc_trans_omp_clauses): Handle OMP_LIST_USE_DEVICE,
1901 OMP_LIST_DEVICE_RESIDENT, OMP_LIST_CACHE, and OMP_MAP_FORCE_ALLOC,
1902 OMP_MAP_FORCE_DEALLOC, OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM,
1903 OMP_MAP_FORCE_TOFROM, OMP_MAP_FORCE_PRESENT,
1904 OMP_MAP_FORCE_DEVICEPTR, and gfc_omp_clauses' async, seq,
1905 independent, wait_list, num_gangs_expr, num_workers_expr,
1906 vector_length_expr, vector, vector_expr, worker, worker_expr,
1907 gang, gang_expr members.
1908 (gfc_trans_omp_do): Handle EXEC_OACC_LOOP.
1909 (gfc_convert_expr_to_tree, gfc_trans_oacc_construct)
1910 (gfc_trans_oacc_executable_directive)
1911 (gfc_trans_oacc_wait_directive, gfc_trans_oacc_combined_directive)
1912 (gfc_trans_oacc_declare, gfc_trans_oacc_directive): New functions.
1913 * trans-stmt.c (gfc_trans_block_construct): Update for OpenACC.
1914 * trans-stmt.h (gfc_trans_oacc_directive, gfc_trans_oacc_declare):
1916 * trans.c (tranc_code): Handle EXEC_OACC_CACHE, EXEC_OACC_WAIT,
1917 EXEC_OACC_UPDATE, EXEC_OACC_LOOP, EXEC_OACC_HOST_DATA,
1918 EXEC_OACC_DATA, EXEC_OACC_KERNELS, EXEC_OACC_KERNELS_LOOP,
1919 EXEC_OACC_PARALLEL, EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_ENTER_DATA,
1920 EXEC_OACC_EXIT_DATA.
1921 * gfortran.texi: Update for OpenACC.
1922 * intrinsic.texi: Likewise.
1923 * invoke.texi: Likewise.
1925 2015-01-15 Janus Weil <janus@gcc.gnu.org>
1928 * resolve.c (resolve_fl_derived0): Continue resolving next component
1931 2015-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1934 * io.c (gfc_match_inquire): Generate error if unit number in
1935 inquire statement is a constant -1. All other values allowed.
1936 * trans-io.c (gfc_trans_inquire): Delete dummy iostat variable.
1937 (create_dummy_iostat): Delete function no longer used.
1939 2015-01-13 Jakub Jelinek <jakub@redhat.com>
1942 * trans-decl.c (create_function_arglist): Don't set TREE_READONLY
1943 on dummy args with VALUE attribute.
1945 2015-01-11 Janus Weil <janus@gcc.gnu.org>
1948 * interface.c (gfc_extend_expr): Look for type-bound operators before
1951 2015-01-11 Janus Weil <janus@gcc.gnu.org>
1954 * resolve.c (resolve_fl_derived0): Set error flag if problems with the
1955 interface of a procedure-pointer component were detected.
1957 2015-01-11 Janus Weil <janus@gcc.gnu.org>
1960 * interface.c (compare_parameter): Interface check for
1961 procedure-pointer component as actual argument.
1963 2015-01-10 Thomas Schwinge <thomas@codesourcery.com>
1965 * gfortran.texi: Update for libgomp being renamed from "GNU OpenMP
1966 Runtime Library" to "GNU Offloading and Multi Processing Runtime
1968 * intrinsic.texi: Likewise.
1970 2015-01-10 Tobias Burnus <burnus@net-b.de>
1973 * invoke.texi (Wline-truncation): Document new behaviour.
1974 * lang.opt (Wline-truncation): Add Init(-1).
1975 * options.c (gfc_post_options): If -Wline-truncation is unset,
1976 enable it for free-form source files; for the latter, also use
1977 -Werror=line-truncation, unless -Wno-error has been specified.
1979 2015-01-09 Michael Collison <michael.collison@linaro.org>
1981 * convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1982 input.h, alias.h, symtab.h, options.h, fold-const.h,
1983 wide-int.h, and inchash.h due to flattening of tree.h.
1984 * cpp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1985 input.h, alias.h, symtab.h, fold-const.h,
1986 wide-int.h, and inchash.h due to flattening of tree.h.
1988 * f95.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1989 input.h, alias.h, symtab.h, options.h, fold-const.h,
1990 wide-int.h, and inchash.h due to flattening of tree.h.
1991 * iresolve.c: Ditto.
1992 * match.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1993 input.h, alias.h, symtab.h, fold-const.h,
1994 wide-int.h, and inchash.h due to flattening of tree.h.
1995 * module.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1996 input.h, alias.h, symtab.h, options.h, fold-const.h,
1997 wide-int.h, and inchash.h due to flattening of tree.h.
1999 * target-memory.c: Include hash-set.h, vec.h,
2000 double-int.h, input.h, alias.h, symtab.h, fold-const.h,
2001 wide-int.h, and inchash.h due to flattening of tree.h.
2002 * trans-array.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2003 input.h, alias.h, symtab.h, options.h, fold-const.h,
2004 wide-int.h, and inchash.h due to flattening of tree.h.
2005 * trans.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2006 input.h, alias.h, symtab.h, options.h, fold-const.h,
2007 wide-int.h, and inchash.h due to flattening of tree.h.
2008 * trans-common.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2009 input.h, alias.h, symtab.h, fold-const.h,
2010 wide-int.h, and inchash.h due to flattening of tree.h.
2011 * trans-const.c: Ditto.
2012 * trans-decl.c: Ditto.
2013 * trans-expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2014 input.h, alias.h, symtab.h, options.h, fold-const.h,
2015 wide-int.h, and inchash.h due to flattening of tree.h.
2016 * trans-intrinsic.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2017 input.h, alias.h, symtab.h, fold-const.h,
2018 wide-int.h, inchash.h and real.h due to flattening of tree.h.
2019 * trans-io.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2020 input.h, alias.h, symtab.h, options.h, fold-const.h,
2021 wide-int.h, and inchash.h due to flattening of tree.h.
2022 * trans-openmp.c: Ditto.
2023 * trans-stmt.c: Ditto.
2024 * trans-types.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2025 input.h, alias.h, symtab.h, fold-const.h,
2026 wide-int.h, inchash.h and real.h due to flattening of tree.h.
2028 2015-01-08 Tobias Burnus <burnus@net-b.de>
2030 * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
2031 for module coarrays with -fcoarray=lib.
2032 (get_proc_pointer_decl): As module variable, make only public
2033 when not marked as private.
2035 2015-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
2038 * dependency.h: Actually commit changes.
2040 2015-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
2043 * dependency.c: Update copyright years.
2044 (gfc_discard_nops): Add prototype.
2045 * dependency.c (discard_nops): Rename to gfc_discard_nops,
2047 (gfc_discard_nops): Use gfc_discard_nops.
2048 (gfc_dep_difference): Likewise.
2049 * frontend-passes.c Update copyright years.
2050 (realloc_strings): New function. Add prototype.
2051 (gfc_run_passes): Call realloc_strings.
2052 (realloc_string_callback): New function.
2053 (create_var): Add prototype. Handle case of a
2054 scalar character variable.
2055 (optimize_trim): Do not handle allocatable variables.
2057 2015-01-05 Jakub Jelinek <jakub@redhat.com>
2059 Update copyright years.
2061 * gfortranspec.c (lang_specific_driver): Update copyright notice
2063 * gfc-internals.texi: Bump @copying's copyright year.
2064 * gfortran.texi: Ditto.
2065 * intrinsic.texi: Ditto.
2066 * invoke.texi: Ditto.
2068 2015-01-02 Janus Weil <janus@gcc.gnu.org>
2071 * expr.c (find_component_ref): Deal with extended types.
2073 2015-01-02 Tobias Burnus <burnus@net-b.de>
2075 * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
2076 for module coarrays with -fcoarray=lib.
2078 2015-01-02 Janus Weil <janus@gcc.gnu.org>
2081 * interface.c (is_procptr_result): New function to check if an
2082 expression is a procedure-pointer result.
2083 (compare_actual_formal): Use it.
2085 Copyright (C) 2015 Free Software Foundation, Inc.
2087 Copying and distribution of this file, with or without modification,
2088 are permitted in any medium without royalty provided the copyright
2089 notice and this notice are preserved.