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