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