1 2016-11-14 Janus Weil <janus@gcc.gnu.org>
4 * resolve.c (resolve_procedure_interface): Properly handle CLASS-valued
7 2016-11-13 Janus Weil <janus@gcc.gnu.org>
10 * decl.c (match_procedure_in_type): Apply the FL_PROCEDURE attribute
11 to the target procedure.
13 2016-11-13 Janus Weil <janus@gcc.gnu.org>
16 * resolve.c (resolve_component): Move check for C437
18 * decl.c (build_struct): ... here. Fix indentation.
20 2016-11-12 Janus Weil <janus@gcc.gnu.org>
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,
27 (gfc_match_generic): Remove an unnecessary assert.
28 Use gfc_get_tbp_symtree to avoid ICE.
30 2016-11-10 Fritz O. Reese <fritzoreese@gmail.com>
33 * gcc/fortran/decl.c (gfc_match_data_decl): Gracefully handle bad
34 anonymous structure declarations.
36 2016-11-10 Fritz O. Reese <fritzoreese@gmail.com>
38 * decl.c (get_struct_decl, gfc_match_map, gfc_match_union): Fix
40 * interface.c (gfc_compare_union_types): Likewise.
42 2016-11-10 Jakub Jelinek <jakub@redhat.com>
44 * cpp.c (cpp_define_builtins): Define _OPENMP to 201511 instead
46 * gfortran.texi: Mention partial OpenMP 4.5 support.
47 * intrinsic.texi: Update for OpenMP 4.5.
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
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
97 (match_omp): Change mask argument from unsigned int to
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
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):
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
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
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
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
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
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
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
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
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
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.
274 2016-11-09 Mikael Morin <mikael@gcc.gnu.org>
275 Janus Weil <janus@gcc.gnu.org>
278 * interface.c (compare_actual_formal): Add safety checks to avoid ICE.
280 2016-11-09 Fritz O. Reese <fritzoreese@gmail.com>
283 * trans-expr.c (gfc_trans_subcomponent_assign): Guard against NULL
286 2016-11-09 Steven G. Kargl <kargl@gcc.gnu.org>
287 Janus Weil <janus@gcc.gnu.org>
290 * expr.c (external_spec_function): Allow recursive specification
293 2016-11-09 Paul Thomas <pault@gcc.gnu.org>
295 * check.c (gfc_check_move_alloc): Prevent error that avoids
296 aliasing between to and from arguments from rejecting valid
299 2016-11-09 Janus Weil <janus@gcc.gnu.org>
302 * class.c (gfc_add_component_ref): Add safety checks to avoid ICE.
304 2016-11-08 Janus Weil <janus@gcc.gnu.org>
307 * expr.c (check_alloc_comp_init): Loosen an assert.
308 * resolve.c (resolve_fl_parameter): Reject class parameters.
310 2016-11-08 Janus Weil <janus@gcc.gnu.org>
313 * expr.c (gfc_check_pointer_assign): Add special check for procedure-
314 pointer component with absent interface.
316 2016-11-07 Thomas Koenig <tkoenig@gcc.gnu.org>
319 * expr.c (gfc_generate_initializer): Add where to EXPR_NULL
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.
326 2016-11-07 Thomas Koenig <tkoenig@gcc.gnu.org>
329 * match.c (gfc_match_select_type): Add where for expr1.
330 * resolve.c (resolev_select_type): Add where for expr1 of new
333 2016-11-06 Thomas Koenig <tkoenig@gcc.gnu.org>
336 resolve.c (build_loc_call): Add location to return value.
338 2016-11-06 Andre Vehreschild <vehre@gcc.gnu.org>
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
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.
361 2016-11-06 Thomas Koenig <tkoenig@gcc.gnu.org>
364 * arith.c (gfc_complex2real): Change gfc_warning_now to
367 2016-11-05 Paul Thomas <pault@gcc.gnu.org>
369 * check.c (gfc_check_move_alloc): Introduce error to prevent
370 aliasing between to and from arguments.
372 2016-11-05 Janus Weil <janus@gcc.gnu.org>
373 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
376 * invoke.texi: Mention -Wpedantic as an alias of -pedantic.
377 * check.c (gfc_check_transfer): Mention responsible flag in warning
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.
385 2016-11-05 Paul Thomas <pault@gcc.gnu.org>
388 * trans-expr.c (gfc_conv_class_to_class): Return _len component
389 of unlimited polymorphic entities.
391 2016-11-04 Paul Thomas <pault@gcc.gnu.org>
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.
399 2016-11-03 Fritz Reese <fritzoreese@gmail.com>
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.
408 2016-11-03 Fritz O. Reese <fritzoreese@gmail.com>
410 * decl.c (gfc_match_parameter): Allow omitted '()' with -std=legacy.
411 * parse.c (decode_statement): Match "parameter" before assignments.
412 * gfortran.texi: Document.
414 2016-11-02 Fritz O. Reese <fritzoreese@gmail.com>
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.
422 2016-11-02 Fritz Reese <fritzoreese@gmail.com>
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.
428 2016-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
431 * match.c (match_simple_where): Fill in locus for assigment
432 in simple WHERE statement.
434 2016-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
437 * match.c (gfc_match_where): Fill in locus for assigment
438 in simple WHERE statement.
440 2016-10-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
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.
447 2016-10-31 Jakub Jelinek <jakub@redhat.com>
449 * trans-types.c (gfc_get_array_descr_info): For -gdwarf-5 or
450 -gno-strict-dwarf, handle assumed rank arrays the way dwarf2out
453 2016-10-30 Thomas Koenig <tkoenig@gcc.gnu.org>
456 * arith.c (gfc_int2real): Change gfc_warning_now
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.
462 2016-10-28 Steven G. Kargl <kargl@gcc.gnu.org>
465 * symbol.c (gfc_type_compatible): Fix typo.
467 2016-10-27 Jakub Jelinek <jakub@redhat.com>
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
480 2016-10-27 Fritz Reese <fritzoreese@gmail.com>
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.
490 2016-10-26 Steven G. Kargl <kargl@gcc.gnu.org>
493 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Fix reference to an
494 array element of type CLASS.
496 2016-10-26 Paul Thomas <pault@gcc.gnu.org>
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.
503 2016-10-26 Fritz Reese <fritzoreese@gmail.com>
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.
510 * trans-io.c (gfc_trans_open): Ditto.
511 * io.c (match_dec_etag, match_dec_ftag): New functions.
512 * gfortran.texi: Document.
514 2016-10-25 Fritz Reese <fritzoreese@gmail.com>
516 * gfortran.texi: Document.
517 * resolve.c (logical_to_bitwise): New function.
518 * resolve.c (resolve_operator): Wrap operands with logical_to_bitwise.
520 2016-10-25 Andre Vehreschild <vehre@gcc.gnu.org>
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
531 * trans-expr.c (gfc_conv_intrinsic_to_class): Made comment more
534 2016-10-25 Cesar Philippidis <cesar@codesourcery.com>
536 * intrinsic.texi (cosd): New mathop.
538 2016-10-25 Fritz Reese <fritzoreese@gmail.com>
540 * match.c (gfc_match_intrinsic_op): Match ".XOR." with -std=legacy.
541 * gfortran.texi: Document.
543 2016-10-25 Fritz Reese <fritzoreese@gmail.com>
545 * primary.c (gfc_match_rvalue): Match %LOC as LOC with -std=legacy.
546 * gfortran.texi: Document.
548 2016-10-25 Fritz Reese <fritzoreese@gmail.com>
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.
556 2016-10-25 Fritz Reese <fritzoreese@gmail.com>
558 * gfortran.texi: Document.
559 * gfortran.h (gfc_is_whitespace): Include form feed ('\f').
561 2016-10-25 Fritz Reese <fritzoreese@gmail.com>
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.
574 2016-10-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
577 * ioparm.def: Reorder dt parameters to match libgfortran.
578 * libgfortran.h: Swap definitions of GFC_INTERNAL_UNIT and
581 2016-10-24 Steven G. Kargl <kargl@gcc.gnu.org>
584 * interface.c (gfc_compare_derived_types): Convert gcc_assert()
585 to a gfc_internal_error() to prevent an ICE.
587 2016-10-24 Jakub Jelinek <jakub@redhat.com>
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.
612 2016-10-23 Steven G. Kargl <kargl@gcc.gnu.org>
615 * parse.c (parse_spec): Allow STRUCTURE in BLOCK DATA. Sort
618 2016-10-23 Steven G. Kargl <kargl@gcc.gnu.org>
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.
627 2016-10-23 Paul Thomas <pault@gcc.gnu.org>
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
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
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.
649 2016-10-22 Thomas Koenig <tkoenig@gcc.gnu.org>
652 * gfc_compare_functions: Strings with different lengths in
653 argument lists compare unequal.
655 2016-10-22 Andre Vehreschild <vehre@gcc.gnu.org>
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
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
686 (gfc_trans_pointer_assignment): Enhance support for class object pointer
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.
698 2016-10-21 Paul Thomas <pault@gcc.gnu.org>
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.
708 2016-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
710 * array.c (gfc_match_array_constructor): Remove set, but unused
713 2016-10-20 Andre Vehreschild <vehre@gcc.gnu.org>
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.
718 2016-10-17 Steven G. Kargl <kargl@gcc.gnu.org>
721 * match.c (gfc_match_stopcode): Fix error reporting for several
722 deficiencies in matching stop-codes.
724 2016-10-17 Paul Thomas <pault@gcc.gnu.org>
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.
732 2016-10-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
735 * trans-io.c (transfer_expr): Ignore dtio procedures for inquire
738 2016-10-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
741 * scanner.c (gfc_next_char_literal): If nextc is null do not
742 decrement the pointer and call the diagnostics.
744 2016-10-14 Andre Vehreschild <vehre@gcc.gnu.org>
746 * resolve.c (resolve_symbol): Add unimplemented message for
747 polymorphic types with allocatable/pointer components and coarray=lib.
749 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
751 * trans-intrinsic.c: Include memmodel.h.
753 2016-10-13 Andre Vehreschild <vehre@gcc.gnu.org>
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=.
763 2016-10-12 Andre Vehreschild <vehre@gcc.gnu.org>
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.
771 2016-10-11 Jakub Jelinek <jakub@redhat.com>
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.
777 2016-10-11 Steven G. Kargl <kargl@gcc.gnu.org>
780 * simplify.c (gfc_simplify_cshift): Check for zero.
782 2016-10-11 Fritz Reese <fritzoreese@gmail.com>
784 * iresolve.c (get_radians, get_degrees): Fix sloppy commit.
785 * simplify.c (degrees_f, radians_f): Ditto.
787 2016-10-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
789 * simplify.c (radians_f): Fix mpfr_mod.
790 * ireolce.c (get_degrees): Declare tmp.
792 2016-10-11 Fritz Reese <fritzoreese@gmail.com>
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
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.
811 2016-10-10 Thomas Koenig <tkoenig@gcc.gnu.org>
814 * frontend-passes.c (inline_matmul_assign): Return early if
815 inside a FORALL statement.
817 2016-10-07 Fritz Reese <fritzoreese@gmail.com>
819 * interface.c (compare_components): Check charlen for BT_CHAR.
821 2016-10-07 Steven G. Kargl <kargl@gcc.gnu.org>
824 * interface.c (gfc_compare_interfaces): Fix detection of ambiguous
825 interface involving alternate return.
826 (check_interface1): Improve error message and loci.
828 2016-10-06 Louis Krupp <louis.krupp@zoho.com>
831 * trans-array.c (gfc_conv_expr_descriptor): Don't allocate
832 components if it's not necessary.
834 2016-10-05 Louis Krupp <louis.krupp@zoho.com>
837 * trans-expr.c (gfc_add_interface_mapping): Don't try to
838 dereference call-by-value scalar argument.
840 2016-10-05 Steven G. Kargl <kargls@gcc.gnu.org>
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.
848 2016-10-05 Fritz Reese <fritzoreese@gmail.com>
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
855 2016-10-05 Louis Krupp <louis.krupp@zoho.com>
858 * resolve.c (resolve_symbol): Don't apply default type rules to
859 mixed-entry master created for function entry points.
861 2016-09-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
864 * io.c (match_dt_unit): Peek check for missing format.
866 2016-09-30 Fritz Reese <fritzoreese@gmail.com>
869 * interface.c (gfc_compare_union_types): Null-guard map components.
871 2016-09-30 Fritz Reese <fritzoreese@gmail.com>
874 * interface.c (gfc_compare_derived_types): Use gfc_compare_union_types
875 to compare union types.
877 2016-09-30 Andre Vehreschild <vehre@gcc.gnu.org>
879 * trans-array.c (gfc_array_allocate): Use the token from coarray's
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.
886 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
888 * options.c (gfc_post_options): Remove special case for
889 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard.
891 2016-09-27 Jakub Jelinek <jakub@redhat.com>
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.
900 * trans-openmp.c (gfc_omp_private_outer_ref): Return true even for
901 references to allocatable arrays.
903 2016-09-26 Steven G. Kargl <kargl@gcc.gnu.org>
906 * trans-common.c: Handle array elements in equivalence when
907 the lower and upper bounds of array spec are NULL.
909 2016-09-26 Paul Thomas <pault@gcc.gnu.org>
912 * interface.c (gfc_find_specific_dtio_proc) : Return NULL if
913 the derived type is broken, as indicated by a flavor other than
916 2016-09-26 Marek Polacek <polacek@redhat.com>
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.
928 2016-09-25 Steven G. Kargl <kargl@gcc.gnu.org>
931 * dependency.c (gfc_check_dependency): Convert gcc_assert() to
932 a conditional and possible call to gfc_internal_error().
934 2016-09-25 Steven G. Kargl <kargl@gcc.gnu.org>
937 * frontend-passes.c (optimize_binop_array_assignment): Check pointer
940 2016-09-23 Fritz Reese <fritzoreese@gmail.com>
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):
955 * trans-decl.c (gfc_finish_var_decl): Ditto.
957 2016-09-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
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
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.
971 2016-09-22 Andre Vehreschild <vehre@gcc.gnu.org>
973 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Use the old caf-
974 interface where possible.
976 2016-09-22 Paul Thomas <pault@gcc.gnu.org>
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.
983 2016-09-21 Louis Krupp <louis.krupp@zoho.com>
986 * decl.c (add_init_expr_to_sym): Catch variable character length
989 2016-09-21 Paul Thomas <pault@gcc.gnu.org>
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.
997 2016-09-20 Marek Polacek <polacek@redhat.com>
999 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Adjust fall through
1002 2016-09-19 Andre Vehreschild <vehre@gcc.gnu.org>
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
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
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
1038 (expr_may_alias_variables): Check that the result is set for testing
1040 (alloc_scalar_allocatable_for_assignment): Added auto allocation of
1042 (gfc_trans_assignment_1): Rewrite an assign to a coarray object to
1044 * trans-intrinsic.c (conv_caf_vector_subscript_elem): Corrected
1046 (compute_component_offset): Compute the correct offset a structure
1048 (conv_expr_ref_to_caf_ref): Convert to a chain of refs into
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
1053 (gfc_conv_intrinsic_function): Adapted to new signuature of the caf
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
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
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.
1079 2016-09-19 Fritz Reese <fritzoreese@gmail.com>
1082 * decl.c (match_record_decl, gfc_match_decl_type_spec): Fixes to
1083 handling of structure/record from declaration-type-spec.
1085 2016_09_17 Louis Krupp <louis.krupp@zoho.com>
1088 * resolve.c (resolve_allocate_expr): Check that derived type
1089 pointer, object or array has been successfully allocated before
1092 2016-09-16 Steven G. Kargl <kargl@gcc.gnu.org>
1095 * decl.c (char_len_param_value): Check parent namespace for
1098 2016-09-15 Louis Krupp <louis.krupp@zoho.com>
1101 * parse.c (reject_statement): Clear charlen pointers in implicit
1102 character typespecs before those charlen structures are freed.
1104 2016-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1106 * simplify.c (gfc_simplify_repeat): Fix a misplaced closing ')'.
1108 2016-09-13 Steven G. Kargl <kargl@gcc.gnu.org>
1111 * module.c (load_equiv): Revert revision 240063.
1113 2016-09-10 Paul Thomas <pault@gcc.gnu.org>
1114 Steven G. Kargl <kargl@gcc.gnu.org>
1117 * interface.c (check_dtio_arg_TKR_intent): Return after error.
1118 (check_dtio_interface1): Remove asserts, test for NULL and return
1121 2016-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
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.
1128 2016-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
1131 * array.c (gfc_match_array_constructor): CHARACTER(len=*) cannot
1132 appear in an array constructor.
1134 2016-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
1137 * intrinsic.c (add_functions): Use correct keyword.
1139 2016-09-08 Steven G. Kargl <kargl@gcc.gnu.org>
1142 * array.c (gfc_match_array_constructor): If type-spec is present,
1143 walk the array constructor performing possible conversions for
1146 2016-09-08 Jakub Jelinek <jakub@redhat.com>
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.
1153 2016-09-04 Steven G. Kargl <kargl@gcc.gnu.org>
1156 * resolve.c (deferred_requirements): New function to check F2008:C402.
1157 (resolve_fl_variable,resolve_fl_parameter): Use it.
1159 2016-09-04 Steven G. Kargl <kargl@gcc.gnu.org>
1162 * simplify.c (simplify_transformation_to_scalar): On error, result
1163 may be NULL, simply return.
1165 2016-08-31 Jakub Jelinek <jakub@redhat.com>
1168 * trans-openmp.c (gfc_trans_omp_parallel_workshare): Always add a
1169 BIND_EXPR with BLOCK around what gfc_trans_omp_workshare returns.
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.
1180 2016-08-31 Paul Thomas <pault@gcc.gnu.org>
1181 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1184 * decl.c (access_attr_decl): Include case INTERFACE_DTIO as
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
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
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.
1237 2016-08-30 Fritz Reese <fritzoreese@gmail.com>
1239 * gfortran.texi: Fix typo in STRUCTURE documentation.
1241 2016-08-29 Fritz Reese <fritzoreese@gmail.com>
1243 Fix, reorganize, and clarify comparisons of anonymous types/components.
1246 * interface.c (is_anonymous_component, is_anonymous_dt): New functions.
1247 * interface.c (compare_components, gfc_compare_derived_types): Use new
1250 2016-08-27 Steven G. Kargl <kargl@gcc.gnu.org>
1253 * dependency.c (gfc_check_dependency): Do not assert with
1256 2016-08-27 Steven G. Kargl <kargl@gcc.gnu.org>
1259 simplify.c (simplify_ieee_selected_real_kind): Check for NULL pointers.
1261 2016-08-25 Steven g. Kargl <kargl@gcc.gnu.org>
1264 * frontend-passes.c (remove_trim,combine_array_constructor): Check for
1267 2016-08-24 Paul Thomas <pault@gcc.gnu.org>
1270 * resolve.c (resolve_fl_procedure): Use the correct gfc_charlen
1271 for deferred character length module procedures.
1273 2016-08-23 Fritz Reese <fritzoreese@gmail.com>
1275 * decl.c (gfc_match_structure_decl): Make gfc_structure_id static.
1277 2016-08-23 Fritz Reese <fritzoreese@gmail.com>
1279 * interface.c (compare_components): Fix typo in name check conditional.
1281 2016-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
1282 Bud Davis <jmdavis@link.com>
1285 * parse.c (next_free,next_fixed): Issue error for statement label
1286 without a statement.
1288 2016-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
1291 * interface.c (compare_parameter): Use better locus for error message.
1293 2016-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
1296 * gcc/fortran/trans-decl.c (generate_local_decl): Suppress warning
1297 for unused variable if symbol is entry point.
1299 2016-08-19 Joseph Myers <joseph@codesourcery.com>
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
1309 2016-08-19 Jakub Jelinek <jakub@redhat.com>
1312 * resolve.c (gfc_resolve): For ns->construct_entities don't save, clear
1313 and restore omp state around the resolving.
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.
1320 2016-08-19 Janne Blomqvist <jb@gcc.gnu.org>
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.
1326 2016-08-18 David Malcolm <dmalcolm@redhat.com>
1328 * error.c (gfc_diagnostic_starter): Update for change to
1329 diagnostic_show_locus.
1331 2016-08-17 Jakub Jelinek <jakub@redhat.com>
1334 * trans-array.c (trans_array_constructor): Load
1335 expr->ts.u.cl->length_from_typespec only if expr->ts.type is
1338 2016-08-15 Fritz Reese <fritzoreese@gmail.com>
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.
1354 2016-08-15 Thomas Koenig <tkoenig@gcc.gnu.org>
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.
1361 2016-08-15 Jakub Jelinek <jakub@redhat.com>
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
1368 2016-08-14 Chung-Lin Tang <cltang@codesourcery.com>
1371 * openmp.c (resolve_omp_clauses): Adjust use_device clause
1372 handling to only allow pointers and arrays.
1374 2016-08-12 Marek Polacek <polacek@redhat.com>
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
1386 2016-08-11 Janne Blomqvist <jb@gcc.gnu.org>
1388 * check.c (gfc_check_random_seed): Use new seed size in check.
1389 * intrinsic.texi (RANDOM_NUMBER): Updated documentation.
1390 (RANDOM_SEED): Likewise.
1392 2016-08-08 Jakub Jelinek <jakub@redhat.com>
1395 * openmp.c (gfc_match_omp_declare_simd): Don't stick anything into
1396 BLOCK DATA ns, it will be rejected later.
1398 2016-08-08 Andre Vehreschild <vehre@gcc.gnu.org>
1401 * trans-array.c (gfc_array_allocate): When SOURCE= is a function
1402 stick with the ref of the object to allocate.
1404 2016-08-08 Andre Vehreschild <vehre@gcc.gnu.org>
1407 * trans-stmt.c (gfc_trans_allocate): Prevent generating code for
1408 copy of zero sized string and with it an ICE.
1410 2016-08-08 Andre Vehreschild <vehre@gcc.gnu.org>
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.
1418 2016-08-03 Fritz Reese <fritzoreese@gmail.com>
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
1426 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1429 * target-memory.c (expr_to_char): Pass in locus and use it in error
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.
1435 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1438 * check.c (gfc_check_reshape): Check for constant expression.
1440 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1443 * decl.c (build_struct): Ensure that pointers point to something.
1445 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1448 * decl.c (gfc_set_constant_character_len): if expr is not
1449 constant issue an error instead of an ICE.
1451 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1454 * io.c (gfc_resolve_dt): Use correct locus.
1455 * resolve.c (resolve_branch): Ditto.
1457 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1460 * decl.c (char_len_param_value): Check return value of
1461 gfc_reduce_init_expr().
1463 2016-07-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
1465 * trans-array.c (gfc_conv_array_ref): Fix allocation of diagnostic
1466 message (was too small).
1468 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
1471 * decl.c (match_data_constant): On error, set 'result' to NULL.
1473 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
1476 * resolve.c(gfc_resolve_iterator): Failure of type conversion need
1479 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
1482 * check.c(numeric_check): Prevent ICE. Issue error for invalid
1483 subroutine as an actual argument when numeric argument is expected.
1485 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
1486 Thomas Koenig <tkoenig@gcc.gnu.org>
1489 * frontend-passes.c (gfc_run_passes): Bail out if there are any
1491 * error.c (gfc_internal_error): If there are any errors in the
1492 buffer, exit with EXIT_FAILURE.
1494 2016-07-28 Renlin Li <renlin.li@arm.com>
1497 2016-07-19 Thomas Koenig <tkoenig@gcc.gnu.org>
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".
1507 2016-07-26 Steven G. Kargl <kargl@gcc.gnu.org>
1510 * class.c: Remove assert. Iterate over component only if non-null.
1512 2016-07-22 Steven G. Kargl <kargl@gcc.gnu.org>
1515 * check.c (is_c_interoperable): Simplify right expression.
1517 2016-07-22 Thomas Koenig <tkoenig@gcc.gnu.org>
1520 * frontend-passes.c (combine_array_constructor): Don't
1521 do anything if the expression is inside an array iterator.
1523 2016-07-22 Andre Vehreschild <vehre@gcc.gnu.org>
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.
1533 2016-07-19 Thomas Koenig <tkoenig@gcc.gnu.org>
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".
1543 2016-07-17 Fritz Reese <fritzoreese@gmail.com>
1546 * trans-decl.c (gfc_finish_var_decl): Replace automatic initializer with
1549 2016-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1550 Marco Restelli <mrestelli@gmail.com>
1553 * symbol.c (select_type_insert_tmp): Recursively call self to take care
1554 of nested select type.
1556 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1558 * openmp.c (gfc_match_omp_clauses): Scan for clause vector_length
1561 2016-07-15 Andre Vehreschild <vehre@gcc.gnu.org>
1564 * trans-expr.c (gfc_trans_subcomponent_assign): Special casing
1565 when allocatable component is set to null() in initializer.
1567 2016-07-14 Steven G. Kargl <kargl@gcc.gnu.org>
1570 * parse.c (parse_contained): Use proper locus.
1572 2016-07-14 Andre Vehreschild <vehre@gcc.gnu.org>
1575 * simplify.c (gfc_simplify_len): Only for unlimited polymorphic
1576 types replace the expression's _data ref with a _len ref.
1578 2016-07-09 Thomas Koenig <tkoenig@gcc.gnu.org>
1581 * frontend-passes.c (create_var): Always allocate a charlen
1582 for character variables.
1584 2016-07-08 Steven G. Kargl <kargl@gcc.gnu.org>
1587 * simplify (gfc_simplify_spread): Adjust locus.
1589 2016-07-08 Cesar Philippidis <cesar@codesourcery.com>
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
1597 2016-07-08 Martin Liska <mliska@suse.cz>
1599 * invoke.texi (Wundefined-do-loop): Enhance documentation.
1601 2016-07-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1604 * trans-expr.c (gfc_trans_structure_assign): Remove assert.
1606 2016-07-07 Martin Liska <mliska@suse.cz>
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.
1614 2016-07-07 Martin Liska <mliska@suse.cz>
1616 * trans-stmt.c (gfc_trans_do): Add expect builtin for DO
1617 loops with step bigger than +-1.
1619 2016-07-05 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
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.
1632 2016-07-05 Andre Vehreschild <vehre@gcc.gnu.org>
1635 * trans-stmt.c (gfc_trans_allocate): Add code of pre block of typespec
1636 in allocate to parent block.
1638 2016-07-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1641 * decl.c (match_procedure_interface): Exit loop if procedure
1642 interface refers to itself.
1644 2016-07-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1645 Steven G. Kargl <kargl@gcc.gnu.org>
1648 * simplify.c (gfc_simplify_ishftc): Check that absolute value of
1649 SHIFT is less than or equal to SIZE.
1651 2016-07-01 Jakub Jelinek <jakub@redhat.com>
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.
1663 * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
1664 for GFC_DECL_ASSOCIATE_VAR_P with POINTER_TYPE.
1666 2016-06-30 Jakub Jelinek <jakub@redhat.com>
1669 * parse.c (matchs, matcho): Move right before decode_omp_directive.
1670 If spec_only, only gfc_match the keyword and if successful, goto
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.
1682 * trans-openmp.c (gfc_trans_omp_clauses): Set TREE_ADDRESSABLE on
1683 decls in to/from clauses.
1685 2016-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1688 * scanner.c (gfc_next_char_literal): Only decrement nextc if it
1691 2016-06-29 Cesar Philippidis <cesar@codesourcery.com>
1693 * openmp.c (match_oacc_clause_gang): Rename to ...
1694 (match_oacc_clause_gwv): this. Add support for OpenACC worker and
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.
1703 2016-06-29 Richard Biener <rguenther@suse.de>
1706 * f95-lang.c (LANG_HOOKS_GET_ALIAS_SET): Remove (un-)define.
1707 (gfc_get_alias_set): Remove.
1709 2016-06-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1712 * module.c (create_intrinsic_function): Check for NULL values and
1713 return after giving error.
1715 2016-06-21 Michael Meissner <meissner@linux.vnet.ibm.com>
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
1721 2016-06-21 Tobias Burnus <burnus@net-b.de>
1724 * resolve.c (resolve_function): Don't resolve caf_get/caf_send.
1725 (check_data_variable): Strip-off caf_get before checking.
1727 2016-06-20 Tobias Burnus <burnus@net-b.de>
1730 * trans-expr.c (gfc_trans_pointer_assignment): Correctly handle
1731 RHS pointer functions.
1733 2016-06-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
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.
1745 2016-06-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1747 * trans-types.c (gfc_typenode_for_spec): Commentary typo fix.
1749 2016-06-17 Cesar Philippidis <cesar@codesourcery.com>
1751 * openmp.c (match_acc): New generic function to parse OpenACC
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.
1763 2016-06-16 Martin Liska <mliska@suse.cz>
1765 * trans-stmt.c (gfc_trans_simple_do): Predict the edge.
1767 2016-06-16 Martin Liska <mliska@suse.cz>
1769 * trans-array.c (gfc_array_allocate): Do not generate expect
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
1775 (gfc_deallocate_with_status): Likewise.
1777 2016-06-13 Paul Thomas <pault@gcc.gnu.org>
1780 * frontend-passes.c (realloc_string_callback): Add a call to
1781 gfc_dep_compare_expr.
1783 2016-06-11 Dominique d'Humieres <dominiq@lps.ens.fr>
1786 * io.c (gfc_resolve_dt): Replace GFC_STD_GNU with GFC_STD_LEGACY.
1788 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1791 * openmp.c (gfc_match_oacc_cache): Add comment.
1793 2016-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
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.
1800 2016-06-05 Andre Vehreschild <vehre@gcc.gnu.org>
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
1807 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
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.
1814 2016-06-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
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.
1821 2016-06-01 Paul Thomas <pault@gcc.gnu.org>
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
1830 2016-06-01 Jakub Jelinek <jakub@redhat.com>
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.
1837 2016-05-26 Jakub Jelinek <jakub@redhat.com>
1839 * openmp.c (resolve_omp_clauses): Warn if chunk_size is known not to
1842 2016-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1845 * scanner.c (gfc_next_char_literal): Clear end_flag when adjusting
1846 current locus back to old_locus.
1848 2016-05-20 Jakub Jelinek <jakub@redhat.com>
1851 * frontend-passes.c (realloc_string_callback): Clear inserted_block
1852 and changed_statement before calling create_var.
1854 2016-05-15 Harald Anlauf <anlauf@gmx.de>
1857 * interface.c (compare_parameter): Check for non-NULL pointer.
1859 2016-05-14 Fritz Reese <fritzoreese@gmail.com>
1861 * gfortran.texi: Update example of DEC UNION extension.
1863 2016-05-14 Fritz Reese <fritzoreese@gmail.com>
1866 * expr.c (gfc_default_initializer): Avoid extra component refs in
1867 constructors for derived types and classes.
1869 2016-05-11 Jakub Jelinek <jakub@redhat.com>
1872 * frontend-passes.c (inline_matmul_assign): Disable in !$omp workshare.
1874 2016-05-09 Richard Biener <rguenther@suse.de>
1877 * trans-decl.c: Include gimplify.h for unshare_expr.
1878 (gfc_trans_vla_one_sizepos): Unshare exprs before inserting
1881 2016-05-07 Fritz Reese <fritzoreese@gmail.com>
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.
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
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):
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):
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):
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.
1966 2016-05-05 Jakub Jelinek <jakub@redhat.com>
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.
1972 2016-05-02 Michael Meissner <meissner@linux.vnet.ibm.com>
1974 * trans-types.c (gfc_build_complex_type):
1976 2016-05-02 Richard Biener <rguenther@suse.de>
1978 * trans-array.c (gfc_trans_create_temp_array): Properly
1979 create a DECL_EXPR for the anonymous VLA array type.
1981 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1984 * trans-openmp.c (gfc_trans_oacc_combined_directive): Duplicate
1985 the reduction clause in both parallel and loop directives.
1987 2016-04-18 Michael Matz <matz@suse.de>
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.
1993 2016-04-13 Dominique d'Humieres <dominiq@lps.ens.fr>
1996 * intrinsic.texi: Correct the documentation of pseudorandom
1999 2016-04-13 Dominique d'Humieres <dominiq@lps.ens.fr>
2002 * gfortran.texi: Document OPEN( ... NAME=) as not implemented
2005 2016-04-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2008 * array.c (match_array_element_spec): Add check for non-integer.
2009 * simplify.c (gfc_simplify_reshape): If source shape is NULL return.
2011 2016-04-06 Patrick Palka <ppalka@gcc.gnu.org>
2014 * openmp.c (gfc_find_omp_udr): Add explicit braces to resolve a
2015 future -Wparentheses warning.
2017 2016-04-04 Andre Vehreschild <vehre@gcc.gnu.org>
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.
2024 2016-04-04 Andre Vehreschild <vehre@gcc.gnu.org>
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.
2032 2016-03-29 Andre Vehreschild <vehre@gcc.gnu.org>
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.
2041 2016-03-28 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
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.
2049 2016-03-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2052 * scanner.c (load_file): Update to use S_ISREG macro.
2054 2016-03-17 Thomas Schwinge <thomas@codesourcery.com>
2056 * gfortran.h (enum gfc_omp_map_op): Rename OMP_MAP_FORCE_DEALLOC
2057 to OMP_MAP_DELETE. Adjust all users.
2059 2016-03-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2060 Jim MacArthur <jim.macarthur@codethink.co.uk>
2063 * scanner.c (load_file): Check that included file is regular.
2065 2016-03-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2066 Harold Anlauf <anlauf@gmx.de>
2069 * invoke.texi: Explain use of the 'no-' construct within the
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.
2075 2016-03-12 Paul Thomas <pault@gcc.gnu.org>
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.
2085 * decl.c (gfc_match_submod_proc): Permit 'module procedure'
2086 declarations within the contains section of modules as well as
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
2093 2016-02-28 Thomas Koenig <tkoenig@gcc.gnu.org>
2097 * frontend-passes.c (realloc_string_callback): Don't set
2100 2016-02-28 Thomas Koenig <tkoenig@gcc.gnu.org>
2102 * dump-parse-tree.c (show_code_node): Print association
2103 list of a block if present. Handle EXEC_END_BLOCK.
2105 2016-02-28 Harald Anlauf <anlauf@gmx.de>
2106 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2109 * match.c (gfc_match_iterator): Add diagnostic for array variable
2112 2016-02-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2113 Steven G. Kargl <kargl@gcc.gnu.org>
2116 * io.c (gfc_match_open): Check that open status is an expression
2117 constant before comparing string to 'scratch' with NEWUNIT.
2119 2016-02-27 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
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).
2126 2016-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2129 * scanner.c (add_path_to_list): If include path is not a directory,
2130 issue a fatal error.
2132 2016-02-23 Andre Vehreschild <vehre@gcc.gnu.org>
2135 * trans-array.c (gfc_array_allocate): Take the attributes from the
2136 expression to allocate and not from the source=-expression.
2138 2016-02-20 Paul Thomas <pault@gcc.gnu.org>
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.
2152 2015-02-16 Thomas Koenig <tkoenig@gcc.gnu.org>
2155 * frontend-passes.c (cfe-expr_0): Don't register functions
2156 from within an ASSOCIATE statement.
2158 2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
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.
2166 2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
2170 * decl.c (build_sym): Reverted previous patch.
2172 2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
2175 * decl.c (build_sym): If the name has already been defined as a
2176 type, issue error and return false.
2178 2016-02-12 David Malcolm <dmalcolm@redhat.com>
2181 * error.c (gfc_diagnostic_start_span): New function.
2182 (gfc_diagnostics_init): Initialize global_dc's start_span.
2184 2016-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
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
2194 * trans-stmt.c (trans_associate_var): For subref_array_pointers in
2195 class objects, take the span from the _data component.
2197 2016-02-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2200 * primary.c (match_actual_arg): If symbol has attribute flavor of
2201 namelist, generate an error. (gfc_match_rvalue): Likewise return
2203 * resolve.c (resolve_symbol): Scan arument list of procedures and
2204 generate an error if a namelist is found.
2206 2016-02-05 Mikael Morin <mikael@gcc.gnu.org>
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.
2219 2016-02-03 Andre Vehreschild <vehre@gcc.gnu.org>
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
2226 * trans-stmt.c (gfc_trans_allocate): Take care of coarrays as
2227 argument to source=-expression.
2229 2016-02-02 Nathan Sidwell <nathan@codesourcery.com>
2231 * lang.opt (fopenacc-dim=): New option.
2233 2016-01-31 Paul Thomas <pault@gcc.gnu.org>
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.
2240 2016-01-30 Paul Thomas <pault@gcc.gnu.org>
2243 * trans-expr.c (gfc_conv_procedure_call): Correct expression
2244 for 'ulim_copy', which was missing a test for 'comp'.
2246 2016-01-28 Andre Vehreschild <vehre@gcc.gnu.org>
2249 * decl.c (gfc_match_end): Only unnest and remove BLOCK namespaces
2250 when the END encountered does not match a BLOCK's end.
2252 2016-01-27 Janus Weil <janus@gcc.gnu.org>
2255 * invoke.texi: Fix documentation of -Wall with respect to -Wtabs.
2257 2016-01-27 Paul Thomas <pault@gcc.gnu.org>
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..
2264 2016-01-26 Paul Thomas <pault@gcc.gnu.org>
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.
2271 2016-01-26 David Malcolm <dmalcolm@redhat.com>
2274 * error.c (gfc_diagnostic_starter): Delete use of pp_newline.
2276 2016-01-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
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.
2285 2016-01-24 Thomas Koenig <tkoenig@gcc.gnu.org>
2288 * frontend-passes.c (matmul_lhs_realloc): Add
2289 forgotten break statement.
2291 2016-01-24 Dominique d'Humieres <dominiq@lps.ens.fr>
2294 * primary.c (gfc_variable_attr): revert revision r221955,
2295 call gfc_internal_error only if there is no error.
2297 2016-01-24 Thomas Koenig <tkoenig@gcc.gnu.org>
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.
2308 2016-01-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
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.
2315 2016-01-19 Martin Jambor <mjambor@suse.cz>
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.
2321 2016-01-15 Paul Thomas <pault@gcc.gnu.org>
2324 * resolve.c (check_uop_procedure): Prevent deferred length
2325 characters from being trapped by assumed length error.
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
2350 * trans-expr.c (gfc_conv_procedure_call): The length of
2351 deferred character length results is set TREE_STATIC and set to
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.
2363 2016-01-10 Thomas Koenig <tkoenig@gcc.gnu.org>
2366 * frontend-passes.c (in_where): New variable.
2367 (inline_matmul_assign): Don't try this if we are within
2369 (gfc_code_walker): Keep track of in_where.
2371 2016-01-10 Paul Thomas <pault@gcc.gnu.org>
2374 * trans_array.c (gfc_conv_scalarized_array_ref): Add missing
2375 se->use_offset from condition for calculation of 'base'.
2377 2016-01-08 Jakub Jelinek <jakub@redhat.com>
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.
2391 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2393 Update copyright years.
2395 * gfortranspec.c (lang_specific_driver): Update copyright notice
2397 * gfc-internals.texi: Bump @copying's copyright year.
2398 * gfortran.texi: Ditto.
2399 * intrinsic.texi: Ditto.
2400 * invoke.texi: Ditto.
2402 2016-01-01 Paul Thomas <pault@gcc.gnu.org>
2405 * trans-array.c (evaluate_bound): If deferred, test that 'desc'
2406 is an array descriptor before using gfc_conv_descriptor_xxx.
2408 Copyright (C) 2016 Free Software Foundation, Inc.
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.