1 2015-03-30 Jakub Jelinek <jakub@redhat.com>
4 * trans-openmp.c (gfc_trans_omp_do): For !simple simd with explicit
5 linear clause for the iterator set OMP_CLAUSE_LINEAR_NO_COPYIN.
6 For implcitly added !simple OMP_CLAUSE_LINEAR set it too. Use step 1
7 instead of the original step on the new iterator - count.
9 2015-03-25 Mikael Morin <mikael@gcc.gnu.org>
13 * gfortran.h (struct gfc_namespace): New field 'types_resolved'.
14 * resolve.c (resolve_types): Return early if field 'types_resolved'
15 is set. Set 'types_resolved' at the end.
17 2015-03-24 Andre Vehreschild <vehre@gmx.de>
20 * trans-expr.c (gfc_conv_structure): Fixed indendation.
21 Using integer_zero_node now instead of explicitly
22 constructing a integer constant zero node.
23 (gfc_conv_derived_to_class): Add handling of _len component,
24 i.e., when the rhs has a string_length then assign that to
25 class' _len, else assign 0.
26 (gfc_conv_intrinsic_to_class): Likewise.
28 2015-03-24 Andre Vehreschild <vehre@gmx.de>
33 * class.c (gfc_add_component_ref): Free no longer needed
34 ref-chains to prevent memory loss.
35 (find_intrinsic_vtab): For deferred length char arrays or
36 unlimited polymorphic objects, store the size in bytes of one
37 character in the size component of the vtab.
38 * gfortran.h: Added gfc_add_len_component () define.
39 * trans-array.c (gfc_trans_create_temp_array): Switched to new
40 function name for getting a class' vtab's field.
41 (build_class_array_ref): Likewise.
42 (gfc_array_init_size): Using the size information from allocate
43 more consequently now, i.e., the typespec of the entity to
44 allocate is no longer needed. This is to address the last open
45 comment in PR fortran/57456.
46 (gfc_array_allocate): Likewise.
47 (structure_alloc_comps): gfc_copy_class_to_class () needs to
48 know whether the class is unlimited polymorphic.
49 * trans-array.h: Changed interface of gfc_array_allocate () to
50 reflect the no longer needed typespec.
51 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): New.
53 (gfc_get_class_array_ref): Switch to new function name for
54 getting a class' vtab's field.
55 (gfc_copy_class_to_class): Added flag to know whether the class
56 to copy is unlimited polymorphic. Adding _len dependent code
57 then, which calls ->vptr->copy () with four arguments adding
58 the length information ->vptr->copy(from, to, from_len, to_cap).
59 (gfc_conv_procedure_call): Switch to new function name for
60 getting a class' vtab's field.
61 (alloc_scalar_allocatable_for_assignment): Use the string_length
62 as computed by gfc_conv_expr and not the statically backend_decl
63 which may be incorrect when ref-ing.
64 (gfc_trans_assignment_1): Use the string_length variable and
65 not the rse.string_length. The former has been computed more
67 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Switch to new
68 function name for getting a class' vtab's field.
69 (gfc_conv_intrinsic_storage_size): Likewise.
70 (gfc_conv_intrinsic_transfer): Likewise.
71 * trans-stmt.c (gfc_trans_allocate): Restructured to evaluate
72 source=expr3 only once before the loop over the objects to
73 allocate, when the objects are not arrays. Doing correct _len
74 initialization and calling of vptr->copy () fixing PR 64787.
75 (gfc_trans_deallocate): Reseting _len to 0, preventing future
77 * trans.c (gfc_build_array_ref): Switch to new function name
78 for getting a class' vtab's field.
79 (gfc_add_comp_finalizer_call): Likewise.
80 * trans.h: Define the prototypes for the gfc_class_vtab_*_get ()
81 and gfc_vptr_*_get () functions.
82 Added gfc_find_and_cut_at_last_class_ref () and
83 gfc_reset_len () routine prototype. Added flag to
84 gfc_copy_class_to_class () prototype to signal an unlimited
85 polymorphic entity to copy.
87 2015-03-24 Iain Sandoe <iain@codesourcery.com>
88 Tobias Burnus <burnus@net-b.de>
90 * gfortran.texi (_gfortran_caf_sync_memory): Improve wording.
92 2015-03-23 Paul Thomas <pault@gcc.gnu.org>
93 Mikael Morin <mikael@gcc.gnu.org>
96 * gfortran.h (struct symbol_attribute) : New field
97 'array_outer_dependency'.
98 * trans.h (struct gfc_ss_info): New field 'array_outer_dependency'.
99 * module.c (enum ab_attribute): New value AB_ARRAY_OUTER_DEPENDENCY.
100 (attr_bits): Append same value to initializer.
101 (mio_symbol_attribute): Handle 'array_outer_dependency' attr
102 in module read and write.
103 * resolve.c (update_current_proc_outer_array_dependency): New function.
104 (resolve_function, resolve_call): Add code to update current procedure's
105 'array_outer_dependency' attribute.
106 (resolve_variable): Mark current procedure with attribute
107 array_outer_dependency if the variable is an array coming from outside
108 the current namespace.
109 (resolve_fl_procedure): Mark a procedure without body with attribute
110 'array_outer_dependency'.
111 * trans-array.c (gfc_conv_resolve_dependencies): If any ss is
112 marked as 'array_outer_dependency' generate a temporary.
113 (gfc_walk_function_expr): If the function may reference external arrays,
114 mark the head gfc_ss with flag 'array_outer_dependency'.
116 2015-03-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
119 * gfortran.texi (Read/Write after EOF marker): New information.
121 2015-03-21 H.J. Lu <hongjiu.lu@intel.com>
123 * gfortran.texi (_gfortran_caf_sync_memory): Put @{xxx} in one
126 2015-03-21 Tobias Burnus <burnus@net-b.de>
128 * gfortran.texi (_gfortran_caf_sync_all, _gfortran_caf_sync_images,
129 _gfortran_caf_sync_memory, _gfortran_caf_error_stop,
130 _gfortran_caf_error_stop_str, _gfortran_caf_atomic_define,
131 _gfortran_caf_atomic_ref, _gfortran_caf_atomic_cas,
132 _gfortran_caf_atomic_op): New sections.
134 2015-03-21 Tobias Burnus <burnus@net-b.de>
136 * trans-expr.c (gfc_get_tree_for_caf_expr): Reject unimplemented
137 coindexed coarray accesses.
139 2015-03-17 Paul Thomas <pault@gcc.gnu.org>
142 * trans-types.c (gfc_get_derived_type): If an abstract derived
143 type with procedure pointer components has no other type of
144 component, return the backend_decl. Otherwise build the
145 components if any of the non-procedure pointer components have
148 2015-03-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
151 *trans-intrinisic.c (conv_intrinsic_system_clock): Check the
152 smallest kind passed in user arguments and hardcode tesults for
153 KIND=1 or KIND=2 to indicate no clock available.
155 2015-03-16 Andre Vehreschild <vehre@gmx.de>
157 * resolve.c: Prevent segfault on illegal input.
159 2015-03-14 Mikael Morin <mikael@gcc.gnu.org>
162 * trans-expr.c (gfc_trans_pointer_assignment): Clear DESCRIPTOR_ONLY
163 field before reusing LSE.
165 2015-03-11 Janne Blomqvist <jb@gcc.gnu.org>
168 * gfortran.texi: Document behavior when opening files without
169 explicit ACTION= specifier.
171 2015-03-10 Paul Thomas <pault@gcc.gnu.org>
174 * trans-expr.c (gfc_conv_component_ref): If the component
175 backend declaration is missing and the derived type symbol is
176 available in the reference, call gfc_build_derived_type.
178 2015-03-10 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
179 Tobias Burnus <burnus@net-b.de>
181 * trans.h (caf_sync_memory): New function decl tree.
182 * trans-decl.c (gfc_build_builtin_function_decls): Define it.
183 (create_main_function): Don't call sync_synchronize and leave
184 it to the CAF library.
185 * trans-stmt.c (gfc_trans_stop): Ditto.
186 (gfc_trans_sync): Ditto; add call library call for sync memory.
188 2015-03-08 Mikael Morin <mikael@gcc.gnu.org>
191 * resolve.c (resolve_symbol): Check that the symbol found by
192 name lookup really is the current symbol being resolved.
194 2015-03-02 Tobias Burnus <burnus@net-b.de>
196 * check.c (gfc_check_atomic): Properly check for coarrayness
197 and for being coindexed.
199 2015-02-26 Martin Liska <mliska@suse.cz>
201 * resolve.c: Rename enum 'comparison' to 'compare_result' as
202 solution for -Wodr issue.
204 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
207 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
209 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
210 * types.def (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
211 (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
212 Remove function types.
213 (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR)
214 (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_INT_INT_VAR)
215 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
218 2015-02-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
222 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Remove mapping
223 for component references to class objects.
224 (gfc_conv_procedure_call): Compare the class by name.
226 2015-02-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
229 * scanner.c (gfc_next_char_literal): For free form source,
230 check for '!' and if found, clear the comment and go back
231 and get the next character. For fixed form source, skip the
234 2015-02-12 Paul Thomas <pault@gcc.gnu.org>
237 * trans-stmt.c (gfc_trans_deallocate): If a component array
238 expression is not a descriptor type and it is a derived type
239 that has allocatable components and is not finalizable, then
240 deallocate the allocatable components.
242 2015-02-08 Mikael Morin <mikael@gcc.gnu.org>
245 * module.c (check_for_ambiguous): Change argument type
246 from gfc_symbol to gfc_symtree. Check local (symtree) name
247 instead of original (symbol) name.
248 (read_module): Update caller.
250 2015-02-06 Paul Thomas <pault@gcc.gnu.org>
253 * gfortran.h: Add 'must finalize' field to gfc_expr and
254 prototypes for gfc_is_alloc_class_scalar_function and for
255 gfc_is_alloc_class_array_function.
256 * expr.c (gfc_is_alloc_class_scalar_function,
257 gfc_is_alloc_class_array_function): New functions.
258 * trans-array.c (gfc_add_loop_ss_code): Do not move the
259 expression for allocatable class scalar functions outside the
261 (conv_array_index_offset): Cope with deltas being NULL_TREE.
262 (build_class_array_ref): Do not return with allocatable class
263 array functions. Add code to pick out the returned class array.
264 Dereference if necessary and return if not a class object.
265 (gfc_conv_scalarized_array_ref): Cope with offsets being NULL.
266 (gfc_walk_function_expr): Return an array ss for the result of
267 an allocatable class array function.
268 * trans-expr.c (gfc_conv_subref_array_arg): Remove the assert
269 that the argument should be a variable. If an allocatable class
270 array function, set the offset to zero and skip the write-out
272 (gfc_conv_procedure_call): Add allocatable class array function
273 to the assert. Call gfc_conv_subref_array_arg for allocatable
274 class array function arguments with derived type formal arg..
275 Add the code for handling allocatable class functions, including
276 finalization calls to prevent memory leaks.
277 (arrayfunc_assign_needs_temporary): Return if an allocatable
278 class array function.
279 (gfc_trans_assignment_1): Set must_finalize to rhs expression
280 for allocatable class functions. Set scalar_to_array as needed
281 for scalar class allocatable functions assigned to an array.
282 Nullify the allocatable components corresponding the the lhs
283 derived type so that the finalization does not free them.
285 2015-01-29 Andre Vehreschild <vehre@gmx.de>
286 Janus Weil <janus@gcc.gnu.org>
289 Initial patch by Janus Weil
290 * resolve.c (resolve_allocate_expr): Add check for comp. only
291 when target is not unlimited polymorphic.
292 * trans-stmt.c (gfc_trans_allocate): Assign correct value to
293 _len component of unlimited polymorphic entities.
295 2015-02-05 Tobias Burnus <burnus@net-b.de>
298 * resolve.c (resolve_transfer): Also check structure
301 2015-02-05 Paul Thomas <pault@gcc.gnu.org>
304 * resolve.c (resolve_structure_cons): Obtain the rank of class
306 * trans-expr.c (gfc_trans_alloc_subarray_assign): Do the
307 assignment to allocatable class array components.
308 (alloc_scalar_allocatable_for_subcomponent_assignment): If comp
309 is a class component, allocate to the _data field.
310 (gfc_trans_subcomponent_assign): If a class component with a
311 derived type expression set the _vptr field and for array
312 components, call gfc_trans_alloc_subarray_assign. For scalars,
313 the assignment is performed here.
315 2015-02-04 Jakub Jelinek <jakub@redhat.com>
317 * options.c: Include langhooks.h.
318 (gfc_post_options): Change lang_hooks.name based on
321 2015-02-03 Steven G. Kargl <kargl@gcc.gnu.org>
323 * intrinsic.texi (CO_ASSOCIATED): c_prt_1 should be c_ptr_1.
325 2015-01-30 Andre Vehreschild <vehre@gmx.de>
327 * trans-decl.c (gfc_get_symbol_decl): Removed duplicate code.
328 * trans-expr.c (gfc_conv_intrinsic_to_class): Fixed indentation.
329 Fixed datatype of charlen to be a 32-bit int.
331 2015-02-01 Joseph Myers <joseph@codesourcery.com>
333 * error.c (gfc_warning (const char *, ...), gfc_warning_now (const
334 char *, ...)): Remove functions.
335 * gfortran.h (gfc_warning (const char *, ...), gfc_warning_now
336 (const char *, ...)): Remove declarations.
337 * arith.c, check.c, data.c, decl.c, frontend-passes.c,
338 interface.c, intrinsic.c, io.c, matchexp.c, module.c, openmp.c,
339 options.c, parse.c, primary.c, resolve.c, scanner.c, symbol.c,
340 trans-common.c, trans-const.c, trans-stmt.c: All callers of
341 gfc_warning and gfc_warning_now changed to pass 0 or option number
344 2015-01-30 Joseph Myers <joseph@codesourcery.com>
346 * f95-lang.c, gfortranspec.c, trans-const.c, trans-expr.c: All
347 callers of fatal_error changed to pass input_location as first
350 2015-01-28 Tobias Burnus <burnus@net-b.de>
352 * intrinsic.texi (CO_BROADCAST): Correct argument description.
354 2015-01-27 Tobias Burnus <burnus@net-b.de>
357 * trans-openmp.c (gfc_has_alloc_comps, gfc_trans_omp_clauses):
358 Fix handling for scalar coarrays.
359 * trans-types.c (gfc_get_element_type): Add comment.
361 2015-01-27 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
364 * interface.c: Remove <algorithm>.
365 (check_dummy_characteristics): Use MAX instead of std::max.
367 2015-01-26 Paul Thomas <pault@gcc.gnu.org>
370 * resolve.c (resolve_allocate_expr): If the default initializer
371 is NULL, keep the original MOLD expression so that the correct
372 typespec is available.
374 2015-01-26 Tobias Burnus <burnus@net-b.de>
377 * interface.c (check_dummy_characteristics): Fix coarray handling.
379 2015-01-26 Tobias Burnus <burnus@net-b.de>
381 * io.c (gfc_match_inquire): Replace "-1" by a defined constant.
383 2015-01-26 Janus Weil <janus@gcc.gnu.org>
386 * class.c (finalize_component): New argument 'sub_ns'. Insert code to
387 check if 'expr' is associated.
388 (generate_finalization_wrapper): Rename 'ptr' symbols to 'ptr1' and
389 'ptr2'. Pass 'sub_ns' to finalize_component.
391 2015-01-25 Mikael Morin <mikael@gcc.gnu.org>
394 * decl.c (gfc_match_derived_decl): Don't insert a new symtree element.
395 * module.c (MOD_VERSION): Bump.
396 (write_module): Don't write list of extensions.
397 (read_module): Don't jump over list of extensions;
398 don't load list of extensions.
399 (load_derived_extensions, write_dt_extensions,
400 write_derived_extensions): Remove.
402 2015-01-24 Tobias Burnus <burnus@net-b.de>
404 * parse.c (gfc_parse_file): Fix two-location gfc_error call.
406 2015-01-23 Martin Liska <mliska@suse.cz>
408 * decl.c (attr_decl1): Workaround -Wmaybe-uninitialized
409 false positive during profiledbootstrap by initializing them.
410 * matchexp.c (match_mult_operand): Likewise.
411 * module.c (write_atom): Likewise.
412 (read_module): Likewise.
414 2015-01-23 Tom de Vries <tom@codesourcery.com>
417 * lang.opt (fopenacc): Mark as LTO option.
419 2015-01-23 Tom de Vries <tom@codesourcery.com>
422 * lang.opt (fopenmp): Mark as LTO option.
424 2015-01-23 Andre Vehreschild <vehre@gmx.de>
426 * trans-decl.c (gfc_finish_var_decl): Fixed moved comment.
427 * trans-stmt.c (gfc_trans_allocate): Fixed indentation.
429 2015-01-23 Jakub Jelinek <jakub@redhat.com>
431 * gfc-diagnostic.def (DK_ICE_NOBT): New kind.
433 2015-01-23 Janus Weil <janus@gcc.gnu.org>
436 * class.c (finalize_component): Apply the check for 'fini_coarray' only
437 to coarray components.
439 2015-01-23 Tobias Burnus <burnus@net-b.de>
442 * trans-openmp.c (gfc_trans_oacc_combined_directive): Fix
445 2015-01-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
449 * trans-io.c (set_parameter_value): Delete use of has_iostat.
450 Redefine to not generate any runtime error check calls.
451 (set_parameter_value_chk): Rename of the former
452 set_parameter_value with the runtime error checks and fix
453 whitespace. (set_parameter_value_inquire): New function that
454 builds a runtime conditional block to set the INQUIRE
455 common parameter block unit number to -2 when unit numbers
456 exceed positive KIND=4 limits. (gfc_trans_open): Whitespace.
457 For unit, use the renamed set_parameter_value_chk.
458 (gfc_trans_close): Likewise use renamed function.
459 (build_filepos): Whitespace and use renamed function.
460 (gfc_trans_inquire): Whitespace and for unit use
461 set_parameter_value and set_parameter_value_inquire.
462 (gfc_trans_wait): Remove p->iostat from call to
463 set_parameter_value. Use new set_parameter_value_chk for unit.
464 (build_dt): Use the new set_parameter_value without p->iostat
465 and fix whitespace. Use set_parameter_value_chk for unit.
467 2015-01-21 Thomas Koenig <tkoenig@netcologne.de>
470 * dependency.c (callback_dummy_intent_not_int): New function.
471 (dummy_intent_not_in): New function.
472 (gfc_full_array_ref_p): Use dummy_intent_not_in.
474 2015-01-18 Andre Vehreschild <vehre@gmx.de>
475 Janus Weil <janus@gcc.gnu.org>
478 * class.c (gfc_get_len_component): New.
479 (gfc_build_class_symbol): Add _len component to unlimited
480 polymorphic entities.
481 (find_intrinsic_vtab): Removed emitting of error message.
482 * gfortran.h: Added prototype for gfc_get_len_component.
483 * simplify.c (gfc_simplify_len): Use _len component where
485 * trans-expr.c (gfc_class_len_get): New.
486 (gfc_conv_intrinsic_to_class): Add handling for deferred
488 (gfc_conv_structure): Treat _len component correctly.
489 (gfc_conv_expr): Prevent bind_c handling when not required.
490 (gfc_trans_pointer_assignment): Propagate _len component.
491 * trans-stmt.c (class_has_len_component): New.
492 (trans_associate_var): _len component treatment for associate
494 (gfc_trans_allocate): Same as for trans_associate_var()
495 * trans.h: Added prototype for gfc_class_len_get.
497 2015-01-18 Paul Thomas <pault@gcc.gnu.org>
500 * trans-expr.c (gfc_trans_subcomponent_assign): Use a deep copy
501 for allocatable components, where the source is a variable.
503 2015-01-18 Paul Thomas <pault@gcc.gnu.org>
506 * primary.c (gfc_match_varspec): Exclude dangling associate-
507 names with dimension 0 from being counted as arrays.
508 * resolve.c (resolve_assoc_var): Sub-strings are permissible
509 for associate-names, so exclude characters from the test for
511 * trans-decl.c (gfc_get_symbol_decl): Associate-names can use
512 the hidden string length variable of their associated target.
513 Signal this by setting 'length' to a constant, if the decl for
514 the string length is a variable.
516 2015-01-17 Paul Thomas <pault@gcc.gnu.org>
519 * trans-expr.c (gfc_trans_pointer_assignment): Make sure that
520 before reinitializing rse, to add the rse.pre to block before
522 * trans-intrinsic.c (gfc_conv_associated): Deal with the class
523 data being a descriptor.
525 2015-01-17 Andre Vehreschild <vehre@gmx.de>
528 * primary.c (build_actual_constructor): Prevent warning.
529 * trans-expr.c (alloc_scalar_allocatable_for_subcomponent_
530 assignment): New function encapsulates treatment of allocatable
532 (gfc_trans_subcomponent_assign): Needed to distinguish between
533 regular assignment and initilization.
534 (gfc_trans_structure_assign): Same.
535 (gfc_conv_structure): Same.
538 * gfortran.h: deferred_parameter is not needed, because
539 it artificial does the trick completely.
540 * primary.c (build_actual_constructor): Same.
541 (gfc_convert_to_structure_constructor): Same.
542 * resolve.c (resolve_fl_derived0): Same.
543 * trans-expr.c (gfc_conv_component_ref): Prevent treating
544 allocatable deferred length char arrays here.
545 (gfc_trans_subcomponent_assign): Same as above.
546 * trans-types.c (gfc_sym_type): This is done in
547 gfc_get_derived_type already.
549 2015-01-17 Andre Vehreschild <vehre@gmx.de>
552 * trans-decl.c (gfc_get_symbol_decl):Use a ref on the string
553 length when the symbol is declared to be a result.
554 * trans-expr.c (gfc_conv_procedure_call): Strip deref on the
555 string length when functions are nested and the string length
556 is a reference already.
558 2015-01-16 Janus Weil <janus@gcc.gnu.org>
561 * decl.c (match_pointer_init): Error out if resolution of init expr
564 2015-01-15 Tobias Burnus <burnus@net-b.de>
566 * openmp.c (check_symbol_not_pointer, resolve_oacc_data_clauses,
567 resolve_oacc_deviceptr_clause, resolve_omp_clauses,
568 gfc_resolve_oacc_declare): Replace '%s' by %qs.
570 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
571 Cesar Philippidis <cesar@codesourcery.com>
572 James Norris <jnorris@codesourcery.com>
573 Ilmir Usmanov <i.usmanov@samsung.com>
574 Tobias Burnus <burnus@net-b.de>
576 * lang.opt (fopenacc): New option.
577 * cpp.c (cpp_define_builtins): Conditionally define _OPENACC.
578 * dump-parse-tree.c (show_omp_node): Split part of it into...
579 (show_omp_clauses): ... this new function.
580 (show_omp_node, show_code_node): Handle EXEC_OACC_PARALLEL_LOOP,
581 EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
582 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
583 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
584 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
585 (show_namespace): Update for OpenACC.
586 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_2, DEF_FUNCTION_TYPE_VAR_8)
587 (DEF_FUNCTION_TYPE_VAR_12, DEF_GOACC_BUILTIN)
588 (DEF_GOACC_BUILTIN_COMPILER): New macros.
589 * types.def (BT_FN_VOID_INT_INT_VAR)
590 (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
591 (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
593 * gfortran.h (gfc_statement): Add ST_OACC_PARALLEL_LOOP,
594 ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
595 ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_DATA,
596 ST_OACC_END_DATA, ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA,
597 ST_OACC_LOOP, ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE,
598 ST_OACC_WAIT, ST_OACC_CACHE, ST_OACC_KERNELS_LOOP,
599 ST_OACC_END_KERNELS_LOOP, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
601 (struct gfc_expr_list): New data type.
602 (gfc_get_expr_list): New macro.
603 (gfc_omp_map_op): Add OMP_MAP_FORCE_ALLOC, OMP_MAP_FORCE_DEALLOC,
604 OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM, OMP_MAP_FORCE_TOFROM,
605 OMP_MAP_FORCE_PRESENT, OMP_MAP_FORCE_DEVICEPTR.
606 (OMP_LIST_FIRST, OMP_LIST_DEVICE_RESIDENT, OMP_LIST_USE_DEVICE)
607 (OMP_LIST_CACHE): New enumerators.
608 (struct gfc_omp_clauses): Add async_expr, gang_expr, worker_expr,
609 vector_expr, num_gangs_expr, num_workers_expr, vector_length_expr,
610 wait_list, tile_list, async, gang, worker, vector, seq,
611 independent, wait, par_auto, gang_static, and loc members.
612 (struct gfc_namespace): Add oacc_declare_clauses member.
613 (gfc_exec_op): Add EXEC_OACC_KERNELS_LOOP,
614 EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS,
615 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
616 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
617 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
618 (gfc_free_expr_list, gfc_resolve_oacc_directive)
619 (gfc_resolve_oacc_declare, gfc_resolve_oacc_parallel_loop_blocks)
620 (gfc_resolve_oacc_blocks): New prototypes.
621 * match.c (match_exit_cycle): Handle EXEC_OACC_LOOP and
622 EXEC_OACC_PARALLEL_LOOP.
623 * match.h (gfc_match_oacc_cache, gfc_match_oacc_wait)
624 (gfc_match_oacc_update, gfc_match_oacc_declare)
625 (gfc_match_oacc_loop, gfc_match_oacc_host_data)
626 (gfc_match_oacc_data, gfc_match_oacc_kernels)
627 (gfc_match_oacc_kernels_loop, gfc_match_oacc_parallel)
628 (gfc_match_oacc_parallel_loop, gfc_match_oacc_enter_data)
629 (gfc_match_oacc_exit_data, gfc_match_oacc_routine): New
631 * openmp.c: Include "diagnostic.h" and "gomp-constants.h".
632 (gfc_free_omp_clauses): Update for members added to struct
634 (gfc_match_omp_clauses): Change mask paramter to uint64_t. Add
636 (resolve_omp_clauses): Add openacc parameter. Update for OpenACC.
637 (struct fortran_omp_context): Add is_openmp member.
638 (gfc_resolve_omp_parallel_blocks): Initialize it.
639 (gfc_resolve_do_iterator): Update for OpenACC.
640 (gfc_resolve_omp_directive): Call
641 resolve_omp_directive_inside_oacc_region.
642 (OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE)
643 (OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_COPYPRIVATE)
644 (OMP_CLAUSE_SHARED, OMP_CLAUSE_COPYIN, OMP_CLAUSE_REDUCTION)
645 (OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_SCHEDULE)
646 (OMP_CLAUSE_DEFAULT, OMP_CLAUSE_ORDERED, OMP_CLAUSE_COLLAPSE)
647 (OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE)
648 (OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH)
649 (OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND)
650 (OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM)
651 (OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP, OMP_CLAUSE_TO)
652 (OMP_CLAUSE_FROM, OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_THREAD_LIMIT)
653 (OMP_CLAUSE_DIST_SCHEDULE): Use uint64_t.
654 (OMP_CLAUSE_ASYNC, OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS)
655 (OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_COPY, OMP_CLAUSE_COPYOUT)
656 (OMP_CLAUSE_CREATE, OMP_CLAUSE_PRESENT)
657 (OMP_CLAUSE_PRESENT_OR_COPY, OMP_CLAUSE_PRESENT_OR_COPYIN)
658 (OMP_CLAUSE_PRESENT_OR_COPYOUT, OMP_CLAUSE_PRESENT_OR_CREATE)
659 (OMP_CLAUSE_DEVICEPTR, OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER)
660 (OMP_CLAUSE_VECTOR, OMP_CLAUSE_SEQ, OMP_CLAUSE_INDEPENDENT)
661 (OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE_DEVICE_RESIDENT)
662 (OMP_CLAUSE_HOST_SELF, OMP_CLAUSE_OACC_DEVICE, OMP_CLAUSE_WAIT)
663 (OMP_CLAUSE_DELETE, OMP_CLAUSE_AUTO, OMP_CLAUSE_TILE): New macros.
664 (gfc_match_omp_clauses): Handle those.
665 (OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES)
666 (OACC_LOOP_CLAUSES, OACC_PARALLEL_LOOP_CLAUSES)
667 (OACC_KERNELS_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES)
668 (OACC_DECLARE_CLAUSES, OACC_UPDATE_CLAUSES)
669 (OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES)
670 (OACC_WAIT_CLAUSES): New macros.
671 (gfc_free_expr_list, match_oacc_expr_list, match_oacc_clause_gang)
672 (gfc_match_omp_map_clause, gfc_match_oacc_parallel_loop)
673 (gfc_match_oacc_parallel, gfc_match_oacc_kernels_loop)
674 (gfc_match_oacc_kernels, gfc_match_oacc_data)
675 (gfc_match_oacc_host_data, gfc_match_oacc_loop)
676 (gfc_match_oacc_declare, gfc_match_oacc_update)
677 (gfc_match_oacc_enter_data, gfc_match_oacc_exit_data)
678 (gfc_match_oacc_wait, gfc_match_oacc_cache)
679 (gfc_match_oacc_routine, oacc_is_loop)
680 (resolve_oacc_scalar_int_expr, resolve_oacc_positive_int_expr)
681 (check_symbol_not_pointer, check_array_not_assumed)
682 (resolve_oacc_data_clauses, resolve_oacc_deviceptr_clause)
683 (oacc_compatible_clauses, oacc_is_parallel, oacc_is_kernels)
684 (omp_code_to_statement, oacc_code_to_statement)
685 (resolve_oacc_directive_inside_omp_region)
686 (resolve_omp_directive_inside_oacc_region)
687 (resolve_oacc_nested_loops, resolve_oacc_params_in_parallel)
688 (resolve_oacc_loop_blocks, gfc_resolve_oacc_blocks)
689 (resolve_oacc_loop, resolve_oacc_cache, gfc_resolve_oacc_declare)
690 (gfc_resolve_oacc_directive): New functions.
691 * parse.c (next_free): Update for OpenACC. Move some code into...
692 (verify_token_free): ... this new function.
693 (next_fixed): Update for OpenACC. Move some code into...
694 (verify_token_fixed): ... this new function.
695 (case_executable): Add ST_OACC_UPDATE, ST_OACC_WAIT,
696 ST_OACC_CACHE, ST_OACC_ENTER_DATA, and ST_OACC_EXIT_DATA.
697 (case_exec_markers): Add ST_OACC_PARALLEL_LOOP, ST_OACC_PARALLEL,
698 ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA, ST_OACC_LOOP,
699 ST_OACC_KERNELS_LOOP.
700 (case_decl): Add ST_OACC_ROUTINE.
701 (push_state, parse_critical_block, parse_progunit): Update for
703 (gfc_ascii_statement): Handle ST_OACC_PARALLEL_LOOP,
704 ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
705 ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_KERNELS_LOOP,
706 ST_OACC_END_KERNELS_LOOP, ST_OACC_DATA, ST_OACC_END_DATA,
707 ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA, ST_OACC_LOOP,
708 ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE, ST_OACC_WAIT,
709 ST_OACC_CACHE, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
711 (verify_st_order, parse_spec): Handle ST_OACC_DECLARE.
712 (parse_executable): Handle ST_OACC_PARALLEL_LOOP,
713 ST_OACC_KERNELS_LOOP, ST_OACC_LOOP, ST_OACC_PARALLEL,
714 ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA.
715 (decode_oacc_directive, parse_oacc_structured_block)
716 (parse_oacc_loop, is_oacc): New functions.
717 * parse.h (struct gfc_state_data): Add oacc_declare_clauses
719 (is_oacc): New prototype.
720 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Handle
721 EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL,
722 EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS, EXEC_OACC_DATA,
723 EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP, EXEC_OACC_UPDATE,
724 EXEC_OACC_WAIT, EXEC_OACC_CACHE, EXEC_OACC_ENTER_DATA,
726 (resolve_codes): Call gfc_resolve_oacc_declare.
727 * scanner.c (openacc_flag, openacc_locus): New variables.
728 (skip_free_comments): Update for OpenACC. Move some code into...
729 (skip_omp_attribute): ... this new function.
730 (skip_oacc_attribute): New function.
731 (skip_fixed_comments, gfc_next_char_literal): Update for OpenACC.
732 * st.c (gfc_free_statement): Handle EXEC_OACC_PARALLEL_LOOP,
733 EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
734 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
735 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
736 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
737 * trans-decl.c (gfc_generate_function_code): Update for OpenACC.
738 * trans-openmp.c: Include "gomp-constants.h".
739 (gfc_omp_finish_clause, gfc_trans_omp_clauses): Use GOMP_MAP_*
740 instead of OMP_CLAUSE_MAP_*. Use OMP_CLAUSE_SET_MAP_KIND.
741 (gfc_trans_omp_clauses): Handle OMP_LIST_USE_DEVICE,
742 OMP_LIST_DEVICE_RESIDENT, OMP_LIST_CACHE, and OMP_MAP_FORCE_ALLOC,
743 OMP_MAP_FORCE_DEALLOC, OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM,
744 OMP_MAP_FORCE_TOFROM, OMP_MAP_FORCE_PRESENT,
745 OMP_MAP_FORCE_DEVICEPTR, and gfc_omp_clauses' async, seq,
746 independent, wait_list, num_gangs_expr, num_workers_expr,
747 vector_length_expr, vector, vector_expr, worker, worker_expr,
748 gang, gang_expr members.
749 (gfc_trans_omp_do): Handle EXEC_OACC_LOOP.
750 (gfc_convert_expr_to_tree, gfc_trans_oacc_construct)
751 (gfc_trans_oacc_executable_directive)
752 (gfc_trans_oacc_wait_directive, gfc_trans_oacc_combined_directive)
753 (gfc_trans_oacc_declare, gfc_trans_oacc_directive): New functions.
754 * trans-stmt.c (gfc_trans_block_construct): Update for OpenACC.
755 * trans-stmt.h (gfc_trans_oacc_directive, gfc_trans_oacc_declare):
757 * trans.c (tranc_code): Handle EXEC_OACC_CACHE, EXEC_OACC_WAIT,
758 EXEC_OACC_UPDATE, EXEC_OACC_LOOP, EXEC_OACC_HOST_DATA,
759 EXEC_OACC_DATA, EXEC_OACC_KERNELS, EXEC_OACC_KERNELS_LOOP,
760 EXEC_OACC_PARALLEL, EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_ENTER_DATA,
762 * gfortran.texi: Update for OpenACC.
763 * intrinsic.texi: Likewise.
764 * invoke.texi: Likewise.
766 2015-01-15 Janus Weil <janus@gcc.gnu.org>
769 * resolve.c (resolve_fl_derived0): Continue resolving next component
772 2015-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
775 * io.c (gfc_match_inquire): Generate error if unit number in
776 inquire statement is a constant -1. All other values allowed.
777 * trans-io.c (gfc_trans_inquire): Delete dummy iostat variable.
778 (create_dummy_iostat): Delete function no longer used.
780 2015-01-13 Jakub Jelinek <jakub@redhat.com>
783 * trans-decl.c (create_function_arglist): Don't set TREE_READONLY
784 on dummy args with VALUE attribute.
786 2015-01-11 Janus Weil <janus@gcc.gnu.org>
789 * interface.c (gfc_extend_expr): Look for type-bound operators before
792 2015-01-11 Janus Weil <janus@gcc.gnu.org>
795 * resolve.c (resolve_fl_derived0): Set error flag if problems with the
796 interface of a procedure-pointer component were detected.
798 2015-01-11 Janus Weil <janus@gcc.gnu.org>
801 * interface.c (compare_parameter): Interface check for
802 procedure-pointer component as actual argument.
804 2015-01-10 Thomas Schwinge <thomas@codesourcery.com>
806 * gfortran.texi: Update for libgomp being renamed from "GNU OpenMP
807 Runtime Library" to "GNU Offloading and Multi Processing Runtime
809 * intrinsic.texi: Likewise.
811 2015-01-10 Tobias Burnus <burnus@net-b.de>
814 * invoke.texi (Wline-truncation): Document new behaviour.
815 * lang.opt (Wline-truncation): Add Init(-1).
816 * options.c (gfc_post_options): If -Wline-truncation is unset,
817 enable it for free-form source files; for the latter, also use
818 -Werror=line-truncation, unless -Wno-error has been specified.
820 2015-01-09 Michael Collison <michael.collison@linaro.org>
822 * convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
823 input.h, alias.h, symtab.h, options.h, fold-const.h,
824 wide-int.h, and inchash.h due to flattening of tree.h.
825 * cpp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
826 input.h, alias.h, symtab.h, fold-const.h,
827 wide-int.h, and inchash.h due to flattening of tree.h.
829 * f95.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
830 input.h, alias.h, symtab.h, options.h, fold-const.h,
831 wide-int.h, and inchash.h due to flattening of tree.h.
833 * match.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
834 input.h, alias.h, symtab.h, fold-const.h,
835 wide-int.h, and inchash.h due to flattening of tree.h.
836 * module.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
837 input.h, alias.h, symtab.h, options.h, fold-const.h,
838 wide-int.h, and inchash.h due to flattening of tree.h.
840 * target-memory.c: Include hash-set.h, vec.h,
841 double-int.h, input.h, alias.h, symtab.h, fold-const.h,
842 wide-int.h, and inchash.h due to flattening of tree.h.
843 * trans-array.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
844 input.h, alias.h, symtab.h, options.h, fold-const.h,
845 wide-int.h, and inchash.h due to flattening of tree.h.
846 * trans.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
847 input.h, alias.h, symtab.h, options.h, fold-const.h,
848 wide-int.h, and inchash.h due to flattening of tree.h.
849 * trans-common.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
850 input.h, alias.h, symtab.h, fold-const.h,
851 wide-int.h, and inchash.h due to flattening of tree.h.
852 * trans-const.c: Ditto.
853 * trans-decl.c: Ditto.
854 * trans-expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
855 input.h, alias.h, symtab.h, options.h, fold-const.h,
856 wide-int.h, and inchash.h due to flattening of tree.h.
857 * trans-intrinsic.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
858 input.h, alias.h, symtab.h, fold-const.h,
859 wide-int.h, inchash.h and real.h due to flattening of tree.h.
860 * trans-io.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
861 input.h, alias.h, symtab.h, options.h, fold-const.h,
862 wide-int.h, and inchash.h due to flattening of tree.h.
863 * trans-openmp.c: Ditto.
864 * trans-stmt.c: Ditto.
865 * trans-types.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
866 input.h, alias.h, symtab.h, fold-const.h,
867 wide-int.h, inchash.h and real.h due to flattening of tree.h.
869 2015-01-08 Tobias Burnus <burnus@net-b.de>
871 * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
872 for module coarrays with -fcoarray=lib.
873 (get_proc_pointer_decl): As module variable, make only public
874 when not marked as private.
876 2015-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
879 * dependency.h: Actually commit changes.
881 2015-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
884 * dependency.c: Update copyright years.
885 (gfc_discard_nops): Add prototype.
886 * dependency.c (discard_nops): Rename to gfc_discard_nops,
888 (gfc_discard_nops): Use gfc_discard_nops.
889 (gfc_dep_difference): Likewise.
890 * frontend-passes.c Update copyright years.
891 (realloc_strings): New function. Add prototype.
892 (gfc_run_passes): Call realloc_strings.
893 (realloc_string_callback): New function.
894 (create_var): Add prototype. Handle case of a
895 scalar character variable.
896 (optimize_trim): Do not handle allocatable variables.
898 2015-01-05 Jakub Jelinek <jakub@redhat.com>
900 Update copyright years.
902 * gfortranspec.c (lang_specific_driver): Update copyright notice
904 * gfc-internals.texi: Bump @copying's copyright year.
905 * gfortran.texi: Ditto.
906 * intrinsic.texi: Ditto.
907 * invoke.texi: Ditto.
909 2015-01-02 Janus Weil <janus@gcc.gnu.org>
912 * expr.c (find_component_ref): Deal with extended types.
914 2015-01-02 Tobias Burnus <burnus@net-b.de>
916 * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
917 for module coarrays with -fcoarray=lib.
919 2015-01-02 Janus Weil <janus@gcc.gnu.org>
922 * interface.c (is_procptr_result): New function to check if an
923 expression is a procedure-pointer result.
924 (compare_actual_formal): Use it.
926 Copyright (C) 2015 Free Software Foundation, Inc.
928 Copying and distribution of this file, with or without modification,
929 are permitted in any medium without royalty provided the copyright
930 notice and this notice are preserved.