1 2016-11-22 Steven G. Kargl <kargl@gcc.gnu.org>
4 * expr.c (gfc_apply_init): Allocate a charlen if needed.
6 2016-11-22 Janus Weil <janus@gcc.gnu.org>
9 * class.c (add_proc_comp): Add a vtype component for non-overridable
10 procedures that are overriding.
12 2016-11-20 Harald Anlauf <anlauf@gmx.de>
15 * resolve.c (gfc_resolve_forall): Check for nonscalar index variables.
17 2016-11-20 Andre Vehreschild <vehre@gcc.gnu.org>
20 * resolve.c (resolve_typebound_function): Prevent stripping of refs,
21 when the base-expression is a class' typed one.
23 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
24 Alan Hayward <alan.hayward@arm.com>
25 David Sherwood <david.sherwood@arm.com>
27 * trans-common.c (build_common_decl): Use SET_DECL_MODE.
28 * trans-decl.c (gfc_build_label_decl): Likewise.
29 * trans-types.c (gfc_get_array_descr_info): Likewise.
31 2016-11-17 Janus Weil <janus@gcc.gnu.org>
34 * simplify.c (gfc_simplify_extends_type_of): Fix missed optimization.
35 Prevent over-simplification. Fix a comment. Add a comment.
37 2016-11-16 Steven G. Kargl <kargl@gcc.gnu.org>
40 * io.c (next_char_not_space): Update handling of a 'tab' in a FORMAT.
41 (format_lex): Adjust invocations of next_char_not_space().
43 2016-11-16 Andre Vehreschild <vehre@gcc.gnu.org>
46 * class.c (gfc_is_class_scalar_expr): Prevent taking an array ref for
48 * trans-expr.c (gfc_trans_assignment_1): Ensure a reference to the
49 object to copy is generated, when assigning class objects.
51 2016-11-14 Thomas Koenig <tkoenig@gcc.gnu.org>
53 * dump-parse-tree.c (show_code): Add prototype.
54 (gfc_debug_code): New function.
55 (show_code_node): Add space after SELECT TYPE.
57 2016-11-14 Janus Weil <janus@gcc.gnu.org>
60 * resolve.c (resolve_procedure_interface): Properly handle CLASS-valued
63 2016-11-13 Janus Weil <janus@gcc.gnu.org>
66 * decl.c (match_procedure_in_type): Apply the FL_PROCEDURE attribute
67 to the target procedure.
69 2016-11-13 Janus Weil <janus@gcc.gnu.org>
72 * resolve.c (resolve_component): Move check for C437
74 * decl.c (build_struct): ... here. Fix indentation.
76 2016-11-12 Janus Weil <janus@gcc.gnu.org>
79 * class.c (gfc_find_typebound_intrinsic_op): Remove an unnecessary
80 assert and nullification.
81 * decl.c (gfc_match_decl_type_spec): Use gfc_get_tbp_symtree,
83 (gfc_match_generic): Remove an unnecessary assert.
84 Use gfc_get_tbp_symtree to avoid ICE.
86 2016-11-10 Fritz O. Reese <fritzoreese@gmail.com>
89 * gcc/fortran/decl.c (gfc_match_data_decl): Gracefully handle bad
90 anonymous structure declarations.
92 2016-11-10 Fritz O. Reese <fritzoreese@gmail.com>
94 * decl.c (get_struct_decl, gfc_match_map, gfc_match_union): Fix
96 * interface.c (gfc_compare_union_types): Likewise.
98 2016-11-10 Jakub Jelinek <jakub@redhat.com>
100 * cpp.c (cpp_define_builtins): Define _OPENMP to 201511 instead
102 * gfortran.texi: Mention partial OpenMP 4.5 support.
103 * intrinsic.texi: Update for OpenMP 4.5.
105 * openmp.c (gfc_free_omp_clauses): Free critical_name, grainsize,
106 hint, num_tasks, priority and if_exprs.
107 (gfc_match_omp_to_link, gfc_match_omp_depend_sink): New functions.
108 (enum omp_mask1, enum omp_mask2): New enums.
109 Change all OMP_CLAUSE_* defines into enum values, and change their
110 values from ((uint64_t) 1 << bit) to just bit.
111 (omp_mask, omp_inv_mask): New classes. Add ctors and operators.
112 (gfc_match_omp_clauses): Change mask argument from uint64_t to
113 const omp_mask. Assert OMP_MASK1_LAST and OMP_MASK2_LAST are
114 at most 64. Move delete clause handling to where it
115 alphabetically belongs. Parse defaultmap, grainsize, hint,
116 is_device_ptr, nogroup, nowait, num_tasks, priority, simd, threads
117 and use_device_ptr clauses. Parse if clause modifier. Parse map
118 clause always modifier, and release and delete kinds. Parse ordered
119 clause with argument. Parse schedule clause modifiers. Differentiate
120 device clause parsing based on openacc flag. Guard link clause
121 parsing with openacc flag. Add support for parsing
122 linear clause modifiers. Parse depend(source) and depend(sink: ...).
123 Use gfc_match_omp_to_link for to and link clauses in declare target
125 (match_acc): Change mask type from uint64_t to const omp_mask.
126 (OMP_SINGLE_CLAUSES, OMP_ORDERED_CLAUSES,
127 OMP_DECLARE_TARGET_CLAUSES, OMP_TASKLOOP_CLAUSES,
128 OMP_TARGET_ENTER_DATA_CLAUSES, OMP_TARGET_EXIT_DATA_CLAUSES): Define.
129 (OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES,
130 OACC_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES, OACC_DECLARE_CLAUSES,
131 OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES, OACC_WAIT_CLAUSES,
132 OACC_ROUTINE_CLAUSES, OMP_PARALLEL_CLAUSES, OMP_DECLARE_SIMD_CLAUSES,
133 OMP_SECTIONS_CLAUSES, OMP_TEAMS_CLAUSES, OMP_DISTRIBUTE_CLAUSES):
134 Replace first or only OMP_CLAUSE_* value in bitset with
135 omp_mask (OMP_CLAUSE_*).
136 (OMP_DO_CLAUSES): Likewise. Add OMP_CLAUSE_LINEAR.
137 (OMP_SIMD_CLAUSES): Replace first or only OMP_CLAUSE_* value in
138 bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_SIMDLEN.
139 (OACC_UPDATE_CLAUSES): Replace first or only OMP_CLAUSE_* value in
140 bitset with omp_mask (OMP_CLAUSE_*). Replace OMP_CLAUSE_OACC_DEVICE
141 with OMP_CLAUSE_DEVICE.
142 (OMP_TASK_CLAUSES): Replace first or only OMP_CLAUSE_* value in
143 bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_PRIORITY.
144 (OMP_TARGET_CLAUSES): Replace first or only OMP_CLAUSE_* value in
145 bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_DEPEND,
146 OMP_CLAUSE_NOWAIT, OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE,
147 OMP_CLAUSE_DEFAULTMAP and OMP_CLAUSE_IS_DEVICE_PTR.
148 (OMP_TARGET_DATA_CLAUSES): Replace first or only OMP_CLAUSE_* value in
149 bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_USE_DEVICE_PTR.
150 (OMP_TARGET_UPDATE_CLAUSES): Replace first or only OMP_CLAUSE_* value
151 in bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_DEPEND and
153 (match_omp): Change mask argument from unsigned int to
155 (gfc_match_omp_critical): Parse optional clauses and use omp_clauses
156 union member instead of omp_name.
157 (gfc_match_omp_end_critical): New function.
158 (gfc_match_omp_distribute_parallel_do): Remove ordered and linear
159 clauses from the mask.
160 (gfc_match_omp_distribute_parallel_do_simd): Use
161 & ~(omp_mask (OMP_CLAUSE_*)) instead of & ~OMP_CLAUSE_*.
162 (gfc_match_omp_target_teams_distribute_parallel_do_simd): Likewise.
163 (gfc_match_omp_teams_distribute_parallel_do_simd): Likewise.
164 (gfc_match_omp_do_simd): Likewise. Don't remove ordered clause from
166 (gfc_match_omp_parallel_do_simd): Likewise.
167 (gfc_match_omp_target_teams_distribute_parallel_do): Likewise.
168 (gfc_match_omp_teams_distribute_parallel_do): Likewise.
169 (gfc_match_omp_declare_simd): If not using the form with
170 (proc-name), require space before first clause. Make (proc-name)
171 optional. If not present, set proc_name to NULL.
172 (gfc_match_omp_declare_target): Rewritten for OpenMP 4.5.
173 (gfc_match_omp_single): Use OMP_SINGLE_CLAUSES.
174 (gfc_match_omp_task, gfc_match_omp_taskwait, gfc_match_omp_taskyield):
175 Move around to where they belong alphabetically.
176 (gfc_match_omp_target_enter_data, gfc_match_omp_target_exit_data,
177 gfc_match_omp_target_parallel, gfc_match_omp_target_parallel_do,
178 gfc_match_omp_target_parallel_do_simd, gfc_match_omp_target_simd,
179 gfc_match_omp_taskloop, gfc_match_omp_taskloop_simd):
181 (gfc_match_omp_ordered): Parse clauses.
182 (gfc_match_omp_ordered_depend): New function.
183 (gfc_match_omp_cancel, gfc_match_omp_end_single): Use
184 omp_mask (OMP_CLAUSE_*) instead of OMP_CLAUSE_*.
185 (resolve_oacc_scalar_int_expr): Renamed to ...
186 (resolve_scalar_int_expr): ... this. Fix up formatting.
187 (resolve_oacc_positive_int_expr): Renamed to ...
188 (resolve_positive_int_expr): ... this. Fix up formatting.
189 (resolve_nonnegative_int_expr): New function.
190 (resolve_omp_clauses): Adjust callers, use the above functions
191 even for OpenMP clauses, add handling of new OpenMP 4.5 clauses.
192 Require orderedc >= collapse if specified. Handle depend(sink:)
193 and depend(source) restrictions. Disallow linear clause when
194 orderedc is non-zero. Diagnose linear clause modifiers when not in
195 declare simd. Only check for integer type if ref modifier
196 is not used. Remove diagnostics for required VALUE attribute.
197 Diagnose VALUE attribute with ref or uval modifiers. Allow
198 non-constant linear-step, if it is a dummy argument alone and is
199 mentioned in uniform clause. Diagnose map kinds not allowed
200 for various constructs. Diagnose target {enter ,exit ,}data without
201 any map clauses. Add dummy OMP_LIST_IS_DEVICE_PTR and
202 OMP_LIST_USE_DEVICE_PTR cases.
203 (gfc_resolve_omp_do_blocks): Set omp_current_do_collapse to orderedc
205 (gfc_resolve_omp_parallel_blocks): Handle new OpenMP 4.5 constructs,
206 replace underscores with spaces in a few construct names.
207 (resolve_omp_do): Set collapse to orderedc if non-zero. Handle new
208 OpenMP 4.5 constructs.
209 (resolve_oacc_loop_blocks): Call resolve_positive_int_expr instead
210 of resolve_oacc_positive_int_expr.
211 (gfc_resolve_omp_directive): Handle new OpenMP 4.5 constructs.
212 (gfc_resolve_omp_declare_simd): Allow ods->proc_name to be NULL.
213 * trans-openmp.c (gfc_omp_scalar_p): New function.
214 (doacross_steps): New variable.
215 (gfc_trans_omp_clauses): Handle new OpenMP 4.5 clauses and new clause
217 (gfc_trans_omp_critical): Adjust EXEC_OMP_CRITICAL handling.
218 (gfc_trans_omp_do): Handle doacross loops. Clear sched_simd flag.
219 Handle EXEC_OMP_TASKLOOP.
220 (gfc_trans_omp_ordered): Translate omp clauses, allow NULL
222 (GFC_OMP_SPLIT_TASKLOOP, GFC_OMP_MASK_TASKLOOP): New enum constants.
223 (gfc_split_omp_clauses): Copy orderedc together with ordered. Change
224 firstprivate and lastprivate handling for OpenMP 4.5.
225 Handle EXEC_OMP_TARGET_SIMD, EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD}
226 and EXEC_OMP_TASKLOOP{,_SIMD}. Add handling for new OpenMP 4.5
227 clauses and clause modifiers and handle if clause without/with
229 (gfc_trans_omp_teams): Add omp_clauses argument, add it to other
230 teams clauses. Don't wrap into OMP_TEAMS if -fopenmp-simd.
231 (gfc_trans_omp_target): For -fopenmp, translate num_teams and
232 thread_limit clauses on combined target teams early and pass to
233 gfc_trans_omp_teams. Set OMP_TARGET_COMBINED if needed.
234 Handle EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD} and
235 EXEC_OMP_TARGET_SIMD.
236 (gfc_trans_omp_taskloop, gfc_trans_omp_target_enter_data,
237 gfc_trans_omp_target_exit_data): New functions.
238 (gfc_trans_omp_directive): Handle EXEC_OMP_TARGET_{ENTER,EXIT}_DATA
239 EXEC_OMP_TASKLOOP{,_SIMD}, EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD}
240 and EXEC_OMP_TARGET_SIMD. Adjust gfc_trans_omp_teams caller.
241 * symbol.c (check_conflict): Handle omp_declare_target_link.
242 (gfc_add_omp_declare_target_link): New function.
243 (gfc_copy_attr): Copy omp_declare_target_link.
244 * dump-parse-tree.c (show_omp_namelist): Handle OMP_DEPEND_SINK_FIRST
245 depend_op. Print linear clause modifiers.
246 (show_omp_clauses): Adjust for OpenMP 4.5 clause changes.
247 (show_omp_node): Print clauses for EXEC_OMP_ORDERED. Allow NULL
248 c->block for EXEC_OMP_ORDERED. Formatting fixes. Adjust handling of
249 EXEC_OMP_CRITICAL, handle new OpenMP 4.5 constructs and some
250 forgotten OpenMP 4.0 constructs.
251 (show_code_node): Handle new OpenMP 4.5 constructs and some forgotten
252 OpenMP 4.0 constructs.
253 * gfortran.h (symbol_attribute): Add omp_declare_target_link bitfield.
254 (struct gfc_omp_namelist): Add u.common and u.linear_op fields.
255 (struct gfc_common_head): Change omp_declare_target into bitfield.
256 Add omp_declare_target_link bitfield.
257 (gfc_add_omp_declare_target_link): New prototype.
258 (enum gfc_statement): Add ST_OMP_TARGET_PARALLEL,
259 ST_OMP_END_TARGET_PARALLEL, ST_OMP_TARGET_PARALLEL_DO,
260 ST_OMP_END_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD,
261 ST_OMP_END_TARGET_PARALLEL_DO_SIMD, ST_OMP_TARGET_ENTER_DATA,
262 ST_OMP_TARGET_EXIT_DATA, ST_OMP_TARGET_SIMD, ST_OMP_END_TARGET_SIMD,
263 ST_OMP_TASKLOOP, ST_OMP_END_TASKLOOP, ST_OMP_TASKLOOP_SIMD,
264 ST_OMP_END_TASKLOOP_SIMD and ST_OMP_ORDERED_DEPEND.
265 (enum gfc_omp_depend_op): Add OMP_DEPEND_SINK_FIRST and
267 (enum gfc_omp_linear_op): New.
268 (struct gfc_omp_clauses): Add critical_name, depend_source,
269 orderedc, defaultmap, nogroup, sched_simd, sched_monotonic,
270 sched_nonmonotonic, simd, threads, grainsize, hint, num_tasks,
271 priority and if_exprs fields.
272 (enum gfc_exec_op): Add EXEC_OMP_END_CRITICAL,
273 EXEC_OMP_TARGET_ENTER_DATA, EXEC_OMP_TARGET_EXIT_DATA,
274 EXEC_OMP_TARGET_PARALLEL, EXEC_OMP_TARGET_PARALLEL_DO,
275 EXEC_OMP_TARGET_PARALLEL_DO_SIMD, EXEC_OMP_TARGET_SIMD,
276 EXEC_OMP_TASKLOOP, EXEC_OMP_TASKLOOP_SIMD.
277 (enum gfc_omp_map_op): Add OMP_MAP_RELEASE,
278 OMP_MAP_ALWAYS_TO, OMP_MAP_ALWAYS_FROM and OMP_MAP_ALWAYS_TOFROM.
279 (OMP_LIST_IS_DEVICE_PTR, OMP_LIST_USE_DEVICE_PTR): New.
280 (enum gfc_omp_if_kind): New.
281 * module.c (enum ab_attribute): Add AB_OMP_DECLARE_TARGET_LINK.
282 (attr_bits): Add AB_OMP_DECLARE_TARGET_LINK entry.
283 (mio_symbol_attribute): Save and restore omp_declare_target_link bit.
284 * trans.h (gfc_omp_scalar_p): New prototype.
285 * frontend-passes.c (gfc_code_walker): Handle new OpenMP 4.5
287 * trans.c (trans_code): Handle new OpenMP 4.5 constructs.
288 * resolve.c (gfc_resolve_blocks): Likewise.
289 (gfc_resolve_code): Likewise.
290 * f95-lang.c (LANG_HOOKS_OMP_SCALAR_P): Redefine to gfc_omp_scalar_p.
291 (gfc_attribute_table): Add "omp declare target link".
292 * st.c (gfc_free_statement): Handle EXEC_OMP_END_CRITICAL like
293 EXEC_OMP_CRITICAL before, free clauses for EXEC_OMP_CRITICAL
294 and new OpenMP 4.5 constructs. Free omp clauses even for
296 * match.c (match_exit_cycle): Rename collapse variable to count,
297 set it to orderedc if non-zero, instead of collapse.
298 * trans-decl.c (add_attributes_to_decl): Add "omp declare target link"
299 instead of "omp declare target" for omp_declare_target_link.
300 * trans-common.c (build_common_decl): Likewise.
301 * match.h (gfc_match_omp_target_enter_data,
302 gfc_match_omp_target_exit_data, gfc_match_omp_target_parallel,
303 gfc_match_omp_target_parallel_do,
304 gfc_match_omp_target_parallel_do_simd, gfc_match_omp_target_simd,
305 gfc_match_omp_taskloop, gfc_match_omp_taskloop_simd,
306 gfc_match_omp_end_critical, gfc_match_omp_ordered_depend): New
308 * parse.c (decode_omp_directive): Use gfc_match_omp_end_critical
309 instead of gfc_match_omp_critical for !$omp end critical.
310 Handle new OpenMP 4.5 constructs. If ordered directive has
311 depend clause as the first of the clauses, use
312 gfc_match_omp_ordered_depend and ST_OMP_ORDERED_DEPEND instead of
313 gfc_match_omp_ordered and ST_OMP_ORDERED.
314 (case_executable): Add ST_OMP_TARGET_ENTER_DATA,
315 ST_OMP_TARGET_EXIT_DATA and ST_OMP_ORDERED_DEPEND cases.
316 (case_exec_markers): Add ST_OMP_TARGET_PARALLEL,
317 ST_OMP_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD,
318 ST_OMP_TARGET_SIMD, ST_OMP_TASKLOOP and ST_OMP_TASKLOOP_SIMD cases.
319 (gfc_ascii_statement): Handle new OpenMP 4.5 constructs.
320 (parse_omp_do): Handle ST_OMP_TARGET_PARALLEL_DO,
321 ST_OMP_TARGET_PARALLEL_DO_SIMD, ST_OMP_TASKLOOP and
322 ST_OMP_TASKLOOP_SIMD.
323 (parse_omp_structured_block): Handle EXEC_OMP_END_CRITICAL instead
324 of EXEC_OMP_CRITICAL, adjust for EXEC_OMP_CRITICAL having omp clauses
326 (parse_executable): Handle ST_OMP_TARGET_PARALLEL,
327 ST_OMP_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD,
328 ST_OMP_TASKLOOP and ST_OMP_TASKLOOP_SIMD.
330 2016-11-09 Mikael Morin <mikael@gcc.gnu.org>
331 Janus Weil <janus@gcc.gnu.org>
334 * interface.c (compare_actual_formal): Add safety checks to avoid ICE.
336 2016-11-09 Fritz O. Reese <fritzoreese@gmail.com>
339 * trans-expr.c (gfc_trans_subcomponent_assign): Guard against NULL
342 2016-11-09 Steven G. Kargl <kargl@gcc.gnu.org>
343 Janus Weil <janus@gcc.gnu.org>
346 * expr.c (external_spec_function): Allow recursive specification
349 2016-11-09 Paul Thomas <pault@gcc.gnu.org>
351 * check.c (gfc_check_move_alloc): Prevent error that avoids
352 aliasing between to and from arguments from rejecting valid
355 2016-11-09 Janus Weil <janus@gcc.gnu.org>
358 * class.c (gfc_add_component_ref): Add safety checks to avoid ICE.
360 2016-11-08 Janus Weil <janus@gcc.gnu.org>
363 * expr.c (check_alloc_comp_init): Loosen an assert.
364 * resolve.c (resolve_fl_parameter): Reject class parameters.
366 2016-11-08 Janus Weil <janus@gcc.gnu.org>
369 * expr.c (gfc_check_pointer_assign): Add special check for procedure-
370 pointer component with absent interface.
372 2016-11-07 Thomas Koenig <tkoenig@gcc.gnu.org>
375 * expr.c (gfc_generate_initializer): Add where to EXPR_NULL
377 * iresolve.c (gfc_resolve_extends_type_of): Add where to
378 both arguments of the function.
379 * resolve.c (resolve_select_type): Add where to the
380 second argument of the new statement.
382 2016-11-07 Thomas Koenig <tkoenig@gcc.gnu.org>
385 * match.c (gfc_match_select_type): Add where for expr1.
386 * resolve.c (resolev_select_type): Add where for expr1 of new
389 2016-11-06 Thomas Koenig <tkoenig@gcc.gnu.org>
392 resolve.c (build_loc_call): Add location to return value.
394 2016-11-06 Andre Vehreschild <vehre@gcc.gnu.org>
396 * expr.c (is_non_empty_structure_constructor): New function to detect
397 non-empty structure constructor.
398 (gfc_has_default_initializer): Analyse initializers.
399 * resolve.c (cond_init): Removed.
400 (resolve_allocate_expr): Removed dead code. Moved invariant code out
401 of the loop over all objects to allocate.
402 (resolve_allocate_deallocate): Added the invariant code remove from
403 resolve_allocate_expr.
404 * trans-array.c (gfc_array_allocate): Removed nullify of structure
405 components in favour of doing this in gfc_trans_allocate for both
406 scalars and arrays in the same place.
407 * trans-expr.c (gfc_trans_init_assign): Always using _vptr->copy for
409 * trans-stmt.c (allocate_get_initializer): Get the initializer
410 expression for object allocated.
411 (gfc_trans_allocate): Nullify a derived type only, when no SOURCE=
412 or MOLD= is present preventing duplicate work. Moved the creation
413 of the init-expression here to prevent code for conditions that
414 can not occur on freshly allocated object, like checking for the need
415 to free allocatable components.
417 2016-11-06 Thomas Koenig <tkoenig@gcc.gnu.org>
420 * arith.c (gfc_complex2real): Change gfc_warning_now to
423 2016-11-05 Paul Thomas <pault@gcc.gnu.org>
425 * check.c (gfc_check_move_alloc): Introduce error to prevent
426 aliasing between to and from arguments.
428 2016-11-05 Janus Weil <janus@gcc.gnu.org>
429 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
432 * invoke.texi: Mention -Wpedantic as an alias of -pedantic.
433 * check.c (gfc_check_transfer): Mention responsible flag in warning
435 * frontend-passes.c (do_warn_function_elimination): Ditto.
436 * resolve.c (resolve_elemental_actual): Ditto.
437 (resolve_operator): Ditto.
438 (warn_unused_fortran_label): Ditto.
439 * trans-common.c (translate_common): Ditto.
441 2016-11-05 Paul Thomas <pault@gcc.gnu.org>
444 * trans-expr.c (gfc_conv_class_to_class): Return _len component
445 of unlimited polymorphic entities.
447 2016-11-04 Paul Thomas <pault@gcc.gnu.org>
450 * primary.c (gfc_match_varspec): If selector expression is
451 unambiguously an array, make sure that the associate name
452 is an array and has an array spec. Modify the original
453 condition for doing this to exclude character types.
455 2016-11-03 Fritz Reese <fritzoreese@gmail.com>
457 * gfortran.texi: Document.
458 * gfortran.h (gfc_dt): New field default_exp.
459 * primary.c (match_real_constant): Default exponent with -fdec.
460 * io.c (match_io): Set dt.default_exp with -fdec.
461 * ioparm.def (IOPARM_dt_default_exp): New.
462 * trans-io.c (build_dt): Set IOPARM_dt_default_exp with -fdec.
464 2016-11-03 Fritz O. Reese <fritzoreese@gmail.com>
466 * decl.c (gfc_match_parameter): Allow omitted '()' with -std=legacy.
467 * parse.c (decode_statement): Match "parameter" before assignments.
468 * gfortran.texi: Document.
470 2016-11-02 Fritz O. Reese <fritzoreese@gmail.com>
472 * lang.opt, invoke.texi: New argument -Wargument-mismatch.
473 * interface.c (compare_parameter, compare_actual_formal,
474 gfc_check_typebound_override, argument_rank_mismatch): Control argument
475 mismatch warnings with -Wargument-mismatch.
476 * resolve.c (resolve_structure_cons, resolve_global_procedure): Ditto.
478 2016-11-02 Fritz Reese <fritzoreese@gmail.com>
480 * gfortran.h (gfc_error): New declaration for gfc_error with 'opt'.
481 * error.c (gfc_error): Add optional 'opt' argument.
482 * error.c (gfc_notify_std): Call fully-qualified gfc_error.
484 2016-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
487 * match.c (match_simple_where): Fill in locus for assigment
488 in simple WHERE statement.
490 2016-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
493 * match.c (gfc_match_where): Fill in locus for assigment
494 in simple WHERE statement.
496 2016-10-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
499 * io.c (check_format): Adjust checks for FMT_L to treat a zero
500 width as an extension, giving warnings or error as appropriate.
503 2016-10-31 Jakub Jelinek <jakub@redhat.com>
505 * trans-types.c (gfc_get_array_descr_info): For -gdwarf-5 or
506 -gno-strict-dwarf, handle assumed rank arrays the way dwarf2out
509 2016-10-30 Thomas Koenig <tkoenig@gcc.gnu.org>
512 * arith.c (gfc_int2real): Change gfc_warning_now
514 * primary.c (match_complex_constant): If there
515 is no comma, throw away any warning which might have
516 been issued by gfc_int2real.
518 2016-10-28 Steven G. Kargl <kargl@gcc.gnu.org>
521 * symbol.c (gfc_type_compatible): Fix typo.
523 2016-10-27 Jakub Jelinek <jakub@redhat.com>
526 * parse.c (decode_statement): Don't create namespace for possible
527 select type here and destroy it afterwards.
528 (parse_select_type_block): Set gfc_current_ns to new_st.ext.block.ns.
529 (parse_executable, gfc_parse_file): Formatting fixes.
530 * match.c (gfc_match_select_type): Create namespace for select type
531 here, only after matching select type. Formatting fixes. Free that
532 namespace if not returning MATCH_YES, after gfc_undo_symbols,
533 otherwise remember it in new_st.ext.block.ns and switch to parent
536 2016-10-27 Fritz Reese <fritzoreese@gmail.com>
538 * expr.c (generate_union_initializer, get_union_initializer): New.
539 * expr.c (component_initializer): Consider BT_UNION specially.
540 * resolve.c (resolve_structure_cons): Hack for BT_UNION.
541 * trans-expr.c (gfc_trans_subcomponent_assign): Ditto.
542 * trans-expr.c (gfc_conv_union_initializer): New.
543 * trans-expr.c (gfc_conv_structure): Replace UNION handling code with
544 new function gfc_conv_union_initializer.
546 2016-10-26 Steven G. Kargl <kargl@gcc.gnu.org>
549 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Fix reference to an
550 array element of type CLASS.
552 2016-10-26 Paul Thomas <pault@gcc.gnu.org>
555 * resolve.c (resolve_typebound_intrinsic_op): For submodules
556 suppress the error and return if the same procedure symbol
557 is added more than once to the interface.
559 2016-10-26 Fritz Reese <fritzoreese@gmail.com>
561 * frontend-passes.c (gfc_code_walker): Add SHARE and CARRIAGECONTROL.
562 * io.c (gfc_free_open, gfc_resolve_open, gfc_match_open): Ditto.
563 * gfortran.h (gfc_open): Add SHARE, CARRIAGECONTROL, and READONLY.
564 * io.c (io_tag, match_open_element): Ditto.
566 * trans-io.c (gfc_trans_open): Ditto.
567 * io.c (match_dec_etag, match_dec_ftag): New functions.
568 * gfortran.texi: Document.
570 2016-10-25 Fritz Reese <fritzoreese@gmail.com>
572 * gfortran.texi: Document.
573 * resolve.c (logical_to_bitwise): New function.
574 * resolve.c (resolve_operator): Wrap operands with logical_to_bitwise.
576 2016-10-25 Andre Vehreschild <vehre@gcc.gnu.org>
579 * class.c (find_intrinsic_vtab): No longer encode the string length
580 into vtype's name and use the char's kind for the size instead of
581 the string_length time the size.
582 * trans-array.c (gfc_conv_ss_descriptor): For deferred length char
583 arrays the dynamically sized type needs to be declared.
584 (build_class_array_ref): Address the i-th array element by multiplying
585 it with the _vptr->_size and the _len to make sure char arrays are
587 * trans-expr.c (gfc_conv_intrinsic_to_class): Made comment more
590 2016-10-25 Cesar Philippidis <cesar@codesourcery.com>
592 * intrinsic.texi (cosd): New mathop.
594 2016-10-25 Fritz Reese <fritzoreese@gmail.com>
596 * match.c (gfc_match_intrinsic_op): Match ".XOR." with -std=legacy.
597 * gfortran.texi: Document.
599 2016-10-25 Fritz Reese <fritzoreese@gmail.com>
601 * primary.c (gfc_match_rvalue): Match %LOC as LOC with -std=legacy.
602 * gfortran.texi: Document.
604 2016-10-25 Fritz Reese <fritzoreese@gmail.com>
606 * decl.c (gfc_match_type): New function.
607 * match.h (gfc_match_type): New function.
608 * match.c (gfc_match_if): Special case for one-line IFs.
609 * gfortran.texi: Update documentation.
610 * parse.c (decode_statement): Invoke gfc_match_type.
612 2016-10-25 Fritz Reese <fritzoreese@gmail.com>
614 * gfortran.texi: Document.
615 * gfortran.h (gfc_is_whitespace): Include form feed ('\f').
617 2016-10-25 Fritz Reese <fritzoreese@gmail.com>
619 * invoke.texi, gfortran.texi: Touch up documentation of -fdec.
620 * gfortran.h (gfc_option): Move flag_dec_structure out of gfc_option.
621 * decl.c (match_record_decl, gfc_match_decl_type_spec,
622 gfc_match_structure_decl): Ditto.
623 * match.c (gfc_match_member_sep): Ditto.
624 * options.c (gfc_handle_option): Ditto.
625 * lang.opt (fdec-structure): Use Fortran Var for flag_dec_structure.
626 * lang.opt (fdec): Use Fortran Var to create flag_dec.
627 * options.c (set_dec_flags): With -fdec enable -fcray-pointer,
628 -fd-lines-as-comments (default), -fdollar-ok, and legacy std flags.
630 2016-10-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
633 * ioparm.def: Reorder dt parameters to match libgfortran.
634 * libgfortran.h: Swap definitions of GFC_INTERNAL_UNIT and
637 2016-10-24 Steven G. Kargl <kargl@gcc.gnu.org>
640 * interface.c (gfc_compare_derived_types): Convert gcc_assert()
641 to a gfc_internal_error() to prevent an ICE.
643 2016-10-24 Jakub Jelinek <jakub@redhat.com>
645 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Use VAR_P (x)
646 instead of TREE_CODE (x) == VAR_DECL.
647 * trans-expr.c (gfc_class_vptr_get, gfc_class_len_get,
648 gfc_class_len_or_zero_get, gfc_get_vptr_from_expr,
649 gfc_conv_string_length, conv_base_obj_fcn_val,
650 gfc_conv_procedure_call, gfc_trans_assignment_1): Likewise.
651 * trans-openmp.c (gfc_omp_predetermined_sharing,
652 gfc_omp_disregard_value_expr, gfc_omp_private_debug_clause,
653 gfc_trans_omp_atomic, gfc_trans_omp_do): Likewise.
654 * trans-io.c (nml_get_addr_expr): Likewise.
655 * trans-decl.c (gfc_finish_decl, gfc_build_qualified_array,
656 gfc_get_symbol_decl, gfc_get_fake_result_decl,
657 gfc_trans_deferred_vars, gfc_trans_use_stmts,
658 generate_local_decl): Likewise.
659 * trans-array.c (trans_array_constructor, trans_array_bound_check,
660 build_class_array_ref, gfc_array_init_size,
661 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
662 gfc_trans_dummy_array_bias, gfc_alloc_allocatable_for_assignment,
663 gfc_trans_deferred_array): Likewise.
664 * trans.c (gfc_build_array_ref): Likewise. Use
665 VAR_OR_FUNCTION_DECL_P (x) instead of TREE_CODE (x) == VAR_DECL
666 || TREE_CODE (x) == FUNCTION_DECL.
668 2016-10-23 Steven G. Kargl <kargl@gcc.gnu.org>
671 * parse.c (parse_spec): Allow STRUCTURE in BLOCK DATA. Sort
674 2016-10-23 Steven G. Kargl <kargl@gcc.gnu.org>
678 * array.c (gfc_match_array_constructor): Remove checkpointing
679 introduced in r196416 (original fix for PR fortran/54730). Move
680 initialization to top of function.
681 * match.c (gfc_match_type_spec): Special case matching for REAL.
683 2016-10-23 Paul Thomas <pault@gcc.gnu.org>
686 * class.c (gfc_find_derived_vtab): Obtain the gsymbol for the
687 derived type's module. If the gsymbol is present and the top
688 level namespace corresponds to a module, use the gsymbol name
689 space. In the search to see if the vtable exists, try the gsym
691 * dump-parse-tree (show_code_node): Modify select case dump to
692 show select type construct.
693 * resolve.c (build_loc_call): New function.
694 (resolve_select_type): Add check for repeated type is cases.
695 Retain selector expression and use it later instead of expr1.
696 Exclude deferred length TYPE IS cases and emit error message.
697 Store the address for the vtable in the 'low' expression and
698 the hash value in the 'high' expression, for each case. Do not
700 * trans.c(trans_code) : Call gfc_trans_select_type.
701 * trans-stmt.c (gfc_trans_select_type_cases): New function.
702 (gfc_trans_select_type): New function.
703 * trans-stmt.h : Add prototype for gfc_trans_select_type.
705 2016-10-22 Thomas Koenig <tkoenig@gcc.gnu.org>
708 * gfc_compare_functions: Strings with different lengths in
709 argument lists compare unequal.
711 2016-10-22 Andre Vehreschild <vehre@gcc.gnu.org>
718 * primary.c (gfc_expr_attr): For transformational functions on classes
719 get the attrs from the class argument.
720 * resolve.c (resolve_ordinary_assign): Remove error message due to
721 feature implementation. Rewrite POINTER_ASSIGNS to ordinary ones when
722 the right-hand side is scalar class object (with some restrictions).
723 * trans-array.c (trans_array_constructor): Create the temporary from
724 class' inner type, i.e., the derived type.
725 (build_class_array_ref): Add support for class array's storage of the
726 class object or the array descriptor in the decl saved descriptor.
727 (gfc_conv_expr_descriptor): When creating temporaries for class objects
728 add the class object's handle into the decl saved descriptor.
729 (structure_alloc_comps): Use the common way to get the _data component.
730 (gfc_is_reallocatable_lhs): Add notion of allocatable class objects.
731 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Remove the only ref
732 only when the expression's type is BT_CLASS.
733 (gfc_trans_class_init_assign): Correctly handle class arrays.
734 (gfc_trans_class_assign): Joined into gfc_trans_assignment_1.
735 (gfc_conv_procedure_call): Support for class types as arguments.
736 (trans_get_upoly_len): For unlimited polymorphics retrieve the _len
738 (trans_class_vptr_len_assignment): Catch all ways to assign the _vptr
739 and _len components of a class object correctly.
740 (pointer_assignment_is_proc_pointer): Identify assignments of
742 (gfc_trans_pointer_assignment): Enhance support for class object pointer
744 (gfc_trans_scalar_assign): Removed assert.
745 (trans_class_assignment): Assign to a class object.
746 (gfc_trans_assignment_1): Treat class objects correctly.
747 (gfc_trans_assignment): Propagate flags to trans_assignment_1.
748 * trans-stmt.c (gfc_trans_allocate): Use gfc_trans_assignment now
749 instead of copy_class_to_class.
750 * trans-stmt.h: Function prototype removed.
751 * trans.c (trans_code): Less special casing for class objects.
752 * trans.h: Added flags to gfc_trans_assignment () prototype.
754 2016-10-21 Paul Thomas <pault@gcc.gnu.org>
757 * resolve.c (fixup_array_ref): New function.
758 (resolve_select_type): Gather up the rank and array reference,
759 if any, from the selector. Fix up the 'associate name' and the
760 'associate entities' as necessary.
761 * trans-expr.c (gfc_conv_class_to_class): If the symbol backend
762 decl is a FUNCTION_DECL, use the 'fake_result_decl' instead.
764 2016-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
766 * array.c (gfc_match_array_constructor): Remove set, but unused
769 2016-10-20 Andre Vehreschild <vehre@gcc.gnu.org>
771 * class.c (gfc_build_class_symbol): Set the kind of _len to
772 gfc_charlen_int_kind to catch changes of the charlen kind.
774 2016-10-17 Steven G. Kargl <kargl@gcc.gnu.org>
777 * match.c (gfc_match_stopcode): Fix error reporting for several
778 deficiencies in matching stop-codes.
780 2016-10-17 Paul Thomas <pault@gcc.gnu.org>
784 * resolve.c (resolve_variable): Obtain the typespec for a
785 variable expression, when the variable is a function result
786 that is a procedure pointer.
788 2016-10-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
791 * trans-io.c (transfer_expr): Ignore dtio procedures for inquire
794 2016-10-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
797 * scanner.c (gfc_next_char_literal): If nextc is null do not
798 decrement the pointer and call the diagnostics.
800 2016-10-14 Andre Vehreschild <vehre@gcc.gnu.org>
802 * resolve.c (resolve_symbol): Add unimplemented message for
803 polymorphic types with allocatable/pointer components and coarray=lib.
805 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
807 * trans-intrinsic.c: Include memmodel.h.
809 2016-10-13 Andre Vehreschild <vehre@gcc.gnu.org>
812 * trans-expr.c (gfc_copy_class_to_class): Add generation of
813 runtime array bounds check.
814 * trans-intrinsic.c (gfc_conv_intrinsic_size): Add a crutch to
815 get the descriptor of a function returning a class object.
816 * trans-stmt.c (gfc_trans_allocate): Use the array spec on the
817 array to allocate instead of the array spec from source=.
819 2016-10-12 Andre Vehreschild <vehre@gcc.gnu.org>
821 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Fixed style.
822 (gfc_trans_class_init_assign): Same.
823 (gfc_conv_procedure_call): Same.
824 (gfc_trans_assignment_1): Same.
825 * trans-stmt.c (gfc_trans_allocate): Same.
827 2016-10-11 Jakub Jelinek <jakub@redhat.com>
829 * iresolve.c (is_trig_resolved, resolve_trig_call): Formatting fixes.
830 * simplify.c (simplify_trig_call, degrees_f, radians_f,
831 gfc_simplify_atrigd, gfc_simplify_cotan): Likewise.
833 2016-10-11 Steven G. Kargl <kargl@gcc.gnu.org>
836 * simplify.c (gfc_simplify_cshift): Check for zero.
838 2016-10-11 Fritz Reese <fritzoreese@gmail.com>
840 * iresolve.c (get_radians, get_degrees): Fix sloppy commit.
841 * simplify.c (degrees_f, radians_f): Ditto.
843 2016-10-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
845 * simplify.c (radians_f): Fix mpfr_mod.
846 * ireolce.c (get_degrees): Declare tmp.
848 2016-10-11 Fritz Reese <fritzoreese@gmail.com>
850 * lang.opt: New flag -fdec-math.
851 * options.c (set_dec_flags): Enable with -fdec.
852 * invoke.texi, gfortran.texi, intrinsic.texi: Update documentation.
853 * intrinsics.c (add_functions, do_simplify): New intrinsics
855 * gfortran.h (gfc_isym_id): New isym GFC_ISYM_COTAN.
856 * gfortran.h (gfc_resolve_atan2d, gfc_resolve_cotan,
857 gfc_resolve_trigd, gfc_resolve_atrigd): New prototypes.
858 * iresolve.c (resolve_trig_call, get_degrees, get_radians,
859 is_trig_resolved, gfc_resolve_cotan, gfc_resolve_trigd,
860 gfc_resolve_atrigd, gfc_resolve_atan2d): New functions.
861 * intrinsics.h (gfc_simplify_atan2d, gfc_simplify_atrigd,
862 gfc_simplify_cotan, gfc_simplify_trigd): New prototypes.
863 * simplify.c (simplify_trig_call, degrees_f, radians_f,
864 gfc_simplify_cotan, gfc_simplify_trigd, gfc_simplify_atrigd,
865 gfc_simplify_atan2d): New functions.
867 2016-10-10 Thomas Koenig <tkoenig@gcc.gnu.org>
870 * frontend-passes.c (inline_matmul_assign): Return early if
871 inside a FORALL statement.
873 2016-10-07 Fritz Reese <fritzoreese@gmail.com>
875 * interface.c (compare_components): Check charlen for BT_CHAR.
877 2016-10-07 Steven G. Kargl <kargl@gcc.gnu.org>
880 * interface.c (gfc_compare_interfaces): Fix detection of ambiguous
881 interface involving alternate return.
882 (check_interface1): Improve error message and loci.
884 2016-10-06 Louis Krupp <louis.krupp@zoho.com>
887 * trans-array.c (gfc_conv_expr_descriptor): Don't allocate
888 components if it's not necessary.
890 2016-10-05 Louis Krupp <louis.krupp@zoho.com>
893 * trans-expr.c (gfc_add_interface_mapping): Don't try to
894 dereference call-by-value scalar argument.
896 2016-10-05 Steven G. Kargl <kargls@gcc.gnu.org>
900 * resolve.c (resolve_assoc_var): Fix CHARACTER type-spec for a
901 selector in ASSOCIATE.
902 (resolve_fl_variable): Skip checks for an ASSOCIATE variable.
904 2016-10-05 Fritz Reese <fritzoreese@gmail.com>
906 * interface.c (gfc_compare_types): Don't compare BT_UNION components
907 until we know they're both UNIONs.
908 * interface.c (gfc_compare_union_types): Guard against empty
911 2016-10-05 Louis Krupp <louis.krupp@zoho.com>
914 * resolve.c (resolve_symbol): Don't apply default type rules to
915 mixed-entry master created for function entry points.
917 2016-09-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
920 * io.c (match_dt_unit): Peek check for missing format.
922 2016-09-30 Fritz Reese <fritzoreese@gmail.com>
925 * interface.c (gfc_compare_union_types): Null-guard map components.
927 2016-09-30 Fritz Reese <fritzoreese@gmail.com>
930 * interface.c (gfc_compare_derived_types): Use gfc_compare_union_types
931 to compare union types.
933 2016-09-30 Andre Vehreschild <vehre@gcc.gnu.org>
935 * trans-array.c (gfc_array_allocate): Use the token from coarray's
937 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Only generate
938 caf-reference chains from the first coarray references on.
939 * trans-types.c (gfc_get_derived_type): Switch on mandatory .token
940 member generation for allocatable arrays in coarrays in derived types.
942 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
944 * options.c (gfc_post_options): Remove special case for
945 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard.
947 2016-09-27 Jakub Jelinek <jakub@redhat.com>
949 * dependency.c (gfc_dep_compare_expr): Remove break after return.
950 * frontend-passes.c (optimize_op): Likewise.
951 * interface.c (gfc_current_interface_head): Likewise.
952 * symbol.c (check_conflict): Likewise.
953 * trans-intrinsic.c (build_fix_expr): Likewise.
956 * trans-openmp.c (gfc_omp_private_outer_ref): Return true even for
957 references to allocatable arrays.
959 2016-09-26 Steven G. Kargl <kargl@gcc.gnu.org>
962 * trans-common.c: Handle array elements in equivalence when
963 the lower and upper bounds of array spec are NULL.
965 2016-09-26 Paul Thomas <pault@gcc.gnu.org>
968 * interface.c (gfc_find_specific_dtio_proc) : Return NULL if
969 the derived type is broken, as indicated by a flavor other than
972 2016-09-26 Marek Polacek <polacek@redhat.com>
975 * arith.c (eval_intrinsic): Add gcc_fallthrough.
976 * frontend-passes.c (optimize_op): Likewise.
977 (gfc_expr_walker): Likewise.
978 * parse.c (next_fixed): Likewise.
979 * primary.c (match_variable): Likewise.
980 * trans-array.c: Likewise.
981 * trans-expr.c (flatten_array_ctors_without_strlen): Likewise.
982 * trans-io.c (transfer_expr): Likewise.
984 2016-09-25 Steven G. Kargl <kargl@gcc.gnu.org>
987 * dependency.c (gfc_check_dependency): Convert gcc_assert() to
988 a conditional and possible call to gfc_internal_error().
990 2016-09-25 Steven G. Kargl <kargl@gcc.gnu.org>
993 * frontend-passes.c (optimize_binop_array_assignment): Check pointer
996 2016-09-23 Fritz Reese <fritzoreese@gmail.com>
998 * lang.opt, invoke.texi, gfortran.texi: New flag -fdec-static.
999 * options.c (set_dec_flags): Set -fdec-static with -fdec.
1000 * gfortran.h (symbol_attribute): New attribute automatic.
1001 * gfortran.h (gfc_add_automatic): New prototype.
1002 * match.h (gfc_match_automatic, gfc_match_static): New functions.
1003 * decl.c (gfc_match_automatic, gfc_match_static): Ditto.
1004 * symbol.c (gfc_add_automatic): Ditto.
1005 * decl.c (match_attr_spec): Match AUTOMATIC and STATIC decls.
1006 * parse.c (decode_specification_statement, decode_statement): Ditto.
1007 * resolve.c (apply_default_init_local, resolve_fl_variable_derived,
1008 resolve_symbol): Support for automatic attribute.
1009 * symbol.c (check_conflict, gfc_copy_attr, gfc_is_var_automatic):
1011 * trans-decl.c (gfc_finish_var_decl): Ditto.
1013 2016-09-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1016 * gfortran.h (gfc_dt): Add *udtio.
1017 * ioparm.def: Add bit IOPARM_dt_f2003 to align with library use of bit
1018 25. Add IOPARM_dt_dtio bit to common flags.
1019 * resolve.c (resolve_transfer): Set dt->udtio to expression.
1020 * io.c (gfc_match_inquire): Adjust error message for internal
1022 * libgfortran.h: Adjust defines for GFC_INTERNAL_UNIT4,
1023 GFC_INTERNAL_UNIT, and GFC_INVALID_UNIT.
1024 * trans-io.c (build_dt): Set common_unit to reflect the KIND of
1025 the internal unit. Set mask bit for presence of dt->udtio.
1027 2016-09-22 Andre Vehreschild <vehre@gcc.gnu.org>
1029 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Use the old caf-
1030 interface where possible.
1032 2016-09-22 Paul Thomas <pault@gcc.gnu.org>
1034 * interface.c (check_dtio_interface1): Introduce errors for
1035 alternate returns and incorrect numbers of arguments.
1036 (gfc_find_specific_dtio_proc): Return cleanly if the derived
1037 type either doesn't exist or has no namespace.
1039 2016-09-21 Louis Krupp <louis.krupp@zoho.com>
1042 * decl.c (add_init_expr_to_sym): Catch variable character length
1045 2016-09-21 Paul Thomas <pault@gcc.gnu.org>
1049 * interface.c (gfc_find_specific_dtio_proc): Borrow trick from
1050 resolve_typebound_generic_call to find dtio procedures that
1051 over-ride those in the declared type.
1053 2016-09-20 Marek Polacek <polacek@redhat.com>
1055 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Adjust fall through
1058 2016-09-19 Andre Vehreschild <vehre@gcc.gnu.org>
1061 * expr.c (gfc_check_assign): Added flag to control whether datatype
1062 conversion is allowed.
1063 * gfortran.h: Added caf-token-tree to gfc_component. Changed
1064 prototypes mostly to add whether datatype conversion is allowed.
1065 * gfortran.texi: Added documentation for the caf_reference_t and the
1066 caf_*_by_ref function.
1067 * primary.c (caf_variable_attr): Similar to gfc_variable_attr but
1068 focused on the needs of coarrays.
1069 (gfc_caf_attr): Same.
1070 * resolve.c (resolve_ordinary_assign): Set the conversion allowed
1071 flag when not in a coarray.
1072 * trans-array.c (gfc_array_init_size): Moved setting of array
1073 descriptor's datatype before the alloc, because caf_register needs it.
1074 (gfc_array_allocate): Changed notion of whether an array is a coarray.
1075 (gfc_array_deallocate): Same.
1076 (gfc_alloc_allocatable_for_assignment): Added setting of coarray's
1077 array descriptor datatype before the register. And using deregister/
1078 register to mimmick a realloc for coarrays.
1079 * trans-decl.c (gfc_build_builtin_function_decls): Corrected signatures
1080 of old caf-functions and added signature definitions of the _by_ref
1082 (generate_coarray_sym_init): Adapted to new caf_register signature.
1083 * trans-expr.c (gfc_conv_scalar_to_descriptor): Make sure a constant
1084 is translated to an lvalue expression before use in an array
1086 (gfc_get_ultimate_alloc_ptr_comps_caf_token): New function. Get the
1087 last allocatable component's coarray token.
1088 (gfc_get_tree_for_caf_expr): For top-level object get the coarray
1089 token and check for unsupported features.
1090 (gfc_get_caf_token_offset): Getting the offset might procude new
1091 statements, which now are stored in the pre and post of the current se.
1092 (gfc_caf_get_image_index): For this image return a call to
1094 (expr_may_alias_variables): Check that the result is set for testing
1096 (alloc_scalar_allocatable_for_assignment): Added auto allocation of
1098 (gfc_trans_assignment_1): Rewrite an assign to a coarray object to
1100 * trans-intrinsic.c (conv_caf_vector_subscript_elem): Corrected
1102 (compute_component_offset): Compute the correct offset a structure
1104 (conv_expr_ref_to_caf_ref): Convert to a chain of refs into
1106 (gfc_conv_intrinsic_caf_get): Call caf_get_by_ref instead of caf_get.
1107 (conv_caf_send): Call caf_*_by_ref for coarrays that need
1109 (gfc_conv_intrinsic_function): Adapted to new signuature of the caf
1111 (conv_intrinsic_atomic_op): Add pre and post statements correctly.
1112 (conv_intrinsic_atomic_ref): Same.
1113 (conv_intrinsic_atomic_cas): Same.
1114 (conv_intrinsic_event_query): Same.
1115 * trans-stmt.c (gfc_trans_lock_unlock): Same.
1116 (gfc_trans_event_post_wait): Same.
1117 (gfc_trans_allocate): Support allocation of allocatable coarrays.
1118 (gfc_trans_deallocate): And there deallocation.
1119 * trans-types.c (gfc_typenode_for_spec): Added flag to control whether
1120 a component is part of coarray. When so, then add space to store a
1122 (gfc_build_array_type): Same.
1123 (gfc_get_array_descriptor_base): Same.
1124 (gfc_get_array_type_bounds): Same.
1125 (gfc_sym_type): Same.
1126 (gfc_get_derived_type): Same.
1127 (gfc_get_caf_reference_type): Declare the caf_reference_type.
1128 * trans-types.h: Prototype changes only.
1129 * trans.c (gfc_allocate_using_lib): Use the updated caf_register
1131 (gfc_allocate_allocatable): Same.
1132 (gfc_deallocate_with_status): Same.
1133 * trans.h: Defined the runtime types for caf_reference_t and the enums.
1135 2016-09-19 Fritz Reese <fritzoreese@gmail.com>
1138 * decl.c (match_record_decl, gfc_match_decl_type_spec): Fixes to
1139 handling of structure/record from declaration-type-spec.
1141 2016_09_17 Louis Krupp <louis.krupp@zoho.com>
1144 * resolve.c (resolve_allocate_expr): Check that derived type
1145 pointer, object or array has been successfully allocated before
1148 2016-09-16 Steven G. Kargl <kargl@gcc.gnu.org>
1151 * decl.c (char_len_param_value): Check parent namespace for
1154 2016-09-15 Louis Krupp <louis.krupp@zoho.com>
1157 * parse.c (reject_statement): Clear charlen pointers in implicit
1158 character typespecs before those charlen structures are freed.
1160 2016-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1162 * simplify.c (gfc_simplify_repeat): Fix a misplaced closing ')'.
1164 2016-09-13 Steven G. Kargl <kargl@gcc.gnu.org>
1167 * module.c (load_equiv): Revert revision 240063.
1169 2016-09-10 Paul Thomas <pault@gcc.gnu.org>
1170 Steven G. Kargl <kargl@gcc.gnu.org>
1173 * interface.c (check_dtio_arg_TKR_intent): Return after error.
1174 (check_dtio_interface1): Remove asserts, test for NULL and return
1177 2016-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
1180 * module.c (load_equiv): If the current namespace has a list of
1181 equivalence statements, initialize duplicate to false and then
1182 look for duplicates; otherwise, initialize it to true.
1184 2016-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
1187 * array.c (gfc_match_array_constructor): CHARACTER(len=*) cannot
1188 appear in an array constructor.
1190 2016-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
1193 * intrinsic.c (add_functions): Use correct keyword.
1195 2016-09-08 Steven G. Kargl <kargl@gcc.gnu.org>
1198 * array.c (gfc_match_array_constructor): If type-spec is present,
1199 walk the array constructor performing possible conversions for
1202 2016-09-08 Jakub Jelinek <jakub@redhat.com>
1205 * trans-openmp.c (gfc_trans_omp_atomic): For atomic write or
1206 swap, don't try to look through GFC_ISYM_CONVERSION. In other cases,
1207 check that value.function.isym is non-NULL before dereferencing it.
1209 2016-09-04 Steven G. Kargl <kargl@gcc.gnu.org>
1212 * resolve.c (deferred_requirements): New function to check F2008:C402.
1213 (resolve_fl_variable,resolve_fl_parameter): Use it.
1215 2016-09-04 Steven G. Kargl <kargl@gcc.gnu.org>
1218 * simplify.c (simplify_transformation_to_scalar): On error, result
1219 may be NULL, simply return.
1221 2016-08-31 Jakub Jelinek <jakub@redhat.com>
1224 * trans-openmp.c (gfc_trans_omp_parallel_workshare): Always add a
1225 BIND_EXPR with BLOCK around what gfc_trans_omp_workshare returns.
1228 * parse.c (parse_omp_oacc_atomic): Copy over cp->ext.omp_atomic
1229 to cp->block->ext.omp_atomic.
1230 * resolve.c (gfc_resolve_blocks): Assert block with one or two
1231 EXEC_ASSIGNs for EXEC_*_ATOMIC.
1232 * openmp.c (resolve_omp_atomic): Don't assert one or two
1233 EXEC_ASSIGNs, instead return quietly for EXEC_NOPs and otherwise
1234 error unexpected statements.
1236 2016-08-31 Paul Thomas <pault@gcc.gnu.org>
1237 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1240 * decl.c (access_attr_decl): Include case INTERFACE_DTIO as
1242 * gfortran.h : Add INTRINSIC_FORMATTED and
1243 INTRINSIC_UNFORMATTED to gfc_intrinsic_op. Add INTERFACE_DTIO
1244 to interface type. Add new enum 'dtio_codes'. Add bitfield
1245 'has_dtio_procs' to symbol_attr. Add prototypes
1246 'gfc_check_dtio_interfaces' and 'gfc_find_specific_dtio_proc'.
1247 * interface.c (dtio_op): New function.
1248 (gfc_match_generic_spec): Match generic DTIO interfaces.
1249 (gfc_match_interface): Treat DTIO interfaces in the same way as
1250 (gfc_current_interface_head): Add INTERFACE_DTIO appropriately.
1251 (check_dtio_arg_TKR_intent): New function.
1252 (check_dtio_interface1): New function.
1253 (gfc_check_dtio_interfaces): New function.
1254 (gfc_find_specific_dtio_proc): New function.
1255 * io.c : Add FMT_DT to format_token.
1256 (format_lex): Handle DTIO formatting.
1257 * match.c (gfc_op2string): Add DTIO operators.
1258 * resolve.c (derived_inaccessible): Ignore pointer components
1259 to enclosing derived type.
1260 (resolve_transfer): Resolve transfers that involve DTIO.
1261 procedures. Find the specific subroutine for the transfer and
1262 use its existence to over-ride some of the constraints on
1263 derived types. If the transfer is recursive, require that the
1264 subroutine be so qualified.
1265 (dtio_procs_present): New function.
1266 (resolve_fl_namelist): Remove inhibition of polymorphic objects
1267 in namelists if DTIO read and write subroutines exist. Likewise
1269 (resolve_types): Invoke 'gfc_verify_dtio_procedures'.
1270 * symbol.c : Set 'dtio_procs' using 'minit'.
1271 * trans-decl.c (gfc_finish_var_decl): If a derived-type/class
1272 object is associated with DTIO procedures, make it TREE_STATIC.
1273 * trans-expr.c (gfc_get_vptr_from_expr): If the expression
1274 drills down to a PARM_DECL, extract the vptr correctly.
1275 (gfc_conv_derived_to_class): Check 'info' in the test for
1276 'useflags'. If the se expression exists and is a pointer, use
1277 it as the class _data.
1278 * trans-io.c : Add IOCALL_X_DERIVED to iocall and the function
1279 prototype. Likewise for IOCALL_SET_NML_DTIO_VAL.
1280 (set_parameter_tree): Renamed from 'set_parameter_const', now
1281 returns void and has new tree argument. Calls modified to match
1283 (transfer_namelist_element): Transfer DTIO procedure pointer
1284 and vpointer using the new function IOCALL_SET_NML_DTIO_VAL.
1285 (get_dtio_proc): New function.
1286 (transfer_expr): Add new argument for the vptr field of class
1287 objects. Add the code to call the specific DTIO proc, convert
1288 derived types to class and call IOCALL_X_DERIVED.
1289 (trans_transfer): Add BT_CLASS to structures for treatment by
1290 the scalarizer. Obtain the vptr for the dynamic type, both for
1291 scalar and array transfer.
1293 2016-08-30 Fritz Reese <fritzoreese@gmail.com>
1295 * gfortran.texi: Fix typo in STRUCTURE documentation.
1297 2016-08-29 Fritz Reese <fritzoreese@gmail.com>
1299 Fix, reorganize, and clarify comparisons of anonymous types/components.
1302 * interface.c (is_anonymous_component, is_anonymous_dt): New functions.
1303 * interface.c (compare_components, gfc_compare_derived_types): Use new
1306 2016-08-27 Steven G. Kargl <kargl@gcc.gnu.org>
1309 * dependency.c (gfc_check_dependency): Do not assert with
1312 2016-08-27 Steven G. Kargl <kargl@gcc.gnu.org>
1315 simplify.c (simplify_ieee_selected_real_kind): Check for NULL pointers.
1317 2016-08-25 Steven g. Kargl <kargl@gcc.gnu.org>
1320 * frontend-passes.c (remove_trim,combine_array_constructor): Check for
1323 2016-08-24 Paul Thomas <pault@gcc.gnu.org>
1326 * resolve.c (resolve_fl_procedure): Use the correct gfc_charlen
1327 for deferred character length module procedures.
1329 2016-08-23 Fritz Reese <fritzoreese@gmail.com>
1331 * decl.c (gfc_match_structure_decl): Make gfc_structure_id static.
1333 2016-08-23 Fritz Reese <fritzoreese@gmail.com>
1335 * interface.c (compare_components): Fix typo in name check conditional.
1337 2016-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
1338 Bud Davis <jmdavis@link.com>
1341 * parse.c (next_free,next_fixed): Issue error for statement label
1342 without a statement.
1344 2016-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
1347 * interface.c (compare_parameter): Use better locus for error message.
1349 2016-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
1352 * gcc/fortran/trans-decl.c (generate_local_decl): Suppress warning
1353 for unused variable if symbol is entry point.
1355 2016-08-19 Joseph Myers <joseph@codesourcery.com>
1358 * trans-types.h (float128_type_node): Rename to
1359 gfc_float128_type_node.
1360 (complex_float128_type_node): Rename to
1361 gfc_complex_float128_type_node.
1362 * iso-c-binding.def, trans-intrinsic.c, trans-types.c: All users
1365 2016-08-19 Jakub Jelinek <jakub@redhat.com>
1368 * resolve.c (gfc_resolve): For ns->construct_entities don't save, clear
1369 and restore omp state around the resolving.
1372 * trans-openmp.c (gfc_trans_omp_parallel, gfc_trans_omp_task,
1373 gfc_trans_omp_target): Wrap gfc_trans_omp_code result in an extra
1374 BIND_EXPR with its own forced BLOCK.
1376 2016-08-19 Janne Blomqvist <jb@gcc.gnu.org>
1378 * intrinsics.texi (RANDOM_NUMBER): Remove reference to
1379 init_random_seed in example.
1380 (RANDOM_SEED): Remove warning to not set all seed values to 0.
1382 2016-08-18 David Malcolm <dmalcolm@redhat.com>
1384 * error.c (gfc_diagnostic_starter): Update for change to
1385 diagnostic_show_locus.
1387 2016-08-17 Jakub Jelinek <jakub@redhat.com>
1390 * trans-array.c (trans_array_constructor): Load
1391 expr->ts.u.cl->length_from_typespec only if expr->ts.type is
1394 2016-08-15 Fritz Reese <fritzoreese@gmail.com>
1396 * lang.opt, invoke.texi: New flag -finit-derived.
1397 * gfortran.h (gfc_build_default_init_expr, gfc_apply_init,
1398 gfc_generate_initializer): New prototypes.
1399 * expr.c (gfc_build_default_init_expr, gfc_apply_init,
1400 component_initializer, gfc_generate_initializer): New functions.
1401 * expr.c (gfc_default_initializer): Wrap gfc_generate_initializer.
1402 * decl.c (build_struct): Move common code to gfc_apply_init.
1403 * resolve.c (can_generate_init): New function.
1404 * resolve.c (build_default_init_expr): Wrap gfc_build_default_init_expr.
1405 * resolve.c (apply_default_init, resolve_fl_variable_derived): Use
1406 gfc_generate_initializer.
1407 * trans-decl.c (gfc_generate_function_code): Use
1408 gfc_generate_initializer.
1410 2016-08-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1412 * frontend-passes.c (create_var): Set ts.deferred for
1413 deferred-length character variables.
1414 * dump-parse-tree.c (show_typespec): Also dump
1415 is_c_interop, is_iso_c and deferred flags.
1417 2016-08-15 Jakub Jelinek <jakub@redhat.com>
1420 * trans-decl.c (gfc_get_symbol_decl): Call gfc_finish_var_decl
1421 for decl's character length before gfc_finish_var_decl on the
1424 2016-08-14 Chung-Lin Tang <cltang@codesourcery.com>
1427 * openmp.c (resolve_omp_clauses): Adjust use_device clause
1428 handling to only allow pointers and arrays.
1430 2016-08-12 Marek Polacek <polacek@redhat.com>
1433 * decl.c (match_attr_spec): Add FALLTHRU.
1434 * primary.c (match_arg_list_function): Likewise.
1435 * resolve.c (resolve_operator): Adjust fall through comment.
1436 (fixup_charlen): Add FALLTHRU.
1437 (resolve_allocate_expr): Adjust fall through comment.
1438 * trans-array.c (gfc_conv_ss_startstride): Add FALLTHRU.
1439 * trans-intrinsic.c (gfc_conv_intrinsic_len): Adjust fall through
1442 2016-08-11 Janne Blomqvist <jb@gcc.gnu.org>
1444 * check.c (gfc_check_random_seed): Use new seed size in check.
1445 * intrinsic.texi (RANDOM_NUMBER): Updated documentation.
1446 (RANDOM_SEED): Likewise.
1448 2016-08-08 Jakub Jelinek <jakub@redhat.com>
1451 * openmp.c (gfc_match_omp_declare_simd): Don't stick anything into
1452 BLOCK DATA ns, it will be rejected later.
1454 2016-08-08 Andre Vehreschild <vehre@gcc.gnu.org>
1457 * trans-array.c (gfc_array_allocate): When SOURCE= is a function
1458 stick with the ref of the object to allocate.
1460 2016-08-08 Andre Vehreschild <vehre@gcc.gnu.org>
1463 * trans-stmt.c (gfc_trans_allocate): Prevent generating code for
1464 copy of zero sized string and with it an ICE.
1466 2016-08-08 Andre Vehreschild <vehre@gcc.gnu.org>
1469 * trans-array.c (gfc_trans_dummy_array_bias): Ensure that the
1470 location information is correctly set.
1471 * trans-decl.c (gfc_trans_deferred_vars): Set the locus of the
1472 current construct early.
1474 2016-08-03 Fritz Reese <fritzoreese@gmail.com>
1476 * lang.opt: New option -fdec-intrinsic-ints.
1477 * options.c (set_dec_flags): Enable with -fdec.
1478 * gfortran.texi, invoke.texi, intrinsics.texi: Update documentation.
1479 * intrinsic.c (add_function, add_subroutine): New B/I/J/K intrinsic
1482 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1485 * target-memory.c (expr_to_char): Pass in locus and use it in error
1487 (gfc_merge_initializers): Ditto.
1488 * target-memory.h: Update prototype for gfc_merge_initializers ().
1489 * trans-common.c (get_init_field): Use the correct locus.
1491 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1494 * check.c (gfc_check_reshape): Check for constant expression.
1496 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1499 * decl.c (build_struct): Ensure that pointers point to something.
1501 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1504 * decl.c (gfc_set_constant_character_len): if expr is not
1505 constant issue an error instead of an ICE.
1507 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1510 * io.c (gfc_resolve_dt): Use correct locus.
1511 * resolve.c (resolve_branch): Ditto.
1513 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1516 * decl.c (char_len_param_value): Check return value of
1517 gfc_reduce_init_expr().
1519 2016-07-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
1521 * trans-array.c (gfc_conv_array_ref): Fix allocation of diagnostic
1522 message (was too small).
1524 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
1527 * decl.c (match_data_constant): On error, set 'result' to NULL.
1529 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
1532 * resolve.c(gfc_resolve_iterator): Failure of type conversion need
1535 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
1538 * check.c(numeric_check): Prevent ICE. Issue error for invalid
1539 subroutine as an actual argument when numeric argument is expected.
1541 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
1542 Thomas Koenig <tkoenig@gcc.gnu.org>
1545 * frontend-passes.c (gfc_run_passes): Bail out if there are any
1547 * error.c (gfc_internal_error): If there are any errors in the
1548 buffer, exit with EXIT_FAILURE.
1550 2016-07-28 Renlin Li <renlin.li@arm.com>
1553 2016-07-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1556 * dependency.c (gfc_check_dependency): Use dep_ref. Handle case
1557 if identical is true and two array element references differ.
1558 (gfc_dep_resovler): Move most of the code to dep_ref.
1559 (dep_ref): New function.
1560 * frontend-passes.c (realloc_string_callback): Name temporary
1561 variable "realloc_string".
1563 2016-07-26 Steven G. Kargl <kargl@gcc.gnu.org>
1566 * class.c: Remove assert. Iterate over component only if non-null.
1568 2016-07-22 Steven G. Kargl <kargl@gcc.gnu.org>
1571 * check.c (is_c_interoperable): Simplify right expression.
1573 2016-07-22 Thomas Koenig <tkoenig@gcc.gnu.org>
1576 * frontend-passes.c (combine_array_constructor): Don't
1577 do anything if the expression is inside an array iterator.
1579 2016-07-22 Andre Vehreschild <vehre@gcc.gnu.org>
1581 * expr.c (gfc_find_stat_co): Fixed whitespaces.
1582 * gfortran.texi: Fixed typos and reversed meaning of caf_get()'s
1583 src and dst description.
1584 * trans-decl.c (gfc_build_builtin_function_decls): Fixed style
1585 and corrected fnspec for caf functions.
1586 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Fixed style.
1587 (conv_caf_send): Dito.
1589 2016-07-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1592 * dependency.c (gfc_check_dependency): Use dep_ref. Handle case
1593 if identical is true and two array element references differ.
1594 (gfc_dep_resovler): Move most of the code to dep_ref.
1595 (dep_ref): New function.
1596 * frontend-passes.c (realloc_string_callback): Name temporary
1597 variable "realloc_string".
1599 2016-07-17 Fritz Reese <fritzoreese@gmail.com>
1602 * trans-decl.c (gfc_finish_var_decl): Replace automatic initializer with
1605 2016-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1606 Marco Restelli <mrestelli@gmail.com>
1609 * symbol.c (select_type_insert_tmp): Recursively call self to take care
1610 of nested select type.
1612 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1614 * openmp.c (gfc_match_omp_clauses): Scan for clause vector_length
1617 2016-07-15 Andre Vehreschild <vehre@gcc.gnu.org>
1620 * trans-expr.c (gfc_trans_subcomponent_assign): Special casing
1621 when allocatable component is set to null() in initializer.
1623 2016-07-14 Steven G. Kargl <kargl@gcc.gnu.org>
1626 * parse.c (parse_contained): Use proper locus.
1628 2016-07-14 Andre Vehreschild <vehre@gcc.gnu.org>
1631 * simplify.c (gfc_simplify_len): Only for unlimited polymorphic
1632 types replace the expression's _data ref with a _len ref.
1634 2016-07-09 Thomas Koenig <tkoenig@gcc.gnu.org>
1637 * frontend-passes.c (create_var): Always allocate a charlen
1638 for character variables.
1640 2016-07-08 Steven G. Kargl <kargl@gcc.gnu.org>
1643 * simplify (gfc_simplify_spread): Adjust locus.
1645 2016-07-08 Cesar Philippidis <cesar@codesourcery.com>
1647 * parse.c (matcha): Define.
1648 (decode_oacc_directive): Add spec_only local var and set it. Use
1649 matcha to parse acc directives except for routine and declare. Return
1650 ST_GET_FCN_CHARACTERISTICS if a non-declarative directive could be
1653 2016-07-08 Martin Liska <mliska@suse.cz>
1655 * invoke.texi (Wundefined-do-loop): Enhance documentation.
1657 2016-07-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1660 * trans-expr.c (gfc_trans_structure_assign): Remove assert.
1662 2016-07-07 Martin Liska <mliska@suse.cz>
1664 * lang.opt (Wundefined-do-loop): New option.
1665 * resolve.c (gfc_resolve_iterator): Warn for Wundefined-do-loop.
1666 (gfc_trans_simple_do): Generate a c-style loop.
1667 (gfc_trans_do): Fix GNU coding style.
1668 * invoke.texi: Mention the new warning.
1670 2016-07-07 Martin Liska <mliska@suse.cz>
1672 * trans-stmt.c (gfc_trans_do): Add expect builtin for DO
1673 loops with step bigger than +-1.
1675 2016-07-05 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
1677 * array.c (gfc_match_array_ref): Add parsing support for
1678 STAT= attribute in CAF reference.
1679 * expr.c (gfc_find_stat_co): New function that returns
1680 the STAT= assignment.
1681 * gfortran.h (gfc_array_ref): New member.
1682 * trans-decl.c (gfc_build_builtin_function_decls):
1683 new attribute for caf_get and caf_send functions.
1684 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Passing
1685 the stat attribute to external function.
1686 (gfc_conv_intrinsic_caf_send): Ditto.
1688 2016-07-05 Andre Vehreschild <vehre@gcc.gnu.org>
1691 * trans-stmt.c (gfc_trans_allocate): Add code of pre block of typespec
1692 in allocate to parent block.
1694 2016-07-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1697 * decl.c (match_procedure_interface): Exit loop if procedure
1698 interface refers to itself.
1700 2016-07-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1701 Steven G. Kargl <kargl@gcc.gnu.org>
1704 * simplify.c (gfc_simplify_ishftc): Check that absolute value of
1705 SHIFT is less than or equal to SIZE.
1707 2016-07-01 Jakub Jelinek <jakub@redhat.com>
1710 * f95-lang.c (struct binding_level): Add reversed field.
1711 (clear_binding_level): Adjust initializer.
1712 (getdecls): If reversed is clear, set it and nreverse the names
1713 chain before returning it.
1714 (poplevel): Use getdecls.
1715 * trans-decl.c (gfc_generate_function_code, gfc_process_block_locals):
1716 Use nreverse to pushdecl decls in the declaration order.
1719 * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
1720 for GFC_DECL_ASSOCIATE_VAR_P with POINTER_TYPE.
1722 2016-06-30 Jakub Jelinek <jakub@redhat.com>
1725 * parse.c (matchs, matcho): Move right before decode_omp_directive.
1726 If spec_only, only gfc_match the keyword and if successful, goto
1728 (matchds, matchdo): Define.
1729 (decode_omp_directive): Add spec_only local var and set it.
1730 Use matchds or matchdo macros instead of matchs or matcho
1731 for declare target, declare simd, declare reduction and threadprivate
1732 directives. Return ST_GET_FCN_CHARACTERISTICS if a non-declarative
1733 directive could be matched.
1734 (next_statement): For ST_GET_FCN_CHARACTERISTICS restore
1735 gfc_current_locus from old_locus even if there is no label.
1738 * trans-openmp.c (gfc_trans_omp_clauses): Set TREE_ADDRESSABLE on
1739 decls in to/from clauses.
1741 2016-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1744 * scanner.c (gfc_next_char_literal): Only decrement nextc if it
1747 2016-06-29 Cesar Philippidis <cesar@codesourcery.com>
1749 * openmp.c (match_oacc_clause_gang): Rename to ...
1750 (match_oacc_clause_gwv): this. Add support for OpenACC worker and
1752 (gfc_match_omp_clauses): Use match_oacc_clause_gwv for
1753 OMP_CLAUSE_{GANG,WORKER,VECTOR}. Propagate any MATCH_ERRORs for
1754 invalid OMP_CLAUSE_{ASYNC,WAIT,GANG,WORKER,VECTOR} clauses.
1755 (gfc_match_oacc_wait): Propagate MATCH_ERROR for invalid
1756 oacc_expr_lists. Adjust the first and needs_space arguments to
1757 gfc_match_omp_clauses.
1759 2016-06-29 Richard Biener <rguenther@suse.de>
1762 * f95-lang.c (LANG_HOOKS_GET_ALIAS_SET): Remove (un-)define.
1763 (gfc_get_alias_set): Remove.
1765 2016-06-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1768 * module.c (create_intrinsic_function): Check for NULL values and
1769 return after giving error.
1771 2016-06-21 Michael Meissner <meissner@linux.vnet.ibm.com>
1773 * trans-types.c (gfc_build_complex_type): Move setting complex
1774 MODE to layout_type, instead of setting it ahead of time by the
1777 2016-06-21 Tobias Burnus <burnus@net-b.de>
1780 * resolve.c (resolve_function): Don't resolve caf_get/caf_send.
1781 (check_data_variable): Strip-off caf_get before checking.
1783 2016-06-20 Tobias Burnus <burnus@net-b.de>
1786 * trans-expr.c (gfc_trans_pointer_assignment): Correctly handle
1787 RHS pointer functions.
1789 2016-06-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1791 * class.c (gfc_add_class_array_ref): Call gfc_add_data_component()
1792 instead of gfc_add_component_ref().
1793 (gfc_get_len_component): Call gfc_add_len_component() instead of
1794 gfc_add_component_ref().
1795 * trans-intrinsic.c (gfc_conv_intrinsic_loc): Call
1796 gfc_add_data_component() instead of gfc_add_component_ref().
1797 * trans.c (gfc_add_finalizer_call): Call
1798 gfc_add_final_component() and gfc_add_size_component() instead
1799 of gfc_add_component_ref.
1801 2016-06-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1803 * trans-types.c (gfc_typenode_for_spec): Commentary typo fix.
1805 2016-06-17 Cesar Philippidis <cesar@codesourcery.com>
1807 * openmp.c (match_acc): New generic function to parse OpenACC
1809 (gfc_match_oacc_parallel_loop): Use it.
1810 (gfc_match_oacc_parallel): Likewise.
1811 (gfc_match_oacc_kernels_loop): Likewise.
1812 (gfc_match_oacc_kernels): Likewise.
1813 (gfc_match_oacc_data): Likewise.
1814 (gfc_match_oacc_host_data): Likewise.
1815 (gfc_match_oacc_loop): Likewise.
1816 (gfc_match_oacc_enter_data): Likewise.
1817 (gfc_match_oacc_exit_data): Likewise.
1819 2016-06-16 Martin Liska <mliska@suse.cz>
1821 * trans-stmt.c (gfc_trans_simple_do): Predict the edge.
1823 2016-06-16 Martin Liska <mliska@suse.cz>
1825 * trans-array.c (gfc_array_allocate): Do not generate expect
1827 * trans.c (gfc_allocate_using_malloc): Properly set FAIL_ALLOC
1828 predictor for malloc return value.
1829 (gfc_allocate_allocatable): Use REALLOC predictor instead of
1831 (gfc_deallocate_with_status): Likewise.
1833 2016-06-13 Paul Thomas <pault@gcc.gnu.org>
1836 * frontend-passes.c (realloc_string_callback): Add a call to
1837 gfc_dep_compare_expr.
1839 2016-06-11 Dominique d'Humieres <dominiq@lps.ens.fr>
1842 * io.c (gfc_resolve_dt): Replace GFC_STD_GNU with GFC_STD_LEGACY.
1844 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1847 * openmp.c (gfc_match_oacc_cache): Add comment.
1849 2016-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1852 * io.c (match_io): For READ, commit in pending symbols in the
1853 current statement before trying to match an expression so that
1854 if the match fails and we undo symbols we dont toss good symbols.
1856 2016-06-05 Andre Vehreschild <vehre@gcc.gnu.org>
1859 * trans-array.c (gfc_trans_dummy_array_bias): For class arrays use
1860 the address of the _data component to reference the arrays data
1863 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1865 * trans-openmp.c (gfc_trans_omp_reduction_list): Add mark_addressable
1866 bool parameter, set reduction clause DECLs as addressable when true.
1867 (gfc_trans_omp_clauses): Pass clauses->async to
1868 gfc_trans_omp_reduction_list, add comment describing OpenACC situation.
1870 2016-06-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1873 * io.c (match_io): For READ, try to match a default character
1874 expression. If found, set the dt format expression to this,
1875 otherwise go back and try control list.
1877 2016-06-01 Paul Thomas <pault@gcc.gnu.org>
1880 * decl.c (copy_prefix): Add checks that the module procedure
1881 declaration prefixes are compliant with the interface. Invert
1882 order of existing elemental and pure checks.
1883 * resolve.c (resolve_fl_procedure): Invert order of elemental
1886 2016-06-01 Jakub Jelinek <jakub@redhat.com>
1888 * parse.c (case_decl): Move ST_OMP_* to ...
1889 (case_omp_decl): ... here, new macro.
1890 (verify_st_order): For case_omp_decl, complain about
1891 p->state >= ORDER_EXEC, but don't change p->state otherwise.
1893 2016-05-26 Jakub Jelinek <jakub@redhat.com>
1895 * openmp.c (resolve_omp_clauses): Warn if chunk_size is known not to
1898 2016-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1901 * scanner.c (gfc_next_char_literal): Clear end_flag when adjusting
1902 current locus back to old_locus.
1904 2016-05-20 Jakub Jelinek <jakub@redhat.com>
1907 * frontend-passes.c (realloc_string_callback): Clear inserted_block
1908 and changed_statement before calling create_var.
1910 2016-05-15 Harald Anlauf <anlauf@gmx.de>
1913 * interface.c (compare_parameter): Check for non-NULL pointer.
1915 2016-05-14 Fritz Reese <fritzoreese@gmail.com>
1917 * gfortran.texi: Update example of DEC UNION extension.
1919 2016-05-14 Fritz Reese <fritzoreese@gmail.com>
1922 * expr.c (gfc_default_initializer): Avoid extra component refs in
1923 constructors for derived types and classes.
1925 2016-05-11 Jakub Jelinek <jakub@redhat.com>
1928 * frontend-passes.c (inline_matmul_assign): Disable in !$omp workshare.
1930 2016-05-09 Richard Biener <rguenther@suse.de>
1933 * trans-decl.c: Include gimplify.h for unshare_expr.
1934 (gfc_trans_vla_one_sizepos): Unshare exprs before inserting
1937 2016-05-07 Fritz Reese <fritzoreese@gmail.com>
1940 * module.c (dt_upper_string): Rename to gfc_dt_upper_string
1941 (dt_lower_string): Likewise.
1942 * gfortran.h: Make new gfc_dt_upper/lower_string global.
1943 * class.c: Use gfc_dt_upper_string.
1945 * symbol.c: Likewise.
1946 * resolve.c (resolve_component): New function.
1947 (resolve_fl_derived0): Move component loop code to resolve_component.
1948 * parse.c (check_component): New function.
1949 (parse_derived): Move loop code to check_component.
1950 * lang.opt, invoke.texi, options.c : New option -fdec-structure.
1951 * libgfortran.h (bt): New basic type BT_UNION.
1952 * gfortran.h (gfc_option): New option -fdec-structure.
1953 (gfc_get_union_type, gfc_compare_union_types): New prototypes.
1954 (gfc_bt_struct, gfc_fl_struct, case_bt_struct, case_fl_struct): New
1956 (gfc_find_component): Change prototype.
1957 * match.h (gfc_match_member_sep, gfc_match_map, gfc_match_union,
1958 gfc_match_structure_decl): New prototypes.
1959 * parse.h (gfc_comp_struct): New macro.
1960 * symbol.c (gfc_find_component): Search for components in nested unions
1961 * class.c (insert_component_ref, gfc_add_component_ref, add_proc_comp,
1962 copy_vtab_proc_comps): Update calls to gfc_find_component.
1963 * primary.c (gfc_convert_to_structure_constructor): Likewise.
1964 * symbol.c (gfc_add_component): Likewise.
1965 * resolve.c (resolve_typebound_function, resolve_typebound_subroutine,
1966 resolve_typebound_procedure, resolve_component, resolve_fl_derived):
1968 * expr.c (get_union_init, component_init): New functions.
1969 * decl.c (match_clist_expr, match_record_decl, get_struct_decl,
1970 gfc_match_map, gfc_match_union, gfc_match_structure_decl): Likewise.
1971 * interface.c (compare_components, gfc_compare_union_types): Likewise.
1972 * match.c (gfc_match_member_sep): Likewise.
1973 * parse.c (check_component, parse_union, parse_struct_map): Likewise.
1974 * resolve.c (resolve_fl_struct): Likewise.
1975 * symbol.c (find_union_component): Likewise.
1976 * trans-types.c (gfc_get_union_type): Likewise.
1977 * parse.c (parse_derived): Use new functions.
1978 * interface.c (gfc_compare_derived_types, gfc_compare_types): Likewise.
1979 * expr.c (gfc_default_initializer): Likewise.
1980 * gfortran.texi: Support for DEC structures, unions, and maps.
1981 * gfortran.h (gfc_statement, sym_flavor): Likewise.
1982 * check.c (gfc_check_kill_sub): Likewise.
1983 * expr.c (gfc_copy_expr, simplify_const_ref,
1984 gfc_has_default_initializer): Likewise.
1985 * decl.c (build_sym, match_data_constant, add_init_expr_to_sym,
1986 match_pointer_init, build_struct, variable_decl,
1987 gfc_match_decl_type_spec, gfc_mach_data-decl, gfc_match_entry,
1988 gfc_match_end, gfc_match_derived_decl): Likewise.
1989 * interface.c (check_interface0, check_interface1,
1990 gfc_search_interface): Likewise.
1991 * misc.c (gfc_basic_typename, gfc_typename): Likewise.
1992 * module.c (add_true_name, build_tnt, bt_types, mio_typespec,
1993 fix_mio_expr, load_needed, mio_symbol, read_module, write_symbol,
1994 gfc_get_module_backend_decl): Likewise.
1995 * parse.h (gfc_compile_state): Likewise.
1996 * parse.c (decode_specification_statement, decode_statement,
1997 gfc_ascii_statement, verify_st_order, parse_spec): Likewise.
1998 * primary.c (gfc_match_varspec, gfc_match_structure_constructor,
1999 gfc_match_rvalue, match_variable): Likewise.
2000 * resolve.c (find_arglists, resolve_structure_cons,
2001 is_illegal_recursion, resolve_generic_f, get_declared_from_expr,
2002 resolve_typebound_subroutine, resolve_allocate_expr,
2003 nonscalar_typebound_assign, generate_component_assignments,
2004 resolve_fl_variable_derived, check_defined_assignments,
2005 resolve_component, resolve_symbol, resolve_equivalence_derived):
2007 * symbol.c (flavors, check_conflict, gfc_add_flavor, gfc_use_derived,
2008 gfc_restore_last_undo_checkpoint, gfc_type_compatible,
2009 gfc_find_dt_in_generic): Likewise.
2010 * trans-decl.c (gfc_get_module_backend_decl, create_function_arglist,
2011 gfc_create_module_variable, check_constant_initializer): Likewise.
2012 * trans-expr.c (gfc_conv_component_ref, gfc_conv_initializer,
2013 gfc_trans_alloc_subarray_assign, gfc_trans_subcomponent_assign,
2014 gfc_conv_structure, gfc_trans_scalar_assign, copyable_array_p):
2016 * trans-io.c (transfer_namelist_element, transfer_expr,
2017 gfc_trans_transfer): Likewise.
2018 * trans-stmt.c (gfc_trans_deallocate): Likewise.
2019 * trans-types.c (gfc_typenode_for_spec, gfc_copy_dt_decls_ifequal,
2020 gfc_get_derived_type): Likewise.
2022 2016-05-05 Jakub Jelinek <jakub@redhat.com>
2024 * openmp.c (gfc_match_omp_clauses): Restructuralize, so that clause
2025 parsing is done in a big switch based on gfc_peek_ascii_char and
2026 individual clauses under their first letters are sorted too.
2028 2016-05-02 Michael Meissner <meissner@linux.vnet.ibm.com>
2030 * trans-types.c (gfc_build_complex_type):
2032 2016-05-02 Richard Biener <rguenther@suse.de>
2034 * trans-array.c (gfc_trans_create_temp_array): Properly
2035 create a DECL_EXPR for the anonymous VLA array type.
2037 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2040 * trans-openmp.c (gfc_trans_oacc_combined_directive): Duplicate
2041 the reduction clause in both parallel and loop directives.
2043 2016-04-18 Michael Matz <matz@suse.de>
2045 * trans-io.c (gfc_build_io_library_fndecls): Use SET_TYPE_ALIGN.
2046 * trans-common.c (build_common_decl): Use SET_DECL_ALIGN.
2047 * trans-types.c (gfc_add_field_to_struct): Use SET_DECL_ALIGN.
2049 2016-04-13 Dominique d'Humieres <dominiq@lps.ens.fr>
2052 * intrinsic.texi: Correct the documentation of pseudorandom
2055 2016-04-13 Dominique d'Humieres <dominiq@lps.ens.fr>
2058 * gfortran.texi: Document OPEN( ... NAME=) as not implemented
2061 2016-04-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2064 * array.c (match_array_element_spec): Add check for non-integer.
2065 * simplify.c (gfc_simplify_reshape): If source shape is NULL return.
2067 2016-04-06 Patrick Palka <ppalka@gcc.gnu.org>
2070 * openmp.c (gfc_find_omp_udr): Add explicit braces to resolve a
2071 future -Wparentheses warning.
2073 2016-04-04 Andre Vehreschild <vehre@gcc.gnu.org>
2076 * resolve.c (resolve_allocate_expr): Emit error message when no
2077 array spec and no array valued source= expression is given in an
2078 F2008 allocate() for an array to allocate.
2080 2016-04-04 Andre Vehreschild <vehre@gcc.gnu.org>
2083 * trans-array.c (gfc_array_allocate): When the array is a coarray,
2084 do not nullyfing its allocatable components in array_allocate, because
2085 the nullify missed the array ref and nullifies the wrong component.
2088 2016-03-29 Andre Vehreschild <vehre@gcc.gnu.org>
2091 * trans-expr.c (gfc_class_len_or_zero_get): Add function to return a
2092 constant zero tree, when the class to get the _len component from is
2093 not unlimited polymorphic.
2094 (gfc_copy_class_to_class): Use the new function.
2095 * trans.h: Added interface of new function gfc_class_len_or_zero_get.
2097 2016-03-28 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
2099 * trans-decl.c (gfc_build_builtin_function_decls):
2100 caf_stop_numeric and caf_stop_str definition.
2101 * trans-stmt.c (gfc_trans_stop): invoke external functions
2102 for stop and stop_str when coarrays are used.
2103 * trans.h: extern for new functions.
2105 2016-03-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2108 * scanner.c (load_file): Update to use S_ISREG macro.
2110 2016-03-17 Thomas Schwinge <thomas@codesourcery.com>
2112 * gfortran.h (enum gfc_omp_map_op): Rename OMP_MAP_FORCE_DEALLOC
2113 to OMP_MAP_DELETE. Adjust all users.
2115 2016-03-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2116 Jim MacArthur <jim.macarthur@codethink.co.uk>
2119 * scanner.c (load_file): Check that included file is regular.
2121 2016-03-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2122 Harold Anlauf <anlauf@gmx.de>
2125 * invoke.texi: Explain use of the 'no-' construct within the
2127 * options.c (gfc_handle_runtime_check_option): Enable use of
2128 'no-' prefix for the various options with -fcheck= to allow
2129 negating previously enabled check options.
2131 2016-03-12 Paul Thomas <pault@gcc.gnu.org>
2134 * decl.c (gfc_match_prefix): Treat the 'module' prefix in the
2135 same way as the others, rather than fixing it to come last.
2136 (gfc_match_function_decl, gfc_match_subroutine): After errors
2137 in 'copy_prefix', emit them immediately in the case of module
2138 procedures to prevent a later ICE.
2141 * decl.c (gfc_match_submod_proc): Permit 'module procedure'
2142 declarations within the contains section of modules as well as
2144 * resolve.c (resolve_fl_procedure): Likewise.
2145 *trans-decl.c (build_function_decl): Change the gcc_assert to
2146 allow all forms of module procedure declarations within module
2149 2016-02-28 Thomas Koenig <tkoenig@gcc.gnu.org>
2153 * frontend-passes.c (realloc_string_callback): Don't set
2156 2016-02-28 Thomas Koenig <tkoenig@gcc.gnu.org>
2158 * dump-parse-tree.c (show_code_node): Print association
2159 list of a block if present. Handle EXEC_END_BLOCK.
2161 2016-02-28 Harald Anlauf <anlauf@gmx.de>
2162 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2165 * match.c (gfc_match_iterator): Add diagnostic for array variable
2168 2016-02-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2169 Steven G. Kargl <kargl@gcc.gnu.org>
2172 * io.c (gfc_match_open): Check that open status is an expression
2173 constant before comparing string to 'scratch' with NEWUNIT.
2175 2016-02-27 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
2177 * trans.c (gfc_allocate_allocatable): size conversion
2178 from byte to number of elements for event variables.
2179 * trans-types.c (gfc_get_derived_type): event variables
2180 represented as a pointer (like lock variable).
2182 2016-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2185 * scanner.c (add_path_to_list): If include path is not a directory,
2186 issue a fatal error.
2188 2016-02-23 Andre Vehreschild <vehre@gcc.gnu.org>
2191 * trans-array.c (gfc_array_allocate): Take the attributes from the
2192 expression to allocate and not from the source=-expression.
2194 2016-02-20 Paul Thomas <pault@gcc.gnu.org>
2197 * trans-decl.c (create_function_arglist): Deferred character
2198 length functions, with and without declared results, address
2199 the passed reference type as '.result' and the local string
2200 length as '..result'.
2201 (gfc_null_and_pass_deferred_len): Helper function to null and
2202 return deferred string lengths, as needed.
2203 (gfc_trans_deferred_vars): Call it, thereby reducing repeated
2204 code, add call for deferred arrays and reroute pointer function
2205 results. Avoid using 'tmp' for anything other that a temporary
2206 tree by introducing 'type_of_array' for the arrayspec type.
2208 2015-02-16 Thomas Koenig <tkoenig@gcc.gnu.org>
2211 * frontend-passes.c (cfe-expr_0): Don't register functions
2212 from within an ASSOCIATE statement.
2214 2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
2217 * decl.c (build_sym): If the name has already been defined as a
2218 type, it has a symtree with an upper case letter at the beginning.
2219 If such a symtree exists, issue an error and exit. Don't do
2220 this if there is no corresponding upper case letter.
2222 2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
2226 * decl.c (build_sym): Reverted previous patch.
2228 2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
2231 * decl.c (build_sym): If the name has already been defined as a
2232 type, issue error and return false.
2234 2016-02-12 David Malcolm <dmalcolm@redhat.com>
2237 * error.c (gfc_diagnostic_start_span): New function.
2238 (gfc_diagnostics_init): Initialize global_dc's start_span.
2240 2016-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
2243 * gfortran.h: Added flag to gfc_association_list indicating that
2244 the rank of an associate variable has been guessed only.
2245 * parse.c (parse_associate): Set the guess flag mentioned above
2246 when guessing the rank of an expression.
2247 * resolve.c (resolve_assoc_var): When the rank has been guessed,
2248 make sure, that the guess was correct else overwrite with the actual
2250 * trans-stmt.c (trans_associate_var): For subref_array_pointers in
2251 class objects, take the span from the _data component.
2253 2016-02-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2256 * primary.c (match_actual_arg): If symbol has attribute flavor of
2257 namelist, generate an error. (gfc_match_rvalue): Likewise return
2259 * resolve.c (resolve_symbol): Scan arument list of procedures and
2260 generate an error if a namelist is found.
2262 2016-02-05 Mikael Morin <mikael@gcc.gnu.org>
2265 * trans-expr.c (expr_is_variable, gfc_expr_is_variable): Rename
2266 the former to the latter and make it non-static. Update callers.
2267 * gfortran.h (gfc_expr_is_variable): New declaration.
2268 (struct gfc_ss_info): Add field needs_temporary.
2269 * trans-array.c (gfc_scalar_elemental_arg_saved_as_argument):
2270 Tighten the condition on aggregate expressions with a check
2271 that the expression is a variable and doesn't need a temporary.
2272 (gfc_conv_resolve_dependency): Add intermediary reference variable.
2273 Set the needs_temporary field.
2275 2016-02-03 Andre Vehreschild <vehre@gcc.gnu.org>
2279 * trans-expr.c (gfc_copy_class_to_class): For coarrays just the
2280 pointer is passed. Take it as is without trying to deref the
2282 * trans-stmt.c (gfc_trans_allocate): Take care of coarrays as
2283 argument to source=-expression.
2285 2016-02-02 Nathan Sidwell <nathan@codesourcery.com>
2287 * lang.opt (fopenacc-dim=): New option.
2289 2016-01-31 Paul Thomas <pault@gcc.gnu.org>
2292 * trans-expr.c (gfc_conv_procedure_call): For the vtable copy
2293 subroutines, add a string length argument, when the actual
2294 argument is an unlimited polymorphic class object.
2296 2016-01-30 Paul Thomas <pault@gcc.gnu.org>
2299 * trans-expr.c (gfc_conv_procedure_call): Correct expression
2300 for 'ulim_copy', which was missing a test for 'comp'.
2302 2016-01-28 Andre Vehreschild <vehre@gcc.gnu.org>
2305 * decl.c (gfc_match_end): Only unnest and remove BLOCK namespaces
2306 when the END encountered does not match a BLOCK's end.
2308 2016-01-27 Janus Weil <janus@gcc.gnu.org>
2311 * invoke.texi: Fix documentation of -Wall with respect to -Wtabs.
2313 2016-01-27 Paul Thomas <pault@gcc.gnu.org>
2316 * trans-expr.c (is_scalar_reallocatable_lhs): Remove the check
2317 for allocatable components, whilst checking if the symbol is a
2318 derived or class entity..
2320 2016-01-26 Paul Thomas <pault@gcc.gnu.org>
2323 * trans-expr.c (gfc_trans_assignment_1): Exclude initialization
2324 assignments from check on assignment of scalars to unassigned
2325 arrays and correct wrong code within the corresponding block.
2327 2016-01-26 David Malcolm <dmalcolm@redhat.com>
2330 * error.c (gfc_diagnostic_starter): Delete use of pp_newline.
2332 2016-01-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2336 * interface.c (gfc_arglist_matches_symbol): Replace assert with
2337 a return false if not a procedure.
2338 * resolve.c (resolve_generic_f): Test if we are resolving an
2339 initialization expression and adjust error message accordingly.
2341 2016-01-24 Thomas Koenig <tkoenig@gcc.gnu.org>
2344 * frontend-passes.c (matmul_lhs_realloc): Add
2345 forgotten break statement.
2347 2016-01-24 Dominique d'Humieres <dominiq@lps.ens.fr>
2350 * primary.c (gfc_variable_attr): revert revision r221955,
2351 call gfc_internal_error only if there is no error.
2353 2016-01-24 Thomas Koenig <tkoenig@gcc.gnu.org>
2356 * frontend-passes.c (enum matrix_case): Add case A2B2T for
2357 MATMUL(A,TRANSPoSE(B)) where A and B are rank 2.
2358 (inline_limit_check): Also add A2B2T.
2359 (matmul_lhs_realloc): Handle A2B2T.
2360 (check_conjg_variable): Rename to
2361 (check_conjg_transpose_variable): and also count TRANSPOSE.
2362 (inline_matmul_assign): Handle A2B2T.
2364 2016-01-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2367 * error.c (gfc_error): Save the state of abort_on_error and set
2368 it to false for buffered errors to allow normal processing.
2369 Restore the state before leaving.
2371 2016-01-19 Martin Jambor <mjambor@suse.cz>
2373 * types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New.
2374 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed.
2375 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): New.
2377 2016-01-15 Paul Thomas <pault@gcc.gnu.org>
2380 * resolve.c (check_uop_procedure): Prevent deferred length
2381 characters from being trapped by assumed length error.
2389 * trans-array.c (gfc_conv_scalarized_array_ref): Pass decl for
2390 function as well as variable expressions.
2391 (gfc_array_init_size): Add 'expr' as an argument. Use this to
2392 correctly set the descriptor dtype for deferred characters.
2393 (gfc_array_allocate): Add 'expr' to the call to
2394 'gfc_array_init_size'.
2395 * trans.c (gfc_build_array_ref): Expand logic for setting span
2396 to include indirect references to character lengths.
2397 * trans-decl.c (gfc_get_symbol_decl): Ensure that deferred
2398 result char lengths that are PARM_DECLs are indirectly
2399 referenced both for directly passed and by reference.
2400 (create_function_arglist): If the length type is a pointer type
2401 then store the length as the 'passed_length' and make the char
2402 length an indirect reference to it.
2403 (gfc_trans_deferred_vars): If a character length has escaped
2404 being set as an indirect reference, return it via the 'passed
2406 * trans-expr.c (gfc_conv_procedure_call): The length of
2407 deferred character length results is set TREE_STATIC and set to
2409 (gfc_trans_assignment_1): Do not fix the rse string_length if
2410 it is a variable, a parameter or an indirect reference. Add the
2411 code to trap assignment of scalars to unallocated arrays.
2412 * trans-stmt.c (gfc_trans_allocate): Remove 'def_str_len' and
2413 all references to it. Instead, replicate the code to obtain a
2414 explicitly defined string length and provide a value before
2415 array allocation so that the dtype is correctly set.
2416 trans-types.c (gfc_get_character_type): If the character length
2417 is a pointer, use the indirect reference.
2419 2016-01-10 Thomas Koenig <tkoenig@gcc.gnu.org>
2422 * frontend-passes.c (in_where): New variable.
2423 (inline_matmul_assign): Don't try this if we are within
2425 (gfc_code_walker): Keep track of in_where.
2427 2016-01-10 Paul Thomas <pault@gcc.gnu.org>
2430 * trans_array.c (gfc_conv_scalarized_array_ref): Add missing
2431 se->use_offset from condition for calculation of 'base'.
2433 2016-01-08 Jakub Jelinek <jakub@redhat.com>
2436 * trans.h (OMPWS_SCALARIZER_BODY): Define.
2437 (OMPWS_NOWAIT): Renumber.
2438 * trans-stmt.c (gfc_trans_where_3): Only set OMPWS_SCALARIZER_WS
2439 if OMPWS_SCALARIZER_BODY is not set already, and set also
2440 OMPWS_SCALARIZER_BODY until the final loop creation.
2441 * trans-expr.c (gfc_trans_assignment_1): Likewise.
2442 * trans-openmp.c (gfc_trans_omp_workshare): Also clear
2443 OMPWS_SCALARIZER_BODY.
2444 * trans-array.c (gfc_trans_scalarized_loop_end): Don't create
2445 OMP_FOR if OMPWS_SCALARIZER_BODY is set.
2447 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2449 Update copyright years.
2451 * gfortranspec.c (lang_specific_driver): Update copyright notice
2453 * gfc-internals.texi: Bump @copying's copyright year.
2454 * gfortran.texi: Ditto.
2455 * intrinsic.texi: Ditto.
2456 * invoke.texi: Ditto.
2458 2016-01-01 Paul Thomas <pault@gcc.gnu.org>
2461 * trans-array.c (evaluate_bound): If deferred, test that 'desc'
2462 is an array descriptor before using gfc_conv_descriptor_xxx.
2464 Copyright (C) 2016 Free Software Foundation, Inc.
2466 Copying and distribution of this file, with or without modification,
2467 are permitted in any medium without royalty provided the copyright
2468 notice and this notice are preserved.