1 2015-01-15 Tobias Burnus <burnus@net-b.de>
3 * openmp.c (check_symbol_not_pointer, resolve_oacc_data_clauses,
4 resolve_oacc_deviceptr_clause, resolve_omp_clauses,
5 gfc_resolve_oacc_declare): Replace '%s' by %qs.
7 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
8 Cesar Philippidis <cesar@codesourcery.com>
9 James Norris <jnorris@codesourcery.com>
10 Ilmir Usmanov <i.usmanov@samsung.com>
11 Tobias Burnus <burnus@net-b.de>
13 * lang.opt (fopenacc): New option.
14 * cpp.c (cpp_define_builtins): Conditionally define _OPENACC.
15 * dump-parse-tree.c (show_omp_node): Split part of it into...
16 (show_omp_clauses): ... this new function.
17 (show_omp_node, show_code_node): Handle EXEC_OACC_PARALLEL_LOOP,
18 EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
19 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
20 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
21 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
22 (show_namespace): Update for OpenACC.
23 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_2, DEF_FUNCTION_TYPE_VAR_8)
24 (DEF_FUNCTION_TYPE_VAR_12, DEF_GOACC_BUILTIN)
25 (DEF_GOACC_BUILTIN_COMPILER): New macros.
26 * types.def (BT_FN_VOID_INT_INT_VAR)
27 (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
28 (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
30 * gfortran.h (gfc_statement): Add ST_OACC_PARALLEL_LOOP,
31 ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
32 ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_DATA,
33 ST_OACC_END_DATA, ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA,
34 ST_OACC_LOOP, ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE,
35 ST_OACC_WAIT, ST_OACC_CACHE, ST_OACC_KERNELS_LOOP,
36 ST_OACC_END_KERNELS_LOOP, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
38 (struct gfc_expr_list): New data type.
39 (gfc_get_expr_list): New macro.
40 (gfc_omp_map_op): Add OMP_MAP_FORCE_ALLOC, OMP_MAP_FORCE_DEALLOC,
41 OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM, OMP_MAP_FORCE_TOFROM,
42 OMP_MAP_FORCE_PRESENT, OMP_MAP_FORCE_DEVICEPTR.
43 (OMP_LIST_FIRST, OMP_LIST_DEVICE_RESIDENT, OMP_LIST_USE_DEVICE)
44 (OMP_LIST_CACHE): New enumerators.
45 (struct gfc_omp_clauses): Add async_expr, gang_expr, worker_expr,
46 vector_expr, num_gangs_expr, num_workers_expr, vector_length_expr,
47 wait_list, tile_list, async, gang, worker, vector, seq,
48 independent, wait, par_auto, gang_static, and loc members.
49 (struct gfc_namespace): Add oacc_declare_clauses member.
50 (gfc_exec_op): Add EXEC_OACC_KERNELS_LOOP,
51 EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS,
52 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
53 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
54 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
55 (gfc_free_expr_list, gfc_resolve_oacc_directive)
56 (gfc_resolve_oacc_declare, gfc_resolve_oacc_parallel_loop_blocks)
57 (gfc_resolve_oacc_blocks): New prototypes.
58 * match.c (match_exit_cycle): Handle EXEC_OACC_LOOP and
59 EXEC_OACC_PARALLEL_LOOP.
60 * match.h (gfc_match_oacc_cache, gfc_match_oacc_wait)
61 (gfc_match_oacc_update, gfc_match_oacc_declare)
62 (gfc_match_oacc_loop, gfc_match_oacc_host_data)
63 (gfc_match_oacc_data, gfc_match_oacc_kernels)
64 (gfc_match_oacc_kernels_loop, gfc_match_oacc_parallel)
65 (gfc_match_oacc_parallel_loop, gfc_match_oacc_enter_data)
66 (gfc_match_oacc_exit_data, gfc_match_oacc_routine): New
68 * openmp.c: Include "diagnostic.h" and "gomp-constants.h".
69 (gfc_free_omp_clauses): Update for members added to struct
71 (gfc_match_omp_clauses): Change mask paramter to uint64_t. Add
73 (resolve_omp_clauses): Add openacc parameter. Update for OpenACC.
74 (struct fortran_omp_context): Add is_openmp member.
75 (gfc_resolve_omp_parallel_blocks): Initialize it.
76 (gfc_resolve_do_iterator): Update for OpenACC.
77 (gfc_resolve_omp_directive): Call
78 resolve_omp_directive_inside_oacc_region.
79 (OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE)
80 (OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_COPYPRIVATE)
81 (OMP_CLAUSE_SHARED, OMP_CLAUSE_COPYIN, OMP_CLAUSE_REDUCTION)
82 (OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_SCHEDULE)
83 (OMP_CLAUSE_DEFAULT, OMP_CLAUSE_ORDERED, OMP_CLAUSE_COLLAPSE)
84 (OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE)
85 (OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH)
86 (OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND)
87 (OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM)
88 (OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP, OMP_CLAUSE_TO)
89 (OMP_CLAUSE_FROM, OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_THREAD_LIMIT)
90 (OMP_CLAUSE_DIST_SCHEDULE): Use uint64_t.
91 (OMP_CLAUSE_ASYNC, OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS)
92 (OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_COPY, OMP_CLAUSE_COPYOUT)
93 (OMP_CLAUSE_CREATE, OMP_CLAUSE_PRESENT)
94 (OMP_CLAUSE_PRESENT_OR_COPY, OMP_CLAUSE_PRESENT_OR_COPYIN)
95 (OMP_CLAUSE_PRESENT_OR_COPYOUT, OMP_CLAUSE_PRESENT_OR_CREATE)
96 (OMP_CLAUSE_DEVICEPTR, OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER)
97 (OMP_CLAUSE_VECTOR, OMP_CLAUSE_SEQ, OMP_CLAUSE_INDEPENDENT)
98 (OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE_DEVICE_RESIDENT)
99 (OMP_CLAUSE_HOST_SELF, OMP_CLAUSE_OACC_DEVICE, OMP_CLAUSE_WAIT)
100 (OMP_CLAUSE_DELETE, OMP_CLAUSE_AUTO, OMP_CLAUSE_TILE): New macros.
101 (gfc_match_omp_clauses): Handle those.
102 (OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES)
103 (OACC_LOOP_CLAUSES, OACC_PARALLEL_LOOP_CLAUSES)
104 (OACC_KERNELS_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES)
105 (OACC_DECLARE_CLAUSES, OACC_UPDATE_CLAUSES)
106 (OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES)
107 (OACC_WAIT_CLAUSES): New macros.
108 (gfc_free_expr_list, match_oacc_expr_list, match_oacc_clause_gang)
109 (gfc_match_omp_map_clause, gfc_match_oacc_parallel_loop)
110 (gfc_match_oacc_parallel, gfc_match_oacc_kernels_loop)
111 (gfc_match_oacc_kernels, gfc_match_oacc_data)
112 (gfc_match_oacc_host_data, gfc_match_oacc_loop)
113 (gfc_match_oacc_declare, gfc_match_oacc_update)
114 (gfc_match_oacc_enter_data, gfc_match_oacc_exit_data)
115 (gfc_match_oacc_wait, gfc_match_oacc_cache)
116 (gfc_match_oacc_routine, oacc_is_loop)
117 (resolve_oacc_scalar_int_expr, resolve_oacc_positive_int_expr)
118 (check_symbol_not_pointer, check_array_not_assumed)
119 (resolve_oacc_data_clauses, resolve_oacc_deviceptr_clause)
120 (oacc_compatible_clauses, oacc_is_parallel, oacc_is_kernels)
121 (omp_code_to_statement, oacc_code_to_statement)
122 (resolve_oacc_directive_inside_omp_region)
123 (resolve_omp_directive_inside_oacc_region)
124 (resolve_oacc_nested_loops, resolve_oacc_params_in_parallel)
125 (resolve_oacc_loop_blocks, gfc_resolve_oacc_blocks)
126 (resolve_oacc_loop, resolve_oacc_cache, gfc_resolve_oacc_declare)
127 (gfc_resolve_oacc_directive): New functions.
128 * parse.c (next_free): Update for OpenACC. Move some code into...
129 (verify_token_free): ... this new function.
130 (next_fixed): Update for OpenACC. Move some code into...
131 (verify_token_fixed): ... this new function.
132 (case_executable): Add ST_OACC_UPDATE, ST_OACC_WAIT,
133 ST_OACC_CACHE, ST_OACC_ENTER_DATA, and ST_OACC_EXIT_DATA.
134 (case_exec_markers): Add ST_OACC_PARALLEL_LOOP, ST_OACC_PARALLEL,
135 ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA, ST_OACC_LOOP,
136 ST_OACC_KERNELS_LOOP.
137 (case_decl): Add ST_OACC_ROUTINE.
138 (push_state, parse_critical_block, parse_progunit): Update for
140 (gfc_ascii_statement): Handle ST_OACC_PARALLEL_LOOP,
141 ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
142 ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_KERNELS_LOOP,
143 ST_OACC_END_KERNELS_LOOP, ST_OACC_DATA, ST_OACC_END_DATA,
144 ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA, ST_OACC_LOOP,
145 ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE, ST_OACC_WAIT,
146 ST_OACC_CACHE, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
148 (verify_st_order, parse_spec): Handle ST_OACC_DECLARE.
149 (parse_executable): Handle ST_OACC_PARALLEL_LOOP,
150 ST_OACC_KERNELS_LOOP, ST_OACC_LOOP, ST_OACC_PARALLEL,
151 ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA.
152 (decode_oacc_directive, parse_oacc_structured_block)
153 (parse_oacc_loop, is_oacc): New functions.
154 * parse.h (struct gfc_state_data): Add oacc_declare_clauses
156 (is_oacc): New prototype.
157 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Handle
158 EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL,
159 EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS, EXEC_OACC_DATA,
160 EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP, EXEC_OACC_UPDATE,
161 EXEC_OACC_WAIT, EXEC_OACC_CACHE, EXEC_OACC_ENTER_DATA,
163 (resolve_codes): Call gfc_resolve_oacc_declare.
164 * scanner.c (openacc_flag, openacc_locus): New variables.
165 (skip_free_comments): Update for OpenACC. Move some code into...
166 (skip_omp_attribute): ... this new function.
167 (skip_oacc_attribute): New function.
168 (skip_fixed_comments, gfc_next_char_literal): Update for OpenACC.
169 * st.c (gfc_free_statement): Handle EXEC_OACC_PARALLEL_LOOP,
170 EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
171 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
172 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
173 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
174 * trans-decl.c (gfc_generate_function_code): Update for OpenACC.
175 * trans-openmp.c: Include "gomp-constants.h".
176 (gfc_omp_finish_clause, gfc_trans_omp_clauses): Use GOMP_MAP_*
177 instead of OMP_CLAUSE_MAP_*. Use OMP_CLAUSE_SET_MAP_KIND.
178 (gfc_trans_omp_clauses): Handle OMP_LIST_USE_DEVICE,
179 OMP_LIST_DEVICE_RESIDENT, OMP_LIST_CACHE, and OMP_MAP_FORCE_ALLOC,
180 OMP_MAP_FORCE_DEALLOC, OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM,
181 OMP_MAP_FORCE_TOFROM, OMP_MAP_FORCE_PRESENT,
182 OMP_MAP_FORCE_DEVICEPTR, and gfc_omp_clauses' async, seq,
183 independent, wait_list, num_gangs_expr, num_workers_expr,
184 vector_length_expr, vector, vector_expr, worker, worker_expr,
185 gang, gang_expr members.
186 (gfc_trans_omp_do): Handle EXEC_OACC_LOOP.
187 (gfc_convert_expr_to_tree, gfc_trans_oacc_construct)
188 (gfc_trans_oacc_executable_directive)
189 (gfc_trans_oacc_wait_directive, gfc_trans_oacc_combined_directive)
190 (gfc_trans_oacc_declare, gfc_trans_oacc_directive): New functions.
191 * trans-stmt.c (gfc_trans_block_construct): Update for OpenACC.
192 * trans-stmt.h (gfc_trans_oacc_directive, gfc_trans_oacc_declare):
194 * trans.c (tranc_code): Handle EXEC_OACC_CACHE, EXEC_OACC_WAIT,
195 EXEC_OACC_UPDATE, EXEC_OACC_LOOP, EXEC_OACC_HOST_DATA,
196 EXEC_OACC_DATA, EXEC_OACC_KERNELS, EXEC_OACC_KERNELS_LOOP,
197 EXEC_OACC_PARALLEL, EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_ENTER_DATA,
199 * gfortran.texi: Update for OpenACC.
200 * intrinsic.texi: Likewise.
201 * invoke.texi: Likewise.
203 2015-01-15 Janus Weil <janus@gcc.gnu.org>
206 * resolve.c (resolve_fl_derived0): Continue resolving next component
209 2015-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
212 * io.c (gfc_match_inquire): Generate error if unit number in
213 inquire statement is a constant -1. All other values allowed.
214 * trans-io.c (gfc_trans_inquire): Delete dummy iostat variable.
215 (create_dummy_iostat): Delete function no longer used.
217 2015-01-13 Jakub Jelinek <jakub@redhat.com>
220 * trans-decl.c (create_function_arglist): Don't set TREE_READONLY
221 on dummy args with VALUE attribute.
223 2015-01-11 Janus Weil <janus@gcc.gnu.org>
226 * interface.c (gfc_extend_expr): Look for type-bound operators before
229 2015-01-11 Janus Weil <janus@gcc.gnu.org>
232 * resolve.c (resolve_fl_derived0): Set error flag if problems with the
233 interface of a procedure-pointer component were detected.
235 2015-01-11 Janus Weil <janus@gcc.gnu.org>
238 * interface.c (compare_parameter): Interface check for
239 procedure-pointer component as actual argument.
241 2015-01-10 Thomas Schwinge <thomas@codesourcery.com>
243 * gfortran.texi: Update for libgomp being renamed from "GNU OpenMP
244 Runtime Library" to "GNU Offloading and Multi Processing Runtime
246 * intrinsic.texi: Likewise.
248 2015-01-10 Tobias Burnus <burnus@net-b.de>
251 * invoke.texi (Wline-truncation): Document new behaviour.
252 * lang.opt (Wline-truncation): Add Init(-1).
253 * options.c (gfc_post_options): If -Wline-truncation is unset,
254 enable it for free-form source files; for the latter, also use
255 -Werror=line-truncation, unless -Wno-error has been specified.
257 2015-01-09 Michael Collison <michael.collison@linaro.org>
259 * convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
260 input.h, alias.h, symtab.h, options.h, fold-const.h,
261 wide-int.h, and inchash.h due to flattening of tree.h.
262 * cpp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
263 input.h, alias.h, symtab.h, fold-const.h,
264 wide-int.h, and inchash.h due to flattening of tree.h.
266 * f95.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
267 input.h, alias.h, symtab.h, options.h, fold-const.h,
268 wide-int.h, and inchash.h due to flattening of tree.h.
270 * match.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
271 input.h, alias.h, symtab.h, fold-const.h,
272 wide-int.h, and inchash.h due to flattening of tree.h.
273 * module.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
274 input.h, alias.h, symtab.h, options.h, fold-const.h,
275 wide-int.h, and inchash.h due to flattening of tree.h.
277 * target-memory.c: Include hash-set.h, vec.h,
278 double-int.h, input.h, alias.h, symtab.h, fold-const.h,
279 wide-int.h, and inchash.h due to flattening of tree.h.
280 * trans-array.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
281 input.h, alias.h, symtab.h, options.h, fold-const.h,
282 wide-int.h, and inchash.h due to flattening of tree.h.
283 * trans.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
284 input.h, alias.h, symtab.h, options.h, fold-const.h,
285 wide-int.h, and inchash.h due to flattening of tree.h.
286 * trans-common.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
287 input.h, alias.h, symtab.h, fold-const.h,
288 wide-int.h, and inchash.h due to flattening of tree.h.
289 * trans-const.c: Ditto.
290 * trans-decl.c: Ditto.
291 * trans-expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
292 input.h, alias.h, symtab.h, options.h, fold-const.h,
293 wide-int.h, and inchash.h due to flattening of tree.h.
294 * trans-intrinsic.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
295 input.h, alias.h, symtab.h, fold-const.h,
296 wide-int.h, inchash.h and real.h due to flattening of tree.h.
297 * trans-io.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
298 input.h, alias.h, symtab.h, options.h, fold-const.h,
299 wide-int.h, and inchash.h due to flattening of tree.h.
300 * trans-openmp.c: Ditto.
301 * trans-stmt.c: Ditto.
302 * trans-types.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
303 input.h, alias.h, symtab.h, fold-const.h,
304 wide-int.h, inchash.h and real.h due to flattening of tree.h.
306 2015-01-08 Tobias Burnus <burnus@net-b.de>
308 * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
309 for module coarrays with -fcoarray=lib.
310 (get_proc_pointer_decl): As module variable, make only public
311 when not marked as private.
313 2015-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
316 * dependency.h: Actually commit changes.
318 2015-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
321 * dependency.c: Update copyright years.
322 (gfc_discard_nops): Add prototype.
323 * dependency.c (discard_nops): Rename to gfc_discard_nops,
325 (gfc_discard_nops): Use gfc_discard_nops.
326 (gfc_dep_difference): Likewise.
327 * frontend-passes.c Update copyright years.
328 (realloc_strings): New function. Add prototype.
329 (gfc_run_passes): Call realloc_strings.
330 (realloc_string_callback): New function.
331 (create_var): Add prototype. Handle case of a
332 scalar character variable.
333 (optimize_trim): Do not handle allocatable variables.
335 2015-01-05 Jakub Jelinek <jakub@redhat.com>
337 Update copyright years.
339 * gfortranspec.c (lang_specific_driver): Update copyright notice
341 * gfc-internals.texi: Bump @copying's copyright year.
342 * gfortran.texi: Ditto.
343 * intrinsic.texi: Ditto.
344 * invoke.texi: Ditto.
346 2015-01-02 Janus Weil <janus@gcc.gnu.org>
349 * expr.c (find_component_ref): Deal with extended types.
351 2015-01-02 Tobias Burnus <burnus@net-b.de>
353 * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
354 for module coarrays with -fcoarray=lib.
356 2015-01-02 Janus Weil <janus@gcc.gnu.org>
359 * interface.c (is_procptr_result): New function to check if an
360 expression is a procedure-pointer result.
361 (compare_actual_formal): Use it.
363 Copyright (C) 2015 Free Software Foundation, Inc.
365 Copying and distribution of this file, with or without modification,
366 are permitted in any medium without royalty provided the copyright
367 notice and this notice are preserved.