]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/fortran/ChangeLog
2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
[thirdparty/gcc.git] / gcc / fortran / ChangeLog
CommitLineData
dc8078a3 12014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
2
3 PR fortran/44054
4 * gfortran.h: Define GCC_DIAG_STYLE.
5 (gfc_diagnostics_init,gfc_warning_cmdline): Declare.
6 * trans-array.c: Include gfortran.h before diagnostic-core.h.
7 * trans-expr.c: Likewise.
8 * trans-openmp.c: Likewise.
9 * trans-const.c: Likewise.
10 * trans.c: Likewise.
11 * trans-types.c: Likewise.
12 * f95-lang.c: Likewise.
13 * trans-decl.c: Likewise.
14 * trans-io.c: Likewise.
15 * trans-intrinsic.c: Likewise.
16 * error.c: Include diagnostic.h and diagnostic-color.h.
17 (gfc_diagnostic_build_prefix): New.
18 (gfc_diagnostic_starter): New.
19 (gfc_diagnostic_finalizer): New.
20 (gfc_warning_cmdline): New.
21 (gfc_diagnostics_init): New.
22 * gfc-diagnostic.def: New.
23 * options.c (gfc_init_options): Call gfc_diagnostics_init.
24 (gfc_post_options): Use gfc_warning_cmdline.
25
79e690df 262014-08-15 Jakub Jelinek <jakub@redhat.com>
27 Tobias Burnus <burnus@net-b.de>
28
29 PR fortran/62131
30 * openmp.c (resolve_omp_atomic): Only complain if code->expr1's attr
31 is allocatable, rather than whenever var->attr.allocatable.
32
d2aa25da 332014-08-15 Jakub Jelinek <jakub@redhat.com>
34
35 PR fortran/62107
36 * trans-openmp.c (gfc_omp_finish_clause): Handle scalar pointer
37 or allocatable passed by reference.
38 (gfc_trans_omp_clauses) <case OMP_LIST_MAP>: Likewise.
39
f0c4b2a7 402014-08-14 Thomas Koenig <tkoenig@gcc.gnu.org>
41
42 PR fortran/62106
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
48 for constants.
49
498b946e 502014-08-14 Tobias Burnus <burnus@net-b.de>
51
52 * gfortran.texi (caf_register_t): Add CAF_REGTYPE_CRITICAL.
53 (_gfortran_caf_register): Update for locking/critical.
54 (_gfortran_caf_lock, _gfortran_caf_unlock): Add.
55 * resolve.c (resolve_critical): New.
56 (gfc_resolve_code): Call it.
57 * trans-decl.c (gfor_fndecl_caf_critical,
58 gfor_fndecl_caf_end_critical): Remove.
59 (gfor_fndecl_caf_lock, gfor_fndecl_caf_unlock): Add.
60 (gfc_build_builtin_function_decls): Remove critical,
61 assign locking declarations.
62 (generate_coarray_sym_init): Handle locking and
63 critical variables.
64 * trans-stmt.c (gfc_trans_critical): Add calls to
65 lock/unlock libcaf functions.
66 * trans.h (gfc_coarray_type): Update locking, add
67 critical enum values.
68 (gfor_fndecl_caf_critical, gfor_fndecl_caf_end_critical): Remove.
69 (gfor_fndecl_caf_lock, gfor_fndecl_caf_unlock): Add.
70
18f025fb 712014-08-14 Tobias Burnus <burnus@net-b.de>
72
73 * gfortran.texi (Coarray Programming): Add first ABI
74 documentation.
75
6d0b38b1 762014-08-14 Jakub Jelinek <jakub@redhat.com>
77
78 PR fortran/62076
79 * openmp.c (gfc_match_omp_clauses): When failed to match
80 operator name, defined op name or name, set buffer to
81 empty string. Don't call gfc_find_omp_udr if buffer is empty
82 string.
83 (gfc_match_omp_declare_reduction): Call gfc_undo_symbols ()
84 before calling gfc_free_omp_udr.
85
57b01fe0 862014-08-11 Richard Biener <rguenther@suse.de>
87
88 PR fortran/61950
89 * trans-expr.c (gfc_conv_structure): Initialize _size with
90 a value of proper type.
91
c861a821 922014-08-10 Thomas Koenig <tkoenig@gcc.gnu.org>
93
94 PR fortran/61999
95 * simplify.c (gfc_simplify_dot_product): Convert types of
96 vectors before calculating the result.
97
431205b7 982014-08-02 Trevor Saunders <tsaunders@mozilla.com>
99
100 * openmp.c, trans-decl.c: Use hash_set instead of pointer_set.
101
7bd6248b 1022014-07-26 Tobias Burnus <burnus@net-b.de>
103
f85b4ce0 104 PR fortran/61881
105 PR fortran/61888
106 PR fortran/57305
107 * intrinsic.texi (SIZEOF): Document changed behavior
108 for polymorphic arrays.
109
1102014-07-26 Tobias Burnus <burnus@net-b.de>
111
112 PR fortran/61881
113 PR fortran/61888
114 PR fortran/57305
7bd6248b 115 * check.c (gfc_check_sizeof): Permit for assumed type if and
116 only if it has an array descriptor.
117 * intrinsic.c (do_ts29113_check): Permit SIZEOF.
118 (add_functions): SIZEOF is an Inquiry function.
119 * intrinsic.texi (SIZEOF): Add note that only contiguous
120 arrays are permitted.
121 * trans-expr.c (gfc_conv_intrinsic_to_class): Handle assumed
122 rank.
123 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Handle
124 assumed type + array descriptor, CLASS and assumed rank.
125 (gfc_conv_intrinsic_storage_size): Handle class arrays.
126
91798e71 1272014-07-25 Tobias Burnus <burnus@net-b.de>
128
129 * simplify.c (gfc_simplify_storage_size): Use proper
130 integer kind for the returned value.
131
fe37ca13 1322014-07-24 Uros Bizjak <ubizjak@gmail.com>
133
134 * intrinsic.texi (Intrinsic Procedures) <ATOMIC_DEFINE>: Move to
135 correct menu position to match sectioning.
136
8f3f392c 1372014-06-15 Tobias Burnus <burnus@net-b.de>
138
139 * symbol.c (check_conflict): Add codimension conflict with
140 pointer; fix cray-pointee check.
141
3906f8fc 1422014-06-14 Tobias Burnus <burnus@net-b.de>
143
144 * trans-intrinsic.c (conv_intrinsic_atomic_ref): Fix handling
145 for kind mismatch with -fcoarray=lib.
146
9caa6670 1472014-07-12 Paul Thomas <pault@gcc.gnu.org>
148
149 PR fortran/61780
150 * dependency.c (gfc_dep_resolver): Index the 'reverse' array so
151 that elements are skipped. This then correctly aligns 'reverse'
152 with the scalarizer loops.
153
71abdaca 1542014-07-12 Tobias Burnus <burnus@net-b.de>
155
156 PR fortran/61628
157 * trans-types.c (gfc_init_types): Fix data-type bug
158 with gfc_max_array_element_size.
159
97b9ac34 1602014-07-12 Tobias Burnus <burnus@net-b.de>
161
162 * libgfortran.h (libcaf_atomic_codes): Add.
163 * trans-decl.c (gfor_fndecl_caf_atomic_def,
164 gfor_fndecl_caf_atomic_ref, gfor_fndecl_caf_atomic_cas,
165 gfor_fndecl_caf_atomic_op): New variables.
166 (gfc_build_builtin_function_decls): Initialize them.
167 * trans.h (gfor_fndecl_caf_atomic_def,
168 gfor_fndecl_caf_atomic_ref, gfor_fndecl_caf_atomic_cas,
169 gfor_fndecl_caf_atomic_op): New variables.
170 * trans-intrinsic.c (conv_intrinsic_atomic_op,
171 conv_intrinsic_atomic_ref, conv_intrinsic_atomic_cas):
172 Add library calls with -fcoarray=lib.
173
75fe6d70 1742014-07-12 Tobias Burnus <burnus@net-b.de>
175
176 * check.c (gfc_check_atomic): Update for STAT=.
177 (gfc_check_atomic_def, gfc_check_atomic_ref): Update call.
178 (gfc_check_atomic_op, gfc_check_atomic_cas,
179 gfc_check_atomic_fetch_op): New.
180 * gfortran.h (gfc_isym_id): GFC_ISYM_ATOMIC_CAS, GFC_ISYM_ATOMIC_ADD,
181 GFC_ISYM_ATOMIC_AND, GFC_ISYM_ATOMIC_OR, GFC_ISYM_ATOMIC_XOR,
182 GFC_ISYM_ATOMIC_FETCH_ADD, GFC_ISYM_ATOMIC_FETCH_AND,
183 GFC_ISYM_ATOMIC_FETCH_OR and GFC_ISYM_ATOMIC_FETCH_XOR.
184 * intrinsic.c (add_subroutines): Handle them.
185 * intrinsic.texi: Add documentation for them.
186 (ATOMIC_REF, ATOMIC_DEFINE): Add STAT=.
187 (ISO_FORTRAN_ENV): Add STAT_FAILED_IMAGE.
188 * intrinsic.h (gfc_check_atomic_op, gfc_check_atomic_cas,
189 gfc_check_atomic_fetch_op): New
190 prototypes.
191 * libgfortran.h (libgfortran_stat_codes): Add GFC_STAT_FAILED_IMAGE.
192 * iso-fortran-env.def: Add it.
193 * trans-intrinsic.c (conv_intrinsic_atomic_op): Renamed from
194 conv_intrinsic_atomic_ref; handle more atomics.
195 (conv_intrinsic_atomic_def): Handle STAT=.
196 (conv_intrinsic_atomic_cas): New.
197 (gfc_conv_intrinsic_subroutine): Handle new atomics.
198
bf77f8ee 1992014-07-09 Bernd Schmidt <bernds@codesourcery.com>
200
201 * trans-array.c (gfc_build_constant_array_constructor): Build a
202 static decl manually.
203 * trans-decl.c (create_main_function): Likewise.
204
724b177d 2052014-07-07 Paul Thomas <pault@gcc.gnu.org>
206
207 PR fortran/61459
208 PR fortran/58883
209 * trans-expr.c (fcncall_realloc_result): Use the natural type
210 for the address expression of 'res_desc'.
211
115a196a 2122014-07-07 Gerald Pfeifer <gerald@pfeifer.com>
213
214 * gfortran.texi (Fortran 2003 status): Fix grammar.
215
102abea2 2162014-07-04 Tobias Burnus <burnus@net-b.de>
217
218 * resolve.c (resolve_assoc_var): Fix corank setting.
219 * trans-array.c (gfc_conv_descriptor_token): Change assert.
220 for select-type temporaries.
221 * trans-decl.c (generate_coarray_sym_init): Skip for
724b177d 222 attr.select_type_temporary.
102abea2 223 * trans-expr.c (gfc_conv_procedure_call): Fix for
224 select-type temporaries.
225 * trans-intrinsic.c (get_caf_token_offset): Ditto.
226 (gfc_conv_intrinsic_caf_get, gfc_conv_intrinsic_caf_send): Set
227 the correct dtype.
228 * trans-types.h (gfc_get_dtype_rank_type): New.
229 * trans-types.c (gfc_get_dtype_rank_type): Ditto.
230
04d9b799 2312014-07-03 Tobias Burnus <burnus@net-b.de>
724b177d 232
04d9b799 233 * scanner.c (skip_free_comments): Fix indentation.
234
d57a1422 2352014-07-02 Jakub Jelinek <jakub@redhat.com>
236 Fritz Reese <Reese-Fritz@zai.com>
237
238 * decl.c (variable_decl): Reject old style initialization
239 for derived type components.
240
7136063b 2412014-06-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
242
243 PR fortran/36275
244 PR fortran/38839
245 * decl.c (check_bind_name_identifier): New function.
246 (gfc_match_bind_c): Match any constant expression as binding
247 label.
248 * match.c (gfc_match_name_C): Remove.
249
d566c3e0 2502014-06-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
251
252 PR fortran/29383
253 * gfortran.h (gfc_simplify_ieee_selected_real_kind): New prototype.
254 * libgfortran.h (GFC_FPE_*): Use simple integer values, valid in
255 both C and Fortran.
256 * expr.c (gfc_check_init_expr): Simplify IEEE_SELECTED_REAL_KIND.
257 * simplify.c (gfc_simplify_ieee_selected_real_kind): New function.
258 * module.c (mio_symbol): Keep track of symbols which came from
259 intrinsic modules.
260 (gfc_use_module): Keep track of the IEEE modules.
261 * trans-decl.c (gfc_get_symbol_decl): Adjust code since
262 we have new intrinsic modules.
263 (gfc_build_builtin_function_decls): Build decls for
264 ieee_procedure_entry and ieee_procedure_exit.
265 (is_from_ieee_module, is_ieee_module_used, save_fp_state,
266 restore_fp_state): New functions.
267 (gfc_generate_function_code): Save and restore floating-point
268 state on procedure entry/exit, when IEEE modules are used.
269 * intrinsic.texi: Document the IEEE modules.
270
7c8ba2fd 2712014-06-25 Tobias Burnus <burnus@net-b.de>
272
273 * interface.c (check_intents): Fix diagnostic with
274 coindexed coarrays.
275
a10fb10a 2762014-06-25 Tobias Burnus <burnus@net-b.de>
277
278 * resolve.c (resolve_ordinary_assign): Don't invoke caf_send
279 when assigning a coindexed RHS scalar to a noncoindexed LHS
280 array.
281 * trans-intrinsic.c (conv_caf_send): Do numeric type conversion
282 for a noncoindexed scalar RHS.
283
00bc0309 2842014-06-25 Tobias Burnus <burnus@net-b.de>
285
286 * check.c (check_co_minmaxsum): Add definable check.
287 * expr.c (gfc_check_vardef_context): Fix context == NULL case.
a10fb10a 288 * trans-expr.c (get_scalar_to_descriptor_type): Handle pointer
289 arguments.
290 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Fix generation of
291 temporary strings.
00bc0309 292
9580cb79 2932014-06-25 Jakub Jelinek <jakub@redhat.com>
294
295 * trans.h (gfc_omp_clause_linear_ctor): New prototype.
296 * trans-openmp.c (gfc_omp_linear_clause_add_loop,
297 gfc_omp_clause_linear_ctor): New functions.
298 (gfc_trans_omp_clauses): Make sure OMP_CLAUSE_LINEAR_STEP has
299 correct type. Set OMP_CLAUSE_LINEAR_ARRAY flag if needed.
300 * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR): Redefine.
301
c3f3b68d 3022014-06-24 Jakub Jelinek <jakub@redhat.com>
303
304 * dump-parse-tree.c (show_omp_namelist): Use n->udr->udr instead
305 of n->udr.
306 * f95-lang.c (gfc_init_builtin_functions): Initialize
307 BUILT_IN_ASSUME_ALIGNED.
308 * gfortran.h (gfc_omp_namelist): Change udr field type to
309 struct gfc_omp_namelist_udr.
310 (gfc_omp_namelist_udr): New type.
311 (gfc_get_omp_namelist_udr): Define.
312 (gfc_resolve_code): New prototype.
313 * match.c (gfc_free_omp_namelist): Free name->udr.
314 * module.c (intrinsics): Add INTRINSIC_USER.
315 (fix_mio_expr): Likewise.
316 (mio_expr): Handle INSTRINSIC_USER and non-resolved EXPR_FUNCTION.
317 * openmp.c (gfc_match_omp_clauses): Adjust initialization of n->udr.
318 (gfc_match_omp_declare_reduction): Treat len=: the same as len=*.
319 Set attr.flavor on omp_{out,in,priv,orig} artificial variables.
320 (struct resolve_omp_udr_callback_data): New type.
321 (resolve_omp_udr_callback, resolve_omp_udr_callback2,
322 resolve_omp_udr_clause): New functions.
323 (resolve_omp_clauses): Adjust for n->udr changes, resolve UDR clauses
324 here.
325 (omp_udr_callback): Don't check for implicitly declared functions
326 here.
327 (gfc_resolve_omp_udr): Don't call gfc_resolve. Don't check for
328 implicitly declared subroutines here.
329 * resolve.c (resolve_function): If value.function.isym is non-NULL,
330 consider it already resolved.
331 (resolve_code): Renamed to ...
332 (gfc_resolve_code): ... this. No longer static.
333 (gfc_resolve_blocks, generate_component_assignments, resolve_codes):
334 Adjust callers.
335 * trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize
336 by reference type (C_PTR) variables.
337 (gfc_omp_finish_clause): Make sure OMP_CLAUSE_SIZE is non-NULL.
338 (gfc_trans_omp_udr_expr): Remove.
339 (gfc_trans_omp_array_reduction_or_udr): Adjust for n->udr changes.
340 Don't call gfc_trans_omp_udr_expr, even for sym->attr.dimension
341 expand it as assignment or subroutine call. Don't initialize
342 value.function.isym.
343
197423f5 3442014-06-23 Tobias Burnus <burnus@net-b.de>
345
346 * trans-decl.c (gfc_trans_deferred_vars): Fix handling of
347 explicit-size arrays with -fcoarray=lib.
348
32cd0cc4 3492014-06-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
350
351 PR fortran/33363
352 * invoke.texi: Don't mention nonexisting -fcase-lower option.
353
098018e2 3542014-06-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
355
356 PR fortran/61454
357 * expr.c (scalarize_intrinsic_call): Take care of optional
358 arguments.
359
8c68cf35 3602014-06-19 Tobias Burnus <burnus@net-b.de>
361
362 * trans-intrinsic.c (conv_co_minmaxsum): Fix argument
363 passing.
364
131f8441 3652014-06-18 Tobias Burnus <burnus@net-b.de>
366
367 * gfortran.texi (OpenMP): Update refs to OpenMP 4.0.
368 * intrinsic.texi (OpenMP Modules): Ditto.
369
691447ab 3702014-06-18 Jakub Jelinek <jakub@redhat.com>
371
372 * cpp.c (cpp_define_builtins): Change _OPENMP macro to
373 201307.
374 * dump-parse-tree.c (show_omp_namelist): Add list_type
375 argument. Adjust for rop being u.reduction_op now,
376 handle depend_op or map_op.
377 (show_omp_node): Adjust callers. Print some new
378 OpenMP 4.0 clauses, adjust for OMP_LIST_DEPEND_{IN,OUT}
379 becoming a single OMP_LIST_DEPEND.
380 * f95-lang.c (gfc_handle_omp_declare_target_attribute): New
381 function.
382 (gfc_attribute_table): New variable.
383 (LANG_HOOKS_OMP_FINISH_CLAUSE, LANG_HOOKS_ATTRIBUTE_TABLE): Redefine.
384 * frontend-passes.c (gfc_code_walker): Handle new OpenMP target
385 EXEC_OMP_* codes and new clauses.
386 * gfortran.h (gfc_statement): Add ST_OMP_TARGET, ST_OMP_END_TARGET,
387 ST_OMP_TARGET_DATA, ST_OMP_END_TARGET_DATA, ST_OMP_TARGET_UPDATE,
388 ST_OMP_DECLARE_TARGET, ST_OMP_TEAMS, ST_OMP_END_TEAMS,
389 ST_OMP_DISTRIBUTE, ST_OMP_END_DISTRIBUTE, ST_OMP_DISTRIBUTE_SIMD,
390 ST_OMP_END_DISTRIBUTE_SIMD, ST_OMP_DISTRIBUTE_PARALLEL_DO,
391 ST_OMP_END_DISTRIBUTE_PARALLEL_DO, ST_OMP_DISTRIBUTE_PARALLEL_DO_SIMD,
392 ST_OMP_END_DISTRIBUTE_PARALLEL_DO_SIMD, ST_OMP_TARGET_TEAMS,
393 ST_OMP_END_TARGET_TEAMS, ST_OMP_TEAMS_DISTRIBUTE,
394 ST_OMP_END_TEAMS_DISTRIBUTE, ST_OMP_TEAMS_DISTRIBUTE_SIMD,
395 ST_OMP_END_TEAMS_DISTRIBUTE_SIMD, ST_OMP_TARGET_TEAMS_DISTRIBUTE,
396 ST_OMP_END_TARGET_TEAMS_DISTRIBUTE,
397 ST_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD,
398 ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_SIMD,
399 ST_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO,
400 ST_OMP_END_TEAMS_DISTRIBUTE_PARALLEL_DO,
401 ST_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
402 ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
403 ST_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
404 ST_OMP_END_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
405 ST_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD and
406 ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD.
407 (symbol_attribute): Add omp_declare_target field.
408 (gfc_omp_depend_op, gfc_omp_map_op): New enums.
409 (gfc_omp_namelist): Replace rop field with union
410 containing reduction_op, depend_op and map_op.
411 (OMP_LIST_DEPEND_IN, OMP_LIST_DEPEND_OUT): Remove.
412 (OMP_LIST_DEPEND, OMP_LIST_MAP, OMP_LIST_TO, OMP_LIST_FROM): New.
413 (gfc_omp_clauses): Add num_teams, device, thread_limit,
414 dist_sched_kind, dist_chunk_size fields.
415 (gfc_common_head): Add omp_declare_target field.
416 (gfc_exec_op): Add EXEC_OMP_TARGET, EXEC_OMP_TARGET_DATA,
417 EXEC_OMP_TEAMS, EXEC_OMP_DISTRIBUTE, EXEC_OMP_DISTRIBUTE_SIMD,
418 EXEC_OMP_DISTRIBUTE_PARALLEL_DO, EXEC_OMP_DISTRIBUTE_PARALLEL_DO_SIMD,
419 EXEC_OMP_TARGET_TEAMS, EXEC_OMP_TEAMS_DISTRIBUTE,
420 EXEC_OMP_TEAMS_DISTRIBUTE_SIMD, EXEC_OMP_TARGET_TEAMS_DISTRIBUTE,
421 EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD,
422 EXEC_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO,
423 EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
424 EXEC_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
425 EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD and
426 EXEC_OMP_TARGET_UPDATE.
427 (gfc_add_omp_declare_target): New prototype.
428 * match.h (gfc_match_omp_declare_target, gfc_match_omp_distribute,
429 gfc_match_omp_distribute_parallel_do,
430 gfc_match_omp_distribute_parallel_do_simd,
431 gfc_match_omp_distribute_simd, gfc_match_omp_target,
432 gfc_match_omp_target_data, gfc_match_omp_target_teams,
433 gfc_match_omp_target_teams_distribute,
434 gfc_match_omp_target_teams_distribute_parallel_do,
435 gfc_match_omp_target_teams_distribute_parallel_do_simd,
436 gfc_match_omp_target_teams_distribute_simd,
437 gfc_match_omp_target_update, gfc_match_omp_teams,
438 gfc_match_omp_teams_distribute,
439 gfc_match_omp_teams_distribute_parallel_do,
440 gfc_match_omp_teams_distribute_parallel_do_simd,
441 gfc_match_omp_teams_distribute_simd): New prototypes.
442 * module.c (ab_attribute): Add AB_OMP_DECLARE_TARGET.
443 (attr_bits): Likewise.
444 (mio_symbol_attribute): Handle omp_declare_target attribute.
445 (gfc_free_omp_clauses): Free num_teams, device, thread_limit
446 and dist_chunk_size expressions.
447 (OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE, OMP_CLAUSE_LASTPRIVATE,
448 OMP_CLAUSE_COPYPRIVATE, OMP_CLAUSE_SHARED, OMP_CLAUSE_COPYIN,
449 OMP_CLAUSE_REDUCTION, OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS,
450 OMP_CLAUSE_SCHEDULE, OMP_CLAUSE_DEFAULT, OMP_CLAUSE_ORDERED,
451 OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL,
452 OMP_CLAUSE_MERGEABLE, OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND,
453 OMP_CLAUSE_INBRANCH, OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH,
454 OMP_CLAUSE_PROC_BIND, OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN,
455 OMP_CLAUSE_UNIFORM): Use 1U instead of 1.
456 (OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP, OMP_CLAUSE_TO, OMP_CLAUSE_FROM,
457 OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_THREAD_LIMIT,
458 OMP_CLAUSE_DIST_SCHEDULE): Define.
459 (gfc_match_omp_clauses): Change mask parameter to unsigned int.
460 Adjust for rop becoming u.reduction_op. Disallow inbranch with
461 notinbranch. For depend clause, always create OMP_LIST_DEPEND
462 and fill in u.depend_op. Handle num_teams, device, map,
463 to, from, thread_limit and dist_schedule clauses.
464 (OMP_DECLARE_SIMD_CLAUSES): Or in OMP_CLAUSE_INBRANCH and
465 OMP_CLAUSE_NOTINBRANCH.
466 (OMP_TARGET_CLAUSES, OMP_TARGET_DATA_CLAUSES,
467 OMP_TARGET_UPDATE_CLAUSES, OMP_TEAMS_CLAUSES,
468 OMP_DISTRIBUTE_CLAUSES): Define.
469 (match_omp): New function.
470 (gfc_match_omp_do, gfc_match_omp_do_simd, gfc_match_omp_parallel,
471 gfc_match_omp_parallel_do, gfc_match_omp_parallel_do_simd,
472 gfc_match_omp_parallel_sections, gfc_match_omp_parallel_workshare,
473 gfc_match_omp_sections, gfc_match_omp_simd, gfc_match_omp_single,
474 gfc_match_omp_task): Rewritten using match_omp.
475 (gfc_match_omp_threadprivate, gfc_match_omp_declare_reduction):
476 Diagnose if the directives are followed by unexpected junk.
477 (gfc_match_omp_distribute, gfc_match_omp_distribute_parallel_do,
478 gfc_match_omp_distribute_parallel_do_simd,
479 gfc_match_omp_distrbute_simd, gfc_match_omp_declare_target,
480 gfc_match_omp_target, gfc_match_omp_target_data,
481 gfc_match_omp_target_teams, gfc_match_omp_target_teams_distribute,
482 gfc_match_omp_target_teams_distribute_parallel_do,
483 gfc_match_omp_target_teams_distribute_parallel_do_simd,
484 gfc_match_omp_target_teams_distrbute_simd, gfc_match_omp_target_update,
485 gfc_match_omp_teams, gfc_match_omp_teams_distribute,
486 gfc_match_omp_teams_distribute_parallel_do,
487 gfc_match_omp_teams_distribute_parallel_do_simd,
488 gfc_match_omp_teams_distrbute_simd): New functions.
489 * openmp.c (resolve_omp_clauses): Adjust for
490 OMP_LIST_DEPEND_{IN,OUT} being changed to OMP_LIST_DEPEND. Handle
491 OMP_LIST_MAP, OMP_LIST_FROM, OMP_LIST_TO, num_teams, device,
492 dist_chunk_size and thread_limit.
493 (gfc_resolve_omp_parallel_blocks): Only put sharing clauses into
494 ctx.sharing_clauses. Call gfc_resolve_omp_do_blocks for various
495 new EXEC_OMP_* codes.
496 (resolve_omp_do): Handle various new EXEC_OMP_* codes.
497 (gfc_resolve_omp_directive): Likewise.
498 (gfc_resolve_omp_declare_simd): Add missing space to diagnostics.
499 * parse.c (decode_omp_directive): Handle parsing of OpenMP 4.0
500 offloading related directives.
501 (case_executable): Add ST_OMP_TARGET_UPDATE.
502 (case_exec_markers): Add ST_OMP_TARGET*, ST_OMP_TEAMS*,
503 ST_OMP_DISTRIBUTE*.
504 (case_decl): Add ST_OMP_DECLARE_TARGET.
505 (gfc_ascii_statement): Handle new ST_OMP_* codes.
506 (parse_omp_do): Handle various new ST_OMP_* codes.
507 (parse_executable): Likewise.
508 * resolve.c (gfc_resolve_blocks): Handle various new EXEC_OMP_*
509 codes.
510 (resolve_code): Likewise.
511 (resolve_symbol): Change that !$OMP DECLARE TARGET variables
512 are saved.
513 * st.c (gfc_free_statement): Handle various new EXEC_OMP_* codes.
514 * symbol.c (check_conflict): Check omp_declare_target conflicts.
515 (gfc_add_omp_declare_target): New function.
516 (gfc_copy_attr): Copy omp_declare_target.
517 * trans.c (trans_code): Handle various new EXEC_OMP_* codes.
518 * trans-common.c (build_common_decl): Add "omp declare target"
519 attribute if needed.
520 * trans-decl.c (add_attributes_to_decl): Likewise.
521 * trans.h (gfc_omp_finish_clause): New prototype.
522 * trans-openmp.c (gfc_omp_finish_clause): New function.
523 (gfc_trans_omp_reduction_list): Adjust for rop being renamed
524 to u.reduction_op.
525 (gfc_trans_omp_clauses): Adjust for OMP_LIST_DEPEND_{IN,OUT}
526 change to OMP_LIST_DEPEND and fix up depend handling.
527 Handle OMP_LIST_MAP, OMP_LIST_TO, OMP_LIST_FROM, num_teams,
528 thread_limit, device, dist_chunk_size and dist_sched_kind.
529 (gfc_trans_omp_do): Handle EXEC_OMP_DISTRIBUTE.
530 (GFC_OMP_SPLIT_DISTRIBUTE, GFC_OMP_SPLIT_TEAMS,
531 GFC_OMP_SPLIT_TARGET, GFC_OMP_SPLIT_NUM, GFC_OMP_MASK_DISTRIBUTE,
532 GFC_OMP_MASK_TEAMS, GFC_OMP_MASK_TARGET, GFC_OMP_MASK_NUM): New.
533 (gfc_split_omp_clauses): Handle splitting of clauses for new
534 EXEC_OMP_* codes.
535 (gfc_trans_omp_do_simd): Add pblock argument, adjust for being
536 callable for combined constructs.
537 (gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_do_simd): Likewise.
538 (gfc_trans_omp_distribute, gfc_trans_omp_teams,
539 gfc_trans_omp_target, gfc_trans_omp_target_data,
540 gfc_trans_omp_target_update): New functions.
541 (gfc_trans_omp_directive): Adjust gfc_trans_omp_* callers, handle
542 new EXEC_OMP_* codes.
543
23096bb0 5442014-06-18 Tobias Burnus <burnus@net-b.de>
545
546 PR fortran/61126
547 * invoke.texi (-Wunused-parameter): Make clearer when
548 -Wextra implies this option.
549
40adcfed 5502014-06-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
551
552 PR fortran/61126
553 * options.c (gfc_handle_option): Remove call to
554 handle_generated_option.
555
5f4a118e 5562014-06-17 Tobias Burnus <burnus@net-b.de>
557
558 * check.c (gfc_check_atomic, gfc_check_atomic_def):
559 Use argument for GFC_ISYM_CAF_GET.
560 * resolve.c (resolve_variable): Enable CAF_GET insertion.
561 (resolve_lock_unlock): Remove GFC_ISYM_CAF_GET.
562 (resolve_ordinary_assign): Enable CAF_SEND insertion.
563 * trans-const.c (gfc_build_string_const,
564 gfc_build_wide_string_const): Set TYPE_STRING_FLAG.
565 * trans-decl.c (gfor_fndecl_caf_get, gfor_fndecl_caf_send,
566 gfor_fndecl_caf_sendget): New global variables.
567 (gfc_build_builtin_function_decls): Initialize them;
568 update co_min/max/sum initialization.
569 * trans-expr.c (gfc_get_tree_for_caf_expr): Renamed from
570 get_tree_for_caf_expr and removed static.
571 (gfc_conv_procedure_call): Update call.
572 * trans-intrinsic.c (caf_get_image_index,
573 conv_caf_vector_subscript_elem, conv_caf_vector_subscript,
574 get_caf_token_offset, gfc_conv_intrinsic_caf_get,
575 conv_caf_send): New.
576 (gfc_conv_intrinsic_function, gfc_conv_intrinsic_subroutine,
577 gfc_walk_intrinsic_function): Handle CAF_GET and CAF_SEND.
578 (conv_co_minmaxsum): Update call for remove unused vector
579 subscript.
580 (conv_intrinsic_atomic_def, conv_intrinsic_atomic_ref):
581 Skip a CAF_GET of the argument.
582 * trans-types.c (gfc_get_caf_vector_type): New.
583 * trans-types.h (gfc_get_caf_vector_type): New.
584 * trans.h (gfor_fndecl_caf_get, gfor_fndecl_caf_send,
585 gfor_fndecl_caf_sendget): New global variables.
586 (gfc_get_tree_for_caf_expr): New prototypes.
587
5e68df57 5882014-06-15 Jan Hubicka <hubicka@ucw.cz>
589
590 * trans-common.c (build_common_decl): Use
591 set_decl_tls_model.
592 * trans-decl.c (gfc_finish_var_decl): Likewise.
593 (get_proc_pointer_decl): Likewise.
594
72ce5390 5952014-06-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
596
597 PR fortran/28484
598 PR fortran/61429
599 * check.c (gfc_check_system_clock): Improve checking of arguments.
600 * intrinsic.texi: Update doc of SYSTEM_CLOCK.
601 * iresolve.c (gfc_resolve_system_clock): Choose library function
602 used depending on argument kinds.
603 * trans-decl.c (gfc_build_intrinsic_function_decls): Build
604 decls for system_clock_4 and system_clock_8.
605 * trans-intrinsic.c (conv_intrinsic_system_clock): New function.
606 (gfc_conv_intrinsic_subroutine): Call conv_intrinsic_system_clock.
607 * trans.h (gfor_fndecl_system_clock4, gfor_fndecl_system_clock8):
608 New variables.
609
4b36c1ce 6102014-06-12 Tobias Burnus <burnus@net-b.de>
611
612 * gfortran.h (gfc_copy_formal_args_intr): Update prototype.
613 * symbol.c (gfc_copy_formal_args_intr): Handle the case
614 that absent optional arguments should be ignored.
615 * trans-intrinsic.c (gfc_get_symbol_for_expr): Ditto.
616 (gfc_conv_intrinsic_funcall,
617 conv_generic_with_optional_char_arg): Update call.
618 * resolve.c (gfc_resolve_intrinsic): Ditto.
619
d4b8f841 6202014-06-10 Dominique d'Humieres <dominiq@lps.ens.fr>
621 Mikael Morin <mikael@gcc.gnu.org>
622
623 PR fortran/41936
624 * trans-expr.c (gfc_conv_expr_reference): Deallocate array
625 components.
626
cf5f881f 6272014-06-10 Jakub Jelinek <jakub@redhat.com>
628
629 PR fortran/60928
630 * f95-lang.c (gfc_init_builtin_functions): Handle -fopenmp-simd
631 like -fopenmp.
632 * openmp.c (resolve_omp_clauses): Remove allocatable components
633 diagnostics. Add associate-name and intent(in) pointer
634 diagnostics for various clauses, diagnose procedure pointers in
635 reduction clause.
636 * parse.c (match_word_omp_simd): New function.
637 (matchs, matcho): New macros.
638 (decode_omp_directive): Change match macros to either matchs
639 or matcho. Handle -fopenmp-simd.
640 (next_free, next_fixed): Handle -fopenmp-simd like -fopenmp.
641 * scanner.c (skip_free_comments, skip_fixed_comments, include_line):
642 Likewise.
643 * trans-array.c (get_full_array_size): Rename to...
644 (gfc_full_array_size): ... this. No longer static.
645 (duplicate_allocatable): Adjust caller. Add NO_MEMCPY argument
646 and handle it.
647 (gfc_duplicate_allocatable, gfc_copy_allocatable_data): Adjust
648 duplicate_allocatable callers.
649 (gfc_duplicate_allocatable_nocopy): New function.
650 (structure_alloc_comps): Adjust g*_full_array_size and
651 duplicate_allocatable caller.
652 * trans-array.h (gfc_full_array_size,
653 gfc_duplicate_allocatable_nocopy): New prototypes.
654 * trans-common.c (create_common): Call gfc_finish_decl_attrs.
655 * trans-decl.c (gfc_finish_decl_attrs): New function.
656 (gfc_finish_var_decl, create_function_arglist,
657 gfc_get_fake_result_decl): Call it.
658 (gfc_allocate_lang_decl): If DECL_LANG_SPECIFIC is already allocated,
659 don't allocate it again.
660 (gfc_get_symbol_decl): Set GFC_DECL_ASSOCIATE_VAR_P on
661 associate-names.
662 * trans.h (gfc_finish_decl_attrs): New prototype.
663 (struct lang_decl): Add scalar_allocatable and scalar_pointer
664 bitfields.
665 (GFC_DECL_SCALAR_ALLOCATABLE, GFC_DECL_SCALAR_POINTER,
666 GFC_DECL_GET_SCALAR_ALLOCATABLE, GFC_DECL_GET_SCALAR_POINTER,
667 GFC_DECL_ASSOCIATE_VAR_P): Define.
668 (GFC_POINTER_TYPE_P): Remove.
669 * trans-openmp.c (gfc_omp_privatize_by_reference): Don't check
670 GFC_POINTER_TYPE_P, instead test GFC_DECL_GET_SCALAR_ALLOCATABLE,
671 GFC_DECL_GET_SCALAR_POINTER or GFC_DECL_CRAY_POINTEE on decl.
672 (gfc_omp_predetermined_sharing): Associate-names are predetermined.
673 (enum walk_alloc_comps): New.
674 (gfc_has_alloc_comps, gfc_omp_unshare_expr_r, gfc_omp_unshare_expr,
675 gfc_walk_alloc_comps): New functions.
676 (gfc_omp_private_outer_ref): Return true for scalar allocatables or
677 decls with allocatable components.
678 (gfc_omp_clause_default_ctor, gfc_omp_clause_copy_ctor,
679 gfc_omp_clause_assign_op, gfc_omp_clause_dtor): Fix up handling of
680 allocatables, handle also OMP_CLAUSE_REDUCTION, handle scalar
681 allocatables and decls with allocatable components.
682 (gfc_trans_omp_array_reduction_or_udr): Don't handle allocatable
683 arrays here.
684 (gfc_trans_omp_reduction_list): Call
685 gfc_trans_omp_array_reduction_or_udr even for allocatable scalars.
686 (gfc_trans_omp_do_simd): If -fno-openmp, just expand it as OMP_SIMD.
687 (gfc_trans_omp_parallel_do_simd): Likewise.
688 * trans-types.c (gfc_sym_type): Don't set GFC_POINTER_TYPE_P.
689 (gfc_get_derived_type): Call gfc_finish_decl_attrs.
690
007dd57d 6912014-06-09 Paul Thomas <pault@gcc.gnu.org>
692
693 PR fortran/61406
694 * trans-stmt.c (trans_associate_var): Check that array
695 constructors are constant for direct reference.
696
c4a02ffd 6972014-06-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
698
699 PR fortran/36096
700 * intrinsic.texi: Fix documentation of BESSEL_J0, BESSEL_J1,
701 BESSEL_Y0, and BESSEL_Y1.
702
cd958916 7032014-06-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
704
705 PR fortran/45187
706 * trans-decl.c (gfc_create_module_variable): Don't create
707 Cray-pointee decls twice.
708
be5ce1bd 7092014-06-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
710
711 * io.c (resolve_tag): Warn on non-default kind for NUMBER,
712 NEXTREC, RECL, NAMED, OPENED and PENDING I/O specifiers.
713
b14b82d9 7142014-06-06 Jakub Jelinek <jakub@redhat.com>
715
716 * dump-parse-tree.c (show_omp_namelist): Dump reduction
717 id in each list item.
718 (show_omp_node): Only handle OMP_LIST_REDUCTION, not
719 OMP_LIST_REDUCTION_FIRST .. OMP_LIST_REDUCTION_LAST. Don't
720 dump reduction id here.
721 * frontend-passes.c (dummy_code_callback): Renamed to...
722 (gfc_dummy_code_callback): ... this. No longer static.
723 (optimize_reduction): Use gfc_dummy_code_callback instead of
724 dummy_code_callback.
725 * gfortran.h (gfc_statement): Add ST_OMP_DECLARE_REDUCTION.
726 (symbol_attribute): Add omp_udr_artificial_var bitfield.
727 (gfc_omp_reduction_op): New enum.
728 (gfc_omp_namelist): Add rop and udr fields.
729 (OMP_LIST_PLUS, OMP_LIST_REDUCTION_FIRST, OMP_LIST_MULT,
730 OMP_LIST_SUB, OMP_LIST_AND, OMP_LIST_OR, OMP_LIST_EQV,
731 OMP_LIST_NEQV, OMP_LIST_MAX, OMP_LIST_MIN, OMP_LIST_IAND,
732 OMP_LIST_IOR, OMP_LIST_IEOR, OMP_LIST_REDUCTION_LAST): Removed.
733 (OMP_LIST_REDUCTION): New.
734 (gfc_omp_udr): New type.
735 (gfc_get_omp_udr): Define.
736 (gfc_symtree): Add n.omp_udr field.
737 (gfc_namespace): Add omp_udr_root field, add omp_udr_ns bitfield.
738 (gfc_free_omp_udr, gfc_omp_udr_find, gfc_resolve_omp_udrs,
739 gfc_dummy_code_callback): New prototypes.
740 * match.h (gfc_match_omp_declare_reduction): New prototype.
741 * module.c (MOD_VERSION): Increase to 13.
742 (omp_declare_reduction_stmt): New array.
743 (mio_omp_udr_expr, write_omp_udr, write_omp_udrs, load_omp_udrs):
744 New functions.
745 (read_module): Read OpenMP user defined reductions.
746 (write_module): Write OpenMP user defined reductions.
747 * openmp.c: Include arith.h.
748 (gfc_free_omp_udr, gfc_find_omp_udr): New functions.
749 (gfc_match_omp_clauses): Handle user defined reductions.
750 Store reduction kind into gfc_omp_namelist instead of using
751 several OMP_LIST_* entries.
752 (match_udr_expr, gfc_omp_udr_predef, gfc_omp_udr_find,
753 gfc_match_omp_declare_reduction): New functions.
754 (resolve_omp_clauses): Adjust for reduction clauses being only
755 in OMP_LIST_REDUCTION list. Diagnose missing UDRs.
756 (struct omp_udr_callback_data): New type.
757 (omp_udr_callback, gfc_resolve_omp_udr, gfc_resolve_omp_udrs): New
758 functions.
759 * parse.c (decode_omp_directive): Handle !$omp declare reduction.
760 (case_decl): Add ST_OMP_DECLARE_REDUCTION.
761 (gfc_ascii_statement): Print ST_OMP_DECLARE_REDUCTION.
762 * resolve.c (resolve_fl_variable): Allow len=: or len=* on
763 sym->attr.omp_udr_artificial_var symbols.
764 (resolve_types): Call gfc_resolve_omp_udrs.
765 * symbol.c (gfc_get_uop): If gfc_current_ns->omp_udr_ns,
766 use parent ns instead of gfc_current_ns.
767 (gfc_get_sym_tree): Don't insert symbols into
768 namespaces with omp_udr_ns set.
769 (free_omp_udr_tree): New function.
770 (gfc_free_namespace): Call it.
771 * trans-openmp.c (struct omp_udr_find_orig_data): New type.
772 (omp_udr_find_orig, gfc_trans_omp_udr_expr): New functions.
773 (gfc_trans_omp_array_reduction): Renamed to...
774 (gfc_trans_omp_array_reduction_or_udr): ... this. Remove SYM
775 argument, instead pass gfc_omp_namelist pointer N. Handle
776 user defined reductions.
777 (gfc_trans_omp_reduction_list): Remove REDUCTION_CODE argument.
778 Handle user defined reductions and reduction ops in gfc_omp_namelist.
779 (gfc_trans_omp_clauses): Adjust for just a single OMP_LIST_REDUCTION
780 list.
781 (gfc_split_omp_clauses): Likewise.
782
667a8869 7832014-06-05 Richard Biener <rguenther@suse.de>
784
785 PR fortran/61418
786 * gfortranspec.c (spec_file): Remove.
787 (find_spec_file): Likewise.
788 (lang_specific_driver): Do not look for specs file in -L
789 or append -specs command line argument.
790 (lang_specific_pre_link): Always %:include libgfortran.spec.
791
f7715905 7922014-06-02 Andrew MacLeod <amacleod@redhat.com>
793
794 * fortran/trans.c (trans_runtime_error_vararg): Call
795 fold_build_call_array_loc instead of fold_builtin_call_array.
796
53687b4e 7972014-06-02 Bernd Schmidt <bernds@codesourcery.com>
798
799 * trans-decl.c (gfc_build_builtin_function_decls): Correct number of
800 arguments to caf_init.
801
031b9c5c 8022014-05-26 Tobias Burnus <burnus@net-b.de>
803
804 * gfortran.texi (Project Status): Fix broken link.
805
765c5bcd 8062014-05-26 Janne Blomqvist <jb@gcc.gnu.org>
807
808 PR libfortran/61310
809 * intrinsics.texi (CTIME): Remove mention of locale-dependent
810 behavior.
811
74f5b093 8122014-05-26 Tobias Burnus <burnus@net-b.de>
813
814 PR fortran/55117
815 * trans-io.c (nml_full_name, transfer_namelist_element): Insert
816 a '+' rather then '%' to differentiate namelist variable names
817 that are based on extended derived types.
818
3427a543 8192014-05-25 Tobias Burnus <burnus@net-b.de>
820
821 * check.c (gfc_check_num_images): New.
822 (gfc_check_this_image): Handle distance argument.
823 * intrinsic.c (add_functions): Update this_image and num_images
824 for new distance and failed arguments.
825 * intrinsic.texi (THIS_IMAGE, NUM_IMAGES): Document the new
826 arguments.
827 * intrinsic.h (gfc_check_num_images): New.
828 (gfc_check_this_image, gfc_simplify_num_images,
829 gfc_simplify_this_image, gfc_resolve_this_image): Update prototype.
830 * iresolve.c (gfc_resolve_this_image): Handle distance argument.
831 * simplify.c (gfc_simplify_num_images, gfc_simplify_this_image):
832 Handle new arguments.
833 * trans-intrinsic.c (trans_this_image, trans_num_images): Ditto.
834 (gfc_conv_intrinsic_function): Update trans_num_images call.
835
84e17338 8362014-05-23 Tobias Burnus <burnus@net-b.de>
837
838 * gfc-internals.texi: Change URLs to HTTPS; fix broken links.
839 * gfortran.texi: Ditto.
840
3c77ca67 8412014-05-22 Thomas Schwinge <thomas@codesourcery.com>
842
843 * f95-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
844 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
845 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
846 * types.def: Simplify examples for DEF_FUNCTION_TYPE_*.
847
25a27413 8482014-05-17 Trevor Saunders <tsaunders@mozilla.com>
849
850 * f95-lang.c (pushlevel): Adjust.
851 * trans-decl.c (gfc_allocate_lang_decl): Adjust.
852 (gfc_find_module): Likewise.
853 * trans-types.c (gfc_get_nodesc_array_type): Likewise.
854 (gfc_get_array_type_bounds): Likewise.
855 (gfc_nonrestricted_type): Likewise.
856 * trans.h: Don't use variable_size gty attribute.
857
a8bd4d82 8582014-05-17 Dominique d'Humieres <dominiq@lps.ens.fr>
859
860 * check.c (gfc_check_fn_rc2008): move "argument" to the right
861 place.
862
936318a7 8632014-05-12 Tobias Burnus <burnus@net-b.de>
864
865 PR fortran/60127
866 * openmp.c (resolve_omp_do): Reject do concurrent loops.
867
f17aef51 8682014-05-12 Thomas Koenig <tkoenig@gcc.gnu.org>
869
870 PR fortran/60834
871 * frontend-passes.c (in_assoc_list): New variable.
872 (optimize_namespace): Initialize in_assoc_list
873 (combine_array_constructor): Don't try to combine
874 assoc lists.
875 (gfc_code_walker): Keep track of in_assoc_list.
876
15b28553 8772014-05-11 Jakub Jelinek <jakub@redhat.com>
878
879 * gfortran.h (gfc_statement): Add ST_OMP_CANCEL,
880 ST_OMP_CANCELLATION_POINT, ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP,
881 ST_OMP_SIMD, ST_OMP_END_SIMD, ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD,
882 ST_OMP_PARALLEL_DO_SIMD, ST_OMP_END_PARALLEL_DO_SIMD and
883 ST_OMP_DECLARE_SIMD.
884 (gfc_omp_namelist): New typedef.
885 (gfc_get_omp_namelist): Define.
886 (OMP_LIST_UNIFORM, OMP_LIST_ALIGNED, OMP_LIST_LINEAR,
887 OMP_LIST_DEPEND_IN, OMP_LIST_DEPEND_OUT): New clause list kinds.
888 (gfc_omp_proc_bind_kind, gfc_omp_cancel_kind): New enums.
889 (gfc_omp_clauses): Change type of lists to gfc_omp_namelist *.
890 Add inbranch, notinbranch, cancel, proc_bind, safelen_expr and
891 simdlen_expr fields.
892 (gfc_omp_declare_simd): New typedef.
893 (gfc_get_omp_declare_simd): Define.
894 (gfc_namespace): Add omp_declare_simd field.
895 (gfc_exec_op): Add EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT,
896 EXEC_OMP_TASKGROUP, EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD and
897 EXEC_OMP_PARALLEL_DO_SIMD.
898 (gfc_omp_atomic_op): Add GFC_OMP_ATOMIC_MASK, GFC_OMP_ATOMIC_SEQ_CST
899 and GFC_OMP_ATOMIC_SWAP.
900 (gfc_code): Change type of omp_namelist field to gfc_omp_namelist *.
901 (gfc_free_omp_namelist, gfc_free_omp_declare_simd,
902 gfc_free_omp_declare_simd_list, gfc_resolve_omp_declare_simd): New
903 prototypes.
904 * trans-stmt.h (gfc_trans_omp_declare_simd): New prototype.
905 * symbol.c (gfc_free_namespace): Call gfc_free_omp_declare_simd.
906 * openmp.c (gfc_free_omp_clauses): Free safelen_expr and
907 simdlen_expr. Use gfc_free_omp_namelist instead of
908 gfc_free_namelist.
909 (gfc_free_omp_declare_simd, gfc_free_omp_declare_simd_list): New
910 functions.
911 (gfc_match_omp_variable_list): Add end_colon, headp and
912 allow_sections arguments. Handle parsing of array sections.
913 Use *omp_namelist* instead of *namelist* data structure and
914 functions/macros. Allow termination at : character.
915 (OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH,
916 OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND,
917 OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM): Define.
918 (gfc_match_omp_clauses): Change first and needs_space variables
919 into arguments with default values. Parse inbranch, notinbranch,
920 proc_bind, safelen, simdlen, uniform, linear, aligned and
921 depend clauses.
922 (OMP_PARALLEL_CLAUSES): Add OMP_CLAUSE_PROC_BIND.
923 (OMP_DECLARE_SIMD_CLAUSES, OMP_SIMD_CLAUSES): Define.
924 (OMP_TASK_CLAUSES): Add OMP_CLAUSE_DEPEND.
925 (gfc_match_omp_do_simd): New function.
926 (gfc_match_omp_flush): Use *omp_namelist* instead of *namelist*
927 data structure and functions/macros.
928 (gfc_match_omp_simd, gfc_match_omp_declare_simd,
929 gfc_match_omp_parallel_do_simd): New functions.
930 (gfc_match_omp_atomic): Handle seq_cst clause. Handle atomic swap.
931 (gfc_match_omp_taskgroup, gfc_match_omp_cancel_kind,
932 gfc_match_omp_cancel, gfc_match_omp_cancellation_point): New
933 functions.
934 (resolve_omp_clauses): Add where, omp_clauses and ns arguments.
935 Use *omp_namelist* instead of *namelist* data structure and
936 functions/macros. Resolve uniform, aligned, linear, depend,
937 safelen and simdlen clauses.
938 (resolve_omp_atomic): Adjust for GFC_OMP_ATOMIC_{MASK,SEQ_CST,SWAP}
939 addition, recognize atomic swap.
940 (gfc_resolve_omp_parallel_blocks): Use gfc_omp_namelist instead
941 of gfc_namelist. Handle EXEC_OMP_PARALLEL_DO_SIMD the same as
942 EXEC_OMP_PARALLEL_DO.
943 (gfc_resolve_do_iterator): Use *omp_namelist* instead of *namelist*
944 data structure and functions/macros.
945 (resolve_omp_do): Likewise. Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD,
946 EXEC_OMP_PARALLEL_DO_SIMD.
947 (gfc_resolve_omp_directive): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD,
948 EXEC_OMP_PARALLEL_DO_SIMD and EXEC_OMP_CANCEL. Adjust
949 resolve_omp_clauses caller.
950 (gfc_resolve_omp_declare_simd): New function.
951 * parse.c (decode_omp_directive): Parse cancellation point, cancel,
952 declare simd, end do simd, end simd, end parallel do simd,
953 end taskgroup, parallel do simd, simd and taskgroup directives.
954 (case_executable): Add ST_OMP_CANCEL and ST_OMP_CANCELLATION_POINT.
955 (case_exec_markers): Add ST_OMP_TASKGROUP, case ST_OMP_SIMD,
956 ST_OMP_DO_SIMD and ST_OMP_PARALLEL_DO_SIMD.
957 (case_decl): Add ST_OMP_DECLARE_SIMD.
958 (gfc_ascii_statement): Handle ST_OMP_CANCEL,
959 ST_OMP_CANCELLATION_POINT, ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP,
960 ST_OMP_SIMD, ST_OMP_END_SIMD, ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD,
961 ST_OMP_PARALLEL_DO_SIMD, ST_OMP_END_PARALLEL_DO_SIMD and
962 ST_OMP_DECLARE_SIMD.
963 (parse_omp_do): Handle ST_OMP_SIMD, ST_OMP_DO_SIMD and
964 ST_OMP_PARALLEL_DO_SIMD.
965 (parse_omp_atomic): Adjust for GFC_OMP_ATOMIC_* additions.
966 (parse_omp_structured_block): Handle ST_OMP_TASKGROUP and
967 ST_OMP_PARALLEL_DO_SIMD.
968 (parse_executable): Handle ST_OMP_SIMD, ST_OMP_DO_SIMD,
969 ST_OMP_PARALLEL_DO_SIMD and ST_OMP_TASKGROUP.
970 * trans-decl.c (gfc_get_extern_function_decl,
971 gfc_create_function_decl): Call gfc_trans_omp_declare_simd if
972 needed.
973 * frontend-passes.c (gfc_code_walker): Handle EXEC_OMP_SIMD,
974 EXEC_OMP_DO_SIMD and EXEC_OMP_PARALLEL_DO_SIMD. Walk
975 safelen_expr and simdlen_expr. Walk expressions in gfc_omp_namelist
976 of depend, aligned and linear clauses.
977 * match.c (match_exit_cycle): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD
978 and EXEC_OMP_PARALLEL_DO_SIMD.
979 (gfc_free_omp_namelist): New function.
980 * dump-parse-tree.c (show_namelist): Removed.
981 (show_omp_namelist): New function.
982 (show_omp_node): Handle OpenMP 4.0 additions.
983 (show_code_node): Handle EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT,
984 EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and
985 EXEC_OMP_TASKGROUP.
986 * match.h (gfc_match_omp_cancel, gfc_match_omp_cancellation_point,
987 gfc_match_omp_declare_simd, gfc_match_omp_do_simd,
988 gfc_match_omp_parallel_do_simd, gfc_match_omp_simd,
989 gfc_match_omp_taskgroup): New prototypes.
990 * trans-openmp.c (gfc_trans_omp_variable): Add declare_simd
991 argument, handle it. Allow current_function_decl to be NULL.
992 (gfc_trans_omp_variable_list): Add declare_simd argument, pass
993 it through to gfc_trans_omp_variable and disregard whether
994 sym is referenced if declare_simd is true. Work on gfc_omp_namelist
995 instead of gfc_namelist.
996 (gfc_trans_omp_reduction_list): Work on gfc_omp_namelist instead of
997 gfc_namelist. Adjust gfc_trans_omp_variable caller.
998 (gfc_trans_omp_clauses): Add declare_simd argument, pass it through
999 to gfc_trans_omp_variable{,_list} callers. Work on gfc_omp_namelist
1000 instead of gfc_namelist. Handle inbranch, notinbranch, safelen,
1001 simdlen, depend, uniform, linear, proc_bind and aligned clauses.
1002 Handle cancel kind.
1003 (gfc_trans_omp_atomic): Handle seq_cst clause, handle atomic swap,
1004 adjust for GFC_OMP_ATOMIC_* changes.
1005 (gfc_trans_omp_cancel, gfc_trans_omp_cancellation_point): New
1006 functions.
1007 (gfc_trans_omp_do): Add op argument, handle simd translation into
1008 generic.
1009 (GFC_OMP_SPLIT_SIMD, GFC_OMP_SPLIT_DO, GFC_OMP_SPLIT_PARALLEL,
1010 GFC_OMP_SPLIT_NUM, GFC_OMP_MASK_SIMD, GFC_OMP_MASK_DO,
1011 GFC_OMP_MASK_PARALLEL): New.
1012 (gfc_split_omp_clauses, gfc_trans_omp_do_simd): New functions.
1013 (gfc_trans_omp_parallel_do): Rework to use gfc_split_omp_clauses.
1014 (gfc_trans_omp_parallel_do_simd, gfc_trans_omp_taskgroup): New
1015 functions.
1016 (gfc_trans_omp_directive): Handle EXEC_OMP_CANCEL,
1017 EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
1018 EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
1019 Adjust gfc_trans_omp_do caller.
1020 (gfc_trans_omp_declare_simd): New function.
1021 * st.c (gfc_free_statement): Handle EXEC_OMP_CANCEL,
1022 EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
1023 EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
1024 For EXEC_OMP_FLUSH call gfc_free_omp_namelist instead of
1025 gfc_free_namelist.
1026 * module.c (omp_declare_simd_clauses): New variable.
1027 (mio_omp_declare_simd): New function.
1028 (mio_symbol): Call it.
1029 * trans.c (trans_code): Handle EXEC_OMP_CANCEL,
1030 EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
1031 EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
007dd57d 1032 * resolve.c (gfc_resolve_blocks): Handle EXEC_OMP_DO_SIMD,
15b28553 1033 EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
1034 (resolve_code): Handle EXEC_OMP_CANCEL,
1035 EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
1036 EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
1037 (resolve_types): Call gfc_resolve_omp_declare_simd.
1038
da82fa7c 10392014-05-11 Tobias Burnus <burnus@net-b.de>
1040
1041 * trans-intrinsic.c (gfc_build_builtin_function_decls):
1042 Change type of second argument to int.
1043
cf767dd4 10442014-05-09 Mike Stump <mikestump@comcast.net>
1045
1046 PR fortran/61109
1047 * trans-array.c (gfc_conv_array_initializer): Fix wide-int
1048 conversion bug.
1049
8879941c 10502014-05-08 Tobias Burnus <burnus@net-b.de>
1051
1052 * gfortran.h (gfc_isym_id): Add GFC_ISYM_CAF_GET
1053 and GFC_ISYM_CAF_SEND.
1054 * intrinsic.c (add_functions): Add only internally
1055 accessible caf_get and caf_send functions.
1056 * resolve.c (add_caf_get_intrinsic,
1057 remove_caf_get_intrinsic): New functions.
1058 (resolve_variable): Resolve expression rank and
1059 prepare for add_caf_get_intrinsic call.
1060 (gfc_resolve_expr): For variables, remove rank
1061 resolution.
1062 (resolve_ordinary_assign): Prepare call to
1063 GFC_ISYM_CAF_SEND.
1064 (resolve_code): Avoid call to GFC_ISYM_CAF_GET for
1065 the LHS of an assignment.
1066
40ed4fd4 10672014-05-08 Tobias Burnus <burnus@net-b.de>
1068
1069 * trans-intrinsic.c (conv_co_minmaxsum): Change condition style.
1070
79ed4a8e 10712014-05-08 Tobias Burnus <burnus@net-b.de>
1072
1073 * check.c (check_co_minmaxsum, gfc_check_co_minmax,
1074 gfc_check_co_sum): New.
1075 * error.c (gfc_notify_std): Update -std=f2008ts.
1076 * gfortran.h (gfc_isym_id): Add GFC_ISYM_CO_MAX,
1077 GFC_ISYM_CO_MIN, GFC_ISYM_CO_SUM.
1078 * intrinsic.h (gfc_check_co_minmax,
1079 gfc_check_co_sum): Declare.
1080 * intrinsic.c (add_subroutines): Add co_min, co_max
1081 and co_sum.
1082 (gfc_check_intrinsic_standard): Update text for
1083 -std=f2008ts.
1084 * intrinsic.texi (CO_MIN, CO_MAX, CO_SUM): Document
1085 them.
1086 * invoke.texi (-std=f2008ts): Update wording.
1087 * trans.h (gfor_fndecl_co_max,
1088 gfor_fndecl_co_min, gfor_fndecl_co_sum): Define.
1089 * trans-decl.c (gfor_fndecl_co_max,
1090 gfor_fndecl_co_min, gfor_fndecl_co_sum): Define.
1091 (gfc_build_builtin_function_decls): Assign to it.
1092 * trans-intrinsic.c (conv_co_minmaxsum): New.
1093 (gfc_conv_intrinsic_subroutine): Call it.
1094
960d5a55 10952014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1096 Mike Stump <mikestump@comcast.net>
1097 Richard Sandiford <rdsandiford@googlemail.com>
1098
1099 * target-memory.c: Include wide-int.h.
1100 (gfc_interpret_logical): Use wide-int interfaces.
1101 * trans-array.c: Include wide-int.h.
1102 (gfc_conv_array_initializer): Use wide-int interfaces.
1103 * trans-const.c: Include wide-int.h.
1104 (gfc_conv_string_init): Use wide-int interfaces.
1105 (gfc_conv_mpz_to_tree): Likewise.
1106 (gfc_conv_tree_to_mpz): Likewise.
1107 * trans-decl.c (gfc_can_put_var_on_stack): Use tree_fits_uhwi_p.
1108 * trans-expr.c: Include wide-int.h.
1109 (gfc_conv_cst_int_power): Use wide-int interfaces.
1110 (gfc_string_to_single_character): Likewise.
1111 (gfc_optimize_len_trim): Likewise.
1112 * trans-intrinsic.c: Include wide-int.h.
1113 (trans_this_image): Use wide-int interfaces.
1114 (gfc_conv_intrinsic_bound): Likewise.
1115 (conv_intrinsic_cobound): Likewise.
1116 * trans-types.c (gfc_init_types): Likewise.
1117 (gfc_get_array_type_bounds): Pass an integer of the correct type
1118 instead of using integer_one_node.
1119
b4d49769 11202014-04-30 Tobias Burnus <burnus@net-b.de>
1121
1122 * trans-decl.c (create_function_arglist): Add hidden coarray arguments
1123 also for polymorphic coarrays.
1124 * trans-expr.c (gfc_conv_procedure_call): Pass hidden coarray arguments
1125 also for polymorphic coarrays.
1126
4921ab8a 11272014-04-30 Tobias Burnus <burnus@net-b.de>
1128
1129 * resolve.c (resolve_function): Don't do
1130 assumed-size check for lcobound/ucobound.
1131 * trans-types.c (gfc_build_array_type): Only build an array
1132 descriptor with codimensions for allocatable coarrays.
1133
3c3f24bc 11342014-04-30 Tobias Burnus <burnus@net-b.de>
1135
1136 * gfortran.h (gfc_init_coarray_decl): Remove.
1137 * parse.c (translate_all_program_units): Remove call to it.
1138 (gfc_parse_file): Update call.
1139 * trans.h (gfor_fndecl_caf_this_image,
1140 gfor_fndecl_caf_num_images): Add.
1141 (gfort_gvar_caf_num_images,
1142 gfort_gvar_caf_this_image): Remove.
1143 * trans-decl.c (gfor_fndecl_caf_this_image,
1144 gfor_fndecl_caf_num_images): Add.
1145 (gfort_gvar_caf_num_images,
1146 gfort_gvar_caf_this_image): Remove.
1147 (gfc_build_builtin_function_decls): Init new decl.
1148 (gfc_init_coarray_dec): Remove.
1149 (create_main_function): Change calls.
1150 * trans-intrinsic.c (trans_this_image, trans_image_index,
1151 conv_intrinsic_cobound): Generate call to new library function
1152 instead of to a static variable.
1153 * trans-stmt.c (gfc_trans_sync): Ditto.
1154
3cc0ee47 11552014-04-30 Tobias Burnus <burnus@net-b.de>
1156
1157 * trans-expr.c (get_tree_for_caf_expr): Fix handling of polymorphic
1158 and derived-type coarrays.
1159
11602014-04-27 Thomas Koenig <tkoenig@gcc.gnu.org>
dd0b96f0 1161
1162 PR fortran/59604
1163 PR fortran/58003
1164 * gfortran.h (gfc_convert_mpz_to_signed): Add prototype.
1165 * arith.c (gfc_int2int): Convert number to signed if
1166 arithmetic overflow is not checked.
1167 * simplify.c (convert_mpz_to_unsigned): Only trigger assert for
1168 size if range checking is in force.
1169 (convert_mpz_to_signed): Make non-static, rename to
1170 (gfc_convert_mpz_to_signed).
1171 (simplify_dshift): Use gfc_convert_mpz_to_signed.
1172 (gfc_simplify_ibclr): Likewise.
1173 (gfc_simplify_ibits): Likewise.
1174 (gfc_simplify_ibset): Likewise.
1175 (simplify_shift): Likewise.
1176 (gfc_simplify_ishiftc): Likewise.
1177 (gfc_simplify_maskr): Likewise.
1178 (gfc_simplify_maskl): Likewise.
1179
0992e56f 11802014-04-22 Tobias Burnus <burnus@net-b.de>
1181
1182 PR fortran/60881
1183 * trans-expr.c (gfc_trans_subcomponent_assign): Fix handling
1184 of scalar coarrays.
1185
e2ec52ca 11862014-04-17 Jakub Jelinek <jakub@redhat.com>
1187
1188 * trans-types.c (gfc_init_kinds): Make sure GET_MODE_BITSIZE
1189 argument is enum machine_mode.
1190
b447bac3 11912014-04-13 Paul Thomas <pault@gcc.gnu.org>
1192
1193 PR fortran/58085
1194 PR fortran/60717
1195 * trans.h: Add 'use_offset' bitfield to gfc_se.
1196 * trans-array.c (gfc_conv_expr_descriptor): Use 'use_offset'
1197 as a trigger to unconditionally recalculate the offset for
1198 array slices and constant arrays.
1199 trans-expr.c (gfc_conv_intrinsic_to_class): Use it.
1200 trans-stmt.c (trans_associate_var): Ditto.
1201 (gfc_conv_procedure_call): Ditto.
1202
baf14602 12032014-04-11 Tobias Burnus <burnus@net-b.de>
1204
1205 PR fortran/58880
1206 PR fortran/60495
1207 * resolve.c (gfc_resolve_finalizers): Ensure that vtables
1208 and finalization wrappers are generated.
1209
d1cc1356 12102014-04-11 Janne Blomqvist <jb@gcc.gnu.org>
1211
1212 * intrinsic.texi (RANDOM_SEED): Improve example.
1213
31c03a14 12142014-04-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
1215
1216 * class.c (gfc_build_class_symbol): Append "_t" to target class
1217 names to make the generated type names unique.
1218
dcb4709c 12192014-04-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
1220
1221 PR fortran/60191
1222 * trans-types.c (gfc_get_function_type): In case of recursion
1223 build a variadic function type with empty argument list instead of a
1224 stdarg-like function type with incomplete argument list.
1225
6f4e5638 12262014-04-04 Tobias Burnus <burnus@net-b.de>
1227
1228 * check.c (gfc_check_cmplx): Fix typo.
1229
8665f3b2 12302014-03-28 Mikael Morin <mikael@gcc.gnu.org>
1231 Tobias Burnus <burnus@net-b.de>
1232
eecfcba4 1233 PR fortran/60576
8665f3b2 1234 * trans-expr.c (gfc_conv_derived_to_class): Avoid
1235 generation of out-of-bounds range expr.
1236
ec9fd7b7 12372014-03-28 Mikael Morin <mikael@gcc.gnu.org>
1238
1239 PR fortran/60677
1240 * trans-intrinsic.c (gfc_conv_intrinsic_ichar): Enlarge argument
1241 list buffer.
1242
12432014-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
9c1f3230 1244
1245 PR fortran/60522
1246 * frontend-passes.c (cfe_code): Do not walk subtrees
1247 for WHERE.
1248
efa70124 12492014-03-27 Tobias Burnus <burnus@net-b.de>
1250
1251 PR fortran/58880
1252 * trans-expr.c (gfc_conv_scalar_to_descriptor): Fix handling
1253 of nonpointers.
1254
bb9c2cbb 12552014-03-26 Dominique d'Humieres <dominiq@lps.ens.fr>
1256
1257 PR fortran/34928
1258 * fortran.texi: Document Volatile COMMON as not supported.
1259
446bdf5f 12602014-03-22 Jakub Jelinek <jakub@redhat.com>
1261
1262 PR debug/60603
1263 * cpp.c (gfc_cpp_init): Restore cb_change_file call to
1264 <built-in>.
1265
e458f5c0 12662014-03-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1267
1268 PR fortran/60148
1269 * gfortran.texi: Add description of namelist DELIM= behavior.
1270
57cb78c6 12712014-03-19 Tobias Burnus <burnus@net-b.>
1272
1273 PR fortran/60543
1274 * io.c (check_io_constraints): Use gfc_unset_implicit_pure.
1275 * resolve.c (resolve_ordinary_assign): Ditto.
1276
c77badf3 12772014-03-19 Tobias Burnus <burnus@net-b.de>
1278
1279 PR fortran/60543
1280 PR fortran/60283
1281 * gfortran.h (gfc_unset_implicit_pure): New prototype.
1282 * resolve.c (gfc_unset_implicit_pure): New.
1283 (resolve_structure_cons, resolve_function,
1284 pure_subroutine): Use it.
1285 * decl.c (match_old_style_init, gfc_match_data,
1286 match_pointer_init, variable_decl): Ditto.
1287 * expr.c (gfc_check_pointer_assign): Ditto.
1288 * intrinsic.c (gfc_intrinsic_sub_interface): Ditto.
1289 * io.c (match_vtag, gfc_match_open, gfc_match_close,
1290 match_filepos, gfc_match_inquire, gfc_match_print,
1291 gfc_match_wait): Ditto.
1292 * match.c (gfc_match_critical, gfc_match_stopcode,
1293 lock_unlock_statement, sync_statement, gfc_match_allocate,
1294 gfc_match_deallocate): Ditto.
1295 * parse.c (decode_omp_directive): Ditto.
1296 * symbol.c (gfc_add_save): Ditto.
1297
c25834c9 12982014-03-18 Janus Weil <janus@gcc.gnu.org>
1299
1300 PR fortran/55207
1301 PR fortran/60549
1302 * decl.c (match_attr_spec): Revert r208590.
1303
c83059be 13042014-03-18 Jakub Jelinek <jakub@redhat.com>
1305
1306 PR ipa/58721
1307 * trans.c (gfc_unlikely, gfc_likely): Don't add __builtin_expect
1308 if !optimize.
1309
13102014-03-18 Tobias Burnus <burnus@net-b.de>
1311
1312 PR ipa/58721
1313 * trans.h (gfc_unlikely, gfc_likely): Add predictor as argument.
1314 (gfc_trans_io_runtime_check): Remove.
1315 * trans-io.c (gfc_trans_io_runtime_check): Make static; add has_iostat
1316 as argument, add predictor to block.
1317 (set_parameter_value, gfc_trans_open, gfc_trans_close, build_filepos,
1318 gfc_trans_inquire, gfc_trans_wait, build_dt): Update calls.
1319 * trans.c (gfc_unlikely, gfc_likely): Add predictor as argument.
1320 (gfc_trans_runtime_check, gfc_allocate_using_malloc,
1321 gfc_allocate_allocatable, gfc_deallocate_with_status): Set explicitly
1322 branch predictor.
1323 * trans-expr.c (gfc_conv_procedure_call): Ditto.
1324 * trans-stmt.c (gfc_trans_allocate): Ditto.
1325 * trans-array.c (gfc_array_init_size, gfc_array_allocate): Ditto.
1326
47e80b17 13272014-03-15 Janus Weil <janus@gcc.gnu.org>
1328
1329 PR fortran/55207
1330 * decl.c (match_attr_spec): Variables in the main program implicitly
1331 get the SAVE attribute in Fortran 2008.
1332
c99239d3 13332014-03-14 Mikael Morin <mikael@gcc.gnu.org>
1334
1335 PR fortran/60392
1336 * trans-array.c (gfc_conv_array_parameter): Don't reuse the descriptor
1337 if it has transposed dimensions.
1338
c7a63538 13392014-03-08 Tobias Burnus <burnus@net-b.de>
1340
1341 PR fortran/60447
1342 * f95-lang.c (gfc_init): Return false when only
1343 preprocessing.
1344 * options.c (gfc_post_options): Ditto.
1345
023e1239 13462014-03-08 Tobias Burnus <burnus@net-b.de>
1347
1348 * gfortran.texi (Fortran 2003 Status): Mention finalization,
1349 deferred-length character support and input rounding.
1350 (Fortran 2008 Status): Mention that at termination
1351 signalling exceptions are shown.
1352
13d7216c 13532014-03-06 Paul Thomas <pault@gcc.gnu.org>
1354 Janus Weil <janus@gcc.gnu.org>
1355
1356 PR fortran/51976
1357 * gfortran.h (symbol_attribute): Add deferred_parameter attribute.
1358 * primary.c (build_actual_constructor): It is not an error if
1359 a missing component has the deferred_parameter attribute;
1360 equally, if one is given a value, it is an error.
1361 * resolve.c (resolve_fl_derived0): Remove error for deferred
1362 character length components. Add the hidden string length
1363 field to the structure. Give it the deferred_parameter
1364 attribute.
1365 * trans-array.c (duplicate_allocatable): Add a strlen field
1366 which is used as the element size if it is non-null.
1367 (gfc_duplicate_allocatable, gfc_copy_allocatable_data): Pass a
1368 NULL to the new argument in duplicate_allocatable.
1369 (structure_alloc_comps): Set the hidden string length as
1370 appropriate. Use it in calls to duplicate_allocatable.
1371 (gfc_alloc_allocatable_for_assignment): When a deferred length
1372 backend declaration is variable, use that; otherwise use the
1373 string length from the expression evaluation.
1374 * trans-expr.c (gfc_conv_component_ref): If this is a deferred
1375 character length component, the string length should have the
1376 value of the hidden string length field.
1377 (gfc_trans_subcomponent_assign): Set the hidden string length
1378 field for deferred character length components. Allocate the
1379 necessary memory for the string.
1380 (alloc_scalar_allocatable_for_assignment): Same change as in
1381 gfc_alloc_allocatable_for_assignment above.
1382 * trans-stmt.c (gfc_trans_allocate): Likewise.
1383 * trans-intrinsic (size_of_string_in_bytes): Make non-static.
1384 * trans-types.c (gfc_get_derived_type): Set the tree type for
1385 a deferred character length component.
1386 * trans.c (gfc_deferred_strlen): New function.
1387 * trans.h (size_of_string_in_bytes,gfc_deferred_strlen): New prototypes.
1388
5230e0eb 13892014-03-01 Mikael Morin <mikael@gcc.gnu.org>
1390
1391 PR fortran/60341
1392 * frontend-passes.c (optimize_comparison): Guard two union accesses
1393 with the corresponding tag checks.
1394
18fe23ca 13952014-02-28 Janus Weil <janus@gcc.gnu.org>
1396
1397 PR fortran/60359
1398 * class.c (find_intrinsic_vtab): Prevent duplicate creation of copy
1399 procedure for characters.
1400
c64dd30b 14012014-02-21 Janus Weil <janus@gcc.gnu.org>
1402
1403 PR fortran/60302
1404 * check.c (gfc_check_c_f_pointer): Only clear 'size' if 'gfc_array_size'
1405 is successful.
1406
e8393d49 14072014-02-21 Janus Weil <janus@gcc.gnu.org>
1408
1409 PR fortran/60234
1410 * gfortran.h (gfc_build_class_symbol): Removed argument.
1411 * class.c (gfc_add_component_ref): Fix up missing vtype if necessary.
1412 (gfc_build_class_symbol): Remove argument 'delayed_vtab'. vtab is always
1413 delayed now, except for unlimited polymorphics.
1414 (comp_is_finalizable): Procedure pointer components are not finalizable.
1415 * decl. (build_sym, build_struct, attr_decl1): Removed argument of
1416 'gfc_build_class_symbol'.
1417 * match.c (copy_ts_from_selector_to_associate, select_type_set_tmp):
1418 Ditto.
1419 * symbol.c (gfc_set_default_type): Ditto.
1420
70782c79 14212014-02-19 Janus Weil <janus@gcc.gnu.org>
1422
1423 PR fortran/60232
1424 * expr.c (gfc_get_variable_expr): Don't add REF_ARRAY for dimensionful
1425 functions, which are used as procedure pointer target.
1426
77d080ca 14272014-02-18 Tobias Burnus <burnus@net-b.de>
1428
1429 PR fortran/49397
1430 * expr.c (gfc_check_pointer_assign): Add check for
1431 F2008Cor2, C729.
1432 * trans-decl.c (gfc_get_symbol_decl): Correctly generate external
1433 decl in a corner case.
1434
2ab6a21d 14352014-02-18 Janus Weil <janus@gcc.gnu.org>
1436
1437 PR fortran/60231
1438 * resolve.c (check_generic_tbp_ambiguity): Check for presence of dummy
1439 arguments to prevent ICE.
1440
41201fa1 14412014-02-17 Janus Weil <janus@gcc.gnu.org>
1442
1443 PR fortran/55907
1444 * resolve.c (build_default_init_expr): Don't initialize character
1445 variable if -fno-automatic is given.
1446
5ac6468c 14472014-02-15 Mikael Morin <mikael@gcc.gnu.org>
1448
1449 PR fortran/59599
1450 * trans-intrinsic.c (gfc_conv_intrinsic_ichar): Calculate the
1451 number of arguments.
1452
a1f1e248 14532014-02-11 Jakub Jelinek <jakub@redhat.com>
1454
1455 PR fortran/52370
1456 * trans-decl.c (gfc_build_dummy_array_decl): Set TREE_NO_WARNING
1457 on decl if sym->attr.optional.
1458
b664a6ed 14592014-02-09 Paul Thomas <pault@gcc.gnu.org>
1460
1461 PR fortran/57522
1462 * resolve.c (resolve_assoc_var): Set the subref_array_pointer
1463 attribute for the 'associate-name' if necessary.
1464 * trans-stmt.c (trans_associate_var): If the 'associate-name'
1465 is a subref_array_pointer, assign the element size of the
1466 associate variable to 'span'.
1467
032f05c9 14682014-02-09 Paul Thomas <pault@gcc.gnu.org>
1469
1470 PR fortran/59026
1471 * trans-expr.c (gfc_conv_procedure_call): Pass the value of the
1472 actual argument to a formal argument with the value attribute
1473 in an elemental procedure.
1474
8e0d05f4 14752014-02-08 Janus Weil <janus@gcc.gnu.org>
1476 Mikael Morin <mikael.morin@gcc.gnu.org>
1477
1478 PR fortran/58470
1479 * class.c (generate_finalization_wrapper): Assert that proc_tree has
1480 been set in gfc_resolve_finalizers.
1481 * resolve.c (resolve_fl_derived0): Remove unnecessary call to
1482 gfc_is_finalizable.
1483
b0b557ae 14842014-02-07 Benno Schulenberg <bensberg@justemail.net>
1485
1486 PR translation/52289
1487 * fortran/resolve.c (resolve_ordinary_assign): Fix typoed word
1488 in an error message.
1489
42412a94 14902014-02-02 Mikael Morin <mikael@gcc.gnu.org>
1491
1492 PR fortran/57033
1493 * primary.c (gfc_convert_to_structure_constructor): Avoid null pointer
1494 dereference.
1495
e6b90557 14962014-02-01 Paul Thomas <pault@gcc.gnu.org>
1497
1498 PR fortran/59906
1499 * trans-stmt.c (gfc_add_loop_ss_code): In the case of character
1500 SS_REFERENCE, use gfc_conv_string_parameter to ensure that a
1501 pointer to the string is stored.
1502 * trans-expr.c (gfc_conv_expr_reference): Likewise, use
1503 gfc_conv_string_parameter to ensure that a pointer to is passed
1504 to the elemental function.
1505
85596a5e 15062014-01-28 Paul Thomas <pault@gcc.gnu.org>
1507
1508 PR fortran/59414
1509 * trans-stmt.c (gfc_trans_allocate): Before the pointer
1510 assignment to transfer the source _vptr to a class allocate
1511 expression, the final class reference should be exposed. The
1512 tail that includes the _data and array references is stored.
1513 This reduced expression is transferred to 'lhs' and the _vptr
1514 added. Then the tail is restored to the allocate expression.
1515
f6ae918d 15162014-01-26 Mikael Morin <mikael@gcc.gnu.org>
1517
1518 PR fortran/58007
1519 * module.c (read_module): Assert for component name correctness.
1520
2c658c2c 15212014-01-18 Mikael Morin <mikael@gcc.gnu.org>
1522
1523 PR fortran/58007
1524 * module.c (MOD_VERSION): Bump.
1525 (fp2, find_pointer2): Remove.
1526 (mio_component_ref): Don't forcedfully set the containing derived type
1527 symbol for loading. Remove unused argument.
1528 (mio_ref): Update caller
1529 (mio_symbol): Dump component list earlier.
1530 (skip_list): New argument nest_level. Initialize level with the new
1531 argument.
1532 (read_module): Add forced pointer components association for derived
1533 type symbols.
1534
a1e76cd9 15352014-01-12 Janus Weil <janus@gcc.gnu.org>
1536
1537 PR fortran/58026
1538 * decl.c (gfc_match_data_decl): Improve error recovery.
1539
ca5cd38f 15402014-01-09 Tobias Burnus <burnus@net-b.de>
1541
1542 * cpp.c (gfc_cpp_handle_option): Add missing break.
1543 * trans-io.c (transfer_expr): Silence unused value warning.
1544
a52fbc53 15452014-01-08 Janus Weil <janus@gcc.gnu.org>
1546
1547 PR fortran/58182
1548 * resolve.c (gfc_verify_binding_labels): Modify order of checks.
1549
195a3a36 15502014-01-06 Janus Weil <janus@gcc.gnu.org>
1551
1552 PR fortran/59589
1553 * class.c (comp_is_finalizable): New function to dermine if a given
1554 component is finalizable.
1555 (finalize_component, generate_finalization_wrapper): Use it.
1556
cf3654f0 15572014-01-06 Janus Weil <janus@gcc.gnu.org>
1558
1559 PR fortran/59023
1560 PR fortran/59662
1561 * resolve.c (resolve_global_procedure): Don't apply to c-binding
1562 procedures.
1563 (gfc_verify_binding_labels): Remove duplicate line.
1564
bd8f578b 15652014-01-04 Janus Weil <janus@gcc.gnu.org>
1566
1567 PR fortran/59547
1568 * class.c (add_proc_comp): Copy pure attribute.
1569
3aea1f79 15702014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1571
1572 Update copyright years
1573
d67510b9 15742014-01-02 Tobias Burnus <burnus@net-b.de>
1575
1576 * gfortranspec.c (lang_specific_driver): Update copyright notice
1577 dates.
1578 * gfc-internals.texi: Bump @copying's copyright year.
1579 * gfortran.texi: Ditto.
1580 * intrinsic.texi: Ditto.
1581 * invoke.texi: Ditto.
1582
839ddc8e 15832014-01-02 Janus Weil <janus@gcc.gnu.org>
92b18bc0 1584
839ddc8e 1585 PR fortran/59654
1586 * resolve.c (resolve_typebound_procedures): No need to create the vtab
1587 here.
7dfbd804 1588\f
839ddc8e 1589Copyright (C) 2014 Free Software Foundation, Inc.
7dfbd804 1590
1591Copying and distribution of this file, with or without modification,
1592are permitted in any medium without royalty provided the copyright
1593notice and this notice are preserved.