check.c (gfc_check_fn_rc2008): move "argument" to the right place.
[gcc.git] / gcc / fortran / ChangeLog
1 2014-05-17 Dominique d'Humieres <dominiq@lps.ens.fr>
2
3 * check.c (gfc_check_fn_rc2008): move "argument" to the right
4 place.
5
6 2014-05-12 Tobias Burnus <burnus@net-b.de>
7
8 PR fortran/60127
9 * openmp.c (resolve_omp_do): Reject do concurrent loops.
10
11 2014-05-12 Thomas Koenig <tkoenig@gcc.gnu.org>
12
13 PR fortran/60834
14 * frontend-passes.c (in_assoc_list): New variable.
15 (optimize_namespace): Initialize in_assoc_list
16 (combine_array_constructor): Don't try to combine
17 assoc lists.
18 (gfc_code_walker): Keep track of in_assoc_list.
19
20 2014-05-11 Jakub Jelinek <jakub@redhat.com>
21
22 * gfortran.h (gfc_statement): Add ST_OMP_CANCEL,
23 ST_OMP_CANCELLATION_POINT, ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP,
24 ST_OMP_SIMD, ST_OMP_END_SIMD, ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD,
25 ST_OMP_PARALLEL_DO_SIMD, ST_OMP_END_PARALLEL_DO_SIMD and
26 ST_OMP_DECLARE_SIMD.
27 (gfc_omp_namelist): New typedef.
28 (gfc_get_omp_namelist): Define.
29 (OMP_LIST_UNIFORM, OMP_LIST_ALIGNED, OMP_LIST_LINEAR,
30 OMP_LIST_DEPEND_IN, OMP_LIST_DEPEND_OUT): New clause list kinds.
31 (gfc_omp_proc_bind_kind, gfc_omp_cancel_kind): New enums.
32 (gfc_omp_clauses): Change type of lists to gfc_omp_namelist *.
33 Add inbranch, notinbranch, cancel, proc_bind, safelen_expr and
34 simdlen_expr fields.
35 (gfc_omp_declare_simd): New typedef.
36 (gfc_get_omp_declare_simd): Define.
37 (gfc_namespace): Add omp_declare_simd field.
38 (gfc_exec_op): Add EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT,
39 EXEC_OMP_TASKGROUP, EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD and
40 EXEC_OMP_PARALLEL_DO_SIMD.
41 (gfc_omp_atomic_op): Add GFC_OMP_ATOMIC_MASK, GFC_OMP_ATOMIC_SEQ_CST
42 and GFC_OMP_ATOMIC_SWAP.
43 (gfc_code): Change type of omp_namelist field to gfc_omp_namelist *.
44 (gfc_free_omp_namelist, gfc_free_omp_declare_simd,
45 gfc_free_omp_declare_simd_list, gfc_resolve_omp_declare_simd): New
46 prototypes.
47 * trans-stmt.h (gfc_trans_omp_declare_simd): New prototype.
48 * symbol.c (gfc_free_namespace): Call gfc_free_omp_declare_simd.
49 * openmp.c (gfc_free_omp_clauses): Free safelen_expr and
50 simdlen_expr. Use gfc_free_omp_namelist instead of
51 gfc_free_namelist.
52 (gfc_free_omp_declare_simd, gfc_free_omp_declare_simd_list): New
53 functions.
54 (gfc_match_omp_variable_list): Add end_colon, headp and
55 allow_sections arguments. Handle parsing of array sections.
56 Use *omp_namelist* instead of *namelist* data structure and
57 functions/macros. Allow termination at : character.
58 (OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH,
59 OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND,
60 OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM): Define.
61 (gfc_match_omp_clauses): Change first and needs_space variables
62 into arguments with default values. Parse inbranch, notinbranch,
63 proc_bind, safelen, simdlen, uniform, linear, aligned and
64 depend clauses.
65 (OMP_PARALLEL_CLAUSES): Add OMP_CLAUSE_PROC_BIND.
66 (OMP_DECLARE_SIMD_CLAUSES, OMP_SIMD_CLAUSES): Define.
67 (OMP_TASK_CLAUSES): Add OMP_CLAUSE_DEPEND.
68 (gfc_match_omp_do_simd): New function.
69 (gfc_match_omp_flush): Use *omp_namelist* instead of *namelist*
70 data structure and functions/macros.
71 (gfc_match_omp_simd, gfc_match_omp_declare_simd,
72 gfc_match_omp_parallel_do_simd): New functions.
73 (gfc_match_omp_atomic): Handle seq_cst clause. Handle atomic swap.
74 (gfc_match_omp_taskgroup, gfc_match_omp_cancel_kind,
75 gfc_match_omp_cancel, gfc_match_omp_cancellation_point): New
76 functions.
77 (resolve_omp_clauses): Add where, omp_clauses and ns arguments.
78 Use *omp_namelist* instead of *namelist* data structure and
79 functions/macros. Resolve uniform, aligned, linear, depend,
80 safelen and simdlen clauses.
81 (resolve_omp_atomic): Adjust for GFC_OMP_ATOMIC_{MASK,SEQ_CST,SWAP}
82 addition, recognize atomic swap.
83 (gfc_resolve_omp_parallel_blocks): Use gfc_omp_namelist instead
84 of gfc_namelist. Handle EXEC_OMP_PARALLEL_DO_SIMD the same as
85 EXEC_OMP_PARALLEL_DO.
86 (gfc_resolve_do_iterator): Use *omp_namelist* instead of *namelist*
87 data structure and functions/macros.
88 (resolve_omp_do): Likewise. Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD,
89 EXEC_OMP_PARALLEL_DO_SIMD.
90 (gfc_resolve_omp_directive): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD,
91 EXEC_OMP_PARALLEL_DO_SIMD and EXEC_OMP_CANCEL. Adjust
92 resolve_omp_clauses caller.
93 (gfc_resolve_omp_declare_simd): New function.
94 * parse.c (decode_omp_directive): Parse cancellation point, cancel,
95 declare simd, end do simd, end simd, end parallel do simd,
96 end taskgroup, parallel do simd, simd and taskgroup directives.
97 (case_executable): Add ST_OMP_CANCEL and ST_OMP_CANCELLATION_POINT.
98 (case_exec_markers): Add ST_OMP_TASKGROUP, case ST_OMP_SIMD,
99 ST_OMP_DO_SIMD and ST_OMP_PARALLEL_DO_SIMD.
100 (case_decl): Add ST_OMP_DECLARE_SIMD.
101 (gfc_ascii_statement): Handle ST_OMP_CANCEL,
102 ST_OMP_CANCELLATION_POINT, ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP,
103 ST_OMP_SIMD, ST_OMP_END_SIMD, ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD,
104 ST_OMP_PARALLEL_DO_SIMD, ST_OMP_END_PARALLEL_DO_SIMD and
105 ST_OMP_DECLARE_SIMD.
106 (parse_omp_do): Handle ST_OMP_SIMD, ST_OMP_DO_SIMD and
107 ST_OMP_PARALLEL_DO_SIMD.
108 (parse_omp_atomic): Adjust for GFC_OMP_ATOMIC_* additions.
109 (parse_omp_structured_block): Handle ST_OMP_TASKGROUP and
110 ST_OMP_PARALLEL_DO_SIMD.
111 (parse_executable): Handle ST_OMP_SIMD, ST_OMP_DO_SIMD,
112 ST_OMP_PARALLEL_DO_SIMD and ST_OMP_TASKGROUP.
113 * trans-decl.c (gfc_get_extern_function_decl,
114 gfc_create_function_decl): Call gfc_trans_omp_declare_simd if
115 needed.
116 * frontend-passes.c (gfc_code_walker): Handle EXEC_OMP_SIMD,
117 EXEC_OMP_DO_SIMD and EXEC_OMP_PARALLEL_DO_SIMD. Walk
118 safelen_expr and simdlen_expr. Walk expressions in gfc_omp_namelist
119 of depend, aligned and linear clauses.
120 * match.c (match_exit_cycle): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD
121 and EXEC_OMP_PARALLEL_DO_SIMD.
122 (gfc_free_omp_namelist): New function.
123 * dump-parse-tree.c (show_namelist): Removed.
124 (show_omp_namelist): New function.
125 (show_omp_node): Handle OpenMP 4.0 additions.
126 (show_code_node): Handle EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT,
127 EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and
128 EXEC_OMP_TASKGROUP.
129 * match.h (gfc_match_omp_cancel, gfc_match_omp_cancellation_point,
130 gfc_match_omp_declare_simd, gfc_match_omp_do_simd,
131 gfc_match_omp_parallel_do_simd, gfc_match_omp_simd,
132 gfc_match_omp_taskgroup): New prototypes.
133 * trans-openmp.c (gfc_trans_omp_variable): Add declare_simd
134 argument, handle it. Allow current_function_decl to be NULL.
135 (gfc_trans_omp_variable_list): Add declare_simd argument, pass
136 it through to gfc_trans_omp_variable and disregard whether
137 sym is referenced if declare_simd is true. Work on gfc_omp_namelist
138 instead of gfc_namelist.
139 (gfc_trans_omp_reduction_list): Work on gfc_omp_namelist instead of
140 gfc_namelist. Adjust gfc_trans_omp_variable caller.
141 (gfc_trans_omp_clauses): Add declare_simd argument, pass it through
142 to gfc_trans_omp_variable{,_list} callers. Work on gfc_omp_namelist
143 instead of gfc_namelist. Handle inbranch, notinbranch, safelen,
144 simdlen, depend, uniform, linear, proc_bind and aligned clauses.
145 Handle cancel kind.
146 (gfc_trans_omp_atomic): Handle seq_cst clause, handle atomic swap,
147 adjust for GFC_OMP_ATOMIC_* changes.
148 (gfc_trans_omp_cancel, gfc_trans_omp_cancellation_point): New
149 functions.
150 (gfc_trans_omp_do): Add op argument, handle simd translation into
151 generic.
152 (GFC_OMP_SPLIT_SIMD, GFC_OMP_SPLIT_DO, GFC_OMP_SPLIT_PARALLEL,
153 GFC_OMP_SPLIT_NUM, GFC_OMP_MASK_SIMD, GFC_OMP_MASK_DO,
154 GFC_OMP_MASK_PARALLEL): New.
155 (gfc_split_omp_clauses, gfc_trans_omp_do_simd): New functions.
156 (gfc_trans_omp_parallel_do): Rework to use gfc_split_omp_clauses.
157 (gfc_trans_omp_parallel_do_simd, gfc_trans_omp_taskgroup): New
158 functions.
159 (gfc_trans_omp_directive): Handle EXEC_OMP_CANCEL,
160 EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
161 EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
162 Adjust gfc_trans_omp_do caller.
163 (gfc_trans_omp_declare_simd): New function.
164 * st.c (gfc_free_statement): Handle EXEC_OMP_CANCEL,
165 EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
166 EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
167 For EXEC_OMP_FLUSH call gfc_free_omp_namelist instead of
168 gfc_free_namelist.
169 * module.c (omp_declare_simd_clauses): New variable.
170 (mio_omp_declare_simd): New function.
171 (mio_symbol): Call it.
172 * trans.c (trans_code): Handle EXEC_OMP_CANCEL,
173 EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
174 EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
175 * resolve.c (gfc_resolve_blocks): Handle EXEC_OMP_DO_SIMD,
176 EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
177 (resolve_code): Handle EXEC_OMP_CANCEL,
178 EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
179 EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
180 (resolve_types): Call gfc_resolve_omp_declare_simd.
181
182 2014-05-11 Tobias Burnus <burnus@net-b.de>
183
184 * trans-intrinsic.c (gfc_build_builtin_function_decls):
185 Change type of second argument to int.
186
187 2014-05-09 Mike Stump <mikestump@comcast.net>
188
189 PR fortran/61109
190 * trans-array.c (gfc_conv_array_initializer): Fix wide-int
191 conversion bug.
192
193 2014-05-08 Tobias Burnus <burnus@net-b.de>
194
195 * gfortran.h (gfc_isym_id): Add GFC_ISYM_CAF_GET
196 and GFC_ISYM_CAF_SEND.
197 * intrinsic.c (add_functions): Add only internally
198 accessible caf_get and caf_send functions.
199 * resolve.c (add_caf_get_intrinsic,
200 remove_caf_get_intrinsic): New functions.
201 (resolve_variable): Resolve expression rank and
202 prepare for add_caf_get_intrinsic call.
203 (gfc_resolve_expr): For variables, remove rank
204 resolution.
205 (resolve_ordinary_assign): Prepare call to
206 GFC_ISYM_CAF_SEND.
207 (resolve_code): Avoid call to GFC_ISYM_CAF_GET for
208 the LHS of an assignment.
209
210 2014-05-08 Tobias Burnus <burnus@net-b.de>
211
212 * trans-intrinsic.c (conv_co_minmaxsum): Change condition style.
213
214 2014-05-08 Tobias Burnus <burnus@net-b.de>
215
216 * check.c (check_co_minmaxsum, gfc_check_co_minmax,
217 gfc_check_co_sum): New.
218 * error.c (gfc_notify_std): Update -std=f2008ts.
219 * gfortran.h (gfc_isym_id): Add GFC_ISYM_CO_MAX,
220 GFC_ISYM_CO_MIN, GFC_ISYM_CO_SUM.
221 * intrinsic.h (gfc_check_co_minmax,
222 gfc_check_co_sum): Declare.
223 * intrinsic.c (add_subroutines): Add co_min, co_max
224 and co_sum.
225 (gfc_check_intrinsic_standard): Update text for
226 -std=f2008ts.
227 * intrinsic.texi (CO_MIN, CO_MAX, CO_SUM): Document
228 them.
229 * invoke.texi (-std=f2008ts): Update wording.
230 * trans.h (gfor_fndecl_co_max,
231 gfor_fndecl_co_min, gfor_fndecl_co_sum): Define.
232 * trans-decl.c (gfor_fndecl_co_max,
233 gfor_fndecl_co_min, gfor_fndecl_co_sum): Define.
234 (gfc_build_builtin_function_decls): Assign to it.
235 * trans-intrinsic.c (conv_co_minmaxsum): New.
236 (gfc_conv_intrinsic_subroutine): Call it.
237
238 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
239 Mike Stump <mikestump@comcast.net>
240 Richard Sandiford <rdsandiford@googlemail.com>
241
242 * target-memory.c: Include wide-int.h.
243 (gfc_interpret_logical): Use wide-int interfaces.
244 * trans-array.c: Include wide-int.h.
245 (gfc_conv_array_initializer): Use wide-int interfaces.
246 * trans-const.c: Include wide-int.h.
247 (gfc_conv_string_init): Use wide-int interfaces.
248 (gfc_conv_mpz_to_tree): Likewise.
249 (gfc_conv_tree_to_mpz): Likewise.
250 * trans-decl.c (gfc_can_put_var_on_stack): Use tree_fits_uhwi_p.
251 * trans-expr.c: Include wide-int.h.
252 (gfc_conv_cst_int_power): Use wide-int interfaces.
253 (gfc_string_to_single_character): Likewise.
254 (gfc_optimize_len_trim): Likewise.
255 * trans-intrinsic.c: Include wide-int.h.
256 (trans_this_image): Use wide-int interfaces.
257 (gfc_conv_intrinsic_bound): Likewise.
258 (conv_intrinsic_cobound): Likewise.
259 * trans-types.c (gfc_init_types): Likewise.
260 (gfc_get_array_type_bounds): Pass an integer of the correct type
261 instead of using integer_one_node.
262
263 2014-04-30 Tobias Burnus <burnus@net-b.de>
264
265 * trans-decl.c (create_function_arglist): Add hidden coarray arguments
266 also for polymorphic coarrays.
267 * trans-expr.c (gfc_conv_procedure_call): Pass hidden coarray arguments
268 also for polymorphic coarrays.
269
270 2014-04-30 Tobias Burnus <burnus@net-b.de>
271
272 * resolve.c (resolve_function): Don't do
273 assumed-size check for lcobound/ucobound.
274 * trans-types.c (gfc_build_array_type): Only build an array
275 descriptor with codimensions for allocatable coarrays.
276
277 2014-04-30 Tobias Burnus <burnus@net-b.de>
278
279 * gfortran.h (gfc_init_coarray_decl): Remove.
280 * parse.c (translate_all_program_units): Remove call to it.
281 (gfc_parse_file): Update call.
282 * trans.h (gfor_fndecl_caf_this_image,
283 gfor_fndecl_caf_num_images): Add.
284 (gfort_gvar_caf_num_images,
285 gfort_gvar_caf_this_image): Remove.
286 * trans-decl.c (gfor_fndecl_caf_this_image,
287 gfor_fndecl_caf_num_images): Add.
288 (gfort_gvar_caf_num_images,
289 gfort_gvar_caf_this_image): Remove.
290 (gfc_build_builtin_function_decls): Init new decl.
291 (gfc_init_coarray_dec): Remove.
292 (create_main_function): Change calls.
293 * trans-intrinsic.c (trans_this_image, trans_image_index,
294 conv_intrinsic_cobound): Generate call to new library function
295 instead of to a static variable.
296 * trans-stmt.c (gfc_trans_sync): Ditto.
297
298 2014-04-30 Tobias Burnus <burnus@net-b.de>
299
300 * trans-expr.c (get_tree_for_caf_expr): Fix handling of polymorphic
301 and derived-type coarrays.
302
303 2014-04-27 Thomas Koenig <tkoenig@gcc.gnu.org>
304
305 PR fortran/59604
306 PR fortran/58003
307 * gfortran.h (gfc_convert_mpz_to_signed): Add prototype.
308 * arith.c (gfc_int2int): Convert number to signed if
309 arithmetic overflow is not checked.
310 * simplify.c (convert_mpz_to_unsigned): Only trigger assert for
311 size if range checking is in force.
312 (convert_mpz_to_signed): Make non-static, rename to
313 (gfc_convert_mpz_to_signed).
314 (simplify_dshift): Use gfc_convert_mpz_to_signed.
315 (gfc_simplify_ibclr): Likewise.
316 (gfc_simplify_ibits): Likewise.
317 (gfc_simplify_ibset): Likewise.
318 (simplify_shift): Likewise.
319 (gfc_simplify_ishiftc): Likewise.
320 (gfc_simplify_maskr): Likewise.
321 (gfc_simplify_maskl): Likewise.
322
323 2014-04-22 Tobias Burnus <burnus@net-b.de>
324
325 PR fortran/60881
326 * trans-expr.c (gfc_trans_subcomponent_assign): Fix handling
327 of scalar coarrays.
328
329 2014-04-17 Jakub Jelinek <jakub@redhat.com>
330
331 * trans-types.c (gfc_init_kinds): Make sure GET_MODE_BITSIZE
332 argument is enum machine_mode.
333
334 2014-04-13 Paul Thomas <pault@gcc.gnu.org>
335
336 PR fortran/58085
337 PR fortran/60717
338 * trans.h: Add 'use_offset' bitfield to gfc_se.
339 * trans-array.c (gfc_conv_expr_descriptor): Use 'use_offset'
340 as a trigger to unconditionally recalculate the offset for
341 array slices and constant arrays.
342 trans-expr.c (gfc_conv_intrinsic_to_class): Use it.
343 trans-stmt.c (trans_associate_var): Ditto.
344 (gfc_conv_procedure_call): Ditto.
345
346 2014-04-11 Tobias Burnus <burnus@net-b.de>
347
348 PR fortran/58880
349 PR fortran/60495
350 * resolve.c (gfc_resolve_finalizers): Ensure that vtables
351 and finalization wrappers are generated.
352
353 2014-04-11 Janne Blomqvist <jb@gcc.gnu.org>
354
355 * intrinsic.texi (RANDOM_SEED): Improve example.
356
357 2014-04-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
358
359 * class.c (gfc_build_class_symbol): Append "_t" to target class
360 names to make the generated type names unique.
361
362 2014-04-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
363
364 PR fortran/60191
365 * trans-types.c (gfc_get_function_type): In case of recursion
366 build a variadic function type with empty argument list instead of a
367 stdarg-like function type with incomplete argument list.
368
369 2014-04-04 Tobias Burnus <burnus@net-b.de>
370
371 * check.c (gfc_check_cmplx): Fix typo.
372
373 2014-03-28 Mikael Morin <mikael@gcc.gnu.org>
374 Tobias Burnus <burnus@net-b.de>
375
376 PR fortran/60576
377 * trans-expr.c (gfc_conv_derived_to_class): Avoid
378 generation of out-of-bounds range expr.
379
380 2014-03-28 Mikael Morin <mikael@gcc.gnu.org>
381
382 PR fortran/60677
383 * trans-intrinsic.c (gfc_conv_intrinsic_ichar): Enlarge argument
384 list buffer.
385
386 2014-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
387
388 PR fortran/60522
389 * frontend-passes.c (cfe_code): Do not walk subtrees
390 for WHERE.
391
392 2014-03-27 Tobias Burnus <burnus@net-b.de>
393
394 PR fortran/58880
395 * trans-expr.c (gfc_conv_scalar_to_descriptor): Fix handling
396 of nonpointers.
397
398 2014-03-26 Dominique d'Humieres <dominiq@lps.ens.fr>
399
400 PR fortran/34928
401 * fortran.texi: Document Volatile COMMON as not supported.
402
403 2014-03-22 Jakub Jelinek <jakub@redhat.com>
404
405 PR debug/60603
406 * cpp.c (gfc_cpp_init): Restore cb_change_file call to
407 <built-in>.
408
409 2014-03-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
410
411 PR fortran/60148
412 * gfortran.texi: Add description of namelist DELIM= behavior.
413
414 2014-03-19 Tobias Burnus <burnus@net-b.>
415
416 PR fortran/60543
417 * io.c (check_io_constraints): Use gfc_unset_implicit_pure.
418 * resolve.c (resolve_ordinary_assign): Ditto.
419
420 2014-03-19 Tobias Burnus <burnus@net-b.de>
421
422 PR fortran/60543
423 PR fortran/60283
424 * gfortran.h (gfc_unset_implicit_pure): New prototype.
425 * resolve.c (gfc_unset_implicit_pure): New.
426 (resolve_structure_cons, resolve_function,
427 pure_subroutine): Use it.
428 * decl.c (match_old_style_init, gfc_match_data,
429 match_pointer_init, variable_decl): Ditto.
430 * expr.c (gfc_check_pointer_assign): Ditto.
431 * intrinsic.c (gfc_intrinsic_sub_interface): Ditto.
432 * io.c (match_vtag, gfc_match_open, gfc_match_close,
433 match_filepos, gfc_match_inquire, gfc_match_print,
434 gfc_match_wait): Ditto.
435 * match.c (gfc_match_critical, gfc_match_stopcode,
436 lock_unlock_statement, sync_statement, gfc_match_allocate,
437 gfc_match_deallocate): Ditto.
438 * parse.c (decode_omp_directive): Ditto.
439 * symbol.c (gfc_add_save): Ditto.
440
441 2014-03-18 Janus Weil <janus@gcc.gnu.org>
442
443 PR fortran/55207
444 PR fortran/60549
445 * decl.c (match_attr_spec): Revert r208590.
446
447 2014-03-18 Jakub Jelinek <jakub@redhat.com>
448
449 PR ipa/58721
450 * trans.c (gfc_unlikely, gfc_likely): Don't add __builtin_expect
451 if !optimize.
452
453 2014-03-18 Tobias Burnus <burnus@net-b.de>
454
455 PR ipa/58721
456 * trans.h (gfc_unlikely, gfc_likely): Add predictor as argument.
457 (gfc_trans_io_runtime_check): Remove.
458 * trans-io.c (gfc_trans_io_runtime_check): Make static; add has_iostat
459 as argument, add predictor to block.
460 (set_parameter_value, gfc_trans_open, gfc_trans_close, build_filepos,
461 gfc_trans_inquire, gfc_trans_wait, build_dt): Update calls.
462 * trans.c (gfc_unlikely, gfc_likely): Add predictor as argument.
463 (gfc_trans_runtime_check, gfc_allocate_using_malloc,
464 gfc_allocate_allocatable, gfc_deallocate_with_status): Set explicitly
465 branch predictor.
466 * trans-expr.c (gfc_conv_procedure_call): Ditto.
467 * trans-stmt.c (gfc_trans_allocate): Ditto.
468 * trans-array.c (gfc_array_init_size, gfc_array_allocate): Ditto.
469
470 2014-03-15 Janus Weil <janus@gcc.gnu.org>
471
472 PR fortran/55207
473 * decl.c (match_attr_spec): Variables in the main program implicitly
474 get the SAVE attribute in Fortran 2008.
475
476 2014-03-14 Mikael Morin <mikael@gcc.gnu.org>
477
478 PR fortran/60392
479 * trans-array.c (gfc_conv_array_parameter): Don't reuse the descriptor
480 if it has transposed dimensions.
481
482 2014-03-08 Tobias Burnus <burnus@net-b.de>
483
484 PR fortran/60447
485 * f95-lang.c (gfc_init): Return false when only
486 preprocessing.
487 * options.c (gfc_post_options): Ditto.
488
489 2014-03-08 Tobias Burnus <burnus@net-b.de>
490
491 * gfortran.texi (Fortran 2003 Status): Mention finalization,
492 deferred-length character support and input rounding.
493 (Fortran 2008 Status): Mention that at termination
494 signalling exceptions are shown.
495
496 2014-03-06 Paul Thomas <pault@gcc.gnu.org>
497 Janus Weil <janus@gcc.gnu.org>
498
499 PR fortran/51976
500 * gfortran.h (symbol_attribute): Add deferred_parameter attribute.
501 * primary.c (build_actual_constructor): It is not an error if
502 a missing component has the deferred_parameter attribute;
503 equally, if one is given a value, it is an error.
504 * resolve.c (resolve_fl_derived0): Remove error for deferred
505 character length components. Add the hidden string length
506 field to the structure. Give it the deferred_parameter
507 attribute.
508 * trans-array.c (duplicate_allocatable): Add a strlen field
509 which is used as the element size if it is non-null.
510 (gfc_duplicate_allocatable, gfc_copy_allocatable_data): Pass a
511 NULL to the new argument in duplicate_allocatable.
512 (structure_alloc_comps): Set the hidden string length as
513 appropriate. Use it in calls to duplicate_allocatable.
514 (gfc_alloc_allocatable_for_assignment): When a deferred length
515 backend declaration is variable, use that; otherwise use the
516 string length from the expression evaluation.
517 * trans-expr.c (gfc_conv_component_ref): If this is a deferred
518 character length component, the string length should have the
519 value of the hidden string length field.
520 (gfc_trans_subcomponent_assign): Set the hidden string length
521 field for deferred character length components. Allocate the
522 necessary memory for the string.
523 (alloc_scalar_allocatable_for_assignment): Same change as in
524 gfc_alloc_allocatable_for_assignment above.
525 * trans-stmt.c (gfc_trans_allocate): Likewise.
526 * trans-intrinsic (size_of_string_in_bytes): Make non-static.
527 * trans-types.c (gfc_get_derived_type): Set the tree type for
528 a deferred character length component.
529 * trans.c (gfc_deferred_strlen): New function.
530 * trans.h (size_of_string_in_bytes,gfc_deferred_strlen): New prototypes.
531
532 2014-03-01 Mikael Morin <mikael@gcc.gnu.org>
533
534 PR fortran/60341
535 * frontend-passes.c (optimize_comparison): Guard two union accesses
536 with the corresponding tag checks.
537
538 2014-02-28 Janus Weil <janus@gcc.gnu.org>
539
540 PR fortran/60359
541 * class.c (find_intrinsic_vtab): Prevent duplicate creation of copy
542 procedure for characters.
543
544 2014-02-21 Janus Weil <janus@gcc.gnu.org>
545
546 PR fortran/60302
547 * check.c (gfc_check_c_f_pointer): Only clear 'size' if 'gfc_array_size'
548 is successful.
549
550 2014-02-21 Janus Weil <janus@gcc.gnu.org>
551
552 PR fortran/60234
553 * gfortran.h (gfc_build_class_symbol): Removed argument.
554 * class.c (gfc_add_component_ref): Fix up missing vtype if necessary.
555 (gfc_build_class_symbol): Remove argument 'delayed_vtab'. vtab is always
556 delayed now, except for unlimited polymorphics.
557 (comp_is_finalizable): Procedure pointer components are not finalizable.
558 * decl. (build_sym, build_struct, attr_decl1): Removed argument of
559 'gfc_build_class_symbol'.
560 * match.c (copy_ts_from_selector_to_associate, select_type_set_tmp):
561 Ditto.
562 * symbol.c (gfc_set_default_type): Ditto.
563
564 2014-02-19 Janus Weil <janus@gcc.gnu.org>
565
566 PR fortran/60232
567 * expr.c (gfc_get_variable_expr): Don't add REF_ARRAY for dimensionful
568 functions, which are used as procedure pointer target.
569
570 2014-02-18 Tobias Burnus <burnus@net-b.de>
571
572 PR fortran/49397
573 * expr.c (gfc_check_pointer_assign): Add check for
574 F2008Cor2, C729.
575 * trans-decl.c (gfc_get_symbol_decl): Correctly generate external
576 decl in a corner case.
577
578 2014-02-18 Janus Weil <janus@gcc.gnu.org>
579
580 PR fortran/60231
581 * resolve.c (check_generic_tbp_ambiguity): Check for presence of dummy
582 arguments to prevent ICE.
583
584 2014-02-17 Janus Weil <janus@gcc.gnu.org>
585
586 PR fortran/55907
587 * resolve.c (build_default_init_expr): Don't initialize character
588 variable if -fno-automatic is given.
589
590 2014-02-15 Mikael Morin <mikael@gcc.gnu.org>
591
592 PR fortran/59599
593 * trans-intrinsic.c (gfc_conv_intrinsic_ichar): Calculate the
594 number of arguments.
595
596 2014-02-11 Jakub Jelinek <jakub@redhat.com>
597
598 PR fortran/52370
599 * trans-decl.c (gfc_build_dummy_array_decl): Set TREE_NO_WARNING
600 on decl if sym->attr.optional.
601
602 2014-02-09 Paul Thomas <pault@gcc.gnu.org>
603
604 PR fortran/57522
605 * resolve.c (resolve_assoc_var): Set the subref_array_pointer
606 attribute for the 'associate-name' if necessary.
607 * trans-stmt.c (trans_associate_var): If the 'associate-name'
608 is a subref_array_pointer, assign the element size of the
609 associate variable to 'span'.
610
611 2014-02-09 Paul Thomas <pault@gcc.gnu.org>
612
613 PR fortran/59026
614 * trans-expr.c (gfc_conv_procedure_call): Pass the value of the
615 actual argument to a formal argument with the value attribute
616 in an elemental procedure.
617
618 2014-02-08 Janus Weil <janus@gcc.gnu.org>
619 Mikael Morin <mikael.morin@gcc.gnu.org>
620
621 PR fortran/58470
622 * class.c (generate_finalization_wrapper): Assert that proc_tree has
623 been set in gfc_resolve_finalizers.
624 * resolve.c (resolve_fl_derived0): Remove unnecessary call to
625 gfc_is_finalizable.
626
627 2014-02-07 Benno Schulenberg <bensberg@justemail.net>
628
629 PR translation/52289
630 * fortran/resolve.c (resolve_ordinary_assign): Fix typoed word
631 in an error message.
632
633 2014-02-02 Mikael Morin <mikael@gcc.gnu.org>
634
635 PR fortran/57033
636 * primary.c (gfc_convert_to_structure_constructor): Avoid null pointer
637 dereference.
638
639 2014-02-01 Paul Thomas <pault@gcc.gnu.org>
640
641 PR fortran/59906
642 * trans-stmt.c (gfc_add_loop_ss_code): In the case of character
643 SS_REFERENCE, use gfc_conv_string_parameter to ensure that a
644 pointer to the string is stored.
645 * trans-expr.c (gfc_conv_expr_reference): Likewise, use
646 gfc_conv_string_parameter to ensure that a pointer to is passed
647 to the elemental function.
648
649 2014-01-28 Paul Thomas <pault@gcc.gnu.org>
650
651 PR fortran/59414
652 * trans-stmt.c (gfc_trans_allocate): Before the pointer
653 assignment to transfer the source _vptr to a class allocate
654 expression, the final class reference should be exposed. The
655 tail that includes the _data and array references is stored.
656 This reduced expression is transferred to 'lhs' and the _vptr
657 added. Then the tail is restored to the allocate expression.
658
659 2014-01-26 Mikael Morin <mikael@gcc.gnu.org>
660
661 PR fortran/58007
662 * module.c (read_module): Assert for component name correctness.
663
664 2014-01-18 Mikael Morin <mikael@gcc.gnu.org>
665
666 PR fortran/58007
667 * module.c (MOD_VERSION): Bump.
668 (fp2, find_pointer2): Remove.
669 (mio_component_ref): Don't forcedfully set the containing derived type
670 symbol for loading. Remove unused argument.
671 (mio_ref): Update caller
672 (mio_symbol): Dump component list earlier.
673 (skip_list): New argument nest_level. Initialize level with the new
674 argument.
675 (read_module): Add forced pointer components association for derived
676 type symbols.
677
678 2014-01-12 Janus Weil <janus@gcc.gnu.org>
679
680 PR fortran/58026
681 * decl.c (gfc_match_data_decl): Improve error recovery.
682
683 2014-01-09 Tobias Burnus <burnus@net-b.de>
684
685 * cpp.c (gfc_cpp_handle_option): Add missing break.
686 * trans-io.c (transfer_expr): Silence unused value warning.
687
688 2014-01-08 Janus Weil <janus@gcc.gnu.org>
689
690 PR fortran/58182
691 * resolve.c (gfc_verify_binding_labels): Modify order of checks.
692
693 2014-01-06 Janus Weil <janus@gcc.gnu.org>
694
695 PR fortran/59589
696 * class.c (comp_is_finalizable): New function to dermine if a given
697 component is finalizable.
698 (finalize_component, generate_finalization_wrapper): Use it.
699
700 2014-01-06 Janus Weil <janus@gcc.gnu.org>
701
702 PR fortran/59023
703 PR fortran/59662
704 * resolve.c (resolve_global_procedure): Don't apply to c-binding
705 procedures.
706 (gfc_verify_binding_labels): Remove duplicate line.
707
708 2014-01-04 Janus Weil <janus@gcc.gnu.org>
709
710 PR fortran/59547
711 * class.c (add_proc_comp): Copy pure attribute.
712
713 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
714
715 Update copyright years
716
717 2014-01-02 Tobias Burnus <burnus@net-b.de>
718
719 * gfortranspec.c (lang_specific_driver): Update copyright notice
720 dates.
721 * gfc-internals.texi: Bump @copying's copyright year.
722 * gfortran.texi: Ditto.
723 * intrinsic.texi: Ditto.
724 * invoke.texi: Ditto.
725
726 2014-01-02 Janus Weil <janus@gcc.gnu.org>
727
728 PR fortran/59654
729 * resolve.c (resolve_typebound_procedures): No need to create the vtab
730 here.
731 \f
732 Copyright (C) 2014 Free Software Foundation, Inc.
733
734 Copying and distribution of this file, with or without modification,
735 are permitted in any medium without royalty provided the copyright
736 notice and this notice are preserved.