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