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