1 2014-10-30 Release Manager
5 2014-10-10 Jakub Jelinek <jakub@redhat.com>
8 * trans-openmp.c (gfc_omp_predetermined_sharing): Return
9 OMP_CLAUSE_DEFAULT_SHARED for parameters or vtables.
11 2014-09-03 Marek Polacek <polacek@redhat.com>
15 * interface.c (compare_parameter): Fix condition.
16 * trans-expr.c (gfc_conv_procedure_call): Likewise.
18 2014-08-29 Jeffrey Armstrong <jeffrey.armstrong@approximatrix.com>
22 * module.c (gfc_dump_module): Unlink old module file before
25 2014-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
29 * frontend-passes.c (optimize_binop_array_assignment):
30 Do not try to optimize the array assignment for string
33 2014-08-16 Thomas Koenig <tkoenig@gcc.gnu.org>
37 * trans-expr.c (is_runtime_conformable): Add NULL pointer checks.
39 2014-08-15 Thomas Koenig <tkoenig@gcc.gnu.org>
43 * gfortran.h (symbol_attribute): Add fe_temp flag.
44 * frontend-passes.c (is_fe_temp): New function.
45 (create_var): Don't add a temporary for an already
46 created variable or for a constant.
47 (combine_ARRAY_constructor): Remove special handling
50 2014-08-15 Jakub Jelinek <jakub@redhat.com>
51 Tobias Burnus <burnus@net-b.de>
54 * openmp.c (resolve_omp_atomic): Only complain if code->expr1's attr
55 is allocatable, rather than whenever var->attr.allocatable.
57 2014-08-15 Jakub Jelinek <jakub@redhat.com>
60 * trans-openmp.c (gfc_omp_finish_clause): Handle scalar pointer
61 or allocatable passed by reference.
62 (gfc_trans_omp_clauses) <case OMP_LIST_MAP>: Likewise.
64 2014-08-14 Jakub Jelinek <jakub@redhat.com>
67 * openmp.c (gfc_match_omp_clauses): When failed to match
68 operator name, defined op name or name, set buffer to
69 empty string. Don't call gfc_find_omp_udr if buffer is empty
71 (gfc_match_omp_declare_reduction): Call gfc_undo_symbols ()
72 before calling gfc_free_omp_udr.
74 2014-08-10 Thomas Koenig <tkoenig@gcc.gnu.org>
78 * simplify.c (gfc_simplify_dot_product): Convert types of
79 vectors before calculating the result.
81 2014-07-19 Paul Thomas <pault@gcc.gnu.org>
83 Backport from mainline
85 * dependency.c (gfc_dep_resolver): Index the 'reverse' array so
86 that elements are skipped. This then correctly aligns 'reverse'
87 with the scalarizer loops.
89 2014-07-16 Release Manager
93 2014-07-07 Paul Thomas <pault@gcc.gnu.org>
97 * trans-expr.c (fcncall_realloc_result): Use the natural type
98 for the address expression of 'res_desc'.
100 2014-07-07 Dominique d'Humieres <dominiq@lps.ens.fr>
101 Mikael Morin <mikael@gcc.gnu.org>
104 * trans-expr.c (gfc_conv_expr_reference): Deallocate array
107 2014-07-02 Jakub Jelinek <jakub@redhat.com>
108 Fritz Reese <Reese-Fritz@zai.com>
110 * decl.c (variable_decl): Reject old style initialization
111 for derived type components.
113 2014-06-30 Jakub Jelinek <jakub@redhat.com>
115 * module.c (MOD_VERSION): Revert back to 12.
116 (MOD_VERSION_OMP4): Define.
117 (module_omp4): New variable.
118 (mio_symbol): Call mio_omp_declare_simd only if module_omp4.
119 (read_module): Load omp udrs only if module_omp4.
120 (write_module): Write omp udrs only if module_omp4.
121 (find_omp_declare_simd): New function.
122 (gfc_dump_module): Compute module_omp4. Use MOD_VERSION_OMP4
124 (gfc_use_module): Handle MOD_VERSION_OMP4, set module_omp4.
126 Backported from mainline
127 2014-06-25 Jakub Jelinek <jakub@redhat.com>
129 * trans.h (gfc_omp_clause_linear_ctor): New prototype.
130 * trans-openmp.c (gfc_omp_linear_clause_add_loop,
131 gfc_omp_clause_linear_ctor): New functions.
132 (gfc_trans_omp_clauses): Make sure OMP_CLAUSE_LINEAR_STEP has
133 correct type. Set OMP_CLAUSE_LINEAR_ARRAY flag if needed.
134 * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR): Redefine.
136 2014-06-24 Jakub Jelinek <jakub@redhat.com>
138 * dump-parse-tree.c (show_omp_namelist): Use n->udr->udr instead
140 * f95-lang.c (gfc_init_builtin_functions): Initialize
141 BUILT_IN_ASSUME_ALIGNED.
142 * gfortran.h (gfc_omp_namelist): Change udr field type to
143 struct gfc_omp_namelist_udr.
144 (gfc_omp_namelist_udr): New type.
145 (gfc_get_omp_namelist_udr): Define.
146 (gfc_resolve_code): New prototype.
147 * match.c (gfc_free_omp_namelist): Free name->udr.
148 * module.c (intrinsics): Add INTRINSIC_USER.
149 (fix_mio_expr): Likewise.
150 (mio_expr): Handle INSTRINSIC_USER and non-resolved EXPR_FUNCTION.
151 * openmp.c (gfc_match_omp_clauses): Adjust initialization of n->udr.
152 (gfc_match_omp_declare_reduction): Treat len=: the same as len=*.
153 Set attr.flavor on omp_{out,in,priv,orig} artificial variables.
154 (struct resolve_omp_udr_callback_data): New type.
155 (resolve_omp_udr_callback, resolve_omp_udr_callback2,
156 resolve_omp_udr_clause): New functions.
157 (resolve_omp_clauses): Adjust for n->udr changes, resolve UDR clauses
159 (omp_udr_callback): Don't check for implicitly declared functions
161 (gfc_resolve_omp_udr): Don't call gfc_resolve. Don't check for
162 implicitly declared subroutines here.
163 * resolve.c (resolve_function): If value.function.isym is non-NULL,
164 consider it already resolved.
165 (resolve_code): Renamed to ...
166 (gfc_resolve_code): ... this. No longer static.
167 (gfc_resolve_blocks, generate_component_assignments, resolve_codes):
169 * trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize
170 by reference type (C_PTR) variables.
171 (gfc_omp_finish_clause): Make sure OMP_CLAUSE_SIZE is non-NULL.
172 (gfc_trans_omp_udr_expr): Remove.
173 (gfc_trans_omp_array_reduction_or_udr): Adjust for n->udr changes.
174 Don't call gfc_trans_omp_udr_expr, even for sym->attr.dimension
175 expand it as assignment or subroutine call. Don't initialize
178 2014-06-18 Tobias Burnus <burnus@net-b.de>
180 * gfortran.texi (OpenMP): Update refs to OpenMP 4.0.
181 * intrinsic.texi (OpenMP Modules): Ditto.
183 2014-06-18 Jakub Jelinek <jakub@redhat.com>
185 * cpp.c (cpp_define_builtins): Change _OPENMP macro to
187 * dump-parse-tree.c (show_omp_namelist): Add list_type
188 argument. Adjust for rop being u.reduction_op now,
189 handle depend_op or map_op.
190 (show_omp_node): Adjust callers. Print some new
191 OpenMP 4.0 clauses, adjust for OMP_LIST_DEPEND_{IN,OUT}
192 becoming a single OMP_LIST_DEPEND.
193 * f95-lang.c (gfc_handle_omp_declare_target_attribute): New
195 (gfc_attribute_table): New variable.
196 (LANG_HOOKS_OMP_FINISH_CLAUSE, LANG_HOOKS_ATTRIBUTE_TABLE): Redefine.
197 * frontend-passes.c (gfc_code_walker): Handle new OpenMP target
198 EXEC_OMP_* codes and new clauses.
199 * gfortran.h (gfc_statement): Add ST_OMP_TARGET, ST_OMP_END_TARGET,
200 ST_OMP_TARGET_DATA, ST_OMP_END_TARGET_DATA, ST_OMP_TARGET_UPDATE,
201 ST_OMP_DECLARE_TARGET, ST_OMP_TEAMS, ST_OMP_END_TEAMS,
202 ST_OMP_DISTRIBUTE, ST_OMP_END_DISTRIBUTE, ST_OMP_DISTRIBUTE_SIMD,
203 ST_OMP_END_DISTRIBUTE_SIMD, ST_OMP_DISTRIBUTE_PARALLEL_DO,
204 ST_OMP_END_DISTRIBUTE_PARALLEL_DO, ST_OMP_DISTRIBUTE_PARALLEL_DO_SIMD,
205 ST_OMP_END_DISTRIBUTE_PARALLEL_DO_SIMD, ST_OMP_TARGET_TEAMS,
206 ST_OMP_END_TARGET_TEAMS, ST_OMP_TEAMS_DISTRIBUTE,
207 ST_OMP_END_TEAMS_DISTRIBUTE, ST_OMP_TEAMS_DISTRIBUTE_SIMD,
208 ST_OMP_END_TEAMS_DISTRIBUTE_SIMD, ST_OMP_TARGET_TEAMS_DISTRIBUTE,
209 ST_OMP_END_TARGET_TEAMS_DISTRIBUTE,
210 ST_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD,
211 ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_SIMD,
212 ST_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO,
213 ST_OMP_END_TEAMS_DISTRIBUTE_PARALLEL_DO,
214 ST_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
215 ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
216 ST_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
217 ST_OMP_END_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
218 ST_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD and
219 ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD.
220 (symbol_attribute): Add omp_declare_target field.
221 (gfc_omp_depend_op, gfc_omp_map_op): New enums.
222 (gfc_omp_namelist): Replace rop field with union
223 containing reduction_op, depend_op and map_op.
224 (OMP_LIST_DEPEND_IN, OMP_LIST_DEPEND_OUT): Remove.
225 (OMP_LIST_DEPEND, OMP_LIST_MAP, OMP_LIST_TO, OMP_LIST_FROM): New.
226 (gfc_omp_clauses): Add num_teams, device, thread_limit,
227 dist_sched_kind, dist_chunk_size fields.
228 (gfc_common_head): Add omp_declare_target field.
229 (gfc_exec_op): Add EXEC_OMP_TARGET, EXEC_OMP_TARGET_DATA,
230 EXEC_OMP_TEAMS, EXEC_OMP_DISTRIBUTE, EXEC_OMP_DISTRIBUTE_SIMD,
231 EXEC_OMP_DISTRIBUTE_PARALLEL_DO, EXEC_OMP_DISTRIBUTE_PARALLEL_DO_SIMD,
232 EXEC_OMP_TARGET_TEAMS, EXEC_OMP_TEAMS_DISTRIBUTE,
233 EXEC_OMP_TEAMS_DISTRIBUTE_SIMD, EXEC_OMP_TARGET_TEAMS_DISTRIBUTE,
234 EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD,
235 EXEC_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO,
236 EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
237 EXEC_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
238 EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD and
239 EXEC_OMP_TARGET_UPDATE.
240 (gfc_add_omp_declare_target): New prototype.
241 * match.h (gfc_match_omp_declare_target, gfc_match_omp_distribute,
242 gfc_match_omp_distribute_parallel_do,
243 gfc_match_omp_distribute_parallel_do_simd,
244 gfc_match_omp_distribute_simd, gfc_match_omp_target,
245 gfc_match_omp_target_data, gfc_match_omp_target_teams,
246 gfc_match_omp_target_teams_distribute,
247 gfc_match_omp_target_teams_distribute_parallel_do,
248 gfc_match_omp_target_teams_distribute_parallel_do_simd,
249 gfc_match_omp_target_teams_distribute_simd,
250 gfc_match_omp_target_update, gfc_match_omp_teams,
251 gfc_match_omp_teams_distribute,
252 gfc_match_omp_teams_distribute_parallel_do,
253 gfc_match_omp_teams_distribute_parallel_do_simd,
254 gfc_match_omp_teams_distribute_simd): New prototypes.
255 * module.c (ab_attribute): Add AB_OMP_DECLARE_TARGET.
256 (attr_bits): Likewise.
257 (mio_symbol_attribute): Handle omp_declare_target attribute.
258 (gfc_free_omp_clauses): Free num_teams, device, thread_limit
259 and dist_chunk_size expressions.
260 (OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE, OMP_CLAUSE_LASTPRIVATE,
261 OMP_CLAUSE_COPYPRIVATE, OMP_CLAUSE_SHARED, OMP_CLAUSE_COPYIN,
262 OMP_CLAUSE_REDUCTION, OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS,
263 OMP_CLAUSE_SCHEDULE, OMP_CLAUSE_DEFAULT, OMP_CLAUSE_ORDERED,
264 OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL,
265 OMP_CLAUSE_MERGEABLE, OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND,
266 OMP_CLAUSE_INBRANCH, OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH,
267 OMP_CLAUSE_PROC_BIND, OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN,
268 OMP_CLAUSE_UNIFORM): Use 1U instead of 1.
269 (OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP, OMP_CLAUSE_TO, OMP_CLAUSE_FROM,
270 OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_THREAD_LIMIT,
271 OMP_CLAUSE_DIST_SCHEDULE): Define.
272 (gfc_match_omp_clauses): Change mask parameter to unsigned int.
273 Adjust for rop becoming u.reduction_op. Disallow inbranch with
274 notinbranch. For depend clause, always create OMP_LIST_DEPEND
275 and fill in u.depend_op. Handle num_teams, device, map,
276 to, from, thread_limit and dist_schedule clauses.
277 (OMP_DECLARE_SIMD_CLAUSES): Or in OMP_CLAUSE_INBRANCH and
278 OMP_CLAUSE_NOTINBRANCH.
279 (OMP_TARGET_CLAUSES, OMP_TARGET_DATA_CLAUSES,
280 OMP_TARGET_UPDATE_CLAUSES, OMP_TEAMS_CLAUSES,
281 OMP_DISTRIBUTE_CLAUSES): Define.
282 (match_omp): New function.
283 (gfc_match_omp_do, gfc_match_omp_do_simd, gfc_match_omp_parallel,
284 gfc_match_omp_parallel_do, gfc_match_omp_parallel_do_simd,
285 gfc_match_omp_parallel_sections, gfc_match_omp_parallel_workshare,
286 gfc_match_omp_sections, gfc_match_omp_simd, gfc_match_omp_single,
287 gfc_match_omp_task): Rewritten using match_omp.
288 (gfc_match_omp_threadprivate, gfc_match_omp_declare_reduction):
289 Diagnose if the directives are followed by unexpected junk.
290 (gfc_match_omp_distribute, gfc_match_omp_distribute_parallel_do,
291 gfc_match_omp_distribute_parallel_do_simd,
292 gfc_match_omp_distrbute_simd, gfc_match_omp_declare_target,
293 gfc_match_omp_target, gfc_match_omp_target_data,
294 gfc_match_omp_target_teams, gfc_match_omp_target_teams_distribute,
295 gfc_match_omp_target_teams_distribute_parallel_do,
296 gfc_match_omp_target_teams_distribute_parallel_do_simd,
297 gfc_match_omp_target_teams_distrbute_simd, gfc_match_omp_target_update,
298 gfc_match_omp_teams, gfc_match_omp_teams_distribute,
299 gfc_match_omp_teams_distribute_parallel_do,
300 gfc_match_omp_teams_distribute_parallel_do_simd,
301 gfc_match_omp_teams_distrbute_simd): New functions.
302 * openmp.c (resolve_omp_clauses): Adjust for
303 OMP_LIST_DEPEND_{IN,OUT} being changed to OMP_LIST_DEPEND. Handle
304 OMP_LIST_MAP, OMP_LIST_FROM, OMP_LIST_TO, num_teams, device,
305 dist_chunk_size and thread_limit.
306 (gfc_resolve_omp_parallel_blocks): Only put sharing clauses into
307 ctx.sharing_clauses. Call gfc_resolve_omp_do_blocks for various
308 new EXEC_OMP_* codes.
309 (resolve_omp_do): Handle various new EXEC_OMP_* codes.
310 (gfc_resolve_omp_directive): Likewise.
311 (gfc_resolve_omp_declare_simd): Add missing space to diagnostics.
312 * parse.c (decode_omp_directive): Handle parsing of OpenMP 4.0
313 offloading related directives.
314 (case_executable): Add ST_OMP_TARGET_UPDATE.
315 (case_exec_markers): Add ST_OMP_TARGET*, ST_OMP_TEAMS*,
317 (case_decl): Add ST_OMP_DECLARE_TARGET.
318 (gfc_ascii_statement): Handle new ST_OMP_* codes.
319 (parse_omp_do): Handle various new ST_OMP_* codes.
320 (parse_executable): Likewise.
321 * resolve.c (gfc_resolve_blocks): Handle various new EXEC_OMP_*
323 (resolve_code): Likewise.
324 (resolve_symbol): Change that !$OMP DECLARE TARGET variables
326 * st.c (gfc_free_statement): Handle various new EXEC_OMP_* codes.
327 * symbol.c (check_conflict): Check omp_declare_target conflicts.
328 (gfc_add_omp_declare_target): New function.
329 (gfc_copy_attr): Copy omp_declare_target.
330 * trans.c (trans_code): Handle various new EXEC_OMP_* codes.
331 * trans-common.c (build_common_decl): Add "omp declare target"
333 * trans-decl.c (add_attributes_to_decl): Likewise.
334 * trans.h (gfc_omp_finish_clause): New prototype.
335 * trans-openmp.c (gfc_omp_finish_clause): New function.
336 (gfc_trans_omp_reduction_list): Adjust for rop being renamed
338 (gfc_trans_omp_clauses): Adjust for OMP_LIST_DEPEND_{IN,OUT}
339 change to OMP_LIST_DEPEND and fix up depend handling.
340 Handle OMP_LIST_MAP, OMP_LIST_TO, OMP_LIST_FROM, num_teams,
341 thread_limit, device, dist_chunk_size and dist_sched_kind.
342 (gfc_trans_omp_do): Handle EXEC_OMP_DISTRIBUTE.
343 (GFC_OMP_SPLIT_DISTRIBUTE, GFC_OMP_SPLIT_TEAMS,
344 GFC_OMP_SPLIT_TARGET, GFC_OMP_SPLIT_NUM, GFC_OMP_MASK_DISTRIBUTE,
345 GFC_OMP_MASK_TEAMS, GFC_OMP_MASK_TARGET, GFC_OMP_MASK_NUM): New.
346 (gfc_split_omp_clauses): Handle splitting of clauses for new
348 (gfc_trans_omp_do_simd): Add pblock argument, adjust for being
349 callable for combined constructs.
350 (gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_do_simd): Likewise.
351 (gfc_trans_omp_distribute, gfc_trans_omp_teams,
352 gfc_trans_omp_target, gfc_trans_omp_target_data,
353 gfc_trans_omp_target_update): New functions.
354 (gfc_trans_omp_directive): Adjust gfc_trans_omp_* callers, handle
355 new EXEC_OMP_* codes.
357 2014-06-10 Jakub Jelinek <jakub@redhat.com>
360 * f95-lang.c (gfc_init_builtin_functions): Handle -fopenmp-simd
362 * openmp.c (resolve_omp_clauses): Remove allocatable components
363 diagnostics. Add associate-name and intent(in) pointer
364 diagnostics for various clauses, diagnose procedure pointers in
366 * parse.c (match_word_omp_simd): New function.
367 (matchs, matcho): New macros.
368 (decode_omp_directive): Change match macros to either matchs
369 or matcho. Handle -fopenmp-simd.
370 (next_free, next_fixed): Handle -fopenmp-simd like -fopenmp.
371 * scanner.c (skip_free_comments, skip_fixed_comments, include_line):
373 * trans-array.c (get_full_array_size): Rename to...
374 (gfc_full_array_size): ... this. No longer static.
375 (duplicate_allocatable): Adjust caller. Add NO_MEMCPY argument
377 (gfc_duplicate_allocatable, gfc_copy_allocatable_data): Adjust
378 duplicate_allocatable callers.
379 (gfc_duplicate_allocatable_nocopy): New function.
380 (structure_alloc_comps): Adjust g*_full_array_size and
381 duplicate_allocatable caller.
382 * trans-array.h (gfc_full_array_size,
383 gfc_duplicate_allocatable_nocopy): New prototypes.
384 * trans-common.c (create_common): Call gfc_finish_decl_attrs.
385 * trans-decl.c (gfc_finish_decl_attrs): New function.
386 (gfc_finish_var_decl, create_function_arglist,
387 gfc_get_fake_result_decl): Call it.
388 (gfc_allocate_lang_decl): If DECL_LANG_SPECIFIC is already allocated,
389 don't allocate it again.
390 (gfc_get_symbol_decl): Set GFC_DECL_ASSOCIATE_VAR_P on
392 * trans.h (gfc_finish_decl_attrs): New prototype.
393 (struct lang_decl): Add scalar_allocatable and scalar_pointer
395 (GFC_DECL_SCALAR_ALLOCATABLE, GFC_DECL_SCALAR_POINTER,
396 GFC_DECL_GET_SCALAR_ALLOCATABLE, GFC_DECL_GET_SCALAR_POINTER,
397 GFC_DECL_ASSOCIATE_VAR_P): Define.
398 (GFC_POINTER_TYPE_P): Remove.
399 * trans-openmp.c (gfc_omp_privatize_by_reference): Don't check
400 GFC_POINTER_TYPE_P, instead test GFC_DECL_GET_SCALAR_ALLOCATABLE,
401 GFC_DECL_GET_SCALAR_POINTER or GFC_DECL_CRAY_POINTEE on decl.
402 (gfc_omp_predetermined_sharing): Associate-names are predetermined.
403 (enum walk_alloc_comps): New.
404 (gfc_has_alloc_comps, gfc_omp_unshare_expr_r, gfc_omp_unshare_expr,
405 gfc_walk_alloc_comps): New functions.
406 (gfc_omp_private_outer_ref): Return true for scalar allocatables or
407 decls with allocatable components.
408 (gfc_omp_clause_default_ctor, gfc_omp_clause_copy_ctor,
409 gfc_omp_clause_assign_op, gfc_omp_clause_dtor): Fix up handling of
410 allocatables, handle also OMP_CLAUSE_REDUCTION, handle scalar
411 allocatables and decls with allocatable components.
412 (gfc_trans_omp_array_reduction_or_udr): Don't handle allocatable
414 (gfc_trans_omp_reduction_list): Call
415 gfc_trans_omp_array_reduction_or_udr even for allocatable scalars.
416 (gfc_trans_omp_do_simd): If -fno-openmp, just expand it as OMP_SIMD.
417 (gfc_trans_omp_parallel_do_simd): Likewise.
418 * trans-types.c (gfc_sym_type): Don't set GFC_POINTER_TYPE_P.
419 (gfc_get_derived_type): Call gfc_finish_decl_attrs.
421 2014-06-06 Jakub Jelinek <jakub@redhat.com>
423 * dump-parse-tree.c (show_omp_namelist): Dump reduction
424 id in each list item.
425 (show_omp_node): Only handle OMP_LIST_REDUCTION, not
426 OMP_LIST_REDUCTION_FIRST .. OMP_LIST_REDUCTION_LAST. Don't
427 dump reduction id here.
428 * frontend-passes.c (dummy_code_callback): Renamed to...
429 (gfc_dummy_code_callback): ... this. No longer static.
430 (optimize_reduction): Use gfc_dummy_code_callback instead of
432 * gfortran.h (gfc_statement): Add ST_OMP_DECLARE_REDUCTION.
433 (symbol_attribute): Add omp_udr_artificial_var bitfield.
434 (gfc_omp_reduction_op): New enum.
435 (gfc_omp_namelist): Add rop and udr fields.
436 (OMP_LIST_PLUS, OMP_LIST_REDUCTION_FIRST, OMP_LIST_MULT,
437 OMP_LIST_SUB, OMP_LIST_AND, OMP_LIST_OR, OMP_LIST_EQV,
438 OMP_LIST_NEQV, OMP_LIST_MAX, OMP_LIST_MIN, OMP_LIST_IAND,
439 OMP_LIST_IOR, OMP_LIST_IEOR, OMP_LIST_REDUCTION_LAST): Removed.
440 (OMP_LIST_REDUCTION): New.
441 (gfc_omp_udr): New type.
442 (gfc_get_omp_udr): Define.
443 (gfc_symtree): Add n.omp_udr field.
444 (gfc_namespace): Add omp_udr_root field, add omp_udr_ns bitfield.
445 (gfc_free_omp_udr, gfc_omp_udr_find, gfc_resolve_omp_udrs,
446 gfc_dummy_code_callback): New prototypes.
447 * match.h (gfc_match_omp_declare_reduction): New prototype.
448 * module.c (MOD_VERSION): Increase to 13.
449 (omp_declare_reduction_stmt): New array.
450 (mio_omp_udr_expr, write_omp_udr, write_omp_udrs, load_omp_udrs):
452 (read_module): Read OpenMP user defined reductions.
453 (write_module): Write OpenMP user defined reductions.
454 * openmp.c: Include arith.h.
455 (gfc_free_omp_udr, gfc_find_omp_udr): New functions.
456 (gfc_match_omp_clauses): Handle user defined reductions.
457 Store reduction kind into gfc_omp_namelist instead of using
458 several OMP_LIST_* entries.
459 (match_udr_expr, gfc_omp_udr_predef, gfc_omp_udr_find,
460 gfc_match_omp_declare_reduction): New functions.
461 (resolve_omp_clauses): Adjust for reduction clauses being only
462 in OMP_LIST_REDUCTION list. Diagnose missing UDRs.
463 (struct omp_udr_callback_data): New type.
464 (omp_udr_callback, gfc_resolve_omp_udr, gfc_resolve_omp_udrs): New
466 * parse.c (decode_omp_directive): Handle !$omp declare reduction.
467 (case_decl): Add ST_OMP_DECLARE_REDUCTION.
468 (gfc_ascii_statement): Print ST_OMP_DECLARE_REDUCTION.
469 * resolve.c (resolve_fl_variable): Allow len=: or len=* on
470 sym->attr.omp_udr_artificial_var symbols.
471 (resolve_types): Call gfc_resolve_omp_udrs.
472 * symbol.c (gfc_get_uop): If gfc_current_ns->omp_udr_ns,
473 use parent ns instead of gfc_current_ns.
474 (gfc_get_sym_tree): Don't insert symbols into
475 namespaces with omp_udr_ns set.
476 (free_omp_udr_tree): New function.
477 (gfc_free_namespace): Call it.
478 * trans-openmp.c (struct omp_udr_find_orig_data): New type.
479 (omp_udr_find_orig, gfc_trans_omp_udr_expr): New functions.
480 (gfc_trans_omp_array_reduction): Renamed to...
481 (gfc_trans_omp_array_reduction_or_udr): ... this. Remove SYM
482 argument, instead pass gfc_omp_namelist pointer N. Handle
483 user defined reductions.
484 (gfc_trans_omp_reduction_list): Remove REDUCTION_CODE argument.
485 Handle user defined reductions and reduction ops in gfc_omp_namelist.
486 (gfc_trans_omp_clauses): Adjust for just a single OMP_LIST_REDUCTION
488 (gfc_split_omp_clauses): Likewise.
490 2014-05-12 Tobias Burnus <burnus@net-b.de>
493 * openmp.c (resolve_omp_do): Reject do concurrent loops.
495 2014-05-11 Jakub Jelinek <jakub@redhat.com>
497 * gfortran.h (gfc_statement): Add ST_OMP_CANCEL,
498 ST_OMP_CANCELLATION_POINT, ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP,
499 ST_OMP_SIMD, ST_OMP_END_SIMD, ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD,
500 ST_OMP_PARALLEL_DO_SIMD, ST_OMP_END_PARALLEL_DO_SIMD and
502 (gfc_omp_namelist): New typedef.
503 (gfc_get_omp_namelist): Define.
504 (OMP_LIST_UNIFORM, OMP_LIST_ALIGNED, OMP_LIST_LINEAR,
505 OMP_LIST_DEPEND_IN, OMP_LIST_DEPEND_OUT): New clause list kinds.
506 (gfc_omp_proc_bind_kind, gfc_omp_cancel_kind): New enums.
507 (gfc_omp_clauses): Change type of lists to gfc_omp_namelist *.
508 Add inbranch, notinbranch, cancel, proc_bind, safelen_expr and
510 (gfc_omp_declare_simd): New typedef.
511 (gfc_get_omp_declare_simd): Define.
512 (gfc_namespace): Add omp_declare_simd field.
513 (gfc_exec_op): Add EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT,
514 EXEC_OMP_TASKGROUP, EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD and
515 EXEC_OMP_PARALLEL_DO_SIMD.
516 (gfc_omp_atomic_op): Add GFC_OMP_ATOMIC_MASK, GFC_OMP_ATOMIC_SEQ_CST
517 and GFC_OMP_ATOMIC_SWAP.
518 (gfc_code): Change type of omp_namelist field to gfc_omp_namelist *.
519 (gfc_free_omp_namelist, gfc_free_omp_declare_simd,
520 gfc_free_omp_declare_simd_list, gfc_resolve_omp_declare_simd): New
522 * trans-stmt.h (gfc_trans_omp_declare_simd): New prototype.
523 * symbol.c (gfc_free_namespace): Call gfc_free_omp_declare_simd.
524 * openmp.c (gfc_free_omp_clauses): Free safelen_expr and
525 simdlen_expr. Use gfc_free_omp_namelist instead of
527 (gfc_free_omp_declare_simd, gfc_free_omp_declare_simd_list): New
529 (gfc_match_omp_variable_list): Add end_colon, headp and
530 allow_sections arguments. Handle parsing of array sections.
531 Use *omp_namelist* instead of *namelist* data structure and
532 functions/macros. Allow termination at : character.
533 (OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH,
534 OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND,
535 OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM): Define.
536 (gfc_match_omp_clauses): Change first and needs_space variables
537 into arguments with default values. Parse inbranch, notinbranch,
538 proc_bind, safelen, simdlen, uniform, linear, aligned and
540 (OMP_PARALLEL_CLAUSES): Add OMP_CLAUSE_PROC_BIND.
541 (OMP_DECLARE_SIMD_CLAUSES, OMP_SIMD_CLAUSES): Define.
542 (OMP_TASK_CLAUSES): Add OMP_CLAUSE_DEPEND.
543 (gfc_match_omp_do_simd): New function.
544 (gfc_match_omp_flush): Use *omp_namelist* instead of *namelist*
545 data structure and functions/macros.
546 (gfc_match_omp_simd, gfc_match_omp_declare_simd,
547 gfc_match_omp_parallel_do_simd): New functions.
548 (gfc_match_omp_atomic): Handle seq_cst clause. Handle atomic swap.
549 (gfc_match_omp_taskgroup, gfc_match_omp_cancel_kind,
550 gfc_match_omp_cancel, gfc_match_omp_cancellation_point): New
552 (resolve_omp_clauses): Add where, omp_clauses and ns arguments.
553 Use *omp_namelist* instead of *namelist* data structure and
554 functions/macros. Resolve uniform, aligned, linear, depend,
555 safelen and simdlen clauses.
556 (resolve_omp_atomic): Adjust for GFC_OMP_ATOMIC_{MASK,SEQ_CST,SWAP}
557 addition, recognize atomic swap.
558 (gfc_resolve_omp_parallel_blocks): Use gfc_omp_namelist instead
559 of gfc_namelist. Handle EXEC_OMP_PARALLEL_DO_SIMD the same as
560 EXEC_OMP_PARALLEL_DO.
561 (gfc_resolve_do_iterator): Use *omp_namelist* instead of *namelist*
562 data structure and functions/macros.
563 (resolve_omp_do): Likewise. Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD,
564 EXEC_OMP_PARALLEL_DO_SIMD.
565 (gfc_resolve_omp_directive): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD,
566 EXEC_OMP_PARALLEL_DO_SIMD and EXEC_OMP_CANCEL. Adjust
567 resolve_omp_clauses caller.
568 (gfc_resolve_omp_declare_simd): New function.
569 * parse.c (decode_omp_directive): Parse cancellation point, cancel,
570 declare simd, end do simd, end simd, end parallel do simd,
571 end taskgroup, parallel do simd, simd and taskgroup directives.
572 (case_executable): Add ST_OMP_CANCEL and ST_OMP_CANCELLATION_POINT.
573 (case_exec_markers): Add ST_OMP_TASKGROUP, case ST_OMP_SIMD,
574 ST_OMP_DO_SIMD and ST_OMP_PARALLEL_DO_SIMD.
575 (case_decl): Add ST_OMP_DECLARE_SIMD.
576 (gfc_ascii_statement): Handle ST_OMP_CANCEL,
577 ST_OMP_CANCELLATION_POINT, ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP,
578 ST_OMP_SIMD, ST_OMP_END_SIMD, ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD,
579 ST_OMP_PARALLEL_DO_SIMD, ST_OMP_END_PARALLEL_DO_SIMD and
581 (parse_omp_do): Handle ST_OMP_SIMD, ST_OMP_DO_SIMD and
582 ST_OMP_PARALLEL_DO_SIMD.
583 (parse_omp_atomic): Adjust for GFC_OMP_ATOMIC_* additions.
584 (parse_omp_structured_block): Handle ST_OMP_TASKGROUP and
585 ST_OMP_PARALLEL_DO_SIMD.
586 (parse_executable): Handle ST_OMP_SIMD, ST_OMP_DO_SIMD,
587 ST_OMP_PARALLEL_DO_SIMD and ST_OMP_TASKGROUP.
588 * trans-decl.c (gfc_get_extern_function_decl,
589 gfc_create_function_decl): Call gfc_trans_omp_declare_simd if
591 * frontend-passes.c (gfc_code_walker): Handle EXEC_OMP_SIMD,
592 EXEC_OMP_DO_SIMD and EXEC_OMP_PARALLEL_DO_SIMD. Walk
593 safelen_expr and simdlen_expr. Walk expressions in gfc_omp_namelist
594 of depend, aligned and linear clauses.
595 * match.c (match_exit_cycle): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD
596 and EXEC_OMP_PARALLEL_DO_SIMD.
597 (gfc_free_omp_namelist): New function.
598 * dump-parse-tree.c (show_namelist): Removed.
599 (show_omp_namelist): New function.
600 (show_omp_node): Handle OpenMP 4.0 additions.
601 (show_code_node): Handle EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT,
602 EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and
604 * match.h (gfc_match_omp_cancel, gfc_match_omp_cancellation_point,
605 gfc_match_omp_declare_simd, gfc_match_omp_do_simd,
606 gfc_match_omp_parallel_do_simd, gfc_match_omp_simd,
607 gfc_match_omp_taskgroup): New prototypes.
608 * trans-openmp.c (gfc_trans_omp_variable): Add declare_simd
609 argument, handle it. Allow current_function_decl to be NULL.
610 (gfc_trans_omp_variable_list): Add declare_simd argument, pass
611 it through to gfc_trans_omp_variable and disregard whether
612 sym is referenced if declare_simd is true. Work on gfc_omp_namelist
613 instead of gfc_namelist.
614 (gfc_trans_omp_reduction_list): Work on gfc_omp_namelist instead of
615 gfc_namelist. Adjust gfc_trans_omp_variable caller.
616 (gfc_trans_omp_clauses): Add declare_simd argument, pass it through
617 to gfc_trans_omp_variable{,_list} callers. Work on gfc_omp_namelist
618 instead of gfc_namelist. Handle inbranch, notinbranch, safelen,
619 simdlen, depend, uniform, linear, proc_bind and aligned clauses.
621 (gfc_trans_omp_atomic): Handle seq_cst clause, handle atomic swap,
622 adjust for GFC_OMP_ATOMIC_* changes.
623 (gfc_trans_omp_cancel, gfc_trans_omp_cancellation_point): New
625 (gfc_trans_omp_do): Add op argument, handle simd translation into
627 (GFC_OMP_SPLIT_SIMD, GFC_OMP_SPLIT_DO, GFC_OMP_SPLIT_PARALLEL,
628 GFC_OMP_SPLIT_NUM, GFC_OMP_MASK_SIMD, GFC_OMP_MASK_DO,
629 GFC_OMP_MASK_PARALLEL): New.
630 (gfc_split_omp_clauses, gfc_trans_omp_do_simd): New functions.
631 (gfc_trans_omp_parallel_do): Rework to use gfc_split_omp_clauses.
632 (gfc_trans_omp_parallel_do_simd, gfc_trans_omp_taskgroup): New
634 (gfc_trans_omp_directive): Handle EXEC_OMP_CANCEL,
635 EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
636 EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
637 Adjust gfc_trans_omp_do caller.
638 (gfc_trans_omp_declare_simd): New function.
639 * st.c (gfc_free_statement): Handle EXEC_OMP_CANCEL,
640 EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
641 EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
642 For EXEC_OMP_FLUSH call gfc_free_omp_namelist instead of
644 * module.c (omp_declare_simd_clauses): New variable.
645 (mio_omp_declare_simd): New function.
646 (mio_symbol): Call it.
647 * trans.c (trans_code): Handle EXEC_OMP_CANCEL,
648 EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
649 EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
650 * resolve.c (gfc_resolve_blocks): Handle EXEC_OMP_DO_SIMD,
651 EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
652 (resolve_code): Handle EXEC_OMP_CANCEL,
653 EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
654 EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
655 (resolve_types): Call gfc_resolve_omp_declare_simd.
657 2014-06-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
661 * trans-decl.c (gfc_create_module_variable): Don't create
662 Cray-pointee decls twice.
664 2014-06-09 Paul Thomas <pault@gcc.gnu.org>
668 * trans-stmt.c (trans_associate_var): Check that array
669 constructors are constant for direct reference.
671 2014-06-05 Richard Biener <rguenther@suse.de>
674 * gfortranspec.c (spec_file): Remove.
675 (find_spec_file): Likewise.
676 (lang_specific_driver): Do not look for specs file in -L
677 or append -specs command line argument.
678 (lang_specific_pre_link): Always %:include libgfortran.spec.
680 2014-05-29 Thomas Koenig <tkoenig@gcc.gnu.org>
683 Backport from mainline
684 * frontend-passes.c (in_assoc_list): New variable.
685 (optimize_namespace): Initialize in_assoc_list
686 (combine_array_constructor): Don't try to combine
688 (gfc_code_walker): Keep track of in_assoc_list.
690 2014-05-26 Janne Blomqvist <jb@gcc.gnu.org>
692 Backport from mainline
694 * intrinsics.texi (CTIME): Remove mention of locale-dependent
697 2014-04-22 Tobias Burnus <burnus@net-b.de>
699 Backport from mainline
700 2014-04-11 Tobias Burnus <burnus@net-b.de>
704 * resolve.c (gfc_resolve_finalizers): Ensure that vtables
705 and finalization wrappers are generated.
707 2014-04-22 Release Manager
709 * GCC 4.9.0 released.
711 2014-04-13 Paul Thomas <pault@gcc.gnu.org>
715 * trans.h: Add 'use_offset' bitfield to gfc_se.
716 * trans-array.c (gfc_conv_expr_descriptor): Use 'use_offset'
717 as a trigger to unconditionally recalculate the offset for
718 array slices and constant arrays.
719 trans-expr.c (gfc_conv_intrinsic_to_class): Use it.
720 trans-stmt.c (trans_associate_var): Ditto.
721 (gfc_conv_procedure_call): Ditto.
723 2014-04-11 Janne Blomqvist <jb@gcc.gnu.org>
725 * intrinsic.texi (RANDOM_SEED): Improve example.
727 2014-04-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
729 * class.c (gfc_build_class_symbol): Append "_t" to target class
730 names to make the generated type names unique.
732 2014-04-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
735 * trans-types.c (gfc_get_function_type): In case of recursion
736 build a variadic function type with empty argument list instead of a
737 stdarg-like function type with incomplete argument list.
739 2014-04-04 Tobias Burnus <burnus@net-b.de>
741 * check.c (gfc_check_cmplx): Fix typo.
743 2014-03-28 Mikael Morin <mikael@gcc.gnu.org>
744 Tobias Burnus <burnus@net-b.de>
747 * trans-expr.c (gfc_conv_derived_to_class): Avoid
748 generation of out-of-bounds range expr.
750 2014-03-28 Mikael Morin <mikael@gcc.gnu.org>
753 * trans-intrinsic.c (gfc_conv_intrinsic_ichar): Enlarge argument
756 2014-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
759 * frontend-passes.c (cfe_code): Do not walk subtrees
762 2014-03-27 Tobias Burnus <burnus@net-b.de>
765 * trans-expr.c (gfc_conv_scalar_to_descriptor): Fix handling
768 2014-03-26 Dominique d'Humieres <dominiq@lps.ens.fr>
771 * fortran.texi: Document Volatile COMMON as not supported.
773 2014-03-22 Jakub Jelinek <jakub@redhat.com>
776 * cpp.c (gfc_cpp_init): Restore cb_change_file call to
779 2014-03-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
782 * gfortran.texi: Add description of namelist DELIM= behavior.
784 2014-03-19 Tobias Burnus <burnus@net-b.>
787 * io.c (check_io_constraints): Use gfc_unset_implicit_pure.
788 * resolve.c (resolve_ordinary_assign): Ditto.
790 2014-03-19 Tobias Burnus <burnus@net-b.de>
794 * gfortran.h (gfc_unset_implicit_pure): New prototype.
795 * resolve.c (gfc_unset_implicit_pure): New.
796 (resolve_structure_cons, resolve_function,
797 pure_subroutine): Use it.
798 * decl.c (match_old_style_init, gfc_match_data,
799 match_pointer_init, variable_decl): Ditto.
800 * expr.c (gfc_check_pointer_assign): Ditto.
801 * intrinsic.c (gfc_intrinsic_sub_interface): Ditto.
802 * io.c (match_vtag, gfc_match_open, gfc_match_close,
803 match_filepos, gfc_match_inquire, gfc_match_print,
804 gfc_match_wait): Ditto.
805 * match.c (gfc_match_critical, gfc_match_stopcode,
806 lock_unlock_statement, sync_statement, gfc_match_allocate,
807 gfc_match_deallocate): Ditto.
808 * parse.c (decode_omp_directive): Ditto.
809 * symbol.c (gfc_add_save): Ditto.
811 2014-03-18 Janus Weil <janus@gcc.gnu.org>
815 * decl.c (match_attr_spec): Revert r208590.
817 2014-03-18 Jakub Jelinek <jakub@redhat.com>
820 * trans.c (gfc_unlikely, gfc_likely): Don't add __builtin_expect
823 2014-03-18 Tobias Burnus <burnus@net-b.de>
826 * trans.h (gfc_unlikely, gfc_likely): Add predictor as argument.
827 (gfc_trans_io_runtime_check): Remove.
828 * trans-io.c (gfc_trans_io_runtime_check): Make static; add has_iostat
829 as argument, add predictor to block.
830 (set_parameter_value, gfc_trans_open, gfc_trans_close, build_filepos,
831 gfc_trans_inquire, gfc_trans_wait, build_dt): Update calls.
832 * trans.c (gfc_unlikely, gfc_likely): Add predictor as argument.
833 (gfc_trans_runtime_check, gfc_allocate_using_malloc,
834 gfc_allocate_allocatable, gfc_deallocate_with_status): Set explicitly
836 * trans-expr.c (gfc_conv_procedure_call): Ditto.
837 * trans-stmt.c (gfc_trans_allocate): Ditto.
838 * trans-array.c (gfc_array_init_size, gfc_array_allocate): Ditto.
840 2014-03-15 Janus Weil <janus@gcc.gnu.org>
843 * decl.c (match_attr_spec): Variables in the main program implicitly
844 get the SAVE attribute in Fortran 2008.
846 2014-03-14 Mikael Morin <mikael@gcc.gnu.org>
849 * trans-array.c (gfc_conv_array_parameter): Don't reuse the descriptor
850 if it has transposed dimensions.
852 2014-03-08 Tobias Burnus <burnus@net-b.de>
855 * f95-lang.c (gfc_init): Return false when only
857 * options.c (gfc_post_options): Ditto.
859 2014-03-08 Tobias Burnus <burnus@net-b.de>
861 * gfortran.texi (Fortran 2003 Status): Mention finalization,
862 deferred-length character support and input rounding.
863 (Fortran 2008 Status): Mention that at termination
864 signalling exceptions are shown.
866 2014-03-06 Paul Thomas <pault@gcc.gnu.org>
867 Janus Weil <janus@gcc.gnu.org>
870 * gfortran.h (symbol_attribute): Add deferred_parameter attribute.
871 * primary.c (build_actual_constructor): It is not an error if
872 a missing component has the deferred_parameter attribute;
873 equally, if one is given a value, it is an error.
874 * resolve.c (resolve_fl_derived0): Remove error for deferred
875 character length components. Add the hidden string length
876 field to the structure. Give it the deferred_parameter
878 * trans-array.c (duplicate_allocatable): Add a strlen field
879 which is used as the element size if it is non-null.
880 (gfc_duplicate_allocatable, gfc_copy_allocatable_data): Pass a
881 NULL to the new argument in duplicate_allocatable.
882 (structure_alloc_comps): Set the hidden string length as
883 appropriate. Use it in calls to duplicate_allocatable.
884 (gfc_alloc_allocatable_for_assignment): When a deferred length
885 backend declaration is variable, use that; otherwise use the
886 string length from the expression evaluation.
887 * trans-expr.c (gfc_conv_component_ref): If this is a deferred
888 character length component, the string length should have the
889 value of the hidden string length field.
890 (gfc_trans_subcomponent_assign): Set the hidden string length
891 field for deferred character length components. Allocate the
892 necessary memory for the string.
893 (alloc_scalar_allocatable_for_assignment): Same change as in
894 gfc_alloc_allocatable_for_assignment above.
895 * trans-stmt.c (gfc_trans_allocate): Likewise.
896 * trans-intrinsic (size_of_string_in_bytes): Make non-static.
897 * trans-types.c (gfc_get_derived_type): Set the tree type for
898 a deferred character length component.
899 * trans.c (gfc_deferred_strlen): New function.
900 * trans.h (size_of_string_in_bytes,gfc_deferred_strlen): New prototypes.
902 2014-03-01 Mikael Morin <mikael@gcc.gnu.org>
905 * frontend-passes.c (optimize_comparison): Guard two union accesses
906 with the corresponding tag checks.
908 2014-02-28 Janus Weil <janus@gcc.gnu.org>
911 * class.c (find_intrinsic_vtab): Prevent duplicate creation of copy
912 procedure for characters.
914 2014-02-21 Janus Weil <janus@gcc.gnu.org>
917 * check.c (gfc_check_c_f_pointer): Only clear 'size' if 'gfc_array_size'
920 2014-02-21 Janus Weil <janus@gcc.gnu.org>
923 * gfortran.h (gfc_build_class_symbol): Removed argument.
924 * class.c (gfc_add_component_ref): Fix up missing vtype if necessary.
925 (gfc_build_class_symbol): Remove argument 'delayed_vtab'. vtab is always
926 delayed now, except for unlimited polymorphics.
927 (comp_is_finalizable): Procedure pointer components are not finalizable.
928 * decl. (build_sym, build_struct, attr_decl1): Removed argument of
929 'gfc_build_class_symbol'.
930 * match.c (copy_ts_from_selector_to_associate, select_type_set_tmp):
932 * symbol.c (gfc_set_default_type): Ditto.
934 2014-02-19 Janus Weil <janus@gcc.gnu.org>
937 * expr.c (gfc_get_variable_expr): Don't add REF_ARRAY for dimensionful
938 functions, which are used as procedure pointer target.
940 2014-02-18 Tobias Burnus <burnus@net-b.de>
943 * expr.c (gfc_check_pointer_assign): Add check for
945 * trans-decl.c (gfc_get_symbol_decl): Correctly generate external
946 decl in a corner case.
948 2014-02-18 Janus Weil <janus@gcc.gnu.org>
951 * resolve.c (check_generic_tbp_ambiguity): Check for presence of dummy
952 arguments to prevent ICE.
954 2014-02-17 Janus Weil <janus@gcc.gnu.org>
957 * resolve.c (build_default_init_expr): Don't initialize character
958 variable if -fno-automatic is given.
960 2014-02-15 Mikael Morin <mikael@gcc.gnu.org>
963 * trans-intrinsic.c (gfc_conv_intrinsic_ichar): Calculate the
966 2014-02-11 Jakub Jelinek <jakub@redhat.com>
969 * trans-decl.c (gfc_build_dummy_array_decl): Set TREE_NO_WARNING
970 on decl if sym->attr.optional.
972 2014-02-09 Paul Thomas <pault@gcc.gnu.org>
975 * resolve.c (resolve_assoc_var): Set the subref_array_pointer
976 attribute for the 'associate-name' if necessary.
977 * trans-stmt.c (trans_associate_var): If the 'associate-name'
978 is a subref_array_pointer, assign the element size of the
979 associate variable to 'span'.
981 2014-02-09 Paul Thomas <pault@gcc.gnu.org>
984 * trans-expr.c (gfc_conv_procedure_call): Pass the value of the
985 actual argument to a formal argument with the value attribute
986 in an elemental procedure.
988 2014-02-08 Janus Weil <janus@gcc.gnu.org>
989 Mikael Morin <mikael.morin@gcc.gnu.org>
992 * class.c (generate_finalization_wrapper): Assert that proc_tree has
993 been set in gfc_resolve_finalizers.
994 * resolve.c (resolve_fl_derived0): Remove unnecessary call to
997 2014-02-07 Benno Schulenberg <bensberg@justemail.net>
1000 * fortran/resolve.c (resolve_ordinary_assign): Fix typoed word
1001 in an error message.
1003 2014-02-02 Mikael Morin <mikael@gcc.gnu.org>
1006 * primary.c (gfc_convert_to_structure_constructor): Avoid null pointer
1009 2014-02-01 Paul Thomas <pault@gcc.gnu.org>
1012 * trans-stmt.c (gfc_add_loop_ss_code): In the case of character
1013 SS_REFERENCE, use gfc_conv_string_parameter to ensure that a
1014 pointer to the string is stored.
1015 * trans-expr.c (gfc_conv_expr_reference): Likewise, use
1016 gfc_conv_string_parameter to ensure that a pointer to is passed
1017 to the elemental function.
1019 2014-01-28 Paul Thomas <pault@gcc.gnu.org>
1022 * trans-stmt.c (gfc_trans_allocate): Before the pointer
1023 assignment to transfer the source _vptr to a class allocate
1024 expression, the final class reference should be exposed. The
1025 tail that includes the _data and array references is stored.
1026 This reduced expression is transferred to 'lhs' and the _vptr
1027 added. Then the tail is restored to the allocate expression.
1029 2014-01-26 Mikael Morin <mikael@gcc.gnu.org>
1032 * module.c (read_module): Assert for component name correctness.
1034 2014-01-18 Mikael Morin <mikael@gcc.gnu.org>
1037 * module.c (MOD_VERSION): Bump.
1038 (fp2, find_pointer2): Remove.
1039 (mio_component_ref): Don't forcedfully set the containing derived type
1040 symbol for loading. Remove unused argument.
1041 (mio_ref): Update caller
1042 (mio_symbol): Dump component list earlier.
1043 (skip_list): New argument nest_level. Initialize level with the new
1045 (read_module): Add forced pointer components association for derived
1048 2014-01-12 Janus Weil <janus@gcc.gnu.org>
1051 * decl.c (gfc_match_data_decl): Improve error recovery.
1053 2014-01-09 Tobias Burnus <burnus@net-b.de>
1055 * cpp.c (gfc_cpp_handle_option): Add missing break.
1056 * trans-io.c (transfer_expr): Silence unused value warning.
1058 2014-01-08 Janus Weil <janus@gcc.gnu.org>
1061 * resolve.c (gfc_verify_binding_labels): Modify order of checks.
1063 2014-01-06 Janus Weil <janus@gcc.gnu.org>
1066 * class.c (comp_is_finalizable): New function to dermine if a given
1067 component is finalizable.
1068 (finalize_component, generate_finalization_wrapper): Use it.
1070 2014-01-06 Janus Weil <janus@gcc.gnu.org>
1074 * resolve.c (resolve_global_procedure): Don't apply to c-binding
1076 (gfc_verify_binding_labels): Remove duplicate line.
1078 2014-01-04 Janus Weil <janus@gcc.gnu.org>
1081 * class.c (add_proc_comp): Copy pure attribute.
1083 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1085 Update copyright years
1087 2014-01-02 Tobias Burnus <burnus@net-b.de>
1089 * gfortranspec.c (lang_specific_driver): Update copyright notice
1091 * gfc-internals.texi: Bump @copying's copyright year.
1092 * gfortran.texi: Ditto.
1093 * intrinsic.texi: Ditto.
1094 * invoke.texi: Ditto.
1096 2014-01-02 Janus Weil <janus@gcc.gnu.org>
1099 * resolve.c (resolve_typebound_procedures): No need to create the vtab
1102 Copyright (C) 2014 Free Software Foundation, Inc.
1104 Copying and distribution of this file, with or without modification,
1105 are permitted in any medium without royalty provided the copyright
1106 notice and this notice are preserved.