92d704afc67a8f03ef365ed7c1ddaacad550a61e
[gcc.git] / gcc / fortran / ChangeLog
1 2015-05-19 Jakub Jelinek <jakub@redhat.com>
2
3 PR middle-end/66199
4 * trans-openmp.c (gfc_trans_omp_teams): Set OMP_TEAMS_COMBINED for
5 combined constructs.
6 (gfc_trans_omp_target): Make sure BIND_EXPR has non-NULL
7 BIND_EXPR_BLOCK.
8
9 2015-05-19 David Malcolm <dmalcolm@redhat.com>
10
11 * cpp.c (maybe_print_line): Strengthen local "map" from
12 const line_map * to const line_map_ordinary *.
13 (cb_file_change): Likewise for param "map" and local "from".
14 (cb_line_change): Likewise for local "map".
15
16 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
17
18 * interface.c (compare_actual_formal): Use std::swap instead of
19 explicit swaps.
20 * trans-array.c (gfc_trans_scalarized_loop_end): Likewise.
21 * trans-intrinsic.c (walk_inline_intrinsic_transpose): Likewise.
22
23 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
24
25 PR fortran/66106
26 * interface.c(gfc_match_end_interface): Enforce F2008 C1202 (R1201).
27 * match.c(gfc_op2string): Return 'none' for INTRINSIC_NONE.
28
29 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
30
31 PR fortran/66057
32 * decl.c(gfc_match_generic): Detected a malformed GENERIC statement.
33
34 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
35
36 PR fortran/66043
37 * gfortran.dg/storage_size_6.f90: New tests.
38
39 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
40
41 PR fortran/66043
42 * gfortran.dg/storage_size_6.f90: New tests.
43
44 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
45
46 PR fortran/66044
47 * decl.c(gfc_match_entry): Change a gfc_internal_error() into
48 a gfc_error()
49
50 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
51
52 PR fortran/66043
53 * gfortran.dg/storage_size_6.f90: New tests.
54
55 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
56
57 PR fortran/66040
58 * parse.c(verify_st_order): Replace a gfc_internal_error with your
59 generic gfc_error.
60
61 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
62
63 PR fortran/66039
64 * io.c (match_filepos): Check for incomplete/mangled REWIND, FLUSH,
65 BACKSPACE, and ENDFILE statements
66
67 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
68
69 PR fortran/64925
70 * symbol.c(check_conflict): Check for a conflict between a dummy
71 argument and an internal procedure name.
72
73 2015-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
74
75 PR fortran/65903
76 * io.c (format_lex): Change to NONSTRING when checking for
77 possible doubled quote.
78 * scanner.c (gfc_next_char_literal): Revert change from 64506
79 and add a check for quotes and return.
80
81 2015-05-16 Thomas Koenig <tkoenig@gcc.gnu.org>
82
83 PR fortran/66113
84 * expr.c (is_parent_of_current_ns): New function.
85 (check_restricted): Use it.
86
87 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
88
89 PR fortran/44054
90
91 Replace all calls to gfc_notify_std_1 with gfc_notify_std and
92 gfc_warning_1 with gfc_warning.
93 * decl.c (gfc_verify_c_interop_param): Here.
94 * resolve.c (resolve_branch): Here.
95 (resolve_fl_derived): Here.
96 * dependency.c (gfc_check_argument_var_dependency):
97 * scanner.c (preprocessor_line): Use gfc_warning_now_at. Fix line
98 counter and locations before and after warning.
99 * gfortran.h (gfc_warning_1, gfc_warning_now_1, gfc_notify_std_1):
100 Delete.
101 (gfc_warning_now_at): Declare.
102 * error.c (gfc_warning_1): Delete.
103 (gfc_notify_std_1): Delete.
104 (gfc_warning_now_1): Delete.
105 (gfc_format_decoder): Handle two locations.
106 (gfc_diagnostic_build_prefix): Rename as
107 gfc_diagnostic_build_kind_prefix.
108 (gfc_diagnostic_build_locus_prefix): Take an expanded_location
109 instead of diagnostic_info.
110 (gfc_diagnostic_build_locus_prefix): Add overload that takes two
111 expanded_location.
112 (gfc_diagnostic_starter): Handle two locations.
113 (gfc_warning_now_at): New.
114 (gfc_diagnostics_init): Initialize caret_chars array.
115 (gfc_diagnostics_finish): Reset caret_chars array to default.
116
117 2015-05-16 Mikael Morin <mikael@gcc.gnu.org>
118 Paul Thomas <pault@gcc.gnu.org>
119
120 PR fortran/65792
121 * trans-expr.c (gfc_trans_subcomponent_assign): Always assign
122 the expression component to the destination. In addition, if
123 the component has allocatable components, copy them and
124 deallocate those of the expression, if it is not a variable.
125 The expression is fixed if not a variable to prevent multiple
126 evaluations.
127
128 2015-05-12 Thomas Koenig <tkoenig@gcc.gnu.org>
129
130 PR fortran/66111
131 * frontend-passes.c (has_dimen_vector_ref): New function.
132 (inline_matmul_assign): Use it to return early in case
133 of unhandled vector subscripts.
134
135 2015-05-12 Thomas Koenig <tkoenig@gcc.gnu.org>
136
137 PR fortran/66041
138 PR fortran/37131
139 * gfortran.h (gfc_array_spec): Add field resolved.
140 * array.c (gfc_resolve_array_spec): Resolve array spec
141 only once.
142
143 2015-05-11 Mikael Morin <mikael@gcc.gnu.org>
144
145 PR fortran/66100
146 * simplify.c (simplify_bound): Fix assert to accept subobject arrays.
147
148 2015-05-10 Thomas Koenig <tkoenig@gcc.gnu.org>
149
150 PR fortran/66041
151 * frontend-passes.c (scalarized_expr): Set correct dimension and
152 shape for the expression to be passed to lbound. Remove trailing
153 references after array refrence.
154 (inline_matmul_assign): Remove gfc_copy_expr from calls
155 to scalarized_expr().
156
157 2015-05-10 Mikael Morin <mikael@gcc.gnu.org>
158
159 * simplify.c (simplify_bound_dim): Don't check for emptyness
160 in the case of cobound simplification. Factor lower/upper
161 bound differenciation before the actual simplification.
162 (simplify_bound): Remove assumed shape specific simplification.
163 Don't give up early for the lbound of an assumed shape.
164
165 2015-05-09 Mikael Morin <mikael@gcc.gnu.org>
166
167 PR fortran/65894
168 * trans-array.h (gfc_scalar_elemental_arg_saved_as_reference):
169 New prototype.
170 * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
171 New function.
172 (gfc_add_loop_ss_code): Use gfc_scalar_elemental_arg_saved_as_reference
173 as conditional.
174 (gfc_walk_elemental_function_args): Set the dummy_arg field.
175 * trans.h (gfc_ss_info): New subfield dummy_arg.
176 * trans-expr.c (gfc_conv_procedure_call): Revert the change
177 of revision 222361.
178 (gfc_conv_expr): Use gfc_scalar_elemental_arg_saved_as_reference
179 as conditional.
180
181 2015-05-08 Mikael Morin <mikael@gcc.gnu.org>
182
183 * trans-array.c (gfc_walk_elemental_function_args):
184 Don't skip the advance to the next dummy argument when skipping
185 absent optional args.
186
187 2015-05-05 David Malcolm <dmalcolm@redhat.com>
188
189 * expr.c (check_inquiry): Fix indentation so that it reflects the
190 block structure.
191 * interface.c (compare_parameter): Likewise.
192 * parse.c (parse_oacc_structured_block): Likewise.
193 * target-memory.c (expr_to_char): Likewise.
194 * trans-types.c (gfc_init_kinds): Likewise.
195
196 2015-05-02 Steven G. Kargl <kargl@gcc.gnu.org>
197
198 PR fortran/65976
199 * invoke.texi: Remove 'no-' in '-fno-fixed-form'
200
201 2015-05-01 Mikael Morin <mikael@gcc.gnu.org>
202
203 * simplify.c (simplify_bound_dim): Tighten the check for array fullness
204 by also checking for absence of subreference.
205 (simplify_bound): Don't skip simplification if the array
206 has subreferences.
207 (simplify_cobound): Same.
208
209 2015-04-30 Thomas Koenig <tkoenig@gcc.gnu.org>
210
211 PR fortran/37131
212 * simplify.c (simplify_bound): Get constant lower bounds of one
213 from array spec for assumed and explicit shape shape arrays if
214 the lower bounds are indeed one.
215
216 2015-04-30 David Malcolm <dmalcolm@redhat.com>
217
218 * options.c (gfc_init_options): Remove spurious second
219 semicolon.
220 * trans-stmt.c (gfc_trans_allocate): Likewise.
221
222 2015-04-28 Andre Vehreschild <vehre@gmx.de>
223
224 * interface.c (gfc_compare_types): Check for unlimited
225 polymorphism flag in the correct position indepent of the _data
226 component being present or not. This prevents a segfault, when
227 the _data component is not present.
228 * symbol.c (gfc_type_compatible): Same.
229
230 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
231
232 * Make-lang.in (fortran.mostlyclean): Remove gfortran and
233 gfortran-cross.
234
235 2015-04-27 Andre Vehreschild <vehre@gmx.de>
236
237 PR fortran/59678
238 PR fortran/65841
239 * trans-array.c (duplicate_allocatable): Fixed deep copy of
240 allocatable components, which are liable for copy only, when
241 they are allocated.
242 (gfc_duplicate_allocatable): Add deep-copy code into if
243 component allocated block. Needed interface change for that.
244 (gfc_copy_allocatable_data): Supplying NULL_TREE for code to
245 add into if-block for checking whether a component was
246 allocated.
247 (gfc_duplicate_allocatable_nocopy): Likewise.
248 (structure_alloc_comps): Likewise.
249 * trans-array.h: Likewise.
250 * trans-expr.c (gfc_trans_alloc_subarray_assign): Likewise.
251 * trans-openmp.c (gfc_walk_alloc_comps): Likewise.
252
253 2015-04-23 Andre Vehreschild <vehre@gmx.de>
254
255 PR fortran/60322
256 * expr.c (gfc_lval_expr_from_sym): Code to select the regular
257 or class array added.
258 * gfortran.h: Add IS_CLASS_ARRAY macro.
259 * trans-array.c (gfc_add_loop_ss_code): Treat class objects
260 to be referenced always.
261 (build_class_array_ref): Adapt retrieval of array descriptor.
262 (build_array_ref): Likewise.
263 (gfc_conv_array_ref): Hand the vptr or the descriptor to
264 build_array_ref depending whether the sym is class or not.
265 (gfc_trans_array_cobounds): Select correct gfc_array_spec for
266 regular and class arrays.
267 (gfc_trans_array_bounds): Likewise.
268 (gfc_trans_dummy_array_bias): Likewise.
269 (gfc_get_dataptr_offset): Correcting call of build_array_ref.
270 (gfc_conv_expr_descriptor): Set the array's offset to -1 when
271 lbound in inner most dim is 1 and symbol non-pointer/assoc.
272 * trans-decl.c (gfc_build_qualified_array): Select correct
273 gfc_array_spec for regular and class arrays.
274 (gfc_build_dummy_array_decl): Likewise.
275 (gfc_get_symbol_decl): Get a dummy array for class arrays.
276 (gfc_trans_deferred_vars): Tell conv_expr that the descriptor
277 is desired.
278 * trans-expr.c (gfc_class_vptr_get): Get the class descriptor
279 from the correct location for class arrays.
280 (gfc_class_len_get): Likewise.
281 (gfc_conv_intrinsic_to_class): Add handling of _len component.
282 (gfc_conv_class_to_class): Prevent access to unset array data
283 when the array is an optional argument. Add handling of _len
284 component.
285 (gfc_copy_class_to_class): Check that _def_init is non-NULL
286 when used in _vptr->copy()
287 (gfc_trans_class_init_assign): Ensure that the rank of
288 _def_init is zero.
289 (gfc_conv_component_ref): Get the _vptr along with _data refs.
290 (gfc_conv_variable): Make sure the temp array descriptor is
291 returned for class arrays, too, and that class arrays are
292 dereferenced correctly.
293 (gfc_conv_procedure_call): For polymorphic type initialization
294 the initializer has to be a pointer to _def_init stored in a
295 dummy variable, which then needs to be used by value.
296 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Use the
297 temporary array descriptor for class arrays, too.
298 (gfc_conv_intrinsic_storage_size): Likewise.
299 (gfc_conv_intrinsic_loc): Add ref to _data for BT_CLASS
300 expressions.
301 * trans-stmt.c (trans_associate_var): Use a temporary array for
302 the associate variable of class arrays, too, making the array
303 one-based (lbound == 1).
304 * trans-types.c (gfc_is_nodesc_array): Use the correct
305 array data.
306 * trans.c (gfc_build_array_ref): Use the dummy array descriptor
307 when present.
308 * trans.h: Add class_vptr to gfc_se for storing a class ref's
309 vptr.
310
311 2015-04-22 Steven G. Kargl <kargl@gcc.gnu.org>
312
313 PR fortran/65429
314 * decl.c (add_init_expr_to_sym): Set the length type parameter.
315
316 2015-04-10 Tobias Burnus <burnus@net-b.de>
317
318 * trans-stmt.c (gfc_trans_lock_unlock): Implement -fcoarray=lib
319 version; reject not-yet-implemented variants.
320 * trans-types.c (gfc_get_derived_type): For lock_type with
321 -fcoarray=lib, use a void pointer as type.
322 * trans.c (gfc_allocate_using_lib, gfc_allocate_allocatable):
323 Handle lock_type with -fcoarray=lib.
324
325 2015-04-10 Mikael Morin <mikael@gcc.gnu.org>
326
327 PR fortran/56674
328 PR fortran/58813
329 PR fortran/59016
330 PR fortran/59024
331 * symbol.c (save_symbol_data, gfc_save_symbol_data): Rename the
332 former to the latter and make it non-static. Update callers.
333 * gfortran.h (gfc_save_symbol_data): New prototype.
334 * decl.c (gfc_match_decl_type_spec): Call 'gfc_save_symbol_data'
335 before modifying symbols 'sym' and 'dt_sym'.
336
337 2013-04-09 Paul Thomas <pault@gcc.gnu.org>
338
339 PR fortran/56852
340 * primary.c (gfc_variable_attr): Avoid ICE on AR_UNKNOWN if any
341 of the index variables are untyped and errors are present.
342
343 2015-04-07 Andre Vehreschild <vehre@gmx.de>
344
345 PR fortran/65548
346 * trans-stmt.c (gfc_trans_allocate): For intrinsic functions
347 use conv_expr_descriptor() instead of conv_expr_reference().
348
349 2015-03-30 Jakub Jelinek <jakub@redhat.com>
350
351 PR fortran/65597
352 * trans-openmp.c (gfc_trans_omp_do): For !simple simd with explicit
353 linear clause for the iterator set OMP_CLAUSE_LINEAR_NO_COPYIN.
354 For implcitly added !simple OMP_CLAUSE_LINEAR set it too. Use step 1
355 instead of the original step on the new iterator - count.
356
357 2015-03-25 Mikael Morin <mikael@gcc.gnu.org>
358
359 PR fortran/64952
360 PR fortran/65532
361 * gfortran.h (struct gfc_namespace): New field 'types_resolved'.
362 * resolve.c (resolve_types): Return early if field 'types_resolved'
363 is set. Set 'types_resolved' at the end.
364
365 2015-03-24 Andre Vehreschild <vehre@gmx.de>
366
367 PR fortran/55901
368 * trans-expr.c (gfc_conv_structure): Fixed indendation.
369 Using integer_zero_node now instead of explicitly
370 constructing a integer constant zero node.
371 (gfc_conv_derived_to_class): Add handling of _len component,
372 i.e., when the rhs has a string_length then assign that to
373 class' _len, else assign 0.
374 (gfc_conv_intrinsic_to_class): Likewise.
375
376 2015-03-24 Andre Vehreschild <vehre@gmx.de>
377
378 PR fortran/64787
379 PR fortran/57456
380 PR fortran/63230
381 * class.c (gfc_add_component_ref): Free no longer needed
382 ref-chains to prevent memory loss.
383 (find_intrinsic_vtab): For deferred length char arrays or
384 unlimited polymorphic objects, store the size in bytes of one
385 character in the size component of the vtab.
386 * gfortran.h: Added gfc_add_len_component () define.
387 * trans-array.c (gfc_trans_create_temp_array): Switched to new
388 function name for getting a class' vtab's field.
389 (build_class_array_ref): Likewise.
390 (gfc_array_init_size): Using the size information from allocate
391 more consequently now, i.e., the typespec of the entity to
392 allocate is no longer needed. This is to address the last open
393 comment in PR fortran/57456.
394 (gfc_array_allocate): Likewise.
395 (structure_alloc_comps): gfc_copy_class_to_class () needs to
396 know whether the class is unlimited polymorphic.
397 * trans-array.h: Changed interface of gfc_array_allocate () to
398 reflect the no longer needed typespec.
399 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): New.
400 (gfc_reset_len): New.
401 (gfc_get_class_array_ref): Switch to new function name for
402 getting a class' vtab's field.
403 (gfc_copy_class_to_class): Added flag to know whether the class
404 to copy is unlimited polymorphic. Adding _len dependent code
405 then, which calls ->vptr->copy () with four arguments adding
406 the length information ->vptr->copy(from, to, from_len, to_cap).
407 (gfc_conv_procedure_call): Switch to new function name for
408 getting a class' vtab's field.
409 (alloc_scalar_allocatable_for_assignment): Use the string_length
410 as computed by gfc_conv_expr and not the statically backend_decl
411 which may be incorrect when ref-ing.
412 (gfc_trans_assignment_1): Use the string_length variable and
413 not the rse.string_length. The former has been computed more
414 generally.
415 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Switch to new
416 function name for getting a class' vtab's field.
417 (gfc_conv_intrinsic_storage_size): Likewise.
418 (gfc_conv_intrinsic_transfer): Likewise.
419 * trans-stmt.c (gfc_trans_allocate): Restructured to evaluate
420 source=expr3 only once before the loop over the objects to
421 allocate, when the objects are not arrays. Doing correct _len
422 initialization and calling of vptr->copy () fixing PR 64787.
423 (gfc_trans_deallocate): Reseting _len to 0, preventing future
424 errors.
425 * trans.c (gfc_build_array_ref): Switch to new function name
426 for getting a class' vtab's field.
427 (gfc_add_comp_finalizer_call): Likewise.
428 * trans.h: Define the prototypes for the gfc_class_vtab_*_get ()
429 and gfc_vptr_*_get () functions.
430 Added gfc_find_and_cut_at_last_class_ref () and
431 gfc_reset_len () routine prototype. Added flag to
432 gfc_copy_class_to_class () prototype to signal an unlimited
433 polymorphic entity to copy.
434
435 2015-03-24 Iain Sandoe <iain@codesourcery.com>
436 Tobias Burnus <burnus@net-b.de>
437
438 * gfortran.texi (_gfortran_caf_sync_memory): Improve wording.
439
440 2015-03-23 Paul Thomas <pault@gcc.gnu.org>
441 Mikael Morin <mikael@gcc.gnu.org>
442
443 PR fortran/64952
444 * gfortran.h (struct symbol_attribute) : New field
445 'array_outer_dependency'.
446 * trans.h (struct gfc_ss_info): New field 'array_outer_dependency'.
447 * module.c (enum ab_attribute): New value AB_ARRAY_OUTER_DEPENDENCY.
448 (attr_bits): Append same value to initializer.
449 (mio_symbol_attribute): Handle 'array_outer_dependency' attr
450 in module read and write.
451 * resolve.c (update_current_proc_outer_array_dependency): New function.
452 (resolve_function, resolve_call): Add code to update current procedure's
453 'array_outer_dependency' attribute.
454 (resolve_variable): Mark current procedure with attribute
455 array_outer_dependency if the variable is an array coming from outside
456 the current namespace.
457 (resolve_fl_procedure): Mark a procedure without body with attribute
458 'array_outer_dependency'.
459 * trans-array.c (gfc_conv_resolve_dependencies): If any ss is
460 marked as 'array_outer_dependency' generate a temporary.
461 (gfc_walk_function_expr): If the function may reference external arrays,
462 mark the head gfc_ss with flag 'array_outer_dependency'.
463
464 2015-03-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
465
466 PR libgfortran/59513
467 * gfortran.texi (Read/Write after EOF marker): New information.
468
469 2015-03-21 H.J. Lu <hongjiu.lu@intel.com>
470
471 * gfortran.texi (_gfortran_caf_sync_memory): Put @{xxx} in one
472 line.
473
474 2015-03-21 Tobias Burnus <burnus@net-b.de>
475
476 * gfortran.texi (_gfortran_caf_sync_all, _gfortran_caf_sync_images,
477 _gfortran_caf_sync_memory, _gfortran_caf_error_stop,
478 _gfortran_caf_error_stop_str, _gfortran_caf_atomic_define,
479 _gfortran_caf_atomic_ref, _gfortran_caf_atomic_cas,
480 _gfortran_caf_atomic_op): New sections.
481
482 2015-03-21 Tobias Burnus <burnus@net-b.de>
483
484 * trans-expr.c (gfc_get_tree_for_caf_expr): Reject unimplemented
485 coindexed coarray accesses.
486
487 2015-03-17 Paul Thomas <pault@gcc.gnu.org>
488
489 PR fortran/59198
490 * trans-types.c (gfc_get_derived_type): If an abstract derived
491 type with procedure pointer components has no other type of
492 component, return the backend_decl. Otherwise build the
493 components if any of the non-procedure pointer components have
494 no backend_decl.
495
496 2015-03-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
497
498 PR fortran/64432
499 *trans-intrinisic.c (conv_intrinsic_system_clock): Check the
500 smallest kind passed in user arguments and hardcode tesults for
501 KIND=1 or KIND=2 to indicate no clock available.
502
503 2015-03-16 Andre Vehreschild <vehre@gmx.de>
504
505 * resolve.c: Prevent segfault on illegal input.
506
507 2015-03-14 Mikael Morin <mikael@gcc.gnu.org>
508
509 PR fortran/61138
510 * trans-expr.c (gfc_trans_pointer_assignment): Clear DESCRIPTOR_ONLY
511 field before reusing LSE.
512
513 2015-03-11 Janne Blomqvist <jb@gcc.gnu.org>
514
515 PR libfortran/65200
516 * gfortran.texi: Document behavior when opening files without
517 explicit ACTION= specifier.
518
519 2015-03-10 Paul Thomas <pault@gcc.gnu.org>
520
521 PR fortran/65024
522 * trans-expr.c (gfc_conv_component_ref): If the component
523 backend declaration is missing and the derived type symbol is
524 available in the reference, call gfc_build_derived_type.
525
526 2015-03-10 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
527 Tobias Burnus <burnus@net-b.de>
528
529 * trans.h (caf_sync_memory): New function decl tree.
530 * trans-decl.c (gfc_build_builtin_function_decls): Define it.
531 (create_main_function): Don't call sync_synchronize and leave
532 it to the CAF library.
533 * trans-stmt.c (gfc_trans_stop): Ditto.
534 (gfc_trans_sync): Ditto; add call library call for sync memory.
535
536 2015-03-08 Mikael Morin <mikael@gcc.gnu.org>
537
538 PR fortran/60898
539 * resolve.c (resolve_symbol): Check that the symbol found by
540 name lookup really is the current symbol being resolved.
541
542 2015-03-02 Tobias Burnus <burnus@net-b.de>
543
544 * check.c (gfc_check_atomic): Properly check for coarrayness
545 and for being coindexed.
546
547 2015-02-26 Martin Liska <mliska@suse.cz>
548
549 * resolve.c: Rename enum 'comparison' to 'compare_result' as
550 solution for -Wodr issue.
551
552 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
553
554 PR libgomp/64625
555 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
556 Remove macros.
557 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
558 * types.def (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
559 (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
560 Remove function types.
561 (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR)
562 (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_INT_INT_VAR)
563 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
564 New function types.
565
566 2015-02-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
567
568 PR fortran/64980
569 PR fortran/61960
570 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Remove mapping
571 for component references to class objects.
572 (gfc_conv_procedure_call): Compare the class by name.
573
574 2015-02-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
575
576 PR fortran/64506
577 * scanner.c (gfc_next_char_literal): For free form source,
578 check for '!' and if found, clear the comment and go back
579 and get the next character. For fixed form source, skip the
580 rest of the line.
581
582 2015-02-12 Paul Thomas <pault@gcc.gnu.org>
583
584 PR fortran/64932
585 * trans-stmt.c (gfc_trans_deallocate): If a component array
586 expression is not a descriptor type and it is a derived type
587 that has allocatable components and is not finalizable, then
588 deallocate the allocatable components.
589
590 2015-02-08 Mikael Morin <mikael@gcc.gnu.org>
591
592 PR fortran/63744
593 * module.c (check_for_ambiguous): Change argument type
594 from gfc_symbol to gfc_symtree. Check local (symtree) name
595 instead of original (symbol) name.
596 (read_module): Update caller.
597
598 2015-02-06 Paul Thomas <pault@gcc.gnu.org>
599
600 PR fortran/63205
601 * gfortran.h: Add 'must finalize' field to gfc_expr and
602 prototypes for gfc_is_alloc_class_scalar_function and for
603 gfc_is_alloc_class_array_function.
604 * expr.c (gfc_is_alloc_class_scalar_function,
605 gfc_is_alloc_class_array_function): New functions.
606 * trans-array.c (gfc_add_loop_ss_code): Do not move the
607 expression for allocatable class scalar functions outside the
608 loop.
609 (conv_array_index_offset): Cope with deltas being NULL_TREE.
610 (build_class_array_ref): Do not return with allocatable class
611 array functions. Add code to pick out the returned class array.
612 Dereference if necessary and return if not a class object.
613 (gfc_conv_scalarized_array_ref): Cope with offsets being NULL.
614 (gfc_walk_function_expr): Return an array ss for the result of
615 an allocatable class array function.
616 * trans-expr.c (gfc_conv_subref_array_arg): Remove the assert
617 that the argument should be a variable. If an allocatable class
618 array function, set the offset to zero and skip the write-out
619 loop in this case.
620 (gfc_conv_procedure_call): Add allocatable class array function
621 to the assert. Call gfc_conv_subref_array_arg for allocatable
622 class array function arguments with derived type formal arg..
623 Add the code for handling allocatable class functions, including
624 finalization calls to prevent memory leaks.
625 (arrayfunc_assign_needs_temporary): Return if an allocatable
626 class array function.
627 (gfc_trans_assignment_1): Set must_finalize to rhs expression
628 for allocatable class functions. Set scalar_to_array as needed
629 for scalar class allocatable functions assigned to an array.
630 Nullify the allocatable components corresponding the the lhs
631 derived type so that the finalization does not free them.
632
633 2015-01-29 Andre Vehreschild <vehre@gmx.de>
634 Janus Weil <janus@gcc.gnu.org>
635
636 PR fortran/60289
637 Initial patch by Janus Weil
638 * resolve.c (resolve_allocate_expr): Add check for comp. only
639 when target is not unlimited polymorphic.
640 * trans-stmt.c (gfc_trans_allocate): Assign correct value to
641 _len component of unlimited polymorphic entities.
642
643 2015-02-05 Tobias Burnus <burnus@net-b.de>
644
645 PR fortran/64943
646 * resolve.c (resolve_transfer): Also check structure
647 constructors.
648
649 2015-02-05 Paul Thomas <pault@gcc.gnu.org>
650
651 PR fortran/64757
652 * resolve.c (resolve_structure_cons): Obtain the rank of class
653 components.
654 * trans-expr.c (gfc_trans_alloc_subarray_assign): Do the
655 assignment to allocatable class array components.
656 (alloc_scalar_allocatable_for_subcomponent_assignment): If comp
657 is a class component, allocate to the _data field.
658 (gfc_trans_subcomponent_assign): If a class component with a
659 derived type expression set the _vptr field and for array
660 components, call gfc_trans_alloc_subarray_assign. For scalars,
661 the assignment is performed here.
662
663 2015-02-04 Jakub Jelinek <jakub@redhat.com>
664
665 * options.c: Include langhooks.h.
666 (gfc_post_options): Change lang_hooks.name based on
667 selected -std= mode.
668
669 2015-02-03 Steven G. Kargl <kargl@gcc.gnu.org>
670
671 * intrinsic.texi (CO_ASSOCIATED): c_prt_1 should be c_ptr_1.
672
673 2015-01-30 Andre Vehreschild <vehre@gmx.de>
674
675 * trans-decl.c (gfc_get_symbol_decl): Removed duplicate code.
676 * trans-expr.c (gfc_conv_intrinsic_to_class): Fixed indentation.
677 Fixed datatype of charlen to be a 32-bit int.
678
679 2015-02-01 Joseph Myers <joseph@codesourcery.com>
680
681 * error.c (gfc_warning (const char *, ...), gfc_warning_now (const
682 char *, ...)): Remove functions.
683 * gfortran.h (gfc_warning (const char *, ...), gfc_warning_now
684 (const char *, ...)): Remove declarations.
685 * arith.c, check.c, data.c, decl.c, frontend-passes.c,
686 interface.c, intrinsic.c, io.c, matchexp.c, module.c, openmp.c,
687 options.c, parse.c, primary.c, resolve.c, scanner.c, symbol.c,
688 trans-common.c, trans-const.c, trans-stmt.c: All callers of
689 gfc_warning and gfc_warning_now changed to pass 0 or option number
690 as first argument.
691
692 2015-01-30 Joseph Myers <joseph@codesourcery.com>
693
694 * f95-lang.c, gfortranspec.c, trans-const.c, trans-expr.c: All
695 callers of fatal_error changed to pass input_location as first
696 argument.
697
698 2015-01-28 Tobias Burnus <burnus@net-b.de>
699
700 * intrinsic.texi (CO_BROADCAST): Correct argument description.
701
702 2015-01-27 Tobias Burnus <burnus@net-b.de>
703
704 PR fortran/63861
705 * trans-openmp.c (gfc_has_alloc_comps, gfc_trans_omp_clauses):
706 Fix handling for scalar coarrays.
707 * trans-types.c (gfc_get_element_type): Add comment.
708
709 2015-01-27 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
710
711 PR fortran/64771
712 * interface.c: Remove <algorithm>.
713 (check_dummy_characteristics): Use MAX instead of std::max.
714
715 2015-01-26 Paul Thomas <pault@gcc.gnu.org>
716
717 PR fortran/62044
718 * resolve.c (resolve_allocate_expr): If the default initializer
719 is NULL, keep the original MOLD expression so that the correct
720 typespec is available.
721
722 2015-01-26 Tobias Burnus <burnus@net-b.de>
723
724 PR fortran/64771
725 * interface.c (check_dummy_characteristics): Fix coarray handling.
726
727 2015-01-26 Tobias Burnus <burnus@net-b.de>
728
729 * io.c (gfc_match_inquire): Replace "-1" by a defined constant.
730
731 2015-01-26 Janus Weil <janus@gcc.gnu.org>
732
733 PR fortran/64230
734 * class.c (finalize_component): New argument 'sub_ns'. Insert code to
735 check if 'expr' is associated.
736 (generate_finalization_wrapper): Rename 'ptr' symbols to 'ptr1' and
737 'ptr2'. Pass 'sub_ns' to finalize_component.
738
739 2015-01-25 Mikael Morin <mikael@gcc.gnu.org>
740
741 PR fortran/62044
742 * decl.c (gfc_match_derived_decl): Don't insert a new symtree element.
743 * module.c (MOD_VERSION): Bump.
744 (write_module): Don't write list of extensions.
745 (read_module): Don't jump over list of extensions;
746 don't load list of extensions.
747 (load_derived_extensions, write_dt_extensions,
748 write_derived_extensions): Remove.
749
750 2015-01-24 Tobias Burnus <burnus@net-b.de>
751
752 * parse.c (gfc_parse_file): Fix two-location gfc_error call.
753
754 2015-01-23 Martin Liska <mliska@suse.cz>
755
756 * decl.c (attr_decl1): Workaround -Wmaybe-uninitialized
757 false positive during profiledbootstrap by initializing them.
758 * matchexp.c (match_mult_operand): Likewise.
759 * module.c (write_atom): Likewise.
760 (read_module): Likewise.
761
762 2015-01-23 Tom de Vries <tom@codesourcery.com>
763
764 PR libgomp/64672
765 * lang.opt (fopenacc): Mark as LTO option.
766
767 2015-01-23 Tom de Vries <tom@codesourcery.com>
768
769 PR libgomp/64707
770 * lang.opt (fopenmp): Mark as LTO option.
771
772 2015-01-23 Andre Vehreschild <vehre@gmx.de>
773
774 * trans-decl.c (gfc_finish_var_decl): Fixed moved comment.
775 * trans-stmt.c (gfc_trans_allocate): Fixed indentation.
776
777 2015-01-23 Jakub Jelinek <jakub@redhat.com>
778
779 * gfc-diagnostic.def (DK_ICE_NOBT): New kind.
780
781 2015-01-23 Janus Weil <janus@gcc.gnu.org>
782
783 PR fortran/60922
784 * class.c (finalize_component): Apply the check for 'fini_coarray' only
785 to coarray components.
786
787 2015-01-23 Tobias Burnus <burnus@net-b.de>
788
789 PR fortran/64726
790 * trans-openmp.c (gfc_trans_oacc_combined_directive): Fix
791 loop generation.
792
793 2015-01-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
794
795 PR fortran/61933
796 * libgfortran.h:
797 * trans-io.c (set_parameter_value): Delete use of has_iostat.
798 Redefine to not generate any runtime error check calls.
799 (set_parameter_value_chk): Rename of the former
800 set_parameter_value with the runtime error checks and fix
801 whitespace. (set_parameter_value_inquire): New function that
802 builds a runtime conditional block to set the INQUIRE
803 common parameter block unit number to -2 when unit numbers
804 exceed positive KIND=4 limits. (gfc_trans_open): Whitespace.
805 For unit, use the renamed set_parameter_value_chk.
806 (gfc_trans_close): Likewise use renamed function.
807 (build_filepos): Whitespace and use renamed function.
808 (gfc_trans_inquire): Whitespace and for unit use
809 set_parameter_value and set_parameter_value_inquire.
810 (gfc_trans_wait): Remove p->iostat from call to
811 set_parameter_value. Use new set_parameter_value_chk for unit.
812 (build_dt): Use the new set_parameter_value without p->iostat
813 and fix whitespace. Use set_parameter_value_chk for unit.
814
815 2015-01-21 Thomas Koenig <tkoenig@netcologne.de>
816
817 PR fortran/57023
818 * dependency.c (callback_dummy_intent_not_int): New function.
819 (dummy_intent_not_in): New function.
820 (gfc_full_array_ref_p): Use dummy_intent_not_in.
821
822 2015-01-18 Andre Vehreschild <vehre@gmx.de>
823 Janus Weil <janus@gcc.gnu.org>
824
825 PR fortran/60255
826 * class.c (gfc_get_len_component): New.
827 (gfc_build_class_symbol): Add _len component to unlimited
828 polymorphic entities.
829 (find_intrinsic_vtab): Removed emitting of error message.
830 * gfortran.h: Added prototype for gfc_get_len_component.
831 * simplify.c (gfc_simplify_len): Use _len component where
832 available.
833 * trans-expr.c (gfc_class_len_get): New.
834 (gfc_conv_intrinsic_to_class): Add handling for deferred
835 character arrays.
836 (gfc_conv_structure): Treat _len component correctly.
837 (gfc_conv_expr): Prevent bind_c handling when not required.
838 (gfc_trans_pointer_assignment): Propagate _len component.
839 * trans-stmt.c (class_has_len_component): New.
840 (trans_associate_var): _len component treatment for associate
841 context.
842 (gfc_trans_allocate): Same as for trans_associate_var()
843 * trans.h: Added prototype for gfc_class_len_get.
844
845 2015-01-18 Paul Thomas <pault@gcc.gnu.org>
846
847 PR fortran/57959
848 * trans-expr.c (gfc_trans_subcomponent_assign): Use a deep copy
849 for allocatable components, where the source is a variable.
850
851 2015-01-18 Paul Thomas <pault@gcc.gnu.org>
852
853 PR fortran/55901
854 * primary.c (gfc_match_varspec): Exclude dangling associate-
855 names with dimension 0 from being counted as arrays.
856 * resolve.c (resolve_assoc_var): Sub-strings are permissible
857 for associate-names, so exclude characters from the test for
858 misuse as arrays.
859 * trans-decl.c (gfc_get_symbol_decl): Associate-names can use
860 the hidden string length variable of their associated target.
861 Signal this by setting 'length' to a constant, if the decl for
862 the string length is a variable.
863
864 2015-01-17 Paul Thomas <pault@gcc.gnu.org>
865
866 PR fortran/64578
867 * trans-expr.c (gfc_trans_pointer_assignment): Make sure that
868 before reinitializing rse, to add the rse.pre to block before
869 creating 'ptrtemp'.
870 * trans-intrinsic.c (gfc_conv_associated): Deal with the class
871 data being a descriptor.
872
873 2015-01-17 Andre Vehreschild <vehre@gmx.de>
874
875 PR fortran/60357
876 * primary.c (build_actual_constructor): Prevent warning.
877 * trans-expr.c (alloc_scalar_allocatable_for_subcomponent_
878 assignment): New function encapsulates treatment of allocatable
879 components.
880 (gfc_trans_subcomponent_assign): Needed to distinguish between
881 regular assignment and initilization.
882 (gfc_trans_structure_assign): Same.
883 (gfc_conv_structure): Same.
884
885 PR fortran/61275
886 * gfortran.h: deferred_parameter is not needed, because
887 it artificial does the trick completely.
888 * primary.c (build_actual_constructor): Same.
889 (gfc_convert_to_structure_constructor): Same.
890 * resolve.c (resolve_fl_derived0): Same.
891 * trans-expr.c (gfc_conv_component_ref): Prevent treating
892 allocatable deferred length char arrays here.
893 (gfc_trans_subcomponent_assign): Same as above.
894 * trans-types.c (gfc_sym_type): This is done in
895 gfc_get_derived_type already.
896
897 2015-01-17 Andre Vehreschild <vehre@gmx.de>
898
899 PR fortran/60334
900 * trans-decl.c (gfc_get_symbol_decl):Use a ref on the string
901 length when the symbol is declared to be a result.
902 * trans-expr.c (gfc_conv_procedure_call): Strip deref on the
903 string length when functions are nested and the string length
904 is a reference already.
905
906 2015-01-16 Janus Weil <janus@gcc.gnu.org>
907
908 PR fortran/45290
909 * decl.c (match_pointer_init): Error out if resolution of init expr
910 failed.
911
912 2015-01-15 Tobias Burnus <burnus@net-b.de>
913
914 * openmp.c (check_symbol_not_pointer, resolve_oacc_data_clauses,
915 resolve_oacc_deviceptr_clause, resolve_omp_clauses,
916 gfc_resolve_oacc_declare): Replace '%s' by %qs.
917
918 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
919 Cesar Philippidis <cesar@codesourcery.com>
920 James Norris <jnorris@codesourcery.com>
921 Ilmir Usmanov <i.usmanov@samsung.com>
922 Tobias Burnus <burnus@net-b.de>
923
924 * lang.opt (fopenacc): New option.
925 * cpp.c (cpp_define_builtins): Conditionally define _OPENACC.
926 * dump-parse-tree.c (show_omp_node): Split part of it into...
927 (show_omp_clauses): ... this new function.
928 (show_omp_node, show_code_node): Handle EXEC_OACC_PARALLEL_LOOP,
929 EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
930 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
931 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
932 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
933 (show_namespace): Update for OpenACC.
934 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_2, DEF_FUNCTION_TYPE_VAR_8)
935 (DEF_FUNCTION_TYPE_VAR_12, DEF_GOACC_BUILTIN)
936 (DEF_GOACC_BUILTIN_COMPILER): New macros.
937 * types.def (BT_FN_VOID_INT_INT_VAR)
938 (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
939 (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
940 New function types.
941 * gfortran.h (gfc_statement): Add ST_OACC_PARALLEL_LOOP,
942 ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
943 ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_DATA,
944 ST_OACC_END_DATA, ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA,
945 ST_OACC_LOOP, ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE,
946 ST_OACC_WAIT, ST_OACC_CACHE, ST_OACC_KERNELS_LOOP,
947 ST_OACC_END_KERNELS_LOOP, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
948 ST_OACC_ROUTINE.
949 (struct gfc_expr_list): New data type.
950 (gfc_get_expr_list): New macro.
951 (gfc_omp_map_op): Add OMP_MAP_FORCE_ALLOC, OMP_MAP_FORCE_DEALLOC,
952 OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM, OMP_MAP_FORCE_TOFROM,
953 OMP_MAP_FORCE_PRESENT, OMP_MAP_FORCE_DEVICEPTR.
954 (OMP_LIST_FIRST, OMP_LIST_DEVICE_RESIDENT, OMP_LIST_USE_DEVICE)
955 (OMP_LIST_CACHE): New enumerators.
956 (struct gfc_omp_clauses): Add async_expr, gang_expr, worker_expr,
957 vector_expr, num_gangs_expr, num_workers_expr, vector_length_expr,
958 wait_list, tile_list, async, gang, worker, vector, seq,
959 independent, wait, par_auto, gang_static, and loc members.
960 (struct gfc_namespace): Add oacc_declare_clauses member.
961 (gfc_exec_op): Add EXEC_OACC_KERNELS_LOOP,
962 EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS,
963 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
964 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
965 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
966 (gfc_free_expr_list, gfc_resolve_oacc_directive)
967 (gfc_resolve_oacc_declare, gfc_resolve_oacc_parallel_loop_blocks)
968 (gfc_resolve_oacc_blocks): New prototypes.
969 * match.c (match_exit_cycle): Handle EXEC_OACC_LOOP and
970 EXEC_OACC_PARALLEL_LOOP.
971 * match.h (gfc_match_oacc_cache, gfc_match_oacc_wait)
972 (gfc_match_oacc_update, gfc_match_oacc_declare)
973 (gfc_match_oacc_loop, gfc_match_oacc_host_data)
974 (gfc_match_oacc_data, gfc_match_oacc_kernels)
975 (gfc_match_oacc_kernels_loop, gfc_match_oacc_parallel)
976 (gfc_match_oacc_parallel_loop, gfc_match_oacc_enter_data)
977 (gfc_match_oacc_exit_data, gfc_match_oacc_routine): New
978 prototypes.
979 * openmp.c: Include "diagnostic.h" and "gomp-constants.h".
980 (gfc_free_omp_clauses): Update for members added to struct
981 gfc_omp_clauses.
982 (gfc_match_omp_clauses): Change mask paramter to uint64_t. Add
983 openacc parameter.
984 (resolve_omp_clauses): Add openacc parameter. Update for OpenACC.
985 (struct fortran_omp_context): Add is_openmp member.
986 (gfc_resolve_omp_parallel_blocks): Initialize it.
987 (gfc_resolve_do_iterator): Update for OpenACC.
988 (gfc_resolve_omp_directive): Call
989 resolve_omp_directive_inside_oacc_region.
990 (OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE)
991 (OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_COPYPRIVATE)
992 (OMP_CLAUSE_SHARED, OMP_CLAUSE_COPYIN, OMP_CLAUSE_REDUCTION)
993 (OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_SCHEDULE)
994 (OMP_CLAUSE_DEFAULT, OMP_CLAUSE_ORDERED, OMP_CLAUSE_COLLAPSE)
995 (OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE)
996 (OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH)
997 (OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND)
998 (OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM)
999 (OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP, OMP_CLAUSE_TO)
1000 (OMP_CLAUSE_FROM, OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_THREAD_LIMIT)
1001 (OMP_CLAUSE_DIST_SCHEDULE): Use uint64_t.
1002 (OMP_CLAUSE_ASYNC, OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS)
1003 (OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_COPY, OMP_CLAUSE_COPYOUT)
1004 (OMP_CLAUSE_CREATE, OMP_CLAUSE_PRESENT)
1005 (OMP_CLAUSE_PRESENT_OR_COPY, OMP_CLAUSE_PRESENT_OR_COPYIN)
1006 (OMP_CLAUSE_PRESENT_OR_COPYOUT, OMP_CLAUSE_PRESENT_OR_CREATE)
1007 (OMP_CLAUSE_DEVICEPTR, OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER)
1008 (OMP_CLAUSE_VECTOR, OMP_CLAUSE_SEQ, OMP_CLAUSE_INDEPENDENT)
1009 (OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE_DEVICE_RESIDENT)
1010 (OMP_CLAUSE_HOST_SELF, OMP_CLAUSE_OACC_DEVICE, OMP_CLAUSE_WAIT)
1011 (OMP_CLAUSE_DELETE, OMP_CLAUSE_AUTO, OMP_CLAUSE_TILE): New macros.
1012 (gfc_match_omp_clauses): Handle those.
1013 (OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES)
1014 (OACC_LOOP_CLAUSES, OACC_PARALLEL_LOOP_CLAUSES)
1015 (OACC_KERNELS_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES)
1016 (OACC_DECLARE_CLAUSES, OACC_UPDATE_CLAUSES)
1017 (OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES)
1018 (OACC_WAIT_CLAUSES): New macros.
1019 (gfc_free_expr_list, match_oacc_expr_list, match_oacc_clause_gang)
1020 (gfc_match_omp_map_clause, gfc_match_oacc_parallel_loop)
1021 (gfc_match_oacc_parallel, gfc_match_oacc_kernels_loop)
1022 (gfc_match_oacc_kernels, gfc_match_oacc_data)
1023 (gfc_match_oacc_host_data, gfc_match_oacc_loop)
1024 (gfc_match_oacc_declare, gfc_match_oacc_update)
1025 (gfc_match_oacc_enter_data, gfc_match_oacc_exit_data)
1026 (gfc_match_oacc_wait, gfc_match_oacc_cache)
1027 (gfc_match_oacc_routine, oacc_is_loop)
1028 (resolve_oacc_scalar_int_expr, resolve_oacc_positive_int_expr)
1029 (check_symbol_not_pointer, check_array_not_assumed)
1030 (resolve_oacc_data_clauses, resolve_oacc_deviceptr_clause)
1031 (oacc_compatible_clauses, oacc_is_parallel, oacc_is_kernels)
1032 (omp_code_to_statement, oacc_code_to_statement)
1033 (resolve_oacc_directive_inside_omp_region)
1034 (resolve_omp_directive_inside_oacc_region)
1035 (resolve_oacc_nested_loops, resolve_oacc_params_in_parallel)
1036 (resolve_oacc_loop_blocks, gfc_resolve_oacc_blocks)
1037 (resolve_oacc_loop, resolve_oacc_cache, gfc_resolve_oacc_declare)
1038 (gfc_resolve_oacc_directive): New functions.
1039 * parse.c (next_free): Update for OpenACC. Move some code into...
1040 (verify_token_free): ... this new function.
1041 (next_fixed): Update for OpenACC. Move some code into...
1042 (verify_token_fixed): ... this new function.
1043 (case_executable): Add ST_OACC_UPDATE, ST_OACC_WAIT,
1044 ST_OACC_CACHE, ST_OACC_ENTER_DATA, and ST_OACC_EXIT_DATA.
1045 (case_exec_markers): Add ST_OACC_PARALLEL_LOOP, ST_OACC_PARALLEL,
1046 ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA, ST_OACC_LOOP,
1047 ST_OACC_KERNELS_LOOP.
1048 (case_decl): Add ST_OACC_ROUTINE.
1049 (push_state, parse_critical_block, parse_progunit): Update for
1050 OpenACC.
1051 (gfc_ascii_statement): Handle ST_OACC_PARALLEL_LOOP,
1052 ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
1053 ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_KERNELS_LOOP,
1054 ST_OACC_END_KERNELS_LOOP, ST_OACC_DATA, ST_OACC_END_DATA,
1055 ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA, ST_OACC_LOOP,
1056 ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE, ST_OACC_WAIT,
1057 ST_OACC_CACHE, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
1058 ST_OACC_ROUTINE.
1059 (verify_st_order, parse_spec): Handle ST_OACC_DECLARE.
1060 (parse_executable): Handle ST_OACC_PARALLEL_LOOP,
1061 ST_OACC_KERNELS_LOOP, ST_OACC_LOOP, ST_OACC_PARALLEL,
1062 ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA.
1063 (decode_oacc_directive, parse_oacc_structured_block)
1064 (parse_oacc_loop, is_oacc): New functions.
1065 * parse.h (struct gfc_state_data): Add oacc_declare_clauses
1066 member.
1067 (is_oacc): New prototype.
1068 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Handle
1069 EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL,
1070 EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS, EXEC_OACC_DATA,
1071 EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP, EXEC_OACC_UPDATE,
1072 EXEC_OACC_WAIT, EXEC_OACC_CACHE, EXEC_OACC_ENTER_DATA,
1073 EXEC_OACC_EXIT_DATA.
1074 (resolve_codes): Call gfc_resolve_oacc_declare.
1075 * scanner.c (openacc_flag, openacc_locus): New variables.
1076 (skip_free_comments): Update for OpenACC. Move some code into...
1077 (skip_omp_attribute): ... this new function.
1078 (skip_oacc_attribute): New function.
1079 (skip_fixed_comments, gfc_next_char_literal): Update for OpenACC.
1080 * st.c (gfc_free_statement): Handle EXEC_OACC_PARALLEL_LOOP,
1081 EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
1082 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
1083 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
1084 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
1085 * trans-decl.c (gfc_generate_function_code): Update for OpenACC.
1086 * trans-openmp.c: Include "gomp-constants.h".
1087 (gfc_omp_finish_clause, gfc_trans_omp_clauses): Use GOMP_MAP_*
1088 instead of OMP_CLAUSE_MAP_*. Use OMP_CLAUSE_SET_MAP_KIND.
1089 (gfc_trans_omp_clauses): Handle OMP_LIST_USE_DEVICE,
1090 OMP_LIST_DEVICE_RESIDENT, OMP_LIST_CACHE, and OMP_MAP_FORCE_ALLOC,
1091 OMP_MAP_FORCE_DEALLOC, OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM,
1092 OMP_MAP_FORCE_TOFROM, OMP_MAP_FORCE_PRESENT,
1093 OMP_MAP_FORCE_DEVICEPTR, and gfc_omp_clauses' async, seq,
1094 independent, wait_list, num_gangs_expr, num_workers_expr,
1095 vector_length_expr, vector, vector_expr, worker, worker_expr,
1096 gang, gang_expr members.
1097 (gfc_trans_omp_do): Handle EXEC_OACC_LOOP.
1098 (gfc_convert_expr_to_tree, gfc_trans_oacc_construct)
1099 (gfc_trans_oacc_executable_directive)
1100 (gfc_trans_oacc_wait_directive, gfc_trans_oacc_combined_directive)
1101 (gfc_trans_oacc_declare, gfc_trans_oacc_directive): New functions.
1102 * trans-stmt.c (gfc_trans_block_construct): Update for OpenACC.
1103 * trans-stmt.h (gfc_trans_oacc_directive, gfc_trans_oacc_declare):
1104 New prototypes.
1105 * trans.c (tranc_code): Handle EXEC_OACC_CACHE, EXEC_OACC_WAIT,
1106 EXEC_OACC_UPDATE, EXEC_OACC_LOOP, EXEC_OACC_HOST_DATA,
1107 EXEC_OACC_DATA, EXEC_OACC_KERNELS, EXEC_OACC_KERNELS_LOOP,
1108 EXEC_OACC_PARALLEL, EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_ENTER_DATA,
1109 EXEC_OACC_EXIT_DATA.
1110 * gfortran.texi: Update for OpenACC.
1111 * intrinsic.texi: Likewise.
1112 * invoke.texi: Likewise.
1113
1114 2015-01-15 Janus Weil <janus@gcc.gnu.org>
1115
1116 PR fortran/58023
1117 * resolve.c (resolve_fl_derived0): Continue resolving next component
1118 after error.
1119
1120 2015-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1121
1122 PR fortran/61933
1123 * io.c (gfc_match_inquire): Generate error if unit number in
1124 inquire statement is a constant -1. All other values allowed.
1125 * trans-io.c (gfc_trans_inquire): Delete dummy iostat variable.
1126 (create_dummy_iostat): Delete function no longer used.
1127
1128 2015-01-13 Jakub Jelinek <jakub@redhat.com>
1129
1130 PR fortran/64528
1131 * trans-decl.c (create_function_arglist): Don't set TREE_READONLY
1132 on dummy args with VALUE attribute.
1133
1134 2015-01-11 Janus Weil <janus@gcc.gnu.org>
1135
1136 PR fortran/63733
1137 * interface.c (gfc_extend_expr): Look for type-bound operators before
1138 non-typebound ones.
1139
1140 2015-01-11 Janus Weil <janus@gcc.gnu.org>
1141
1142 PR fortran/58023
1143 * resolve.c (resolve_fl_derived0): Set error flag if problems with the
1144 interface of a procedure-pointer component were detected.
1145
1146 2015-01-11 Janus Weil <janus@gcc.gnu.org>
1147
1148 PR fortran/64508
1149 * interface.c (compare_parameter): Interface check for
1150 procedure-pointer component as actual argument.
1151
1152 2015-01-10 Thomas Schwinge <thomas@codesourcery.com>
1153
1154 * gfortran.texi: Update for libgomp being renamed from "GNU OpenMP
1155 Runtime Library" to "GNU Offloading and Multi Processing Runtime
1156 Library".
1157 * intrinsic.texi: Likewise.
1158
1159 2015-01-10 Tobias Burnus <burnus@net-b.de>
1160
1161 PR fortran/64522
1162 * invoke.texi (Wline-truncation): Document new behaviour.
1163 * lang.opt (Wline-truncation): Add Init(-1).
1164 * options.c (gfc_post_options): If -Wline-truncation is unset,
1165 enable it for free-form source files; for the latter, also use
1166 -Werror=line-truncation, unless -Wno-error has been specified.
1167
1168 2015-01-09 Michael Collison <michael.collison@linaro.org>
1169
1170 * convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1171 input.h, alias.h, symtab.h, options.h, fold-const.h,
1172 wide-int.h, and inchash.h due to flattening of tree.h.
1173 * cpp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1174 input.h, alias.h, symtab.h, fold-const.h,
1175 wide-int.h, and inchash.h due to flattening of tree.h.
1176 * decl.c: Ditto.
1177 * f95.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1178 input.h, alias.h, symtab.h, options.h, fold-const.h,
1179 wide-int.h, and inchash.h due to flattening of tree.h.
1180 * iresolve.c: Ditto.
1181 * match.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1182 input.h, alias.h, symtab.h, fold-const.h,
1183 wide-int.h, and inchash.h due to flattening of tree.h.
1184 * module.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1185 input.h, alias.h, symtab.h, options.h, fold-const.h,
1186 wide-int.h, and inchash.h due to flattening of tree.h.
1187 * options.c: Ditto.
1188 * target-memory.c: Include hash-set.h, vec.h,
1189 double-int.h, input.h, alias.h, symtab.h, fold-const.h,
1190 wide-int.h, and inchash.h due to flattening of tree.h.
1191 * trans-array.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1192 input.h, alias.h, symtab.h, options.h, fold-const.h,
1193 wide-int.h, and inchash.h due to flattening of tree.h.
1194 * trans.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1195 input.h, alias.h, symtab.h, options.h, fold-const.h,
1196 wide-int.h, and inchash.h due to flattening of tree.h.
1197 * trans-common.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1198 input.h, alias.h, symtab.h, fold-const.h,
1199 wide-int.h, and inchash.h due to flattening of tree.h.
1200 * trans-const.c: Ditto.
1201 * trans-decl.c: Ditto.
1202 * trans-expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1203 input.h, alias.h, symtab.h, options.h, fold-const.h,
1204 wide-int.h, and inchash.h due to flattening of tree.h.
1205 * trans-intrinsic.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1206 input.h, alias.h, symtab.h, fold-const.h,
1207 wide-int.h, inchash.h and real.h due to flattening of tree.h.
1208 * trans-io.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1209 input.h, alias.h, symtab.h, options.h, fold-const.h,
1210 wide-int.h, and inchash.h due to flattening of tree.h.
1211 * trans-openmp.c: Ditto.
1212 * trans-stmt.c: Ditto.
1213 * trans-types.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1214 input.h, alias.h, symtab.h, fold-const.h,
1215 wide-int.h, inchash.h and real.h due to flattening of tree.h.
1216
1217 2015-01-08 Tobias Burnus <burnus@net-b.de>
1218
1219 * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
1220 for module coarrays with -fcoarray=lib.
1221 (get_proc_pointer_decl): As module variable, make only public
1222 when not marked as private.
1223
1224 2015-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
1225
1226 PR fortran/47674
1227 * dependency.h: Actually commit changes.
1228
1229 2015-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
1230
1231 PR fortran/47674
1232 * dependency.c: Update copyright years.
1233 (gfc_discard_nops): Add prototype.
1234 * dependency.c (discard_nops): Rename to gfc_discard_nops,
1235 make non-static.
1236 (gfc_discard_nops): Use gfc_discard_nops.
1237 (gfc_dep_difference): Likewise.
1238 * frontend-passes.c Update copyright years.
1239 (realloc_strings): New function. Add prototype.
1240 (gfc_run_passes): Call realloc_strings.
1241 (realloc_string_callback): New function.
1242 (create_var): Add prototype. Handle case of a
1243 scalar character variable.
1244 (optimize_trim): Do not handle allocatable variables.
1245
1246 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1247
1248 Update copyright years.
1249
1250 * gfortranspec.c (lang_specific_driver): Update copyright notice
1251 dates.
1252 * gfc-internals.texi: Bump @copying's copyright year.
1253 * gfortran.texi: Ditto.
1254 * intrinsic.texi: Ditto.
1255 * invoke.texi: Ditto.
1256
1257 2015-01-02 Janus Weil <janus@gcc.gnu.org>
1258
1259 PR fortran/57562
1260 * expr.c (find_component_ref): Deal with extended types.
1261
1262 2015-01-02 Tobias Burnus <burnus@net-b.de>
1263
1264 * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
1265 for module coarrays with -fcoarray=lib.
1266
1267 2015-01-02 Janus Weil <janus@gcc.gnu.org>
1268
1269 PR fortran/60507
1270 * interface.c (is_procptr_result): New function to check if an
1271 expression is a procedure-pointer result.
1272 (compare_actual_formal): Use it.
1273 ^L
1274 Copyright (C) 2015 Free Software Foundation, Inc.
1275
1276 Copying and distribution of this file, with or without modification,
1277 are permitted in any medium without royalty provided the copyright
1278 notice and this notice are preserved.