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