]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/fortran/ChangeLog
Split omp-low into multiple files
[thirdparty/gcc.git] / gcc / fortran / ChangeLog
1 2016-12-14 Martin Jambor <mjambor@suse.cz>
2
3 * trans-openmp.c: Include omp-general.h.
4
5 2016-12-14 Andre Vehreschild <vehre@gcc.gnu.org>
6
7 PR fortran/78780
8 * trans-expr.c (gfc_trans_assignment_1): Improve check whether detour
9 caf-runtime routines is needed.
10
11 2016-12-14 Andre Vehreschild <vehre@gcc.gnu.org>
12
13 PR fortran/78672
14 * array.c (gfc_find_array_ref): Add flag to return NULL when no ref is
15 found instead of erroring out.
16 * data.c (gfc_assign_data_value): Only constant expressions are valid
17 for initializers.
18 * gfortran.h: Reflect change of gfc_find_array_ref's signature.
19 * interface.c (compare_actual_formal): Access the non-elemental
20 array-ref. Prevent taking a REF_COMPONENT for a REF_ARRAY. Correct
21 indentation.
22 * module.c (load_omp_udrs): Clear typespec before reading into it.
23 * trans-decl.c (gfc_build_qualified_array): Prevent accessing the array
24 when it is a coarray.
25 * trans-expr.c (gfc_conv_cst_int_power): Use wi::abs()-function instead
26 of crutch preventing sanitizer's bickering here.
27 * trans-stmt.c (gfc_trans_deallocate): Only get data-component when it
28 is a descriptor-array here.
29
30 2016-12-13 Janus Weil <janus@gcc.gnu.org>
31
32 PR fortran/78798
33 * gfortran.h (gfc_is_constant_expr, gfc_is_formal_arg,
34 gfc_is_compile_time_shape): Return bool instead of int.
35 * array.c (gfc_is_compile_time_shape): Ditto.
36 * expr.c (gfc_is_constant_expr): Ditto.
37 * resolve.c (gfc_is_formal_arg): Ditto. Make formal_arg_flag bool.
38
39 2016-12-13 Andre Vehreschild <vehre@gcc.gnu.org>
40
41 PR fortran/77785
42 * resolve.c (resolve_symbol): Correct attr lookup to the _data
43 component.
44 * trans-array.c (gfc_alloc_allocatable_for_assignment): Indirect ref
45 pointers and references before retrieving the caf-token.
46
47 2016-12-13 Janus Weil <janus@gcc.gnu.org>
48 Paul Thomas <pault@gcc.gnu.org>
49
50 PR fortran/78737
51 * gfortran.h (gfc_find_typebound_dtio_proc): New prototype.
52 * interface.c (gfc_compare_interfaces): Whitespace fix.
53 (gfc_find_typebound_dtio_proc): New function.
54 (gfc_find_specific_dtio_proc): Use it. Improve error recovery.
55 * trans-io.c (get_dtio_proc): Implement polymorphic calls to DTIO
56 procedures.
57
58 2016-12-12 Janus Weil <janus@gcc.gnu.org>
59
60 PR fortran/78392
61 * expr.c (gfc_is_constant_expr): Specification functions are not
62 compile-time constants. Update documentation (add reference to F08
63 standard), add a FIXME.
64 (external_spec_function): Add reference to F08 standard.
65 * resolve.c (resolve_fl_variable): Ditto.
66
67 2016-12-10 Thomas Koenig <tkoenig@gcc.gnu.org>
68
69 PR fortran/78226
70 * error.c (gfc_warning_internal): New function.
71 * frontend-passes.c (gfc_run_passes): Call check_locus if
72 CHECKING_P is defined.
73 (check_locus_code): New function.
74 (check_locus_expr): New function.
75 (check_locus): New function.
76 * gfortran.h: Add prototype for gfc_warning_internal.
77
78 2016-12-10 Paul Thomas <pault@gcc.gnu.org>
79
80 PR fortran/78350
81 * resolve.c (resolve_structure_cons): Remove the block that
82 tried to remove a charlen and rely on namespace cleanup.
83
84 2016-12-09 Paul Thomas <pault@gcc.gnu.org>
85
86 PR fortran/77903
87 * decl.c (get_proc_name): Use the symbol tlink field instead of
88 the typespec interface field.
89 (gfc_match_function_decl, gfc_match_submod_proc): Ditto.
90 * gfortran.h : Since the symbol tlink field is no longer used
91 by the frontend for change management, change the comment to
92 reflect its current uses.
93 * parse.c (get_modproc_result): Same as decl.c changes.
94 * resolve.c (resolve_fl_procedure): Ditto.
95
96 2016-12-09 Janus Weil <janus@gcc.gnu.org>
97
98 PR fortran/61767
99 * class.c (has_finalizer_component): Fix this function to detect only
100 non-pointer non-allocatable components which have a finalizer.
101
102 2016-12-09 Andre Vehreschild <vehre@gcc.gnu.org>
103
104 PR fortran/78505
105 * trans-stmt.c (gfc_trans_allocate): Add sync all after the execution
106 of the whole allocate-statement to adhere to the standard.
107
108 2016-12-09 Andre Vehreschild <vehre@gcc.gnu.org>
109
110 * trans-array.c (gfc_array_deallocate): Remove wrapper.
111 (gfc_trans_dealloc_allocated): Same.
112 (structure_alloc_comps): Restructure deallocation of (nested)
113 allocatable components. Insert dealloc of sub-component into the block
114 guarded by the if != NULL for the component.
115 (gfc_trans_deferred_array): Use the almightly deallocate_with_status.
116 * trans-array.h: Remove prototypes.
117 * trans-expr.c (gfc_conv_procedure_call): Use the almighty deallocate_
118 with_status.
119 * trans-openmp.c (gfc_walk_alloc_comps): Likewise.
120 (gfc_omp_clause_assign_op): Likewise.
121 (gfc_omp_clause_dtor): Likewise.
122 * trans-stmt.c (gfc_trans_deallocate): Likewise.
123 * trans.c (gfc_deallocate_with_status): Allow deallocation of scalar
124 and arrays as well as coarrays.
125 (gfc_deallocate_scalar_with_status): Get the data member for coarrays
126 only when freeing an array with descriptor. And set correct caf_mode
127 when freeing components of coarrays.
128 * trans.h: Change prototype of gfc_deallocate_with_status to allow
129 adding statements into the block guarded by the if (pointer != 0) and
130 supply a coarray handle.
131
132 2016-12-09 Paul Thomas <pault@gcc.gnu.org>
133
134 PR fortran/44265
135 * gfortran.h : Add fn_result_spec bitfield to gfc_symbol.
136 * resolve.c (flag_fn_result_spec): New function.
137 (resolve_fntype): Call it for character result lengths.
138 * symbol.c (gfc_new_symbol): Set fn_result_spec to zero.
139 * trans-decl.c (gfc_sym_mangled_identifier): Include the
140 procedure name in the mangled name for symbols with the
141 fn_result_spec bit set.
142 (gfc_finish_var_decl): Mark the decls of these symbols
143 appropriately for the case where the function is external.
144 (gfc_get_symbol_decl): Mangle the name of these symbols.
145 (gfc_create_module_variable): Allow them through the assert.
146 (gfc_generate_function_code): Remove the assert before the
147 initialization of sym->tlink because the frontend no longer
148 uses this field.
149 * trans-expr.c (gfc_map_intrinsic_function): Add a case to
150 treat the LEN_TRIM intrinsic.
151 (gfc_trans_string_copy): Deal with Wstringop-overflow warning
152 that can occur with constant source lengths at -O3.
153
154 2016-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
155
156 PR fortran/65173
157 PR fortran/69064
158 PR fortran/69859
159 PR fortran/78350
160 * gfortran.h (gfc_namespace): Remove old_cl_list member.
161 * parse.c (use_modules, next_statement): old_cl_list is gone.
162 (clear_default_charlen): Remove no longer used function.
163 (reject_statement): Do not try ot clean up gfc_charlen structure(s)
164 that may have been added to a cl_list list.
165 * symbol.c (gfc_new_charlen): old_cl_list structure is gone.
166
167 2016-12-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
168
169 PR fortran/78659
170 * resolve.c (resolve_fl_namelist): Remove unneeded error.
171
172 2016-12-06 Andre Vehreschild <vehre@gcc.gnu.org>
173
174 PR fortran/78226
175 * class.c (finalize_component): Add missing locus information.
176 (finalization_scalarizer): Likewise.
177 (finalization_get_offset): Likewise.
178 (finalizer_insert_packed_call): Likewise.
179 (generate_finalization_wrapper): Likewise.
180
181 2016-12-05 Nathan Sidwell <nathan@acm.org>
182
183 * error.c (gfc_warning_check): Call diagnostic_check_max_errors.
184 (gfc_error_check): Likewise.
185
186 2016-12-04 Janus Weil <janus@gcc.gnu.org>
187
188 PR fortran/78618
189 * intrinsic.c (gfc_convert_type_warn): Do not set the full typespec for
190 the conversion symbol, but only type and kind. Set the full typespec
191 for the expression.
192 (gfc_convert_chartype): Ditto.
193
194 2016-12-03 Janus Weil <janus@gcc.gnu.org>
195
196 PR fortran/43207
197 * primary.c (gfc_match_varspec): Reject nonpolymorphic references to
198 abstract types.
199
200 2016-12-03 Janus Weil <janus@gcc.gnu.org>
201
202 PR fortran/42188
203 * primary.c (gfc_match_rvalue): Add a new check that gives better error
204 messages.
205
206 2016-12-03 Janus Weil <janus@gcc.gnu.org>
207
208 PR fortran/58175
209 * resolve.c (gfc_resolve_finalizers): Prevent bogus warning.
210
211 2016-12-02 Steven G. Kargl <kargl@gcc.gnu.org>
212
213 * simplify.c (gfc_convert_char_constant): Free result on error.
214
215 2016-12-02 Janus Weil <janus@gcc.gnu.org>
216 Steven G. Kargl <kargl@gcc.gnu.org>
217
218 PR fortran/78618
219 * check.c (gfc_check_rank): Remove ATTRIBUTE_UNUSED.
220 * expr.c (gfc_check_assign): Fix error propagation.
221
222 2016-12-01 Elizebeth Punnoose <elizebeth.punnoose@hpe.com>
223
224 PR fortran/77505
225 * trans-array.c (trans_array_constructor): Treat negative character
226 length as LEN = 0.
227
228 2016-12-01 Steven G. Kargl <kargl@gcc.gnu.org>
229
230 PR fortran/78279
231 * dependency.c (identical_array_ref): Convert gcc_assert to conditional
232 and gfc_internal_error.
233
234 2016-11-30 Andre Vehreschild <vehre@gcc.gnu.org>
235
236 * check.c (gfc_check_allocated): By pass the caf_get call and check on
237 the array.
238 * gfortran.h: Add optional flag to gfc_caf_attr.
239 * gfortran.texi: Document new enum values and _caf_is_present function.
240 * primary.c (caf_variable_attr): Add optional flag to indicate that the
241 expression is reffing a component.
242 (gfc_caf_attr): Likewise.
243 * trans-array.c (gfc_array_deallocate): Handle deallocation mode for
244 coarray deregistration.
245 (gfc_trans_dealloc_allocated): Likewise.
246 (duplicate_allocatable): Use constants instead of
247 creating custom constant tree node of zero or one. Use gfc_add_modify
248 convenience function.
249 (duplicate_allocatable_coarray): This function is similar to
250 duplicate_allocatable but tailored to handle coarrays.
251 (caf_enabled): Check whether in-derived-type coarray processing is
252 enabled.
253 (caf_in_coarray): Check that in-derived-type coarray processing is
254 enabled and currently in a derived-typed coarray.
255 (gfc_caf_is_dealloc_only): Return true, when deallocate only is
256 desired for components in derived typed coarrays.
257 (structure_alloc_comps): A mode for handling coarrays, that is no
258 longer encode in the purpose. This makes the use cases of the
259 routine more flexible without repeating. Allocatable components in
260 derived type coarrays are now registered only when nullifying an
261 object and allocated before copying data into them.
262 (gfc_nullify_alloc_comp): Use the caf_mode of structure_alloc_comps
263 now.
264 (gfc_deallocate_alloc_comp): Likewise.
265 (gfc_deallocate_alloc_comp_no_caf): Likewise.
266 (gfc_reassign_alloc_comp_caf): Likewise.
267 (gfc_copy_alloc_comp): Likewise.
268 (gfc_copy_only_alloc_comp): Likewise.
269 (gfc_alloc_allocatable_for_assignment): Make use to the cheaper way of
270 reallocating a coarray without deregistering and reregistering it.
271 (gfc_trans_deferred_array): Initialize the coarray token correctly for
272 deferred variables and tear them down on exit.
273 * trans-array.h: Change some prototypes to add the coarray (de-)
274 registration modes. Add prototype for checking if deallocate only is
275 selected for components in derived typed coarrays.
276 * trans-decl.c (gfc_build_builtin_function_decls): Generate the
277 declarations for the changed/new caf-lib routines.
278 (gfc_trans_deferred_vars): Ensure deferred variables are (de-)
279 registered correctly on procedure entry/exit.
280 (generate_coarray_sym_init): Use constants.
281 * trans-expr.c (gfc_conv_procedure_call): Propagate coarray allocation
282 modes accordingly.
283 (gfc_trans_alloc_subarray_assign): Likewise.
284 (gfc_trans_subcomponent_assign): Likewise.
285 (gfc_trans_structure_assign): Generate code to register the components
286 of a derived type coarray prior to initialization.
287 (gfc_conv_structure): Set flag that the structure is in a coarray.
288 (gfc_trans_scalar_assign): Add flag to indicate being in a coarray and
289 set the structure_alloc_comps modes correctly.
290 (gfc_trans_assignment_1): Figure being in a coarray expression.
291 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Adapt to new
292 structure_alloc_comps interface.
293 (conv_caf_send): Use the old API as long as possible.
294 (trans_caf_is_present): Generate code to check whether an allocatable
295 component in a derived typed coarray is allocated on a remote image.
296 (caf_this_image_ref): Return true, when only reffing this image.
297 (gfc_conv_allocated): Convert allocated queries on allocatable
298 components to the library API.
299 (conv_intrinsic_move_alloc): Adapt to new interface of
300 structure_alloc_comps.
301 * trans-openmp.c (gfc_walk_alloc_comps): Likewise.
302 (gfc_omp_clause_assign_op): Likewise.
303 (gfc_omp_clause_dtor): Likewise.
304 * trans-stmt.c (gfc_trans_deallocate): Figure which mode to use when
305 deallocating allocatable components in derived type coarras.
306 * trans.c (gfc_allocate_using_lib): Renamed to
307 gfc_allcate_using_caf_lib.
308 (gfc_allocate_allocatable): Set the registration mode/type of caf-
309 register calls adapting to all the possible allocatable objects.
310 (gfc_deallocate_with_status): Add deregistration mode for allocatable
311 components in derived type coarrays.
312 (gfc_deallocate_scalar_with_status): Likewise.
313 * trans.h (enum gfc_coarray_type): Renamed to gfc_coarray_regtype to
314 avoid collision with gfc_coarray_deregtype.
315
316 2016-11-30 Janus Weil <janus@gcc.gnu.org>
317
318 PR fortran/78593
319 * primary.c (gfc_match_varspec): Check if sym is non-null to avoid ICE.
320
321 2016-11-30 Janus Weil <janus@gcc.gnu.org>
322
323 PR fortran/78592
324 * interface.c (gfc_find_specific_dtio_proc): Rearrange code to avoid
325 dereferencing a null pointer.
326
327 2016-11-30 Janus Weil <janus@gcc.gnu.org>
328
329 PR fortran/78573
330 * decl.c (build_struct): On error, return directly and do not build
331 class symbol.
332
333 2016-11-29 Tobias Burnus <burnus@net-b.de>
334
335 PR fortran/58175
336 * resolve.c (gfc_resolve_finalizers): Properly detect scalar finalizers.
337
338 2016-11-27 Paul Thomas <pault@gcc.gnu.org>
339
340 PR fortran/78474
341 * module.c (gfc_match_submodule): If there is more than one
342 colon, it is a syntax error.
343
344 PR fortran/78331
345 * module.c (gfc_use_module): If an smod file does not exist it
346 is either because the module does not have a module procedure
347 interface or there is an error in the module.
348
349 2016-11-25 Janne Blomqvist <jb@gcc.gnu.org>
350
351 * intrinsic.texi: Fix ptrdiff_t typo in ISO_C_BINDING constants
352 table.
353
354 2016-11-25 Janus Weil <janus@gcc.gnu.org>
355
356 PR fortran/60853
357 * interface.c (gfc_compare_interfaces): Remove bad special case for
358 unlimited polymorphism. Refactor for loop.
359
360 2016-11-25 Andre Vehreschild <vehre@gcc.gnu.org>
361 Paul Thomas <pault@gcc.gnu.org>
362
363 PR fortran/78293
364 * trans-expr.c (gfc_conv_procedure_call): Prepend deallocation
365 of alloctable components to post, rather than adding to
366 se->post.
367 * trans-stmt.c (gfc_trans_allocate): Move deallocation of expr3
368 allocatable components so that all expr3s are visited.
369
370 2016-11-25 Paul Thomas <pault@gcc.gnu.org>
371
372 PR fortran/78293
373 * gfortran.dg/allocatable_function_10.f90: New test.
374 * gfortran.dg/class_array_15.f03: Increase builtin_free count
375 from 11 to 12.
376
377 2016-11-24 Steven G. Kargl <kargl@gcc.gnu.org>
378
379 PR fortran/78500
380 * expr.c (gfc_check_vardef_contextm): Fix NULL pointer dereference.
381 * interface.c (matching_typebound_op): Ditto.
382
383 2016-11-23 Steven G. Kargl <kargl@gcc.gnu.org>
384
385 PR fortran/78297
386 * trans-common.c (finish_equivalences): Do not dereference a NULL pointer.
387
388 2016-11-23 Martin Jambor <mjambor@suse.cz>
389
390 * f95-lang.c (DEF_HSA_BUILTIN): New macro.
391
392 2016-11-22 Steven G. Kargl <kargl@gcc.gnu.org>
393
394 PR fortran/78479
395 * expr.c (gfc_apply_init): Allocate a charlen if needed.
396
397 2016-11-22 Janus Weil <janus@gcc.gnu.org>
398
399 PR fortran/78443
400 * class.c (add_proc_comp): Add a vtype component for non-overridable
401 procedures that are overriding.
402
403 2016-11-20 Harald Anlauf <anlauf@gmx.de>
404
405 PR fortran/69741
406 * resolve.c (gfc_resolve_forall): Check for nonscalar index variables.
407
408 2016-11-20 Andre Vehreschild <vehre@gcc.gnu.org>
409
410 PR fortran/78395
411 * resolve.c (resolve_typebound_function): Prevent stripping of refs,
412 when the base-expression is a class' typed one.
413
414 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
415 Alan Hayward <alan.hayward@arm.com>
416 David Sherwood <david.sherwood@arm.com>
417
418 * trans-common.c (build_common_decl): Use SET_DECL_MODE.
419 * trans-decl.c (gfc_build_label_decl): Likewise.
420 * trans-types.c (gfc_get_array_descr_info): Likewise.
421
422 2016-11-17 Janus Weil <janus@gcc.gnu.org>
423
424 PR fortran/66227
425 * simplify.c (gfc_simplify_extends_type_of): Fix missed optimization.
426 Prevent over-simplification. Fix a comment. Add a comment.
427
428 2016-11-16 Steven G. Kargl <kargl@gcc.gnu.org>
429
430 PR fortran/58001
431 * io.c (next_char_not_space): Update handling of a 'tab' in a FORMAT.
432 (format_lex): Adjust invocations of next_char_not_space().
433
434 2016-11-16 Andre Vehreschild <vehre@gcc.gnu.org>
435
436 PR fortran/78356
437 * class.c (gfc_is_class_scalar_expr): Prevent taking an array ref for
438 a component ref.
439 * trans-expr.c (gfc_trans_assignment_1): Ensure a reference to the
440 object to copy is generated, when assigning class objects.
441
442 2016-11-14 Thomas Koenig <tkoenig@gcc.gnu.org>
443
444 * dump-parse-tree.c (show_code): Add prototype.
445 (gfc_debug_code): New function.
446 (show_code_node): Add space after SELECT TYPE.
447
448 2016-11-14 Janus Weil <janus@gcc.gnu.org>
449
450 PR fortran/78300
451 * resolve.c (resolve_procedure_interface): Properly handle CLASS-valued
452 function results.
453
454 2016-11-13 Janus Weil <janus@gcc.gnu.org>
455
456 PR fortran/60952
457 * decl.c (match_procedure_in_type): Apply the FL_PROCEDURE attribute
458 to the target procedure.
459
460 2016-11-13 Janus Weil <janus@gcc.gnu.org>
461
462 PR fortran/66366
463 * resolve.c (resolve_component): Move check for C437
464 to ...
465 * decl.c (build_struct): ... here. Fix indentation.
466
467 2016-11-12 Janus Weil <janus@gcc.gnu.org>
468
469 PR fortran/77501
470 * class.c (gfc_find_typebound_intrinsic_op): Remove an unnecessary
471 assert and nullification.
472 * decl.c (gfc_match_decl_type_spec): Use gfc_get_tbp_symtree,
473 fix indentation.
474 (gfc_match_generic): Remove an unnecessary assert.
475 Use gfc_get_tbp_symtree to avoid ICE.
476
477 2016-11-10 Fritz O. Reese <fritzoreese@gmail.com>
478
479 PR fortran/78277
480 * gcc/fortran/decl.c (gfc_match_data_decl): Gracefully handle bad
481 anonymous structure declarations.
482
483 2016-11-10 Fritz O. Reese <fritzoreese@gmail.com>
484
485 * decl.c (get_struct_decl, gfc_match_map, gfc_match_union): Fix
486 whitespace.
487 * interface.c (gfc_compare_union_types): Likewise.
488
489 2016-11-10 Jakub Jelinek <jakub@redhat.com>
490
491 * cpp.c (cpp_define_builtins): Define _OPENMP to 201511 instead
492 of 201307.
493 * gfortran.texi: Mention partial OpenMP 4.5 support.
494 * intrinsic.texi: Update for OpenMP 4.5.
495
496 * openmp.c (gfc_free_omp_clauses): Free critical_name, grainsize,
497 hint, num_tasks, priority and if_exprs.
498 (gfc_match_omp_to_link, gfc_match_omp_depend_sink): New functions.
499 (enum omp_mask1, enum omp_mask2): New enums.
500 Change all OMP_CLAUSE_* defines into enum values, and change their
501 values from ((uint64_t) 1 << bit) to just bit.
502 (omp_mask, omp_inv_mask): New classes. Add ctors and operators.
503 (gfc_match_omp_clauses): Change mask argument from uint64_t to
504 const omp_mask. Assert OMP_MASK1_LAST and OMP_MASK2_LAST are
505 at most 64. Move delete clause handling to where it
506 alphabetically belongs. Parse defaultmap, grainsize, hint,
507 is_device_ptr, nogroup, nowait, num_tasks, priority, simd, threads
508 and use_device_ptr clauses. Parse if clause modifier. Parse map
509 clause always modifier, and release and delete kinds. Parse ordered
510 clause with argument. Parse schedule clause modifiers. Differentiate
511 device clause parsing based on openacc flag. Guard link clause
512 parsing with openacc flag. Add support for parsing
513 linear clause modifiers. Parse depend(source) and depend(sink: ...).
514 Use gfc_match_omp_to_link for to and link clauses in declare target
515 construct.
516 (match_acc): Change mask type from uint64_t to const omp_mask.
517 (OMP_SINGLE_CLAUSES, OMP_ORDERED_CLAUSES,
518 OMP_DECLARE_TARGET_CLAUSES, OMP_TASKLOOP_CLAUSES,
519 OMP_TARGET_ENTER_DATA_CLAUSES, OMP_TARGET_EXIT_DATA_CLAUSES): Define.
520 (OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES,
521 OACC_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES, OACC_DECLARE_CLAUSES,
522 OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES, OACC_WAIT_CLAUSES,
523 OACC_ROUTINE_CLAUSES, OMP_PARALLEL_CLAUSES, OMP_DECLARE_SIMD_CLAUSES,
524 OMP_SECTIONS_CLAUSES, OMP_TEAMS_CLAUSES, OMP_DISTRIBUTE_CLAUSES):
525 Replace first or only OMP_CLAUSE_* value in bitset with
526 omp_mask (OMP_CLAUSE_*).
527 (OMP_DO_CLAUSES): Likewise. Add OMP_CLAUSE_LINEAR.
528 (OMP_SIMD_CLAUSES): Replace first or only OMP_CLAUSE_* value in
529 bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_SIMDLEN.
530 (OACC_UPDATE_CLAUSES): Replace first or only OMP_CLAUSE_* value in
531 bitset with omp_mask (OMP_CLAUSE_*). Replace OMP_CLAUSE_OACC_DEVICE
532 with OMP_CLAUSE_DEVICE.
533 (OMP_TASK_CLAUSES): Replace first or only OMP_CLAUSE_* value in
534 bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_PRIORITY.
535 (OMP_TARGET_CLAUSES): Replace first or only OMP_CLAUSE_* value in
536 bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_DEPEND,
537 OMP_CLAUSE_NOWAIT, OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE,
538 OMP_CLAUSE_DEFAULTMAP and OMP_CLAUSE_IS_DEVICE_PTR.
539 (OMP_TARGET_DATA_CLAUSES): Replace first or only OMP_CLAUSE_* value in
540 bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_USE_DEVICE_PTR.
541 (OMP_TARGET_UPDATE_CLAUSES): Replace first or only OMP_CLAUSE_* value
542 in bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_DEPEND and
543 OMP_CLAUSE_NOWAIT.
544 (match_omp): Change mask argument from unsigned int to
545 const omp_mask.
546 (gfc_match_omp_critical): Parse optional clauses and use omp_clauses
547 union member instead of omp_name.
548 (gfc_match_omp_end_critical): New function.
549 (gfc_match_omp_distribute_parallel_do): Remove ordered and linear
550 clauses from the mask.
551 (gfc_match_omp_distribute_parallel_do_simd): Use
552 & ~(omp_mask (OMP_CLAUSE_*)) instead of & ~OMP_CLAUSE_*.
553 (gfc_match_omp_target_teams_distribute_parallel_do_simd): Likewise.
554 (gfc_match_omp_teams_distribute_parallel_do_simd): Likewise.
555 (gfc_match_omp_do_simd): Likewise. Don't remove ordered clause from
556 the mask.
557 (gfc_match_omp_parallel_do_simd): Likewise.
558 (gfc_match_omp_target_teams_distribute_parallel_do): Likewise.
559 (gfc_match_omp_teams_distribute_parallel_do): Likewise.
560 (gfc_match_omp_declare_simd): If not using the form with
561 (proc-name), require space before first clause. Make (proc-name)
562 optional. If not present, set proc_name to NULL.
563 (gfc_match_omp_declare_target): Rewritten for OpenMP 4.5.
564 (gfc_match_omp_single): Use OMP_SINGLE_CLAUSES.
565 (gfc_match_omp_task, gfc_match_omp_taskwait, gfc_match_omp_taskyield):
566 Move around to where they belong alphabetically.
567 (gfc_match_omp_target_enter_data, gfc_match_omp_target_exit_data,
568 gfc_match_omp_target_parallel, gfc_match_omp_target_parallel_do,
569 gfc_match_omp_target_parallel_do_simd, gfc_match_omp_target_simd,
570 gfc_match_omp_taskloop, gfc_match_omp_taskloop_simd):
571 New functions.
572 (gfc_match_omp_ordered): Parse clauses.
573 (gfc_match_omp_ordered_depend): New function.
574 (gfc_match_omp_cancel, gfc_match_omp_end_single): Use
575 omp_mask (OMP_CLAUSE_*) instead of OMP_CLAUSE_*.
576 (resolve_oacc_scalar_int_expr): Renamed to ...
577 (resolve_scalar_int_expr): ... this. Fix up formatting.
578 (resolve_oacc_positive_int_expr): Renamed to ...
579 (resolve_positive_int_expr): ... this. Fix up formatting.
580 (resolve_nonnegative_int_expr): New function.
581 (resolve_omp_clauses): Adjust callers, use the above functions
582 even for OpenMP clauses, add handling of new OpenMP 4.5 clauses.
583 Require orderedc >= collapse if specified. Handle depend(sink:)
584 and depend(source) restrictions. Disallow linear clause when
585 orderedc is non-zero. Diagnose linear clause modifiers when not in
586 declare simd. Only check for integer type if ref modifier
587 is not used. Remove diagnostics for required VALUE attribute.
588 Diagnose VALUE attribute with ref or uval modifiers. Allow
589 non-constant linear-step, if it is a dummy argument alone and is
590 mentioned in uniform clause. Diagnose map kinds not allowed
591 for various constructs. Diagnose target {enter ,exit ,}data without
592 any map clauses. Add dummy OMP_LIST_IS_DEVICE_PTR and
593 OMP_LIST_USE_DEVICE_PTR cases.
594 (gfc_resolve_omp_do_blocks): Set omp_current_do_collapse to orderedc
595 if non-zero.
596 (gfc_resolve_omp_parallel_blocks): Handle new OpenMP 4.5 constructs,
597 replace underscores with spaces in a few construct names.
598 (resolve_omp_do): Set collapse to orderedc if non-zero. Handle new
599 OpenMP 4.5 constructs.
600 (resolve_oacc_loop_blocks): Call resolve_positive_int_expr instead
601 of resolve_oacc_positive_int_expr.
602 (gfc_resolve_omp_directive): Handle new OpenMP 4.5 constructs.
603 (gfc_resolve_omp_declare_simd): Allow ods->proc_name to be NULL.
604 * trans-openmp.c (gfc_omp_scalar_p): New function.
605 (doacross_steps): New variable.
606 (gfc_trans_omp_clauses): Handle new OpenMP 4.5 clauses and new clause
607 modifiers.
608 (gfc_trans_omp_critical): Adjust EXEC_OMP_CRITICAL handling.
609 (gfc_trans_omp_do): Handle doacross loops. Clear sched_simd flag.
610 Handle EXEC_OMP_TASKLOOP.
611 (gfc_trans_omp_ordered): Translate omp clauses, allow NULL
612 code->block.
613 (GFC_OMP_SPLIT_TASKLOOP, GFC_OMP_MASK_TASKLOOP): New enum constants.
614 (gfc_split_omp_clauses): Copy orderedc together with ordered. Change
615 firstprivate and lastprivate handling for OpenMP 4.5.
616 Handle EXEC_OMP_TARGET_SIMD, EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD}
617 and EXEC_OMP_TASKLOOP{,_SIMD}. Add handling for new OpenMP 4.5
618 clauses and clause modifiers and handle if clause without/with
619 modifiers.
620 (gfc_trans_omp_teams): Add omp_clauses argument, add it to other
621 teams clauses. Don't wrap into OMP_TEAMS if -fopenmp-simd.
622 (gfc_trans_omp_target): For -fopenmp, translate num_teams and
623 thread_limit clauses on combined target teams early and pass to
624 gfc_trans_omp_teams. Set OMP_TARGET_COMBINED if needed.
625 Handle EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD} and
626 EXEC_OMP_TARGET_SIMD.
627 (gfc_trans_omp_taskloop, gfc_trans_omp_target_enter_data,
628 gfc_trans_omp_target_exit_data): New functions.
629 (gfc_trans_omp_directive): Handle EXEC_OMP_TARGET_{ENTER,EXIT}_DATA
630 EXEC_OMP_TASKLOOP{,_SIMD}, EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD}
631 and EXEC_OMP_TARGET_SIMD. Adjust gfc_trans_omp_teams caller.
632 * symbol.c (check_conflict): Handle omp_declare_target_link.
633 (gfc_add_omp_declare_target_link): New function.
634 (gfc_copy_attr): Copy omp_declare_target_link.
635 * dump-parse-tree.c (show_omp_namelist): Handle OMP_DEPEND_SINK_FIRST
636 depend_op. Print linear clause modifiers.
637 (show_omp_clauses): Adjust for OpenMP 4.5 clause changes.
638 (show_omp_node): Print clauses for EXEC_OMP_ORDERED. Allow NULL
639 c->block for EXEC_OMP_ORDERED. Formatting fixes. Adjust handling of
640 EXEC_OMP_CRITICAL, handle new OpenMP 4.5 constructs and some
641 forgotten OpenMP 4.0 constructs.
642 (show_code_node): Handle new OpenMP 4.5 constructs and some forgotten
643 OpenMP 4.0 constructs.
644 * gfortran.h (symbol_attribute): Add omp_declare_target_link bitfield.
645 (struct gfc_omp_namelist): Add u.common and u.linear_op fields.
646 (struct gfc_common_head): Change omp_declare_target into bitfield.
647 Add omp_declare_target_link bitfield.
648 (gfc_add_omp_declare_target_link): New prototype.
649 (enum gfc_statement): Add ST_OMP_TARGET_PARALLEL,
650 ST_OMP_END_TARGET_PARALLEL, ST_OMP_TARGET_PARALLEL_DO,
651 ST_OMP_END_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD,
652 ST_OMP_END_TARGET_PARALLEL_DO_SIMD, ST_OMP_TARGET_ENTER_DATA,
653 ST_OMP_TARGET_EXIT_DATA, ST_OMP_TARGET_SIMD, ST_OMP_END_TARGET_SIMD,
654 ST_OMP_TASKLOOP, ST_OMP_END_TASKLOOP, ST_OMP_TASKLOOP_SIMD,
655 ST_OMP_END_TASKLOOP_SIMD and ST_OMP_ORDERED_DEPEND.
656 (enum gfc_omp_depend_op): Add OMP_DEPEND_SINK_FIRST and
657 OMP_DEPEND_SINK.
658 (enum gfc_omp_linear_op): New.
659 (struct gfc_omp_clauses): Add critical_name, depend_source,
660 orderedc, defaultmap, nogroup, sched_simd, sched_monotonic,
661 sched_nonmonotonic, simd, threads, grainsize, hint, num_tasks,
662 priority and if_exprs fields.
663 (enum gfc_exec_op): Add EXEC_OMP_END_CRITICAL,
664 EXEC_OMP_TARGET_ENTER_DATA, EXEC_OMP_TARGET_EXIT_DATA,
665 EXEC_OMP_TARGET_PARALLEL, EXEC_OMP_TARGET_PARALLEL_DO,
666 EXEC_OMP_TARGET_PARALLEL_DO_SIMD, EXEC_OMP_TARGET_SIMD,
667 EXEC_OMP_TASKLOOP, EXEC_OMP_TASKLOOP_SIMD.
668 (enum gfc_omp_map_op): Add OMP_MAP_RELEASE,
669 OMP_MAP_ALWAYS_TO, OMP_MAP_ALWAYS_FROM and OMP_MAP_ALWAYS_TOFROM.
670 (OMP_LIST_IS_DEVICE_PTR, OMP_LIST_USE_DEVICE_PTR): New.
671 (enum gfc_omp_if_kind): New.
672 * module.c (enum ab_attribute): Add AB_OMP_DECLARE_TARGET_LINK.
673 (attr_bits): Add AB_OMP_DECLARE_TARGET_LINK entry.
674 (mio_symbol_attribute): Save and restore omp_declare_target_link bit.
675 * trans.h (gfc_omp_scalar_p): New prototype.
676 * frontend-passes.c (gfc_code_walker): Handle new OpenMP 4.5
677 expressions.
678 * trans.c (trans_code): Handle new OpenMP 4.5 constructs.
679 * resolve.c (gfc_resolve_blocks): Likewise.
680 (gfc_resolve_code): Likewise.
681 * f95-lang.c (LANG_HOOKS_OMP_SCALAR_P): Redefine to gfc_omp_scalar_p.
682 (gfc_attribute_table): Add "omp declare target link".
683 * st.c (gfc_free_statement): Handle EXEC_OMP_END_CRITICAL like
684 EXEC_OMP_CRITICAL before, free clauses for EXEC_OMP_CRITICAL
685 and new OpenMP 4.5 constructs. Free omp clauses even for
686 EXEC_OMP_ORDERED.
687 * match.c (match_exit_cycle): Rename collapse variable to count,
688 set it to orderedc if non-zero, instead of collapse.
689 * trans-decl.c (add_attributes_to_decl): Add "omp declare target link"
690 instead of "omp declare target" for omp_declare_target_link.
691 * trans-common.c (build_common_decl): Likewise.
692 * match.h (gfc_match_omp_target_enter_data,
693 gfc_match_omp_target_exit_data, gfc_match_omp_target_parallel,
694 gfc_match_omp_target_parallel_do,
695 gfc_match_omp_target_parallel_do_simd, gfc_match_omp_target_simd,
696 gfc_match_omp_taskloop, gfc_match_omp_taskloop_simd,
697 gfc_match_omp_end_critical, gfc_match_omp_ordered_depend): New
698 prototypes.
699 * parse.c (decode_omp_directive): Use gfc_match_omp_end_critical
700 instead of gfc_match_omp_critical for !$omp end critical.
701 Handle new OpenMP 4.5 constructs. If ordered directive has
702 depend clause as the first of the clauses, use
703 gfc_match_omp_ordered_depend and ST_OMP_ORDERED_DEPEND instead of
704 gfc_match_omp_ordered and ST_OMP_ORDERED.
705 (case_executable): Add ST_OMP_TARGET_ENTER_DATA,
706 ST_OMP_TARGET_EXIT_DATA and ST_OMP_ORDERED_DEPEND cases.
707 (case_exec_markers): Add ST_OMP_TARGET_PARALLEL,
708 ST_OMP_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD,
709 ST_OMP_TARGET_SIMD, ST_OMP_TASKLOOP and ST_OMP_TASKLOOP_SIMD cases.
710 (gfc_ascii_statement): Handle new OpenMP 4.5 constructs.
711 (parse_omp_do): Handle ST_OMP_TARGET_PARALLEL_DO,
712 ST_OMP_TARGET_PARALLEL_DO_SIMD, ST_OMP_TASKLOOP and
713 ST_OMP_TASKLOOP_SIMD.
714 (parse_omp_structured_block): Handle EXEC_OMP_END_CRITICAL instead
715 of EXEC_OMP_CRITICAL, adjust for EXEC_OMP_CRITICAL having omp clauses
716 now.
717 (parse_executable): Handle ST_OMP_TARGET_PARALLEL,
718 ST_OMP_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD,
719 ST_OMP_TASKLOOP and ST_OMP_TASKLOOP_SIMD.
720
721 2016-11-09 Mikael Morin <mikael@gcc.gnu.org>
722 Janus Weil <janus@gcc.gnu.org>
723
724 PR fortran/46459
725 * interface.c (compare_actual_formal): Add safety checks to avoid ICE.
726
727 2016-11-09 Fritz O. Reese <fritzoreese@gmail.com>
728
729 PR fortran/78259
730 * trans-expr.c (gfc_trans_subcomponent_assign): Guard against NULL
731 values.
732
733 2016-11-09 Steven G. Kargl <kargl@gcc.gnu.org>
734 Janus Weil <janus@gcc.gnu.org>
735
736 PR fortran/60777
737 * expr.c (external_spec_function): Allow recursive specification
738 functions in F03.
739
740 2016-11-09 Paul Thomas <pault@gcc.gnu.org>
741
742 * check.c (gfc_check_move_alloc): Prevent error that avoids
743 aliasing between to and from arguments from rejecting valid
744 code.
745
746 2016-11-09 Janus Weil <janus@gcc.gnu.org>
747
748 PR fortran/71894
749 * class.c (gfc_add_component_ref): Add safety checks to avoid ICE.
750
751 2016-11-08 Janus Weil <janus@gcc.gnu.org>
752
753 PR fortran/68440
754 * expr.c (check_alloc_comp_init): Loosen an assert.
755 * resolve.c (resolve_fl_parameter): Reject class parameters.
756
757 2016-11-08 Janus Weil <janus@gcc.gnu.org>
758
759 PR fortran/77596
760 * expr.c (gfc_check_pointer_assign): Add special check for procedure-
761 pointer component with absent interface.
762
763 2016-11-07 Thomas Koenig <tkoenig@gcc.gnu.org>
764
765 PR fortran/78226
766 * expr.c (gfc_generate_initializer): Add where to EXPR_NULL
767 statement.
768 * iresolve.c (gfc_resolve_extends_type_of): Add where to
769 both arguments of the function.
770 * resolve.c (resolve_select_type): Add where to the
771 second argument of the new statement.
772
773 2016-11-07 Thomas Koenig <tkoenig@gcc.gnu.org>
774
775 PR fortran/78226
776 * match.c (gfc_match_select_type): Add where for expr1.
777 * resolve.c (resolev_select_type): Add where for expr1 of new
778 statement.
779
780 2016-11-06 Thomas Koenig <tkoenig@gcc.gnu.org>
781
782 PR fortran/78226
783 resolve.c (build_loc_call): Add location to return value.
784
785 2016-11-06 Andre Vehreschild <vehre@gcc.gnu.org>
786
787 * expr.c (is_non_empty_structure_constructor): New function to detect
788 non-empty structure constructor.
789 (gfc_has_default_initializer): Analyse initializers.
790 * resolve.c (cond_init): Removed.
791 (resolve_allocate_expr): Removed dead code. Moved invariant code out
792 of the loop over all objects to allocate.
793 (resolve_allocate_deallocate): Added the invariant code remove from
794 resolve_allocate_expr.
795 * trans-array.c (gfc_array_allocate): Removed nullify of structure
796 components in favour of doing this in gfc_trans_allocate for both
797 scalars and arrays in the same place.
798 * trans-expr.c (gfc_trans_init_assign): Always using _vptr->copy for
799 class objects.
800 * trans-stmt.c (allocate_get_initializer): Get the initializer
801 expression for object allocated.
802 (gfc_trans_allocate): Nullify a derived type only, when no SOURCE=
803 or MOLD= is present preventing duplicate work. Moved the creation
804 of the init-expression here to prevent code for conditions that
805 can not occur on freshly allocated object, like checking for the need
806 to free allocatable components.
807
808 2016-11-06 Thomas Koenig <tkoenig@gcc.gnu.org>
809
810 PR fortran/78221
811 * arith.c (gfc_complex2real): Change gfc_warning_now to
812 gfc_warning.
813
814 2016-11-05 Paul Thomas <pault@gcc.gnu.org>
815
816 * check.c (gfc_check_move_alloc): Introduce error to prevent
817 aliasing between to and from arguments.
818
819 2016-11-05 Janus Weil <janus@gcc.gnu.org>
820 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
821
822 PR fortran/69495
823 * invoke.texi: Mention -Wpedantic as an alias of -pedantic.
824 * check.c (gfc_check_transfer): Mention responsible flag in warning
825 message.
826 * frontend-passes.c (do_warn_function_elimination): Ditto.
827 * resolve.c (resolve_elemental_actual): Ditto.
828 (resolve_operator): Ditto.
829 (warn_unused_fortran_label): Ditto.
830 * trans-common.c (translate_common): Ditto.
831
832 2016-11-05 Paul Thomas <pault@gcc.gnu.org>
833
834 PR fortran/67564
835 * trans-expr.c (gfc_conv_class_to_class): Return _len component
836 of unlimited polymorphic entities.
837
838 2016-11-04 Paul Thomas <pault@gcc.gnu.org>
839
840 PR fortran/64933
841 * primary.c (gfc_match_varspec): If selector expression is
842 unambiguously an array, make sure that the associate name
843 is an array and has an array spec. Modify the original
844 condition for doing this to exclude character types.
845
846 2016-11-03 Fritz Reese <fritzoreese@gmail.com>
847
848 * gfortran.texi: Document.
849 * gfortran.h (gfc_dt): New field default_exp.
850 * primary.c (match_real_constant): Default exponent with -fdec.
851 * io.c (match_io): Set dt.default_exp with -fdec.
852 * ioparm.def (IOPARM_dt_default_exp): New.
853 * trans-io.c (build_dt): Set IOPARM_dt_default_exp with -fdec.
854
855 2016-11-03 Fritz O. Reese <fritzoreese@gmail.com>
856
857 * decl.c (gfc_match_parameter): Allow omitted '()' with -std=legacy.
858 * parse.c (decode_statement): Match "parameter" before assignments.
859 * gfortran.texi: Document.
860
861 2016-11-02 Fritz O. Reese <fritzoreese@gmail.com>
862
863 * lang.opt, invoke.texi: New argument -Wargument-mismatch.
864 * interface.c (compare_parameter, compare_actual_formal,
865 gfc_check_typebound_override, argument_rank_mismatch): Control argument
866 mismatch warnings with -Wargument-mismatch.
867 * resolve.c (resolve_structure_cons, resolve_global_procedure): Ditto.
868
869 2016-11-02 Fritz Reese <fritzoreese@gmail.com>
870
871 * gfortran.h (gfc_error): New declaration for gfc_error with 'opt'.
872 * error.c (gfc_error): Add optional 'opt' argument.
873 * error.c (gfc_notify_std): Call fully-qualified gfc_error.
874
875 2016-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
876
877 PR fortran/78178
878 * match.c (match_simple_where): Fill in locus for assigment
879 in simple WHERE statement.
880
881 2016-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
882
883 PR fortran/69544
884 * match.c (gfc_match_where): Fill in locus for assigment
885 in simple WHERE statement.
886
887 2016-10-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
888
889 PR fortran/54679
890 * io.c (check_format): Adjust checks for FMT_L to treat a zero
891 width as an extension, giving warnings or error as appropriate.
892 Improve messages.
893
894 2016-10-31 Jakub Jelinek <jakub@redhat.com>
895
896 * trans-types.c (gfc_get_array_descr_info): For -gdwarf-5 or
897 -gno-strict-dwarf, handle assumed rank arrays the way dwarf2out
898 expects.
899
900 2016-10-30 Thomas Koenig <tkoenig@gcc.gnu.org>
901
902 PR fortran/67219
903 * arith.c (gfc_int2real): Change gfc_warning_now
904 to gfc_warning.
905 * primary.c (match_complex_constant): If there
906 is no comma, throw away any warning which might have
907 been issued by gfc_int2real.
908
909 2016-10-28 Steven G. Kargl <kargl@gcc.gnu.org>
910
911 PR fortran/71891
912 * symbol.c (gfc_type_compatible): Fix typo.
913
914 2016-10-27 Jakub Jelinek <jakub@redhat.com>
915
916 PR fortran/78026
917 * parse.c (decode_statement): Don't create namespace for possible
918 select type here and destroy it afterwards.
919 (parse_select_type_block): Set gfc_current_ns to new_st.ext.block.ns.
920 (parse_executable, gfc_parse_file): Formatting fixes.
921 * match.c (gfc_match_select_type): Create namespace for select type
922 here, only after matching select type. Formatting fixes. Free that
923 namespace if not returning MATCH_YES, after gfc_undo_symbols,
924 otherwise remember it in new_st.ext.block.ns and switch to parent
925 namespace anyway.
926
927 2016-10-27 Fritz Reese <fritzoreese@gmail.com>
928
929 * expr.c (generate_union_initializer, get_union_initializer): New.
930 * expr.c (component_initializer): Consider BT_UNION specially.
931 * resolve.c (resolve_structure_cons): Hack for BT_UNION.
932 * trans-expr.c (gfc_trans_subcomponent_assign): Ditto.
933 * trans-expr.c (gfc_conv_union_initializer): New.
934 * trans-expr.c (gfc_conv_structure): Replace UNION handling code with
935 new function gfc_conv_union_initializer.
936
937 2016-10-26 Steven G. Kargl <kargl@gcc.gnu.org>
938
939 PR fortran/78092
940 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Fix reference to an
941 array element of type CLASS.
942
943 2016-10-26 Paul Thomas <pault@gcc.gnu.org>
944
945 PR fortran/78108
946 * resolve.c (resolve_typebound_intrinsic_op): For submodules
947 suppress the error and return if the same procedure symbol
948 is added more than once to the interface.
949
950 2016-10-26 Fritz Reese <fritzoreese@gmail.com>
951
952 * frontend-passes.c (gfc_code_walker): Add SHARE and CARRIAGECONTROL.
953 * io.c (gfc_free_open, gfc_resolve_open, gfc_match_open): Ditto.
954 * gfortran.h (gfc_open): Add SHARE, CARRIAGECONTROL, and READONLY.
955 * io.c (io_tag, match_open_element): Ditto.
956 * ioparm.def: Ditto.
957 * trans-io.c (gfc_trans_open): Ditto.
958 * io.c (match_dec_etag, match_dec_ftag): New functions.
959 * gfortran.texi: Document.
960
961 2016-10-25 Fritz Reese <fritzoreese@gmail.com>
962
963 * gfortran.texi: Document.
964 * resolve.c (logical_to_bitwise): New function.
965 * resolve.c (resolve_operator): Wrap operands with logical_to_bitwise.
966
967 2016-10-25 Andre Vehreschild <vehre@gcc.gnu.org>
968
969 PR fortran/72770
970 * class.c (find_intrinsic_vtab): No longer encode the string length
971 into vtype's name and use the char's kind for the size instead of
972 the string_length time the size.
973 * trans-array.c (gfc_conv_ss_descriptor): For deferred length char
974 arrays the dynamically sized type needs to be declared.
975 (build_class_array_ref): Address the i-th array element by multiplying
976 it with the _vptr->_size and the _len to make sure char arrays are
977 addressed correctly.
978 * trans-expr.c (gfc_conv_intrinsic_to_class): Made comment more
979 precise.
980
981 2016-10-25 Cesar Philippidis <cesar@codesourcery.com>
982
983 * intrinsic.texi (cosd): New mathop.
984
985 2016-10-25 Fritz Reese <fritzoreese@gmail.com>
986
987 * match.c (gfc_match_intrinsic_op): Match ".XOR." with -std=legacy.
988 * gfortran.texi: Document.
989
990 2016-10-25 Fritz Reese <fritzoreese@gmail.com>
991
992 * primary.c (gfc_match_rvalue): Match %LOC as LOC with -std=legacy.
993 * gfortran.texi: Document.
994
995 2016-10-25 Fritz Reese <fritzoreese@gmail.com>
996
997 * decl.c (gfc_match_type): New function.
998 * match.h (gfc_match_type): New function.
999 * match.c (gfc_match_if): Special case for one-line IFs.
1000 * gfortran.texi: Update documentation.
1001 * parse.c (decode_statement): Invoke gfc_match_type.
1002
1003 2016-10-25 Fritz Reese <fritzoreese@gmail.com>
1004
1005 * gfortran.texi: Document.
1006 * gfortran.h (gfc_is_whitespace): Include form feed ('\f').
1007
1008 2016-10-25 Fritz Reese <fritzoreese@gmail.com>
1009
1010 * invoke.texi, gfortran.texi: Touch up documentation of -fdec.
1011 * gfortran.h (gfc_option): Move flag_dec_structure out of gfc_option.
1012 * decl.c (match_record_decl, gfc_match_decl_type_spec,
1013 gfc_match_structure_decl): Ditto.
1014 * match.c (gfc_match_member_sep): Ditto.
1015 * options.c (gfc_handle_option): Ditto.
1016 * lang.opt (fdec-structure): Use Fortran Var for flag_dec_structure.
1017 * lang.opt (fdec): Use Fortran Var to create flag_dec.
1018 * options.c (set_dec_flags): With -fdec enable -fcray-pointer,
1019 -fd-lines-as-comments (default), -fdollar-ok, and legacy std flags.
1020
1021 2016-10-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1022
1023 PR fortran/77828
1024 * ioparm.def: Reorder dt parameters to match libgfortran.
1025 * libgfortran.h: Swap definitions of GFC_INTERNAL_UNIT and
1026 GFC_INTERNAL_UNIT4.
1027
1028 2016-10-24 Steven G. Kargl <kargl@gcc.gnu.org>
1029
1030 PR fortran/71895
1031 * interface.c (gfc_compare_derived_types): Convert gcc_assert()
1032 to a gfc_internal_error() to prevent an ICE.
1033
1034 2016-10-24 Jakub Jelinek <jakub@redhat.com>
1035
1036 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Use VAR_P (x)
1037 instead of TREE_CODE (x) == VAR_DECL.
1038 * trans-expr.c (gfc_class_vptr_get, gfc_class_len_get,
1039 gfc_class_len_or_zero_get, gfc_get_vptr_from_expr,
1040 gfc_conv_string_length, conv_base_obj_fcn_val,
1041 gfc_conv_procedure_call, gfc_trans_assignment_1): Likewise.
1042 * trans-openmp.c (gfc_omp_predetermined_sharing,
1043 gfc_omp_disregard_value_expr, gfc_omp_private_debug_clause,
1044 gfc_trans_omp_atomic, gfc_trans_omp_do): Likewise.
1045 * trans-io.c (nml_get_addr_expr): Likewise.
1046 * trans-decl.c (gfc_finish_decl, gfc_build_qualified_array,
1047 gfc_get_symbol_decl, gfc_get_fake_result_decl,
1048 gfc_trans_deferred_vars, gfc_trans_use_stmts,
1049 generate_local_decl): Likewise.
1050 * trans-array.c (trans_array_constructor, trans_array_bound_check,
1051 build_class_array_ref, gfc_array_init_size,
1052 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
1053 gfc_trans_dummy_array_bias, gfc_alloc_allocatable_for_assignment,
1054 gfc_trans_deferred_array): Likewise.
1055 * trans.c (gfc_build_array_ref): Likewise. Use
1056 VAR_OR_FUNCTION_DECL_P (x) instead of TREE_CODE (x) == VAR_DECL
1057 || TREE_CODE (x) == FUNCTION_DECL.
1058
1059 2016-10-23 Steven G. Kargl <kargl@gcc.gnu.org>
1060
1061 PR fortran/77763
1062 * parse.c (parse_spec): Allow STRUCTURE in BLOCK DATA. Sort
1063 case labels.
1064
1065 2016-10-23 Steven G. Kargl <kargl@gcc.gnu.org>
1066
1067 PR fortran/54730
1068 PR fortran/78033
1069 * array.c (gfc_match_array_constructor): Remove checkpointing
1070 introduced in r196416 (original fix for PR fortran/54730). Move
1071 initialization to top of function.
1072 * match.c (gfc_match_type_spec): Special case matching for REAL.
1073
1074 2016-10-23 Paul Thomas <pault@gcc.gnu.org>
1075
1076 PR fortran/69834
1077 * class.c (gfc_find_derived_vtab): Obtain the gsymbol for the
1078 derived type's module. If the gsymbol is present and the top
1079 level namespace corresponds to a module, use the gsymbol name
1080 space. In the search to see if the vtable exists, try the gsym
1081 namespace first.
1082 * dump-parse-tree (show_code_node): Modify select case dump to
1083 show select type construct.
1084 * resolve.c (build_loc_call): New function.
1085 (resolve_select_type): Add check for repeated type is cases.
1086 Retain selector expression and use it later instead of expr1.
1087 Exclude deferred length TYPE IS cases and emit error message.
1088 Store the address for the vtable in the 'low' expression and
1089 the hash value in the 'high' expression, for each case. Do not
1090 call resolve_select.
1091 * trans.c(trans_code) : Call gfc_trans_select_type.
1092 * trans-stmt.c (gfc_trans_select_type_cases): New function.
1093 (gfc_trans_select_type): New function.
1094 * trans-stmt.h : Add prototype for gfc_trans_select_type.
1095
1096 2016-10-22 Thomas Koenig <tkoenig@gcc.gnu.org>
1097
1098 PR fortran/78021
1099 * gfc_compare_functions: Strings with different lengths in
1100 argument lists compare unequal.
1101
1102 2016-10-22 Andre Vehreschild <vehre@gcc.gnu.org>
1103
1104 PR fortran/43366
1105 PR fortran/51864
1106 PR fortran/57117
1107 PR fortran/61337
1108 PR fortran/61376
1109 * primary.c (gfc_expr_attr): For transformational functions on classes
1110 get the attrs from the class argument.
1111 * resolve.c (resolve_ordinary_assign): Remove error message due to
1112 feature implementation. Rewrite POINTER_ASSIGNS to ordinary ones when
1113 the right-hand side is scalar class object (with some restrictions).
1114 * trans-array.c (trans_array_constructor): Create the temporary from
1115 class' inner type, i.e., the derived type.
1116 (build_class_array_ref): Add support for class array's storage of the
1117 class object or the array descriptor in the decl saved descriptor.
1118 (gfc_conv_expr_descriptor): When creating temporaries for class objects
1119 add the class object's handle into the decl saved descriptor.
1120 (structure_alloc_comps): Use the common way to get the _data component.
1121 (gfc_is_reallocatable_lhs): Add notion of allocatable class objects.
1122 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Remove the only ref
1123 only when the expression's type is BT_CLASS.
1124 (gfc_trans_class_init_assign): Correctly handle class arrays.
1125 (gfc_trans_class_assign): Joined into gfc_trans_assignment_1.
1126 (gfc_conv_procedure_call): Support for class types as arguments.
1127 (trans_get_upoly_len): For unlimited polymorphics retrieve the _len
1128 component's tree.
1129 (trans_class_vptr_len_assignment): Catch all ways to assign the _vptr
1130 and _len components of a class object correctly.
1131 (pointer_assignment_is_proc_pointer): Identify assignments of
1132 procedure pointers.
1133 (gfc_trans_pointer_assignment): Enhance support for class object pointer
1134 assignments.
1135 (gfc_trans_scalar_assign): Removed assert.
1136 (trans_class_assignment): Assign to a class object.
1137 (gfc_trans_assignment_1): Treat class objects correctly.
1138 (gfc_trans_assignment): Propagate flags to trans_assignment_1.
1139 * trans-stmt.c (gfc_trans_allocate): Use gfc_trans_assignment now
1140 instead of copy_class_to_class.
1141 * trans-stmt.h: Function prototype removed.
1142 * trans.c (trans_code): Less special casing for class objects.
1143 * trans.h: Added flags to gfc_trans_assignment () prototype.
1144
1145 2016-10-21 Paul Thomas <pault@gcc.gnu.org>
1146
1147 PR fortran/69566
1148 * resolve.c (fixup_array_ref): New function.
1149 (resolve_select_type): Gather up the rank and array reference,
1150 if any, from the selector. Fix up the 'associate name' and the
1151 'associate entities' as necessary.
1152 * trans-expr.c (gfc_conv_class_to_class): If the symbol backend
1153 decl is a FUNCTION_DECL, use the 'fake_result_decl' instead.
1154
1155 2016-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
1156
1157 * array.c (gfc_match_array_constructor): Remove set, but unused
1158 variable.
1159
1160 2016-10-20 Andre Vehreschild <vehre@gcc.gnu.org>
1161
1162 * class.c (gfc_build_class_symbol): Set the kind of _len to
1163 gfc_charlen_int_kind to catch changes of the charlen kind.
1164
1165 2016-10-17 Steven G. Kargl <kargl@gcc.gnu.org>
1166
1167 PR fortran/77978
1168 * match.c (gfc_match_stopcode): Fix error reporting for several
1169 deficiencies in matching stop-codes.
1170
1171 2016-10-17 Paul Thomas <pault@gcc.gnu.org>
1172
1173 PR fortran/61420
1174 PR fortran/78013
1175 * resolve.c (resolve_variable): Obtain the typespec for a
1176 variable expression, when the variable is a function result
1177 that is a procedure pointer.
1178
1179 2016-10-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1180
1181 PR fortran/48298
1182 * trans-io.c (transfer_expr): Ignore dtio procedures for inquire
1183 with iolength.
1184
1185 2016-10-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1186
1187 PR fortran/77972
1188 * scanner.c (gfc_next_char_literal): If nextc is null do not
1189 decrement the pointer and call the diagnostics.
1190
1191 2016-10-14 Andre Vehreschild <vehre@gcc.gnu.org>
1192
1193 * resolve.c (resolve_symbol): Add unimplemented message for
1194 polymorphic types with allocatable/pointer components and coarray=lib.
1195
1196 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1197
1198 * trans-intrinsic.c: Include memmodel.h.
1199
1200 2016-10-13 Andre Vehreschild <vehre@gcc.gnu.org>
1201
1202 PR fortran/72832
1203 * trans-expr.c (gfc_copy_class_to_class): Add generation of
1204 runtime array bounds check.
1205 * trans-intrinsic.c (gfc_conv_intrinsic_size): Add a crutch to
1206 get the descriptor of a function returning a class object.
1207 * trans-stmt.c (gfc_trans_allocate): Use the array spec on the
1208 array to allocate instead of the array spec from source=.
1209
1210 2016-10-12 Andre Vehreschild <vehre@gcc.gnu.org>
1211
1212 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Fixed style.
1213 (gfc_trans_class_init_assign): Same.
1214 (gfc_conv_procedure_call): Same.
1215 (gfc_trans_assignment_1): Same.
1216 * trans-stmt.c (gfc_trans_allocate): Same.
1217
1218 2016-10-11 Jakub Jelinek <jakub@redhat.com>
1219
1220 * iresolve.c (is_trig_resolved, resolve_trig_call): Formatting fixes.
1221 * simplify.c (simplify_trig_call, degrees_f, radians_f,
1222 gfc_simplify_atrigd, gfc_simplify_cotan): Likewise.
1223
1224 2016-10-11 Steven G. Kargl <kargl@gcc.gnu.org>
1225
1226 PR fortran/77942
1227 * simplify.c (gfc_simplify_cshift): Check for zero.
1228
1229 2016-10-11 Fritz Reese <fritzoreese@gmail.com>
1230
1231 * iresolve.c (get_radians, get_degrees): Fix sloppy commit.
1232 * simplify.c (degrees_f, radians_f): Ditto.
1233
1234 2016-10-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1235
1236 * simplify.c (radians_f): Fix mpfr_mod.
1237 * ireolce.c (get_degrees): Declare tmp.
1238
1239 2016-10-11 Fritz Reese <fritzoreese@gmail.com>
1240
1241 * lang.opt: New flag -fdec-math.
1242 * options.c (set_dec_flags): Enable with -fdec.
1243 * invoke.texi, gfortran.texi, intrinsic.texi: Update documentation.
1244 * intrinsics.c (add_functions, do_simplify): New intrinsics
1245 with -fdec-math.
1246 * gfortran.h (gfc_isym_id): New isym GFC_ISYM_COTAN.
1247 * gfortran.h (gfc_resolve_atan2d, gfc_resolve_cotan,
1248 gfc_resolve_trigd, gfc_resolve_atrigd): New prototypes.
1249 * iresolve.c (resolve_trig_call, get_degrees, get_radians,
1250 is_trig_resolved, gfc_resolve_cotan, gfc_resolve_trigd,
1251 gfc_resolve_atrigd, gfc_resolve_atan2d): New functions.
1252 * intrinsics.h (gfc_simplify_atan2d, gfc_simplify_atrigd,
1253 gfc_simplify_cotan, gfc_simplify_trigd): New prototypes.
1254 * simplify.c (simplify_trig_call, degrees_f, radians_f,
1255 gfc_simplify_cotan, gfc_simplify_trigd, gfc_simplify_atrigd,
1256 gfc_simplify_atan2d): New functions.
1257
1258 2016-10-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1259
1260 PR fortran/77915
1261 * frontend-passes.c (inline_matmul_assign): Return early if
1262 inside a FORALL statement.
1263
1264 2016-10-07 Fritz Reese <fritzoreese@gmail.com>
1265
1266 * interface.c (compare_components): Check charlen for BT_CHAR.
1267
1268 2016-10-07 Steven G. Kargl <kargl@gcc.gnu.org>
1269
1270 PR fortran/77406
1271 * interface.c (gfc_compare_interfaces): Fix detection of ambiguous
1272 interface involving alternate return.
1273 (check_interface1): Improve error message and loci.
1274
1275 2016-10-06 Louis Krupp <louis.krupp@zoho.com>
1276
1277 PR fortran/69955
1278 * trans-array.c (gfc_conv_expr_descriptor): Don't allocate
1279 components if it's not necessary.
1280
1281 2016-10-05 Louis Krupp <louis.krupp@zoho.com>
1282
1283 PR fortran/57910
1284 * trans-expr.c (gfc_add_interface_mapping): Don't try to
1285 dereference call-by-value scalar argument.
1286
1287 2016-10-05 Steven G. Kargl <kargls@gcc.gnu.org>
1288
1289 PR fortran/58991
1290 PR fortran/58992
1291 * resolve.c (resolve_assoc_var): Fix CHARACTER type-spec for a
1292 selector in ASSOCIATE.
1293 (resolve_fl_variable): Skip checks for an ASSOCIATE variable.
1294
1295 2016-10-05 Fritz Reese <fritzoreese@gmail.com>
1296
1297 * interface.c (gfc_compare_types): Don't compare BT_UNION components
1298 until we know they're both UNIONs.
1299 * interface.c (gfc_compare_union_types): Guard against empty
1300 components.
1301
1302 2016-10-05 Louis Krupp <louis.krupp@zoho.com>
1303
1304 PR fortran/67524
1305 * resolve.c (resolve_symbol): Don't apply default type rules to
1306 mixed-entry master created for function entry points.
1307
1308 2016-09-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1309
1310 PR fortran/66643
1311 * io.c (match_dt_unit): Peek check for missing format.
1312
1313 2016-09-30 Fritz Reese <fritzoreese@gmail.com>
1314
1315 PR fortran/77764
1316 * interface.c (gfc_compare_union_types): Null-guard map components.
1317
1318 2016-09-30 Fritz Reese <fritzoreese@gmail.com>
1319
1320 PR fortran/77782
1321 * interface.c (gfc_compare_derived_types): Use gfc_compare_union_types
1322 to compare union types.
1323
1324 2016-09-30 Andre Vehreschild <vehre@gcc.gnu.org>
1325
1326 * trans-array.c (gfc_array_allocate): Use the token from coarray's
1327 .token member.
1328 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Only generate
1329 caf-reference chains from the first coarray references on.
1330 * trans-types.c (gfc_get_derived_type): Switch on mandatory .token
1331 member generation for allocatable arrays in coarrays in derived types.
1332
1333 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
1334
1335 * options.c (gfc_post_options): Remove special case for
1336 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard.
1337
1338 2016-09-27 Jakub Jelinek <jakub@redhat.com>
1339
1340 * dependency.c (gfc_dep_compare_expr): Remove break after return.
1341 * frontend-passes.c (optimize_op): Likewise.
1342 * interface.c (gfc_current_interface_head): Likewise.
1343 * symbol.c (check_conflict): Likewise.
1344 * trans-intrinsic.c (build_fix_expr): Likewise.
1345
1346 PR fortran/77666
1347 * trans-openmp.c (gfc_omp_private_outer_ref): Return true even for
1348 references to allocatable arrays.
1349
1350 2016-09-26 Steven G. Kargl <kargl@gcc.gnu.org>
1351
1352 PR fortran/77420
1353 * trans-common.c: Handle array elements in equivalence when
1354 the lower and upper bounds of array spec are NULL.
1355
1356 2016-09-26 Paul Thomas <pault@gcc.gnu.org>
1357
1358 PR fortran/48298
1359 * interface.c (gfc_find_specific_dtio_proc) : Return NULL if
1360 the derived type is broken, as indicated by a flavor other than
1361 FL_DERIVED.
1362
1363 2016-09-26 Marek Polacek <polacek@redhat.com>
1364
1365 PR c/7652
1366 * arith.c (eval_intrinsic): Add gcc_fallthrough.
1367 * frontend-passes.c (optimize_op): Likewise.
1368 (gfc_expr_walker): Likewise.
1369 * parse.c (next_fixed): Likewise.
1370 * primary.c (match_variable): Likewise.
1371 * trans-array.c: Likewise.
1372 * trans-expr.c (flatten_array_ctors_without_strlen): Likewise.
1373 * trans-io.c (transfer_expr): Likewise.
1374
1375 2016-09-25 Steven G. Kargl <kargl@gcc.gnu.org>
1376
1377 PR fortran/77429
1378 * dependency.c (gfc_check_dependency): Convert gcc_assert() to
1379 a conditional and possible call to gfc_internal_error().
1380
1381 2016-09-25 Steven G. Kargl <kargl@gcc.gnu.org>
1382
1383 PR fortran/77694
1384 * frontend-passes.c (optimize_binop_array_assignment): Check pointer
1385 for NULL.
1386
1387 2016-09-23 Fritz Reese <fritzoreese@gmail.com>
1388
1389 * lang.opt, invoke.texi, gfortran.texi: New flag -fdec-static.
1390 * options.c (set_dec_flags): Set -fdec-static with -fdec.
1391 * gfortran.h (symbol_attribute): New attribute automatic.
1392 * gfortran.h (gfc_add_automatic): New prototype.
1393 * match.h (gfc_match_automatic, gfc_match_static): New functions.
1394 * decl.c (gfc_match_automatic, gfc_match_static): Ditto.
1395 * symbol.c (gfc_add_automatic): Ditto.
1396 * decl.c (match_attr_spec): Match AUTOMATIC and STATIC decls.
1397 * parse.c (decode_specification_statement, decode_statement): Ditto.
1398 * resolve.c (apply_default_init_local, resolve_fl_variable_derived,
1399 resolve_symbol): Support for automatic attribute.
1400 * symbol.c (check_conflict, gfc_copy_attr, gfc_is_var_automatic):
1401 Ditto.
1402 * trans-decl.c (gfc_finish_var_decl): Ditto.
1403
1404 2016-09-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1405
1406 PR fortran/48298
1407 * gfortran.h (gfc_dt): Add *udtio.
1408 * ioparm.def: Add bit IOPARM_dt_f2003 to align with library use of bit
1409 25. Add IOPARM_dt_dtio bit to common flags.
1410 * resolve.c (resolve_transfer): Set dt->udtio to expression.
1411 * io.c (gfc_match_inquire): Adjust error message for internal
1412 unit KIND.
1413 * libgfortran.h: Adjust defines for GFC_INTERNAL_UNIT4,
1414 GFC_INTERNAL_UNIT, and GFC_INVALID_UNIT.
1415 * trans-io.c (build_dt): Set common_unit to reflect the KIND of
1416 the internal unit. Set mask bit for presence of dt->udtio.
1417
1418 2016-09-22 Andre Vehreschild <vehre@gcc.gnu.org>
1419
1420 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Use the old caf-
1421 interface where possible.
1422
1423 2016-09-22 Paul Thomas <pault@gcc.gnu.org>
1424
1425 * interface.c (check_dtio_interface1): Introduce errors for
1426 alternate returns and incorrect numbers of arguments.
1427 (gfc_find_specific_dtio_proc): Return cleanly if the derived
1428 type either doesn't exist or has no namespace.
1429
1430 2016-09-21 Louis Krupp <louis.krupp@zoho.com>
1431
1432 PR fortran/66107
1433 * decl.c (add_init_expr_to_sym): Catch variable character length
1434 in parameter array.
1435
1436 2016-09-21 Paul Thomas <pault@gcc.gnu.org>
1437
1438 PR fortran/77657
1439
1440 * interface.c (gfc_find_specific_dtio_proc): Borrow trick from
1441 resolve_typebound_generic_call to find dtio procedures that
1442 over-ride those in the declared type.
1443
1444 2016-09-20 Marek Polacek <polacek@redhat.com>
1445
1446 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Adjust fall through
1447 comment.
1448
1449 2016-09-19 Andre Vehreschild <vehre@gcc.gnu.org>
1450
1451 PR fortran/71952
1452 * expr.c (gfc_check_assign): Added flag to control whether datatype
1453 conversion is allowed.
1454 * gfortran.h: Added caf-token-tree to gfc_component. Changed
1455 prototypes mostly to add whether datatype conversion is allowed.
1456 * gfortran.texi: Added documentation for the caf_reference_t and the
1457 caf_*_by_ref function.
1458 * primary.c (caf_variable_attr): Similar to gfc_variable_attr but
1459 focused on the needs of coarrays.
1460 (gfc_caf_attr): Same.
1461 * resolve.c (resolve_ordinary_assign): Set the conversion allowed
1462 flag when not in a coarray.
1463 * trans-array.c (gfc_array_init_size): Moved setting of array
1464 descriptor's datatype before the alloc, because caf_register needs it.
1465 (gfc_array_allocate): Changed notion of whether an array is a coarray.
1466 (gfc_array_deallocate): Same.
1467 (gfc_alloc_allocatable_for_assignment): Added setting of coarray's
1468 array descriptor datatype before the register. And using deregister/
1469 register to mimmick a realloc for coarrays.
1470 * trans-decl.c (gfc_build_builtin_function_decls): Corrected signatures
1471 of old caf-functions and added signature definitions of the _by_ref
1472 ones.
1473 (generate_coarray_sym_init): Adapted to new caf_register signature.
1474 * trans-expr.c (gfc_conv_scalar_to_descriptor): Make sure a constant
1475 is translated to an lvalue expression before use in an array
1476 descriptor.
1477 (gfc_get_ultimate_alloc_ptr_comps_caf_token): New function. Get the
1478 last allocatable component's coarray token.
1479 (gfc_get_tree_for_caf_expr): For top-level object get the coarray
1480 token and check for unsupported features.
1481 (gfc_get_caf_token_offset): Getting the offset might procude new
1482 statements, which now are stored in the pre and post of the current se.
1483 (gfc_caf_get_image_index): For this image return a call to
1484 caf_this_image.
1485 (expr_may_alias_variables): Check that the result is set for testing
1486 its properties.
1487 (alloc_scalar_allocatable_for_assignment): Added auto allocation of
1488 coarray components.
1489 (gfc_trans_assignment_1): Rewrite an assign to a coarray object to
1490 be a sendget.
1491 * trans-intrinsic.c (conv_caf_vector_subscript_elem): Corrected
1492 wrong comment.
1493 (compute_component_offset): Compute the correct offset a structure
1494 member.
1495 (conv_expr_ref_to_caf_ref): Convert to a chain of refs into
1496 caf_references.
1497 (gfc_conv_intrinsic_caf_get): Call caf_get_by_ref instead of caf_get.
1498 (conv_caf_send): Call caf_*_by_ref for coarrays that need
1499 reallocation.
1500 (gfc_conv_intrinsic_function): Adapted to new signuature of the caf
1501 drivers.
1502 (conv_intrinsic_atomic_op): Add pre and post statements correctly.
1503 (conv_intrinsic_atomic_ref): Same.
1504 (conv_intrinsic_atomic_cas): Same.
1505 (conv_intrinsic_event_query): Same.
1506 * trans-stmt.c (gfc_trans_lock_unlock): Same.
1507 (gfc_trans_event_post_wait): Same.
1508 (gfc_trans_allocate): Support allocation of allocatable coarrays.
1509 (gfc_trans_deallocate): And there deallocation.
1510 * trans-types.c (gfc_typenode_for_spec): Added flag to control whether
1511 a component is part of coarray. When so, then add space to store a
1512 coarray token.
1513 (gfc_build_array_type): Same.
1514 (gfc_get_array_descriptor_base): Same.
1515 (gfc_get_array_type_bounds): Same.
1516 (gfc_sym_type): Same.
1517 (gfc_get_derived_type): Same.
1518 (gfc_get_caf_reference_type): Declare the caf_reference_type.
1519 * trans-types.h: Prototype changes only.
1520 * trans.c (gfc_allocate_using_lib): Use the updated caf_register
1521 signature.
1522 (gfc_allocate_allocatable): Same.
1523 (gfc_deallocate_with_status): Same.
1524 * trans.h: Defined the runtime types for caf_reference_t and the enums.
1525
1526 2016-09-19 Fritz Reese <fritzoreese@gmail.com>
1527
1528 PR fortran/77584
1529 * decl.c (match_record_decl, gfc_match_decl_type_spec): Fixes to
1530 handling of structure/record from declaration-type-spec.
1531
1532 2016_09_17 Louis Krupp <louis.krupp@zoho.com>
1533
1534 PR fortran/68078
1535 * resolve.c (resolve_allocate_expr): Check that derived type
1536 pointer, object or array has been successfully allocated before
1537 initializing.
1538
1539 2016-09-16 Steven G. Kargl <kargl@gcc.gnu.org>
1540
1541 PR fortran/77612
1542 * decl.c (char_len_param_value): Check parent namespace for
1543 seen_implicit_none.
1544
1545 2016-09-15 Louis Krupp <louis.krupp@zoho.com>
1546
1547 PR fortran/69963
1548 * parse.c (reject_statement): Clear charlen pointers in implicit
1549 character typespecs before those charlen structures are freed.
1550
1551 2016-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1552
1553 * simplify.c (gfc_simplify_repeat): Fix a misplaced closing ')'.
1554
1555 2016-09-13 Steven G. Kargl <kargl@gcc.gnu.org>
1556
1557 PR fortran/77420
1558 * module.c (load_equiv): Revert revision 240063.
1559
1560 2016-09-10 Paul Thomas <pault@gcc.gnu.org>
1561 Steven G. Kargl <kargl@gcc.gnu.org>
1562
1563 PR fortran/77532
1564 * interface.c (check_dtio_arg_TKR_intent): Return after error.
1565 (check_dtio_interface1): Remove asserts, test for NULL and return
1566 if found.
1567
1568 2016-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
1569
1570 PR fortran/77420
1571 * module.c (load_equiv): If the current namespace has a list of
1572 equivalence statements, initialize duplicate to false and then
1573 look for duplicates; otherwise, initialize it to true.
1574
1575 2016-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
1576
1577 PR fortran/77506
1578 * array.c (gfc_match_array_constructor): CHARACTER(len=*) cannot
1579 appear in an array constructor.
1580
1581 2016-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
1582
1583 PR fortran/77507
1584 * intrinsic.c (add_functions): Use correct keyword.
1585
1586 2016-09-08 Steven G. Kargl <kargl@gcc.gnu.org>
1587
1588 PR fortran/69514
1589 * array.c (gfc_match_array_constructor): If type-spec is present,
1590 walk the array constructor performing possible conversions for
1591 numeric types.
1592
1593 2016-09-08 Jakub Jelinek <jakub@redhat.com>
1594
1595 PR fortran/77500
1596 * trans-openmp.c (gfc_trans_omp_atomic): For atomic write or
1597 swap, don't try to look through GFC_ISYM_CONVERSION. In other cases,
1598 check that value.function.isym is non-NULL before dereferencing it.
1599
1600 2016-09-04 Steven G. Kargl <kargl@gcc.gnu.org>
1601
1602 PR fortran/77391
1603 * resolve.c (deferred_requirements): New function to check F2008:C402.
1604 (resolve_fl_variable,resolve_fl_parameter): Use it.
1605
1606 2016-09-04 Steven G. Kargl <kargl@gcc.gnu.org>
1607
1608 PR fortran/77460
1609 * simplify.c (simplify_transformation_to_scalar): On error, result
1610 may be NULL, simply return.
1611
1612 2016-08-31 Jakub Jelinek <jakub@redhat.com>
1613
1614 PR fortran/77352
1615 * trans-openmp.c (gfc_trans_omp_parallel_workshare): Always add a
1616 BIND_EXPR with BLOCK around what gfc_trans_omp_workshare returns.
1617
1618 PR fortran/77374
1619 * parse.c (parse_omp_oacc_atomic): Copy over cp->ext.omp_atomic
1620 to cp->block->ext.omp_atomic.
1621 * resolve.c (gfc_resolve_blocks): Assert block with one or two
1622 EXEC_ASSIGNs for EXEC_*_ATOMIC.
1623 * openmp.c (resolve_omp_atomic): Don't assert one or two
1624 EXEC_ASSIGNs, instead return quietly for EXEC_NOPs and otherwise
1625 error unexpected statements.
1626
1627 2016-08-31 Paul Thomas <pault@gcc.gnu.org>
1628 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1629
1630 PR fortran/48298
1631 * decl.c (access_attr_decl): Include case INTERFACE_DTIO as
1632 appropriate.
1633 * gfortran.h : Add INTRINSIC_FORMATTED and
1634 INTRINSIC_UNFORMATTED to gfc_intrinsic_op. Add INTERFACE_DTIO
1635 to interface type. Add new enum 'dtio_codes'. Add bitfield
1636 'has_dtio_procs' to symbol_attr. Add prototypes
1637 'gfc_check_dtio_interfaces' and 'gfc_find_specific_dtio_proc'.
1638 * interface.c (dtio_op): New function.
1639 (gfc_match_generic_spec): Match generic DTIO interfaces.
1640 (gfc_match_interface): Treat DTIO interfaces in the same way as
1641 (gfc_current_interface_head): Add INTERFACE_DTIO appropriately.
1642 (check_dtio_arg_TKR_intent): New function.
1643 (check_dtio_interface1): New function.
1644 (gfc_check_dtio_interfaces): New function.
1645 (gfc_find_specific_dtio_proc): New function.
1646 * io.c : Add FMT_DT to format_token.
1647 (format_lex): Handle DTIO formatting.
1648 * match.c (gfc_op2string): Add DTIO operators.
1649 * resolve.c (derived_inaccessible): Ignore pointer components
1650 to enclosing derived type.
1651 (resolve_transfer): Resolve transfers that involve DTIO.
1652 procedures. Find the specific subroutine for the transfer and
1653 use its existence to over-ride some of the constraints on
1654 derived types. If the transfer is recursive, require that the
1655 subroutine be so qualified.
1656 (dtio_procs_present): New function.
1657 (resolve_fl_namelist): Remove inhibition of polymorphic objects
1658 in namelists if DTIO read and write subroutines exist. Likewise
1659 for derived types.
1660 (resolve_types): Invoke 'gfc_verify_dtio_procedures'.
1661 * symbol.c : Set 'dtio_procs' using 'minit'.
1662 * trans-decl.c (gfc_finish_var_decl): If a derived-type/class
1663 object is associated with DTIO procedures, make it TREE_STATIC.
1664 * trans-expr.c (gfc_get_vptr_from_expr): If the expression
1665 drills down to a PARM_DECL, extract the vptr correctly.
1666 (gfc_conv_derived_to_class): Check 'info' in the test for
1667 'useflags'. If the se expression exists and is a pointer, use
1668 it as the class _data.
1669 * trans-io.c : Add IOCALL_X_DERIVED to iocall and the function
1670 prototype. Likewise for IOCALL_SET_NML_DTIO_VAL.
1671 (set_parameter_tree): Renamed from 'set_parameter_const', now
1672 returns void and has new tree argument. Calls modified to match
1673 new interface.
1674 (transfer_namelist_element): Transfer DTIO procedure pointer
1675 and vpointer using the new function IOCALL_SET_NML_DTIO_VAL.
1676 (get_dtio_proc): New function.
1677 (transfer_expr): Add new argument for the vptr field of class
1678 objects. Add the code to call the specific DTIO proc, convert
1679 derived types to class and call IOCALL_X_DERIVED.
1680 (trans_transfer): Add BT_CLASS to structures for treatment by
1681 the scalarizer. Obtain the vptr for the dynamic type, both for
1682 scalar and array transfer.
1683
1684 2016-08-30 Fritz Reese <fritzoreese@gmail.com>
1685
1686 * gfortran.texi: Fix typo in STRUCTURE documentation.
1687
1688 2016-08-29 Fritz Reese <fritzoreese@gmail.com>
1689
1690 Fix, reorganize, and clarify comparisons of anonymous types/components.
1691
1692 PR fortran/77327
1693 * interface.c (is_anonymous_component, is_anonymous_dt): New functions.
1694 * interface.c (compare_components, gfc_compare_derived_types): Use new
1695 functions.
1696
1697 2016-08-27 Steven G. Kargl <kargl@gcc.gnu.org>
1698
1699 PR fortran/77380
1700 * dependency.c (gfc_check_dependency): Do not assert with
1701 -fcoarray=lib.
1702
1703 2016-08-27 Steven G. Kargl <kargl@gcc.gnu.org>
1704
1705 PR fortran/77372
1706 simplify.c (simplify_ieee_selected_real_kind): Check for NULL pointers.
1707
1708 2016-08-25 Steven g. Kargl <kargl@gcc.gnu.org>
1709
1710 PR fortran/77351
1711 * frontend-passes.c (remove_trim,combine_array_constructor): Check for
1712 NULL pointer.
1713
1714 2016-08-24 Paul Thomas <pault@gcc.gnu.org>
1715
1716 PR fortran/77358
1717 * resolve.c (resolve_fl_procedure): Use the correct gfc_charlen
1718 for deferred character length module procedures.
1719
1720 2016-08-23 Fritz Reese <fritzoreese@gmail.com>
1721
1722 * decl.c (gfc_match_structure_decl): Make gfc_structure_id static.
1723
1724 2016-08-23 Fritz Reese <fritzoreese@gmail.com>
1725
1726 * interface.c (compare_components): Fix typo in name check conditional.
1727
1728 2016-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
1729 Bud Davis <jmdavis@link.com>
1730
1731 PR fortran/60774
1732 * parse.c (next_free,next_fixed): Issue error for statement label
1733 without a statement.
1734
1735 2016-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
1736
1737 PR fortran/61318
1738 * interface.c (compare_parameter): Use better locus for error message.
1739
1740 2016-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
1741
1742 PR fortran/77260
1743 * gcc/fortran/trans-decl.c (generate_local_decl): Suppress warning
1744 for unused variable if symbol is entry point.
1745
1746 2016-08-19 Joseph Myers <joseph@codesourcery.com>
1747
1748 PR c/32187
1749 * trans-types.h (float128_type_node): Rename to
1750 gfc_float128_type_node.
1751 (complex_float128_type_node): Rename to
1752 gfc_complex_float128_type_node.
1753 * iso-c-binding.def, trans-intrinsic.c, trans-types.c: All users
1754 changed.
1755
1756 2016-08-19 Jakub Jelinek <jakub@redhat.com>
1757
1758 PR fortran/71014
1759 * resolve.c (gfc_resolve): For ns->construct_entities don't save, clear
1760 and restore omp state around the resolving.
1761
1762 PR fortran/69281
1763 * trans-openmp.c (gfc_trans_omp_parallel, gfc_trans_omp_task,
1764 gfc_trans_omp_target): Wrap gfc_trans_omp_code result in an extra
1765 BIND_EXPR with its own forced BLOCK.
1766
1767 2016-08-19 Janne Blomqvist <jb@gcc.gnu.org>
1768
1769 * intrinsics.texi (RANDOM_NUMBER): Remove reference to
1770 init_random_seed in example.
1771 (RANDOM_SEED): Remove warning to not set all seed values to 0.
1772
1773 2016-08-18 David Malcolm <dmalcolm@redhat.com>
1774
1775 * error.c (gfc_diagnostic_starter): Update for change to
1776 diagnostic_show_locus.
1777
1778 2016-08-17 Jakub Jelinek <jakub@redhat.com>
1779
1780 PR fortran/67496
1781 * trans-array.c (trans_array_constructor): Load
1782 expr->ts.u.cl->length_from_typespec only if expr->ts.type is
1783 BT_CHARACTER.
1784
1785 2016-08-15 Fritz Reese <fritzoreese@gmail.com>
1786
1787 * lang.opt, invoke.texi: New flag -finit-derived.
1788 * gfortran.h (gfc_build_default_init_expr, gfc_apply_init,
1789 gfc_generate_initializer): New prototypes.
1790 * expr.c (gfc_build_default_init_expr, gfc_apply_init,
1791 component_initializer, gfc_generate_initializer): New functions.
1792 * expr.c (gfc_default_initializer): Wrap gfc_generate_initializer.
1793 * decl.c (build_struct): Move common code to gfc_apply_init.
1794 * resolve.c (can_generate_init): New function.
1795 * resolve.c (build_default_init_expr): Wrap gfc_build_default_init_expr.
1796 * resolve.c (apply_default_init, resolve_fl_variable_derived): Use
1797 gfc_generate_initializer.
1798 * trans-decl.c (gfc_generate_function_code): Use
1799 gfc_generate_initializer.
1800
1801 2016-08-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1802
1803 * frontend-passes.c (create_var): Set ts.deferred for
1804 deferred-length character variables.
1805 * dump-parse-tree.c (show_typespec): Also dump
1806 is_c_interop, is_iso_c and deferred flags.
1807
1808 2016-08-15 Jakub Jelinek <jakub@redhat.com>
1809
1810 PR debug/71906
1811 * trans-decl.c (gfc_get_symbol_decl): Call gfc_finish_var_decl
1812 for decl's character length before gfc_finish_var_decl on the
1813 decl itself.
1814
1815 2016-08-14 Chung-Lin Tang <cltang@codesourcery.com>
1816
1817 PR fortran/70598
1818 * openmp.c (resolve_omp_clauses): Adjust use_device clause
1819 handling to only allow pointers and arrays.
1820
1821 2016-08-12 Marek Polacek <polacek@redhat.com>
1822
1823 PR c/7652
1824 * decl.c (match_attr_spec): Add FALLTHRU.
1825 * primary.c (match_arg_list_function): Likewise.
1826 * resolve.c (resolve_operator): Adjust fall through comment.
1827 (fixup_charlen): Add FALLTHRU.
1828 (resolve_allocate_expr): Adjust fall through comment.
1829 * trans-array.c (gfc_conv_ss_startstride): Add FALLTHRU.
1830 * trans-intrinsic.c (gfc_conv_intrinsic_len): Adjust fall through
1831 comment.
1832
1833 2016-08-11 Janne Blomqvist <jb@gcc.gnu.org>
1834
1835 * check.c (gfc_check_random_seed): Use new seed size in check.
1836 * intrinsic.texi (RANDOM_NUMBER): Updated documentation.
1837 (RANDOM_SEED): Likewise.
1838
1839 2016-08-08 Jakub Jelinek <jakub@redhat.com>
1840
1841 PR fortran/72716
1842 * openmp.c (gfc_match_omp_declare_simd): Don't stick anything into
1843 BLOCK DATA ns, it will be rejected later.
1844
1845 2016-08-08 Andre Vehreschild <vehre@gcc.gnu.org>
1846
1847 PR fortran/71936
1848 * trans-array.c (gfc_array_allocate): When SOURCE= is a function
1849 stick with the ref of the object to allocate.
1850
1851 2016-08-08 Andre Vehreschild <vehre@gcc.gnu.org>
1852
1853 PR fortran/72698
1854 * trans-stmt.c (gfc_trans_allocate): Prevent generating code for
1855 copy of zero sized string and with it an ICE.
1856
1857 2016-08-08 Andre Vehreschild <vehre@gcc.gnu.org>
1858
1859 PR fortran/70524
1860 * trans-array.c (gfc_trans_dummy_array_bias): Ensure that the
1861 location information is correctly set.
1862 * trans-decl.c (gfc_trans_deferred_vars): Set the locus of the
1863 current construct early.
1864
1865 2016-08-03 Fritz Reese <fritzoreese@gmail.com>
1866
1867 * lang.opt: New option -fdec-intrinsic-ints.
1868 * options.c (set_dec_flags): Enable with -fdec.
1869 * gfortran.texi, invoke.texi, intrinsics.texi: Update documentation.
1870 * intrinsic.c (add_function, add_subroutine): New B/I/J/K intrinsic
1871 variants.
1872
1873 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1874
1875 PR fortran/41922
1876 * target-memory.c (expr_to_char): Pass in locus and use it in error
1877 messages.
1878 (gfc_merge_initializers): Ditto.
1879 * target-memory.h: Update prototype for gfc_merge_initializers ().
1880 * trans-common.c (get_init_field): Use the correct locus.
1881
1882 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1883
1884 PR fortran/68566
1885 * check.c (gfc_check_reshape): Check for constant expression.
1886
1887 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1888
1889 PR fortran/69867
1890 * decl.c (build_struct): Ensure that pointers point to something.
1891
1892 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1893
1894 PR fortran/69962
1895 * decl.c (gfc_set_constant_character_len): if expr is not
1896 constant issue an error instead of an ICE.
1897
1898 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1899
1900 PR fortran/70006
1901 * io.c (gfc_resolve_dt): Use correct locus.
1902 * resolve.c (resolve_branch): Ditto.
1903
1904 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1905
1906 PR fortran/71730
1907 * decl.c (char_len_param_value): Check return value of
1908 gfc_reduce_init_expr().
1909
1910 2016-07-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
1911
1912 * trans-array.c (gfc_conv_array_ref): Fix allocation of diagnostic
1913 message (was too small).
1914
1915 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
1916
1917 PR fortran/71067
1918 * decl.c (match_data_constant): On error, set 'result' to NULL.
1919
1920 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
1921
1922 PR fortran/71799
1923 * resolve.c(gfc_resolve_iterator): Failure of type conversion need
1924 not ICE.
1925
1926 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
1927
1928 PR fortran/71859
1929 * check.c(numeric_check): Prevent ICE. Issue error for invalid
1930 subroutine as an actual argument when numeric argument is expected.
1931
1932 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
1933 Thomas Koenig <tkoenig@gcc.gnu.org>
1934
1935 PR fortran/71883
1936 * frontend-passes.c (gfc_run_passes): Bail out if there are any
1937 errors.
1938 * error.c (gfc_internal_error): If there are any errors in the
1939 buffer, exit with EXIT_FAILURE.
1940
1941 2016-07-28 Renlin Li <renlin.li@arm.com>
1942
1943 Revert
1944 2016-07-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1945
1946 PR fortran/71902
1947 * dependency.c (gfc_check_dependency): Use dep_ref. Handle case
1948 if identical is true and two array element references differ.
1949 (gfc_dep_resovler): Move most of the code to dep_ref.
1950 (dep_ref): New function.
1951 * frontend-passes.c (realloc_string_callback): Name temporary
1952 variable "realloc_string".
1953
1954 2016-07-26 Steven G. Kargl <kargl@gcc.gnu.org>
1955
1956 PR fortran/71862
1957 * class.c: Remove assert. Iterate over component only if non-null.
1958
1959 2016-07-22 Steven G. Kargl <kargl@gcc.gnu.org>
1960
1961 PR fortran/71935
1962 * check.c (is_c_interoperable): Simplify right expression.
1963
1964 2016-07-22 Thomas Koenig <tkoenig@gcc.gnu.org>
1965
1966 PR fortran/71795
1967 * frontend-passes.c (combine_array_constructor): Don't
1968 do anything if the expression is inside an array iterator.
1969
1970 2016-07-22 Andre Vehreschild <vehre@gcc.gnu.org>
1971
1972 * expr.c (gfc_find_stat_co): Fixed whitespaces.
1973 * gfortran.texi: Fixed typos and reversed meaning of caf_get()'s
1974 src and dst description.
1975 * trans-decl.c (gfc_build_builtin_function_decls): Fixed style
1976 and corrected fnspec for caf functions.
1977 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Fixed style.
1978 (conv_caf_send): Dito.
1979
1980 2016-07-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1981
1982 PR fortran/71902
1983 * dependency.c (gfc_check_dependency): Use dep_ref. Handle case
1984 if identical is true and two array element references differ.
1985 (gfc_dep_resovler): Move most of the code to dep_ref.
1986 (dep_ref): New function.
1987 * frontend-passes.c (realloc_string_callback): Name temporary
1988 variable "realloc_string".
1989
1990 2016-07-17 Fritz Reese <fritzoreese@gmail.com>
1991
1992 PR fortran/71523
1993 * trans-decl.c (gfc_finish_var_decl): Replace automatic initializer with
1994 a static one.
1995
1996 2016-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1997 Marco Restelli <mrestelli@gmail.com>
1998
1999 PR fortran/62125
2000 * symbol.c (select_type_insert_tmp): Recursively call self to take care
2001 of nested select type.
2002
2003 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2004
2005 * openmp.c (gfc_match_omp_clauses): Scan for clause vector_length
2006 before vector.
2007
2008 2016-07-15 Andre Vehreschild <vehre@gcc.gnu.org>
2009
2010 PR fortran/71807
2011 * trans-expr.c (gfc_trans_subcomponent_assign): Special casing
2012 when allocatable component is set to null() in initializer.
2013
2014 2016-07-14 Steven G. Kargl <kargl@gcc.gnu.org>
2015
2016 PR fortran/29819
2017 * parse.c (parse_contained): Use proper locus.
2018
2019 2016-07-14 Andre Vehreschild <vehre@gcc.gnu.org>
2020
2021 PR fortran/70842
2022 * simplify.c (gfc_simplify_len): Only for unlimited polymorphic
2023 types replace the expression's _data ref with a _len ref.
2024
2025 2016-07-09 Thomas Koenig <tkoenig@gcc.gnu.org>
2026
2027 PR fortran/71783
2028 * frontend-passes.c (create_var): Always allocate a charlen
2029 for character variables.
2030
2031 2016-07-08 Steven G. Kargl <kargl@gcc.gnu.org>
2032
2033 PR fortran/68426
2034 * simplify (gfc_simplify_spread): Adjust locus.
2035
2036 2016-07-08 Cesar Philippidis <cesar@codesourcery.com>
2037
2038 * parse.c (matcha): Define.
2039 (decode_oacc_directive): Add spec_only local var and set it. Use
2040 matcha to parse acc directives except for routine and declare. Return
2041 ST_GET_FCN_CHARACTERISTICS if a non-declarative directive could be
2042 matched.
2043
2044 2016-07-08 Martin Liska <mliska@suse.cz>
2045
2046 * invoke.texi (Wundefined-do-loop): Enhance documentation.
2047
2048 2016-07-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2049
2050 PR fortran/71764
2051 * trans-expr.c (gfc_trans_structure_assign): Remove assert.
2052
2053 2016-07-07 Martin Liska <mliska@suse.cz>
2054
2055 * lang.opt (Wundefined-do-loop): New option.
2056 * resolve.c (gfc_resolve_iterator): Warn for Wundefined-do-loop.
2057 (gfc_trans_simple_do): Generate a c-style loop.
2058 (gfc_trans_do): Fix GNU coding style.
2059 * invoke.texi: Mention the new warning.
2060
2061 2016-07-07 Martin Liska <mliska@suse.cz>
2062
2063 * trans-stmt.c (gfc_trans_do): Add expect builtin for DO
2064 loops with step bigger than +-1.
2065
2066 2016-07-05 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
2067
2068 * array.c (gfc_match_array_ref): Add parsing support for
2069 STAT= attribute in CAF reference.
2070 * expr.c (gfc_find_stat_co): New function that returns
2071 the STAT= assignment.
2072 * gfortran.h (gfc_array_ref): New member.
2073 * trans-decl.c (gfc_build_builtin_function_decls):
2074 new attribute for caf_get and caf_send functions.
2075 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Passing
2076 the stat attribute to external function.
2077 (gfc_conv_intrinsic_caf_send): Ditto.
2078
2079 2016-07-05 Andre Vehreschild <vehre@gcc.gnu.org>
2080
2081 PR fortran/71623
2082 * trans-stmt.c (gfc_trans_allocate): Add code of pre block of typespec
2083 in allocate to parent block.
2084
2085 2016-07-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2086
2087 PR fortran/66575
2088 * decl.c (match_procedure_interface): Exit loop if procedure
2089 interface refers to itself.
2090
2091 2016-07-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2092 Steven G. Kargl <kargl@gcc.gnu.org>
2093
2094 PR fortran/35849
2095 * simplify.c (gfc_simplify_ishftc): Check that absolute value of
2096 SHIFT is less than or equal to SIZE.
2097
2098 2016-07-01 Jakub Jelinek <jakub@redhat.com>
2099
2100 PR fortran/71687
2101 * f95-lang.c (struct binding_level): Add reversed field.
2102 (clear_binding_level): Adjust initializer.
2103 (getdecls): If reversed is clear, set it and nreverse the names
2104 chain before returning it.
2105 (poplevel): Use getdecls.
2106 * trans-decl.c (gfc_generate_function_code, gfc_process_block_locals):
2107 Use nreverse to pushdecl decls in the declaration order.
2108
2109 PR fortran/71717
2110 * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
2111 for GFC_DECL_ASSOCIATE_VAR_P with POINTER_TYPE.
2112
2113 2016-06-30 Jakub Jelinek <jakub@redhat.com>
2114
2115 PR fortran/71704
2116 * parse.c (matchs, matcho): Move right before decode_omp_directive.
2117 If spec_only, only gfc_match the keyword and if successful, goto
2118 do_spec_only.
2119 (matchds, matchdo): Define.
2120 (decode_omp_directive): Add spec_only local var and set it.
2121 Use matchds or matchdo macros instead of matchs or matcho
2122 for declare target, declare simd, declare reduction and threadprivate
2123 directives. Return ST_GET_FCN_CHARACTERISTICS if a non-declarative
2124 directive could be matched.
2125 (next_statement): For ST_GET_FCN_CHARACTERISTICS restore
2126 gfc_current_locus from old_locus even if there is no label.
2127
2128 PR fortran/71705
2129 * trans-openmp.c (gfc_trans_omp_clauses): Set TREE_ADDRESSABLE on
2130 decls in to/from clauses.
2131
2132 2016-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2133
2134 PR fortran/71686
2135 * scanner.c (gfc_next_char_literal): Only decrement nextc if it
2136 is not NULL.
2137
2138 2016-06-29 Cesar Philippidis <cesar@codesourcery.com>
2139
2140 * openmp.c (match_oacc_clause_gang): Rename to ...
2141 (match_oacc_clause_gwv): this. Add support for OpenACC worker and
2142 vector clauses.
2143 (gfc_match_omp_clauses): Use match_oacc_clause_gwv for
2144 OMP_CLAUSE_{GANG,WORKER,VECTOR}. Propagate any MATCH_ERRORs for
2145 invalid OMP_CLAUSE_{ASYNC,WAIT,GANG,WORKER,VECTOR} clauses.
2146 (gfc_match_oacc_wait): Propagate MATCH_ERROR for invalid
2147 oacc_expr_lists. Adjust the first and needs_space arguments to
2148 gfc_match_omp_clauses.
2149
2150 2016-06-29 Richard Biener <rguenther@suse.de>
2151
2152 PR middle-end/71002
2153 * f95-lang.c (LANG_HOOKS_GET_ALIAS_SET): Remove (un-)define.
2154 (gfc_get_alias_set): Remove.
2155
2156 2016-06-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2157
2158 PR fortran/71649
2159 * module.c (create_intrinsic_function): Check for NULL values and
2160 return after giving error.
2161
2162 2016-06-21 Michael Meissner <meissner@linux.vnet.ibm.com>
2163
2164 * trans-types.c (gfc_build_complex_type): Move setting complex
2165 MODE to layout_type, instead of setting it ahead of time by the
2166 caller.
2167
2168 2016-06-21 Tobias Burnus <burnus@net-b.de>
2169
2170 PR fortran/71068
2171 * resolve.c (resolve_function): Don't resolve caf_get/caf_send.
2172 (check_data_variable): Strip-off caf_get before checking.
2173
2174 2016-06-20 Tobias Burnus <burnus@net-b.de>
2175
2176 PR fortran/71194
2177 * trans-expr.c (gfc_trans_pointer_assignment): Correctly handle
2178 RHS pointer functions.
2179
2180 2016-06-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2181
2182 * class.c (gfc_add_class_array_ref): Call gfc_add_data_component()
2183 instead of gfc_add_component_ref().
2184 (gfc_get_len_component): Call gfc_add_len_component() instead of
2185 gfc_add_component_ref().
2186 * trans-intrinsic.c (gfc_conv_intrinsic_loc): Call
2187 gfc_add_data_component() instead of gfc_add_component_ref().
2188 * trans.c (gfc_add_finalizer_call): Call
2189 gfc_add_final_component() and gfc_add_size_component() instead
2190 of gfc_add_component_ref.
2191
2192 2016-06-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2193
2194 * trans-types.c (gfc_typenode_for_spec): Commentary typo fix.
2195
2196 2016-06-17 Cesar Philippidis <cesar@codesourcery.com>
2197
2198 * openmp.c (match_acc): New generic function to parse OpenACC
2199 directives.
2200 (gfc_match_oacc_parallel_loop): Use it.
2201 (gfc_match_oacc_parallel): Likewise.
2202 (gfc_match_oacc_kernels_loop): Likewise.
2203 (gfc_match_oacc_kernels): Likewise.
2204 (gfc_match_oacc_data): Likewise.
2205 (gfc_match_oacc_host_data): Likewise.
2206 (gfc_match_oacc_loop): Likewise.
2207 (gfc_match_oacc_enter_data): Likewise.
2208 (gfc_match_oacc_exit_data): Likewise.
2209
2210 2016-06-16 Martin Liska <mliska@suse.cz>
2211
2212 * trans-stmt.c (gfc_trans_simple_do): Predict the edge.
2213
2214 2016-06-16 Martin Liska <mliska@suse.cz>
2215
2216 * trans-array.c (gfc_array_allocate): Do not generate expect
2217 stmt.
2218 * trans.c (gfc_allocate_using_malloc): Properly set FAIL_ALLOC
2219 predictor for malloc return value.
2220 (gfc_allocate_allocatable): Use REALLOC predictor instead of
2221 FAIL_ALLOC.
2222 (gfc_deallocate_with_status): Likewise.
2223
2224 2016-06-13 Paul Thomas <pault@gcc.gnu.org>
2225
2226 PR fortran/70673
2227 * frontend-passes.c (realloc_string_callback): Add a call to
2228 gfc_dep_compare_expr.
2229
2230 2016-06-11 Dominique d'Humieres <dominiq@lps.ens.fr>
2231
2232 PR fortran/60751
2233 * io.c (gfc_resolve_dt): Replace GFC_STD_GNU with GFC_STD_LEGACY.
2234
2235 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2236
2237 PR c/71381
2238 * openmp.c (gfc_match_oacc_cache): Add comment.
2239
2240 2016-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2241
2242 PR fortran/71404
2243 * io.c (match_io): For READ, commit in pending symbols in the
2244 current statement before trying to match an expression so that
2245 if the match fails and we undo symbols we dont toss good symbols.
2246
2247 2016-06-05 Andre Vehreschild <vehre@gcc.gnu.org>
2248
2249 PR fortran/69659
2250 * trans-array.c (gfc_trans_dummy_array_bias): For class arrays use
2251 the address of the _data component to reference the arrays data
2252 component.
2253
2254 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2255
2256 * trans-openmp.c (gfc_trans_omp_reduction_list): Add mark_addressable
2257 bool parameter, set reduction clause DECLs as addressable when true.
2258 (gfc_trans_omp_clauses): Pass clauses->async to
2259 gfc_trans_omp_reduction_list, add comment describing OpenACC situation.
2260
2261 2016-06-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2262
2263 PR fortran/52393
2264 * io.c (match_io): For READ, try to match a default character
2265 expression. If found, set the dt format expression to this,
2266 otherwise go back and try control list.
2267
2268 2016-06-01 Paul Thomas <pault@gcc.gnu.org>
2269
2270 PR fortran/71156
2271 * decl.c (copy_prefix): Add checks that the module procedure
2272 declaration prefixes are compliant with the interface. Invert
2273 order of existing elemental and pure checks.
2274 * resolve.c (resolve_fl_procedure): Invert order of elemental
2275 and pure errors.
2276
2277 2016-06-01 Jakub Jelinek <jakub@redhat.com>
2278
2279 * parse.c (case_decl): Move ST_OMP_* to ...
2280 (case_omp_decl): ... here, new macro.
2281 (verify_st_order): For case_omp_decl, complain about
2282 p->state >= ORDER_EXEC, but don't change p->state otherwise.
2283
2284 2016-05-26 Jakub Jelinek <jakub@redhat.com>
2285
2286 * openmp.c (resolve_omp_clauses): Warn if chunk_size is known not to
2287 be positive.
2288
2289 2016-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2290
2291 PR fortran/66461
2292 * scanner.c (gfc_next_char_literal): Clear end_flag when adjusting
2293 current locus back to old_locus.
2294
2295 2016-05-20 Jakub Jelinek <jakub@redhat.com>
2296
2297 PR fortran/71204
2298 * frontend-passes.c (realloc_string_callback): Clear inserted_block
2299 and changed_statement before calling create_var.
2300
2301 2016-05-15 Harald Anlauf <anlauf@gmx.de>
2302
2303 PR fortran/69603
2304 * interface.c (compare_parameter): Check for non-NULL pointer.
2305
2306 2016-05-14 Fritz Reese <fritzoreese@gmail.com>
2307
2308 * gfortran.texi: Update example of DEC UNION extension.
2309
2310 2016-05-14 Fritz Reese <fritzoreese@gmail.com>
2311
2312 PR fortran/71047
2313 * expr.c (gfc_default_initializer): Avoid extra component refs in
2314 constructors for derived types and classes.
2315
2316 2016-05-11 Jakub Jelinek <jakub@redhat.com>
2317
2318 PR fortran/70855
2319 * frontend-passes.c (inline_matmul_assign): Disable in !$omp workshare.
2320
2321 2016-05-09 Richard Biener <rguenther@suse.de>
2322
2323 PR fortran/70937
2324 * trans-decl.c: Include gimplify.h for unshare_expr.
2325 (gfc_trans_vla_one_sizepos): Unshare exprs before inserting
2326 them into the IL.
2327
2328 2016-05-07 Fritz Reese <fritzoreese@gmail.com>
2329
2330 PR fortran/56226
2331 * module.c (dt_upper_string): Rename to gfc_dt_upper_string
2332 (dt_lower_string): Likewise.
2333 * gfortran.h: Make new gfc_dt_upper/lower_string global.
2334 * class.c: Use gfc_dt_upper_string.
2335 * decl.c: Likewise.
2336 * symbol.c: Likewise.
2337 * resolve.c (resolve_component): New function.
2338 (resolve_fl_derived0): Move component loop code to resolve_component.
2339 * parse.c (check_component): New function.
2340 (parse_derived): Move loop code to check_component.
2341 * lang.opt, invoke.texi, options.c : New option -fdec-structure.
2342 * libgfortran.h (bt): New basic type BT_UNION.
2343 * gfortran.h (gfc_option): New option -fdec-structure.
2344 (gfc_get_union_type, gfc_compare_union_types): New prototypes.
2345 (gfc_bt_struct, gfc_fl_struct, case_bt_struct, case_fl_struct): New
2346 macros.
2347 (gfc_find_component): Change prototype.
2348 * match.h (gfc_match_member_sep, gfc_match_map, gfc_match_union,
2349 gfc_match_structure_decl): New prototypes.
2350 * parse.h (gfc_comp_struct): New macro.
2351 * symbol.c (gfc_find_component): Search for components in nested unions
2352 * class.c (insert_component_ref, gfc_add_component_ref, add_proc_comp,
2353 copy_vtab_proc_comps): Update calls to gfc_find_component.
2354 * primary.c (gfc_convert_to_structure_constructor): Likewise.
2355 * symbol.c (gfc_add_component): Likewise.
2356 * resolve.c (resolve_typebound_function, resolve_typebound_subroutine,
2357 resolve_typebound_procedure, resolve_component, resolve_fl_derived):
2358 Likewise.
2359 * expr.c (get_union_init, component_init): New functions.
2360 * decl.c (match_clist_expr, match_record_decl, get_struct_decl,
2361 gfc_match_map, gfc_match_union, gfc_match_structure_decl): Likewise.
2362 * interface.c (compare_components, gfc_compare_union_types): Likewise.
2363 * match.c (gfc_match_member_sep): Likewise.
2364 * parse.c (check_component, parse_union, parse_struct_map): Likewise.
2365 * resolve.c (resolve_fl_struct): Likewise.
2366 * symbol.c (find_union_component): Likewise.
2367 * trans-types.c (gfc_get_union_type): Likewise.
2368 * parse.c (parse_derived): Use new functions.
2369 * interface.c (gfc_compare_derived_types, gfc_compare_types): Likewise.
2370 * expr.c (gfc_default_initializer): Likewise.
2371 * gfortran.texi: Support for DEC structures, unions, and maps.
2372 * gfortran.h (gfc_statement, sym_flavor): Likewise.
2373 * check.c (gfc_check_kill_sub): Likewise.
2374 * expr.c (gfc_copy_expr, simplify_const_ref,
2375 gfc_has_default_initializer): Likewise.
2376 * decl.c (build_sym, match_data_constant, add_init_expr_to_sym,
2377 match_pointer_init, build_struct, variable_decl,
2378 gfc_match_decl_type_spec, gfc_mach_data-decl, gfc_match_entry,
2379 gfc_match_end, gfc_match_derived_decl): Likewise.
2380 * interface.c (check_interface0, check_interface1,
2381 gfc_search_interface): Likewise.
2382 * misc.c (gfc_basic_typename, gfc_typename): Likewise.
2383 * module.c (add_true_name, build_tnt, bt_types, mio_typespec,
2384 fix_mio_expr, load_needed, mio_symbol, read_module, write_symbol,
2385 gfc_get_module_backend_decl): Likewise.
2386 * parse.h (gfc_compile_state): Likewise.
2387 * parse.c (decode_specification_statement, decode_statement,
2388 gfc_ascii_statement, verify_st_order, parse_spec): Likewise.
2389 * primary.c (gfc_match_varspec, gfc_match_structure_constructor,
2390 gfc_match_rvalue, match_variable): Likewise.
2391 * resolve.c (find_arglists, resolve_structure_cons,
2392 is_illegal_recursion, resolve_generic_f, get_declared_from_expr,
2393 resolve_typebound_subroutine, resolve_allocate_expr,
2394 nonscalar_typebound_assign, generate_component_assignments,
2395 resolve_fl_variable_derived, check_defined_assignments,
2396 resolve_component, resolve_symbol, resolve_equivalence_derived):
2397 Likewise.
2398 * symbol.c (flavors, check_conflict, gfc_add_flavor, gfc_use_derived,
2399 gfc_restore_last_undo_checkpoint, gfc_type_compatible,
2400 gfc_find_dt_in_generic): Likewise.
2401 * trans-decl.c (gfc_get_module_backend_decl, create_function_arglist,
2402 gfc_create_module_variable, check_constant_initializer): Likewise.
2403 * trans-expr.c (gfc_conv_component_ref, gfc_conv_initializer,
2404 gfc_trans_alloc_subarray_assign, gfc_trans_subcomponent_assign,
2405 gfc_conv_structure, gfc_trans_scalar_assign, copyable_array_p):
2406 Likewise.
2407 * trans-io.c (transfer_namelist_element, transfer_expr,
2408 gfc_trans_transfer): Likewise.
2409 * trans-stmt.c (gfc_trans_deallocate): Likewise.
2410 * trans-types.c (gfc_typenode_for_spec, gfc_copy_dt_decls_ifequal,
2411 gfc_get_derived_type): Likewise.
2412
2413 2016-05-05 Jakub Jelinek <jakub@redhat.com>
2414
2415 * openmp.c (gfc_match_omp_clauses): Restructuralize, so that clause
2416 parsing is done in a big switch based on gfc_peek_ascii_char and
2417 individual clauses under their first letters are sorted too.
2418
2419 2016-05-02 Michael Meissner <meissner@linux.vnet.ibm.com>
2420
2421 * trans-types.c (gfc_build_complex_type):
2422
2423 2016-05-02 Richard Biener <rguenther@suse.de>
2424
2425 * trans-array.c (gfc_trans_create_temp_array): Properly
2426 create a DECL_EXPR for the anonymous VLA array type.
2427
2428 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2429
2430 PR middle-end/70626
2431 * trans-openmp.c (gfc_trans_oacc_combined_directive): Duplicate
2432 the reduction clause in both parallel and loop directives.
2433
2434 2016-04-18 Michael Matz <matz@suse.de>
2435
2436 * trans-io.c (gfc_build_io_library_fndecls): Use SET_TYPE_ALIGN.
2437 * trans-common.c (build_common_decl): Use SET_DECL_ALIGN.
2438 * trans-types.c (gfc_add_field_to_struct): Use SET_DECL_ALIGN.
2439
2440 2016-04-13 Dominique d'Humieres <dominiq@lps.ens.fr>
2441
2442 PR fortran/67039
2443 * intrinsic.texi: Correct the documentation of pseudorandom
2444 number intrinsics.
2445
2446 2016-04-13 Dominique d'Humieres <dominiq@lps.ens.fr>
2447
2448 PR fortran/58000
2449 * gfortran.texi: Document OPEN( ... NAME=) as not implemented
2450 in GNU Fortran
2451
2452 2016-04-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2453
2454 PR fortran/68566
2455 * array.c (match_array_element_spec): Add check for non-integer.
2456 * simplify.c (gfc_simplify_reshape): If source shape is NULL return.
2457
2458 2016-04-06 Patrick Palka <ppalka@gcc.gnu.org>
2459
2460 PR c/70436
2461 * openmp.c (gfc_find_omp_udr): Add explicit braces to resolve a
2462 future -Wparentheses warning.
2463
2464 2016-04-04 Andre Vehreschild <vehre@gcc.gnu.org>
2465
2466 PR fortran/67538
2467 * resolve.c (resolve_allocate_expr): Emit error message when no
2468 array spec and no array valued source= expression is given in an
2469 F2008 allocate() for an array to allocate.
2470
2471 2016-04-04 Andre Vehreschild <vehre@gcc.gnu.org>
2472
2473 PR fortran/65795
2474 * trans-array.c (gfc_array_allocate): When the array is a coarray,
2475 do not nullyfing its allocatable components in array_allocate, because
2476 the nullify missed the array ref and nullifies the wrong component.
2477 Cosmetics.
2478
2479 2016-03-29 Andre Vehreschild <vehre@gcc.gnu.org>
2480
2481 PR fortran/70397
2482 * trans-expr.c (gfc_class_len_or_zero_get): Add function to return a
2483 constant zero tree, when the class to get the _len component from is
2484 not unlimited polymorphic.
2485 (gfc_copy_class_to_class): Use the new function.
2486 * trans.h: Added interface of new function gfc_class_len_or_zero_get.
2487
2488 2016-03-28 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
2489
2490 * trans-decl.c (gfc_build_builtin_function_decls):
2491 caf_stop_numeric and caf_stop_str definition.
2492 * trans-stmt.c (gfc_trans_stop): invoke external functions
2493 for stop and stop_str when coarrays are used.
2494 * trans.h: extern for new functions.
2495
2496 2016-03-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2497
2498 PR fortran/69043
2499 * scanner.c (load_file): Update to use S_ISREG macro.
2500
2501 2016-03-17 Thomas Schwinge <thomas@codesourcery.com>
2502
2503 * gfortran.h (enum gfc_omp_map_op): Rename OMP_MAP_FORCE_DEALLOC
2504 to OMP_MAP_DELETE. Adjust all users.
2505
2506 2016-03-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2507 Jim MacArthur <jim.macarthur@codethink.co.uk>
2508
2509 PR fortran/69043
2510 * scanner.c (load_file): Check that included file is regular.
2511
2512 2016-03-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2513 Harold Anlauf <anlauf@gmx.de>
2514
2515 PR fortran/69520
2516 * invoke.texi: Explain use of the 'no-' construct within the
2517 -fcheck= option.
2518 * options.c (gfc_handle_runtime_check_option): Enable use of
2519 'no-' prefix for the various options with -fcheck= to allow
2520 negating previously enabled check options.
2521
2522 2016-03-12 Paul Thomas <pault@gcc.gnu.org>
2523
2524 PR fortran/70031
2525 * decl.c (gfc_match_prefix): Treat the 'module' prefix in the
2526 same way as the others, rather than fixing it to come last.
2527 (gfc_match_function_decl, gfc_match_subroutine): After errors
2528 in 'copy_prefix', emit them immediately in the case of module
2529 procedures to prevent a later ICE.
2530
2531 PR fortran/69524
2532 * decl.c (gfc_match_submod_proc): Permit 'module procedure'
2533 declarations within the contains section of modules as well as
2534 submodules.
2535 * resolve.c (resolve_fl_procedure): Likewise.
2536 *trans-decl.c (build_function_decl): Change the gcc_assert to
2537 allow all forms of module procedure declarations within module
2538 contains sections.
2539
2540 2016-02-28 Thomas Koenig <tkoenig@gcc.gnu.org>
2541
2542 PR fortran/68147
2543 PR fortran/47674
2544 * frontend-passes.c (realloc_string_callback): Don't set
2545 walk_subtrees.
2546
2547 2016-02-28 Thomas Koenig <tkoenig@gcc.gnu.org>
2548
2549 * dump-parse-tree.c (show_code_node): Print association
2550 list of a block if present. Handle EXEC_END_BLOCK.
2551
2552 2016-02-28 Harald Anlauf <anlauf@gmx.de>
2553 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2554
2555 PR fortran/56007
2556 * match.c (gfc_match_iterator): Add diagnostic for array variable
2557 as do loop index.
2558
2559 2016-02-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2560 Steven G. Kargl <kargl@gcc.gnu.org>
2561
2562 PR fortran/69910
2563 * io.c (gfc_match_open): Check that open status is an expression
2564 constant before comparing string to 'scratch' with NEWUNIT.
2565
2566 2016-02-27 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
2567
2568 * trans.c (gfc_allocate_allocatable): size conversion
2569 from byte to number of elements for event variables.
2570 * trans-types.c (gfc_get_derived_type): event variables
2571 represented as a pointer (like lock variable).
2572
2573 2016-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2574
2575 PR fortran/61156
2576 * scanner.c (add_path_to_list): If include path is not a directory,
2577 issue a fatal error.
2578
2579 2016-02-23 Andre Vehreschild <vehre@gcc.gnu.org>
2580
2581 PR fortran/67451
2582 * trans-array.c (gfc_array_allocate): Take the attributes from the
2583 expression to allocate and not from the source=-expression.
2584
2585 2016-02-20 Paul Thomas <pault@gcc.gnu.org>
2586
2587 PR fortran/69423
2588 * trans-decl.c (create_function_arglist): Deferred character
2589 length functions, with and without declared results, address
2590 the passed reference type as '.result' and the local string
2591 length as '..result'.
2592 (gfc_null_and_pass_deferred_len): Helper function to null and
2593 return deferred string lengths, as needed.
2594 (gfc_trans_deferred_vars): Call it, thereby reducing repeated
2595 code, add call for deferred arrays and reroute pointer function
2596 results. Avoid using 'tmp' for anything other that a temporary
2597 tree by introducing 'type_of_array' for the arrayspec type.
2598
2599 2015-02-16 Thomas Koenig <tkoenig@gcc.gnu.org>
2600
2601 PR fortran/69742
2602 * frontend-passes.c (cfe-expr_0): Don't register functions
2603 from within an ASSOCIATE statement.
2604
2605 2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
2606
2607 PR fortran/60526
2608 * decl.c (build_sym): If the name has already been defined as a
2609 type, it has a symtree with an upper case letter at the beginning.
2610 If such a symtree exists, issue an error and exit. Don't do
2611 this if there is no corresponding upper case letter.
2612
2613 2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
2614
2615 PR fortran/60526
2616 PR bootstrap/69816
2617 * decl.c (build_sym): Reverted previous patch.
2618
2619 2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
2620
2621 PR fortran/60526
2622 * decl.c (build_sym): If the name has already been defined as a
2623 type, issue error and return false.
2624
2625 2016-02-12 David Malcolm <dmalcolm@redhat.com>
2626
2627 PR other/69554
2628 * error.c (gfc_diagnostic_start_span): New function.
2629 (gfc_diagnostics_init): Initialize global_dc's start_span.
2630
2631 2016-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
2632
2633 PR fortran/69296
2634 * gfortran.h: Added flag to gfc_association_list indicating that
2635 the rank of an associate variable has been guessed only.
2636 * parse.c (parse_associate): Set the guess flag mentioned above
2637 when guessing the rank of an expression.
2638 * resolve.c (resolve_assoc_var): When the rank has been guessed,
2639 make sure, that the guess was correct else overwrite with the actual
2640 rank.
2641 * trans-stmt.c (trans_associate_var): For subref_array_pointers in
2642 class objects, take the span from the _data component.
2643
2644 2016-02-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2645
2646 PR fortran/50555
2647 * primary.c (match_actual_arg): If symbol has attribute flavor of
2648 namelist, generate an error. (gfc_match_rvalue): Likewise return
2649 MATCH_ERROR.
2650 * resolve.c (resolve_symbol): Scan arument list of procedures and
2651 generate an error if a namelist is found.
2652
2653 2016-02-05 Mikael Morin <mikael@gcc.gnu.org>
2654
2655 PR fortran/66089
2656 * trans-expr.c (expr_is_variable, gfc_expr_is_variable): Rename
2657 the former to the latter and make it non-static. Update callers.
2658 * gfortran.h (gfc_expr_is_variable): New declaration.
2659 (struct gfc_ss_info): Add field needs_temporary.
2660 * trans-array.c (gfc_scalar_elemental_arg_saved_as_argument):
2661 Tighten the condition on aggregate expressions with a check
2662 that the expression is a variable and doesn't need a temporary.
2663 (gfc_conv_resolve_dependency): Add intermediary reference variable.
2664 Set the needs_temporary field.
2665
2666 2016-02-03 Andre Vehreschild <vehre@gcc.gnu.org>
2667
2668 PR fortran/67451
2669 PR fortran/69418
2670 * trans-expr.c (gfc_copy_class_to_class): For coarrays just the
2671 pointer is passed. Take it as is without trying to deref the
2672 _data component.
2673 * trans-stmt.c (gfc_trans_allocate): Take care of coarrays as
2674 argument to source=-expression.
2675
2676 2016-02-02 Nathan Sidwell <nathan@codesourcery.com>
2677
2678 * lang.opt (fopenacc-dim=): New option.
2679
2680 2016-01-31 Paul Thomas <pault@gcc.gnu.org>
2681
2682 PR fortran/67564
2683 * trans-expr.c (gfc_conv_procedure_call): For the vtable copy
2684 subroutines, add a string length argument, when the actual
2685 argument is an unlimited polymorphic class object.
2686
2687 2016-01-30 Paul Thomas <pault@gcc.gnu.org>
2688
2689 PR fortran/69566
2690 * trans-expr.c (gfc_conv_procedure_call): Correct expression
2691 for 'ulim_copy', which was missing a test for 'comp'.
2692
2693 2016-01-28 Andre Vehreschild <vehre@gcc.gnu.org>
2694
2695 PR fortran/62536
2696 * decl.c (gfc_match_end): Only unnest and remove BLOCK namespaces
2697 when the END encountered does not match a BLOCK's end.
2698
2699 2016-01-27 Janus Weil <janus@gcc.gnu.org>
2700
2701 PR fortran/69484
2702 * invoke.texi: Fix documentation of -Wall with respect to -Wtabs.
2703
2704 2016-01-27 Paul Thomas <pault@gcc.gnu.org>
2705
2706 PR fortran/69422
2707 * trans-expr.c (is_scalar_reallocatable_lhs): Remove the check
2708 for allocatable components, whilst checking if the symbol is a
2709 derived or class entity..
2710
2711 2016-01-26 Paul Thomas <pault@gcc.gnu.org>
2712
2713 PR fortran/69385
2714 * trans-expr.c (gfc_trans_assignment_1): Exclude initialization
2715 assignments from check on assignment of scalars to unassigned
2716 arrays and correct wrong code within the corresponding block.
2717
2718 2016-01-26 David Malcolm <dmalcolm@redhat.com>
2719
2720 PR other/69006
2721 * error.c (gfc_diagnostic_starter): Delete use of pp_newline.
2722
2723 2016-01-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2724
2725 PR fortran/69397
2726 PR fortran/68442
2727 * interface.c (gfc_arglist_matches_symbol): Replace assert with
2728 a return false if not a procedure.
2729 * resolve.c (resolve_generic_f): Test if we are resolving an
2730 initialization expression and adjust error message accordingly.
2731
2732 2016-01-24 Thomas Koenig <tkoenig@gcc.gnu.org>
2733
2734 PR fortran/66094
2735 * frontend-passes.c (matmul_lhs_realloc): Add
2736 forgotten break statement.
2737
2738 2016-01-24 Dominique d'Humieres <dominiq@lps.ens.fr>
2739
2740 PR fortran/68283
2741 * primary.c (gfc_variable_attr): revert revision r221955,
2742 call gfc_internal_error only if there is no error.
2743
2744 2016-01-24 Thomas Koenig <tkoenig@gcc.gnu.org>
2745
2746 PR fortran/66094
2747 * frontend-passes.c (enum matrix_case): Add case A2B2T for
2748 MATMUL(A,TRANSPoSE(B)) where A and B are rank 2.
2749 (inline_limit_check): Also add A2B2T.
2750 (matmul_lhs_realloc): Handle A2B2T.
2751 (check_conjg_variable): Rename to
2752 (check_conjg_transpose_variable): and also count TRANSPOSE.
2753 (inline_matmul_assign): Handle A2B2T.
2754
2755 2016-01-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2756
2757 PR fortran/65996
2758 * error.c (gfc_error): Save the state of abort_on_error and set
2759 it to false for buffered errors to allow normal processing.
2760 Restore the state before leaving.
2761
2762 2016-01-19 Martin Jambor <mjambor@suse.cz>
2763
2764 * types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New.
2765 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed.
2766 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): New.
2767
2768 2016-01-15 Paul Thomas <pault@gcc.gnu.org>
2769
2770 PR fortran/64324
2771 * resolve.c (check_uop_procedure): Prevent deferred length
2772 characters from being trapped by assumed length error.
2773
2774 PR fortran/49630
2775 PR fortran/54070
2776 PR fortran/60593
2777 PR fortran/60795
2778 PR fortran/61147
2779 PR fortran/64324
2780 * trans-array.c (gfc_conv_scalarized_array_ref): Pass decl for
2781 function as well as variable expressions.
2782 (gfc_array_init_size): Add 'expr' as an argument. Use this to
2783 correctly set the descriptor dtype for deferred characters.
2784 (gfc_array_allocate): Add 'expr' to the call to
2785 'gfc_array_init_size'.
2786 * trans.c (gfc_build_array_ref): Expand logic for setting span
2787 to include indirect references to character lengths.
2788 * trans-decl.c (gfc_get_symbol_decl): Ensure that deferred
2789 result char lengths that are PARM_DECLs are indirectly
2790 referenced both for directly passed and by reference.
2791 (create_function_arglist): If the length type is a pointer type
2792 then store the length as the 'passed_length' and make the char
2793 length an indirect reference to it.
2794 (gfc_trans_deferred_vars): If a character length has escaped
2795 being set as an indirect reference, return it via the 'passed
2796 length'.
2797 * trans-expr.c (gfc_conv_procedure_call): The length of
2798 deferred character length results is set TREE_STATIC and set to
2799 zero.
2800 (gfc_trans_assignment_1): Do not fix the rse string_length if
2801 it is a variable, a parameter or an indirect reference. Add the
2802 code to trap assignment of scalars to unallocated arrays.
2803 * trans-stmt.c (gfc_trans_allocate): Remove 'def_str_len' and
2804 all references to it. Instead, replicate the code to obtain a
2805 explicitly defined string length and provide a value before
2806 array allocation so that the dtype is correctly set.
2807 trans-types.c (gfc_get_character_type): If the character length
2808 is a pointer, use the indirect reference.
2809
2810 2016-01-10 Thomas Koenig <tkoenig@gcc.gnu.org>
2811
2812 PR fortran/69154
2813 * frontend-passes.c (in_where): New variable.
2814 (inline_matmul_assign): Don't try this if we are within
2815 a WHERE statement.
2816 (gfc_code_walker): Keep track of in_where.
2817
2818 2016-01-10 Paul Thomas <pault@gcc.gnu.org>
2819
2820 PR fortran/67779
2821 * trans_array.c (gfc_conv_scalarized_array_ref): Add missing
2822 se->use_offset from condition for calculation of 'base'.
2823
2824 2016-01-08 Jakub Jelinek <jakub@redhat.com>
2825
2826 PR fortran/69128
2827 * trans.h (OMPWS_SCALARIZER_BODY): Define.
2828 (OMPWS_NOWAIT): Renumber.
2829 * trans-stmt.c (gfc_trans_where_3): Only set OMPWS_SCALARIZER_WS
2830 if OMPWS_SCALARIZER_BODY is not set already, and set also
2831 OMPWS_SCALARIZER_BODY until the final loop creation.
2832 * trans-expr.c (gfc_trans_assignment_1): Likewise.
2833 * trans-openmp.c (gfc_trans_omp_workshare): Also clear
2834 OMPWS_SCALARIZER_BODY.
2835 * trans-array.c (gfc_trans_scalarized_loop_end): Don't create
2836 OMP_FOR if OMPWS_SCALARIZER_BODY is set.
2837
2838 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2839
2840 Update copyright years.
2841
2842 * gfortranspec.c (lang_specific_driver): Update copyright notice
2843 dates.
2844 * gfc-internals.texi: Bump @copying's copyright year.
2845 * gfortran.texi: Ditto.
2846 * intrinsic.texi: Ditto.
2847 * invoke.texi: Ditto.
2848
2849 2016-01-01 Paul Thomas <pault@gcc.gnu.org>
2850
2851 PR fortran/68864
2852 * trans-array.c (evaluate_bound): If deferred, test that 'desc'
2853 is an array descriptor before using gfc_conv_descriptor_xxx.
2854 \f
2855 Copyright (C) 2016 Free Software Foundation, Inc.
2856
2857 Copying and distribution of this file, with or without modification,
2858 are permitted in any medium without royalty provided the copyright
2859 notice and this notice are preserved.