Use the local name instead of the original name in the check for name conflicts...
[gcc.git] / gcc / fortran / ChangeLog
1 2015-02-08 Mikael Morin <mikael@gcc.gnu.org>
2
3 PR fortran/63744
4 * module.c (check_for_ambiguous): Change argument type
5 from gfc_symbol to gfc_symtree. Check local (symtree) name
6 instead of original (symbol) name.
7 (read_module): Update caller.
8
9 2015-02-06 Paul Thomas <pault@gcc.gnu.org>
10
11 PR fortran/63205
12 * gfortran.h: Add 'must finalize' field to gfc_expr and
13 prototypes for gfc_is_alloc_class_scalar_function and for
14 gfc_is_alloc_class_array_function.
15 * expr.c (gfc_is_alloc_class_scalar_function,
16 gfc_is_alloc_class_array_function): New functions.
17 * trans-array.c (gfc_add_loop_ss_code): Do not move the
18 expression for allocatable class scalar functions outside the
19 loop.
20 (conv_array_index_offset): Cope with deltas being NULL_TREE.
21 (build_class_array_ref): Do not return with allocatable class
22 array functions. Add code to pick out the returned class array.
23 Dereference if necessary and return if not a class object.
24 (gfc_conv_scalarized_array_ref): Cope with offsets being NULL.
25 (gfc_walk_function_expr): Return an array ss for the result of
26 an allocatable class array function.
27 * trans-expr.c (gfc_conv_subref_array_arg): Remove the assert
28 that the argument should be a variable. If an allocatable class
29 array function, set the offset to zero and skip the write-out
30 loop in this case.
31 (gfc_conv_procedure_call): Add allocatable class array function
32 to the assert. Call gfc_conv_subref_array_arg for allocatable
33 class array function arguments with derived type formal arg..
34 Add the code for handling allocatable class functions, including
35 finalization calls to prevent memory leaks.
36 (arrayfunc_assign_needs_temporary): Return if an allocatable
37 class array function.
38 (gfc_trans_assignment_1): Set must_finalize to rhs expression
39 for allocatable class functions. Set scalar_to_array as needed
40 for scalar class allocatable functions assigned to an array.
41 Nullify the allocatable components corresponding the the lhs
42 derived type so that the finalization does not free them.
43
44 2015-01-29 Andre Vehreschild <vehre@gmx.de>
45 Janus Weil <janus@gcc.gnu.org>
46
47 PR fortran/60289
48 Initial patch by Janus Weil
49 * resolve.c (resolve_allocate_expr): Add check for comp. only
50 when target is not unlimited polymorphic.
51 * trans-stmt.c (gfc_trans_allocate): Assign correct value to
52 _len component of unlimited polymorphic entities.
53
54 2015-02-05 Tobias Burnus <burnus@net-b.de>
55
56 PR fortran/64943
57 * resolve.c (resolve_transfer): Also check structure
58 constructors.
59
60 2015-02-05 Paul Thomas <pault@gcc.gnu.org>
61
62 PR fortran/64757
63 * resolve.c (resolve_structure_cons): Obtain the rank of class
64 components.
65 * trans-expr.c (gfc_trans_alloc_subarray_assign): Do the
66 assignment to allocatable class array components.
67 (alloc_scalar_allocatable_for_subcomponent_assignment): If comp
68 is a class component, allocate to the _data field.
69 (gfc_trans_subcomponent_assign): If a class component with a
70 derived type expression set the _vptr field and for array
71 components, call gfc_trans_alloc_subarray_assign. For scalars,
72 the assignment is performed here.
73
74 2015-02-04 Jakub Jelinek <jakub@redhat.com>
75
76 * options.c: Include langhooks.h.
77 (gfc_post_options): Change lang_hooks.name based on
78 selected -std= mode.
79
80 2015-02-03 Steven G. Kargl <kargl@gcc.gnu.org>
81
82 * intrinsic.texi (CO_ASSOCIATED): c_prt_1 should be c_ptr_1.
83
84 2015-01-30 Andre Vehreschild <vehre@gmx.de>
85
86 * trans-decl.c (gfc_get_symbol_decl): Removed duplicate code.
87 * trans-expr.c (gfc_conv_intrinsic_to_class): Fixed indentation.
88 Fixed datatype of charlen to be a 32-bit int.
89
90 2015-02-01 Joseph Myers <joseph@codesourcery.com>
91
92 * error.c (gfc_warning (const char *, ...), gfc_warning_now (const
93 char *, ...)): Remove functions.
94 * gfortran.h (gfc_warning (const char *, ...), gfc_warning_now
95 (const char *, ...)): Remove declarations.
96 * arith.c, check.c, data.c, decl.c, frontend-passes.c,
97 interface.c, intrinsic.c, io.c, matchexp.c, module.c, openmp.c,
98 options.c, parse.c, primary.c, resolve.c, scanner.c, symbol.c,
99 trans-common.c, trans-const.c, trans-stmt.c: All callers of
100 gfc_warning and gfc_warning_now changed to pass 0 or option number
101 as first argument.
102
103 2015-01-30 Joseph Myers <joseph@codesourcery.com>
104
105 * f95-lang.c, gfortranspec.c, trans-const.c, trans-expr.c: All
106 callers of fatal_error changed to pass input_location as first
107 argument.
108
109 2015-01-28 Tobias Burnus <burnus@net-b.de>
110
111 * intrinsic.texi (CO_BROADCAST): Correct argument description.
112
113 2015-01-27 Tobias Burnus <burnus@net-b.de>
114
115 PR fortran/63861
116 * trans-openmp.c (gfc_has_alloc_comps, gfc_trans_omp_clauses):
117 Fix handling for scalar coarrays.
118 * trans-types.c (gfc_get_element_type): Add comment.
119
120 2015-01-27 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
121
122 PR fortran/64771
123 * interface.c: Remove <algorithm>.
124 (check_dummy_characteristics): Use MAX instead of std::max.
125
126 2015-01-26 Paul Thomas <pault@gcc.gnu.org>
127
128 PR fortran/62044
129 * resolve.c (resolve_allocate_expr): If the default initializer
130 is NULL, keep the original MOLD expression so that the correct
131 typespec is available.
132
133 2015-01-26 Tobias Burnus <burnus@net-b.de>
134
135 PR fortran/64771
136 * interface.c (check_dummy_characteristics): Fix coarray handling.
137
138 2015-01-26 Tobias Burnus <burnus@net-b.de>
139
140 * io.c (gfc_match_inquire): Replace "-1" by a defined constant.
141
142 2015-01-26 Janus Weil <janus@gcc.gnu.org>
143
144 PR fortran/64230
145 * class.c (finalize_component): New argument 'sub_ns'. Insert code to
146 check if 'expr' is associated.
147 (generate_finalization_wrapper): Rename 'ptr' symbols to 'ptr1' and
148 'ptr2'. Pass 'sub_ns' to finalize_component.
149
150 2015-01-25 Mikael Morin <mikael@gcc.gnu.org>
151
152 PR fortran/62044
153 * decl.c (gfc_match_derived_decl): Don't insert a new symtree element.
154 * module.c (MOD_VERSION): Bump.
155 (write_module): Don't write list of extensions.
156 (read_module): Don't jump over list of extensions;
157 don't load list of extensions.
158 (load_derived_extensions, write_dt_extensions,
159 write_derived_extensions): Remove.
160
161 2015-01-24 Tobias Burnus <burnus@net-b.de>
162
163 * parse.c (gfc_parse_file): Fix two-location gfc_error call.
164
165 2015-01-23 Martin Liska <mliska@suse.cz>
166
167 * decl.c (attr_decl1): Workaround -Wmaybe-uninitialized
168 false positive during profiledbootstrap by initializing them.
169 * matchexp.c (match_mult_operand): Likewise.
170 * module.c (write_atom): Likewise.
171 (read_module): Likewise.
172
173 2015-01-23 Tom de Vries <tom@codesourcery.com>
174
175 PR libgomp/64672
176 * lang.opt (fopenacc): Mark as LTO option.
177
178 2015-01-23 Tom de Vries <tom@codesourcery.com>
179
180 PR libgomp/64707
181 * lang.opt (fopenmp): Mark as LTO option.
182
183 2015-01-23 Andre Vehreschild <vehre@gmx.de>
184
185 * trans-decl.c (gfc_finish_var_decl): Fixed moved comment.
186 * trans-stmt.c (gfc_trans_allocate): Fixed indentation.
187
188 2015-01-23 Jakub Jelinek <jakub@redhat.com>
189
190 * gfc-diagnostic.def (DK_ICE_NOBT): New kind.
191
192 2015-01-23 Janus Weil <janus@gcc.gnu.org>
193
194 PR fortran/60922
195 * class.c (finalize_component): Apply the check for 'fini_coarray' only
196 to coarray components.
197
198 2015-01-23 Tobias Burnus <burnus@net-b.de>
199
200 PR fortran/64726
201 * trans-openmp.c (gfc_trans_oacc_combined_directive): Fix
202 loop generation.
203
204 2015-01-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
205
206 PR fortran/61933
207 * libgfortran.h:
208 * trans-io.c (set_parameter_value): Delete use of has_iostat.
209 Redefine to not generate any runtime error check calls.
210 (set_parameter_value_chk): Rename of the former
211 set_parameter_value with the runtime error checks and fix
212 whitespace. (set_parameter_value_inquire): New function that
213 builds a runtime conditional block to set the INQUIRE
214 common parameter block unit number to -2 when unit numbers
215 exceed positive KIND=4 limits. (gfc_trans_open): Whitespace.
216 For unit, use the renamed set_parameter_value_chk.
217 (gfc_trans_close): Likewise use renamed function.
218 (build_filepos): Whitespace and use renamed function.
219 (gfc_trans_inquire): Whitespace and for unit use
220 set_parameter_value and set_parameter_value_inquire.
221 (gfc_trans_wait): Remove p->iostat from call to
222 set_parameter_value. Use new set_parameter_value_chk for unit.
223 (build_dt): Use the new set_parameter_value without p->iostat
224 and fix whitespace. Use set_parameter_value_chk for unit.
225
226 2015-01-21 Thomas Koenig <tkoenig@netcologne.de>
227
228 PR fortran/57023
229 * dependency.c (callback_dummy_intent_not_int): New function.
230 (dummy_intent_not_in): New function.
231 (gfc_full_array_ref_p): Use dummy_intent_not_in.
232
233 2015-01-18 Andre Vehreschild <vehre@gmx.de>
234 Janus Weil <janus@gcc.gnu.org>
235
236 PR fortran/60255
237 * class.c (gfc_get_len_component): New.
238 (gfc_build_class_symbol): Add _len component to unlimited
239 polymorphic entities.
240 (find_intrinsic_vtab): Removed emitting of error message.
241 * gfortran.h: Added prototype for gfc_get_len_component.
242 * simplify.c (gfc_simplify_len): Use _len component where
243 available.
244 * trans-expr.c (gfc_class_len_get): New.
245 (gfc_conv_intrinsic_to_class): Add handling for deferred
246 character arrays.
247 (gfc_conv_structure): Treat _len component correctly.
248 (gfc_conv_expr): Prevent bind_c handling when not required.
249 (gfc_trans_pointer_assignment): Propagate _len component.
250 * trans-stmt.c (class_has_len_component): New.
251 (trans_associate_var): _len component treatment for associate
252 context.
253 (gfc_trans_allocate): Same as for trans_associate_var()
254 * trans.h: Added prototype for gfc_class_len_get.
255
256 2015-01-18 Paul Thomas <pault@gcc.gnu.org>
257
258 PR fortran/57959
259 * trans-expr.c (gfc_trans_subcomponent_assign): Use a deep copy
260 for allocatable components, where the source is a variable.
261
262 2015-01-18 Paul Thomas <pault@gcc.gnu.org>
263
264 PR fortran/55901
265 * primary.c (gfc_match_varspec): Exclude dangling associate-
266 names with dimension 0 from being counted as arrays.
267 * resolve.c (resolve_assoc_var): Sub-strings are permissible
268 for associate-names, so exclude characters from the test for
269 misuse as arrays.
270 * trans-decl.c (gfc_get_symbol_decl): Associate-names can use
271 the hidden string length variable of their associated target.
272 Signal this by setting 'length' to a constant, if the decl for
273 the string length is a variable.
274
275 2015-01-17 Paul Thomas <pault@gcc.gnu.org>
276
277 PR fortran/64578
278 * trans-expr.c (gfc_trans_pointer_assignment): Make sure that
279 before reinitializing rse, to add the rse.pre to block before
280 creating 'ptrtemp'.
281 * trans-intrinsic.c (gfc_conv_associated): Deal with the class
282 data being a descriptor.
283
284 2015-01-17 Andre Vehreschild <vehre@gmx.de>
285
286 PR fortran/60357
287 * primary.c (build_actual_constructor): Prevent warning.
288 * trans-expr.c (alloc_scalar_allocatable_for_subcomponent_
289 assignment): New function encapsulates treatment of allocatable
290 components.
291 (gfc_trans_subcomponent_assign): Needed to distinguish between
292 regular assignment and initilization.
293 (gfc_trans_structure_assign): Same.
294 (gfc_conv_structure): Same.
295
296 PR fortran/61275
297 * gfortran.h: deferred_parameter is not needed, because
298 it artificial does the trick completely.
299 * primary.c (build_actual_constructor): Same.
300 (gfc_convert_to_structure_constructor): Same.
301 * resolve.c (resolve_fl_derived0): Same.
302 * trans-expr.c (gfc_conv_component_ref): Prevent treating
303 allocatable deferred length char arrays here.
304 (gfc_trans_subcomponent_assign): Same as above.
305 * trans-types.c (gfc_sym_type): This is done in
306 gfc_get_derived_type already.
307
308 2015-01-17 Andre Vehreschild <vehre@gmx.de>
309
310 PR fortran/60334
311 * trans-decl.c (gfc_get_symbol_decl):Use a ref on the string
312 length when the symbol is declared to be a result.
313 * trans-expr.c (gfc_conv_procedure_call): Strip deref on the
314 string length when functions are nested and the string length
315 is a reference already.
316
317 2015-01-16 Janus Weil <janus@gcc.gnu.org>
318
319 PR fortran/45290
320 * decl.c (match_pointer_init): Error out if resolution of init expr
321 failed.
322
323 2015-01-15 Tobias Burnus <burnus@net-b.de>
324
325 * openmp.c (check_symbol_not_pointer, resolve_oacc_data_clauses,
326 resolve_oacc_deviceptr_clause, resolve_omp_clauses,
327 gfc_resolve_oacc_declare): Replace '%s' by %qs.
328
329 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
330 Cesar Philippidis <cesar@codesourcery.com>
331 James Norris <jnorris@codesourcery.com>
332 Ilmir Usmanov <i.usmanov@samsung.com>
333 Tobias Burnus <burnus@net-b.de>
334
335 * lang.opt (fopenacc): New option.
336 * cpp.c (cpp_define_builtins): Conditionally define _OPENACC.
337 * dump-parse-tree.c (show_omp_node): Split part of it into...
338 (show_omp_clauses): ... this new function.
339 (show_omp_node, show_code_node): Handle EXEC_OACC_PARALLEL_LOOP,
340 EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
341 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
342 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
343 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
344 (show_namespace): Update for OpenACC.
345 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_2, DEF_FUNCTION_TYPE_VAR_8)
346 (DEF_FUNCTION_TYPE_VAR_12, DEF_GOACC_BUILTIN)
347 (DEF_GOACC_BUILTIN_COMPILER): New macros.
348 * types.def (BT_FN_VOID_INT_INT_VAR)
349 (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
350 (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
351 New function types.
352 * gfortran.h (gfc_statement): Add ST_OACC_PARALLEL_LOOP,
353 ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
354 ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_DATA,
355 ST_OACC_END_DATA, ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA,
356 ST_OACC_LOOP, ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE,
357 ST_OACC_WAIT, ST_OACC_CACHE, ST_OACC_KERNELS_LOOP,
358 ST_OACC_END_KERNELS_LOOP, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
359 ST_OACC_ROUTINE.
360 (struct gfc_expr_list): New data type.
361 (gfc_get_expr_list): New macro.
362 (gfc_omp_map_op): Add OMP_MAP_FORCE_ALLOC, OMP_MAP_FORCE_DEALLOC,
363 OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM, OMP_MAP_FORCE_TOFROM,
364 OMP_MAP_FORCE_PRESENT, OMP_MAP_FORCE_DEVICEPTR.
365 (OMP_LIST_FIRST, OMP_LIST_DEVICE_RESIDENT, OMP_LIST_USE_DEVICE)
366 (OMP_LIST_CACHE): New enumerators.
367 (struct gfc_omp_clauses): Add async_expr, gang_expr, worker_expr,
368 vector_expr, num_gangs_expr, num_workers_expr, vector_length_expr,
369 wait_list, tile_list, async, gang, worker, vector, seq,
370 independent, wait, par_auto, gang_static, and loc members.
371 (struct gfc_namespace): Add oacc_declare_clauses member.
372 (gfc_exec_op): Add EXEC_OACC_KERNELS_LOOP,
373 EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS,
374 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
375 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
376 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
377 (gfc_free_expr_list, gfc_resolve_oacc_directive)
378 (gfc_resolve_oacc_declare, gfc_resolve_oacc_parallel_loop_blocks)
379 (gfc_resolve_oacc_blocks): New prototypes.
380 * match.c (match_exit_cycle): Handle EXEC_OACC_LOOP and
381 EXEC_OACC_PARALLEL_LOOP.
382 * match.h (gfc_match_oacc_cache, gfc_match_oacc_wait)
383 (gfc_match_oacc_update, gfc_match_oacc_declare)
384 (gfc_match_oacc_loop, gfc_match_oacc_host_data)
385 (gfc_match_oacc_data, gfc_match_oacc_kernels)
386 (gfc_match_oacc_kernels_loop, gfc_match_oacc_parallel)
387 (gfc_match_oacc_parallel_loop, gfc_match_oacc_enter_data)
388 (gfc_match_oacc_exit_data, gfc_match_oacc_routine): New
389 prototypes.
390 * openmp.c: Include "diagnostic.h" and "gomp-constants.h".
391 (gfc_free_omp_clauses): Update for members added to struct
392 gfc_omp_clauses.
393 (gfc_match_omp_clauses): Change mask paramter to uint64_t. Add
394 openacc parameter.
395 (resolve_omp_clauses): Add openacc parameter. Update for OpenACC.
396 (struct fortran_omp_context): Add is_openmp member.
397 (gfc_resolve_omp_parallel_blocks): Initialize it.
398 (gfc_resolve_do_iterator): Update for OpenACC.
399 (gfc_resolve_omp_directive): Call
400 resolve_omp_directive_inside_oacc_region.
401 (OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE)
402 (OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_COPYPRIVATE)
403 (OMP_CLAUSE_SHARED, OMP_CLAUSE_COPYIN, OMP_CLAUSE_REDUCTION)
404 (OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_SCHEDULE)
405 (OMP_CLAUSE_DEFAULT, OMP_CLAUSE_ORDERED, OMP_CLAUSE_COLLAPSE)
406 (OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE)
407 (OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH)
408 (OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND)
409 (OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM)
410 (OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP, OMP_CLAUSE_TO)
411 (OMP_CLAUSE_FROM, OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_THREAD_LIMIT)
412 (OMP_CLAUSE_DIST_SCHEDULE): Use uint64_t.
413 (OMP_CLAUSE_ASYNC, OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS)
414 (OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_COPY, OMP_CLAUSE_COPYOUT)
415 (OMP_CLAUSE_CREATE, OMP_CLAUSE_PRESENT)
416 (OMP_CLAUSE_PRESENT_OR_COPY, OMP_CLAUSE_PRESENT_OR_COPYIN)
417 (OMP_CLAUSE_PRESENT_OR_COPYOUT, OMP_CLAUSE_PRESENT_OR_CREATE)
418 (OMP_CLAUSE_DEVICEPTR, OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER)
419 (OMP_CLAUSE_VECTOR, OMP_CLAUSE_SEQ, OMP_CLAUSE_INDEPENDENT)
420 (OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE_DEVICE_RESIDENT)
421 (OMP_CLAUSE_HOST_SELF, OMP_CLAUSE_OACC_DEVICE, OMP_CLAUSE_WAIT)
422 (OMP_CLAUSE_DELETE, OMP_CLAUSE_AUTO, OMP_CLAUSE_TILE): New macros.
423 (gfc_match_omp_clauses): Handle those.
424 (OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES)
425 (OACC_LOOP_CLAUSES, OACC_PARALLEL_LOOP_CLAUSES)
426 (OACC_KERNELS_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES)
427 (OACC_DECLARE_CLAUSES, OACC_UPDATE_CLAUSES)
428 (OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES)
429 (OACC_WAIT_CLAUSES): New macros.
430 (gfc_free_expr_list, match_oacc_expr_list, match_oacc_clause_gang)
431 (gfc_match_omp_map_clause, gfc_match_oacc_parallel_loop)
432 (gfc_match_oacc_parallel, gfc_match_oacc_kernels_loop)
433 (gfc_match_oacc_kernels, gfc_match_oacc_data)
434 (gfc_match_oacc_host_data, gfc_match_oacc_loop)
435 (gfc_match_oacc_declare, gfc_match_oacc_update)
436 (gfc_match_oacc_enter_data, gfc_match_oacc_exit_data)
437 (gfc_match_oacc_wait, gfc_match_oacc_cache)
438 (gfc_match_oacc_routine, oacc_is_loop)
439 (resolve_oacc_scalar_int_expr, resolve_oacc_positive_int_expr)
440 (check_symbol_not_pointer, check_array_not_assumed)
441 (resolve_oacc_data_clauses, resolve_oacc_deviceptr_clause)
442 (oacc_compatible_clauses, oacc_is_parallel, oacc_is_kernels)
443 (omp_code_to_statement, oacc_code_to_statement)
444 (resolve_oacc_directive_inside_omp_region)
445 (resolve_omp_directive_inside_oacc_region)
446 (resolve_oacc_nested_loops, resolve_oacc_params_in_parallel)
447 (resolve_oacc_loop_blocks, gfc_resolve_oacc_blocks)
448 (resolve_oacc_loop, resolve_oacc_cache, gfc_resolve_oacc_declare)
449 (gfc_resolve_oacc_directive): New functions.
450 * parse.c (next_free): Update for OpenACC. Move some code into...
451 (verify_token_free): ... this new function.
452 (next_fixed): Update for OpenACC. Move some code into...
453 (verify_token_fixed): ... this new function.
454 (case_executable): Add ST_OACC_UPDATE, ST_OACC_WAIT,
455 ST_OACC_CACHE, ST_OACC_ENTER_DATA, and ST_OACC_EXIT_DATA.
456 (case_exec_markers): Add ST_OACC_PARALLEL_LOOP, ST_OACC_PARALLEL,
457 ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA, ST_OACC_LOOP,
458 ST_OACC_KERNELS_LOOP.
459 (case_decl): Add ST_OACC_ROUTINE.
460 (push_state, parse_critical_block, parse_progunit): Update for
461 OpenACC.
462 (gfc_ascii_statement): Handle ST_OACC_PARALLEL_LOOP,
463 ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
464 ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_KERNELS_LOOP,
465 ST_OACC_END_KERNELS_LOOP, ST_OACC_DATA, ST_OACC_END_DATA,
466 ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA, ST_OACC_LOOP,
467 ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE, ST_OACC_WAIT,
468 ST_OACC_CACHE, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
469 ST_OACC_ROUTINE.
470 (verify_st_order, parse_spec): Handle ST_OACC_DECLARE.
471 (parse_executable): Handle ST_OACC_PARALLEL_LOOP,
472 ST_OACC_KERNELS_LOOP, ST_OACC_LOOP, ST_OACC_PARALLEL,
473 ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA.
474 (decode_oacc_directive, parse_oacc_structured_block)
475 (parse_oacc_loop, is_oacc): New functions.
476 * parse.h (struct gfc_state_data): Add oacc_declare_clauses
477 member.
478 (is_oacc): New prototype.
479 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Handle
480 EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL,
481 EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS, EXEC_OACC_DATA,
482 EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP, EXEC_OACC_UPDATE,
483 EXEC_OACC_WAIT, EXEC_OACC_CACHE, EXEC_OACC_ENTER_DATA,
484 EXEC_OACC_EXIT_DATA.
485 (resolve_codes): Call gfc_resolve_oacc_declare.
486 * scanner.c (openacc_flag, openacc_locus): New variables.
487 (skip_free_comments): Update for OpenACC. Move some code into...
488 (skip_omp_attribute): ... this new function.
489 (skip_oacc_attribute): New function.
490 (skip_fixed_comments, gfc_next_char_literal): Update for OpenACC.
491 * st.c (gfc_free_statement): Handle EXEC_OACC_PARALLEL_LOOP,
492 EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
493 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
494 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
495 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
496 * trans-decl.c (gfc_generate_function_code): Update for OpenACC.
497 * trans-openmp.c: Include "gomp-constants.h".
498 (gfc_omp_finish_clause, gfc_trans_omp_clauses): Use GOMP_MAP_*
499 instead of OMP_CLAUSE_MAP_*. Use OMP_CLAUSE_SET_MAP_KIND.
500 (gfc_trans_omp_clauses): Handle OMP_LIST_USE_DEVICE,
501 OMP_LIST_DEVICE_RESIDENT, OMP_LIST_CACHE, and OMP_MAP_FORCE_ALLOC,
502 OMP_MAP_FORCE_DEALLOC, OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM,
503 OMP_MAP_FORCE_TOFROM, OMP_MAP_FORCE_PRESENT,
504 OMP_MAP_FORCE_DEVICEPTR, and gfc_omp_clauses' async, seq,
505 independent, wait_list, num_gangs_expr, num_workers_expr,
506 vector_length_expr, vector, vector_expr, worker, worker_expr,
507 gang, gang_expr members.
508 (gfc_trans_omp_do): Handle EXEC_OACC_LOOP.
509 (gfc_convert_expr_to_tree, gfc_trans_oacc_construct)
510 (gfc_trans_oacc_executable_directive)
511 (gfc_trans_oacc_wait_directive, gfc_trans_oacc_combined_directive)
512 (gfc_trans_oacc_declare, gfc_trans_oacc_directive): New functions.
513 * trans-stmt.c (gfc_trans_block_construct): Update for OpenACC.
514 * trans-stmt.h (gfc_trans_oacc_directive, gfc_trans_oacc_declare):
515 New prototypes.
516 * trans.c (tranc_code): Handle EXEC_OACC_CACHE, EXEC_OACC_WAIT,
517 EXEC_OACC_UPDATE, EXEC_OACC_LOOP, EXEC_OACC_HOST_DATA,
518 EXEC_OACC_DATA, EXEC_OACC_KERNELS, EXEC_OACC_KERNELS_LOOP,
519 EXEC_OACC_PARALLEL, EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_ENTER_DATA,
520 EXEC_OACC_EXIT_DATA.
521 * gfortran.texi: Update for OpenACC.
522 * intrinsic.texi: Likewise.
523 * invoke.texi: Likewise.
524
525 2015-01-15 Janus Weil <janus@gcc.gnu.org>
526
527 PR fortran/58023
528 * resolve.c (resolve_fl_derived0): Continue resolving next component
529 after error.
530
531 2015-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
532
533 PR fortran/61933
534 * io.c (gfc_match_inquire): Generate error if unit number in
535 inquire statement is a constant -1. All other values allowed.
536 * trans-io.c (gfc_trans_inquire): Delete dummy iostat variable.
537 (create_dummy_iostat): Delete function no longer used.
538
539 2015-01-13 Jakub Jelinek <jakub@redhat.com>
540
541 PR fortran/64528
542 * trans-decl.c (create_function_arglist): Don't set TREE_READONLY
543 on dummy args with VALUE attribute.
544
545 2015-01-11 Janus Weil <janus@gcc.gnu.org>
546
547 PR fortran/63733
548 * interface.c (gfc_extend_expr): Look for type-bound operators before
549 non-typebound ones.
550
551 2015-01-11 Janus Weil <janus@gcc.gnu.org>
552
553 PR fortran/58023
554 * resolve.c (resolve_fl_derived0): Set error flag if problems with the
555 interface of a procedure-pointer component were detected.
556
557 2015-01-11 Janus Weil <janus@gcc.gnu.org>
558
559 PR fortran/64508
560 * interface.c (compare_parameter): Interface check for
561 procedure-pointer component as actual argument.
562
563 2015-01-10 Thomas Schwinge <thomas@codesourcery.com>
564
565 * gfortran.texi: Update for libgomp being renamed from "GNU OpenMP
566 Runtime Library" to "GNU Offloading and Multi Processing Runtime
567 Library".
568 * intrinsic.texi: Likewise.
569
570 2015-01-10 Tobias Burnus <burnus@net-b.de>
571
572 PR fortran/64522
573 * invoke.texi (Wline-truncation): Document new behaviour.
574 * lang.opt (Wline-truncation): Add Init(-1).
575 * options.c (gfc_post_options): If -Wline-truncation is unset,
576 enable it for free-form source files; for the latter, also use
577 -Werror=line-truncation, unless -Wno-error has been specified.
578
579 2015-01-09 Michael Collison <michael.collison@linaro.org>
580
581 * convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
582 input.h, alias.h, symtab.h, options.h, fold-const.h,
583 wide-int.h, and inchash.h due to flattening of tree.h.
584 * cpp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
585 input.h, alias.h, symtab.h, fold-const.h,
586 wide-int.h, and inchash.h due to flattening of tree.h.
587 * decl.c: Ditto.
588 * f95.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
589 input.h, alias.h, symtab.h, options.h, fold-const.h,
590 wide-int.h, and inchash.h due to flattening of tree.h.
591 * iresolve.c: Ditto.
592 * match.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
593 input.h, alias.h, symtab.h, fold-const.h,
594 wide-int.h, and inchash.h due to flattening of tree.h.
595 * module.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
596 input.h, alias.h, symtab.h, options.h, fold-const.h,
597 wide-int.h, and inchash.h due to flattening of tree.h.
598 * options.c: Ditto.
599 * target-memory.c: Include hash-set.h, vec.h,
600 double-int.h, input.h, alias.h, symtab.h, fold-const.h,
601 wide-int.h, and inchash.h due to flattening of tree.h.
602 * trans-array.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
603 input.h, alias.h, symtab.h, options.h, fold-const.h,
604 wide-int.h, and inchash.h due to flattening of tree.h.
605 * trans.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
606 input.h, alias.h, symtab.h, options.h, fold-const.h,
607 wide-int.h, and inchash.h due to flattening of tree.h.
608 * trans-common.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
609 input.h, alias.h, symtab.h, fold-const.h,
610 wide-int.h, and inchash.h due to flattening of tree.h.
611 * trans-const.c: Ditto.
612 * trans-decl.c: Ditto.
613 * trans-expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
614 input.h, alias.h, symtab.h, options.h, fold-const.h,
615 wide-int.h, and inchash.h due to flattening of tree.h.
616 * trans-intrinsic.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
617 input.h, alias.h, symtab.h, fold-const.h,
618 wide-int.h, inchash.h and real.h due to flattening of tree.h.
619 * trans-io.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
620 input.h, alias.h, symtab.h, options.h, fold-const.h,
621 wide-int.h, and inchash.h due to flattening of tree.h.
622 * trans-openmp.c: Ditto.
623 * trans-stmt.c: Ditto.
624 * trans-types.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
625 input.h, alias.h, symtab.h, fold-const.h,
626 wide-int.h, inchash.h and real.h due to flattening of tree.h.
627
628 2015-01-08 Tobias Burnus <burnus@net-b.de>
629
630 * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
631 for module coarrays with -fcoarray=lib.
632 (get_proc_pointer_decl): As module variable, make only public
633 when not marked as private.
634
635 2015-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
636
637 PR fortran/47674
638 * dependency.h: Actually commit changes.
639
640 2015-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
641
642 PR fortran/47674
643 * dependency.c: Update copyright years.
644 (gfc_discard_nops): Add prototype.
645 * dependency.c (discard_nops): Rename to gfc_discard_nops,
646 make non-static.
647 (gfc_discard_nops): Use gfc_discard_nops.
648 (gfc_dep_difference): Likewise.
649 * frontend-passes.c Update copyright years.
650 (realloc_strings): New function. Add prototype.
651 (gfc_run_passes): Call realloc_strings.
652 (realloc_string_callback): New function.
653 (create_var): Add prototype. Handle case of a
654 scalar character variable.
655 (optimize_trim): Do not handle allocatable variables.
656
657 2015-01-05 Jakub Jelinek <jakub@redhat.com>
658
659 Update copyright years.
660
661 * gfortranspec.c (lang_specific_driver): Update copyright notice
662 dates.
663 * gfc-internals.texi: Bump @copying's copyright year.
664 * gfortran.texi: Ditto.
665 * intrinsic.texi: Ditto.
666 * invoke.texi: Ditto.
667
668 2015-01-02 Janus Weil <janus@gcc.gnu.org>
669
670 PR fortran/57562
671 * expr.c (find_component_ref): Deal with extended types.
672
673 2015-01-02 Tobias Burnus <burnus@net-b.de>
674
675 * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
676 for module coarrays with -fcoarray=lib.
677
678 2015-01-02 Janus Weil <janus@gcc.gnu.org>
679
680 PR fortran/60507
681 * interface.c (is_procptr_result): New function to check if an
682 expression is a procedure-pointer result.
683 (compare_actual_formal): Use it.
684 ^L
685 Copyright (C) 2015 Free Software Foundation, Inc.
686
687 Copying and distribution of this file, with or without modification,
688 are permitted in any medium without royalty provided the copyright
689 notice and this notice are preserved.