137303cfc0d18ee24b35bf453d88678034ec154b
[gcc.git] / gcc / fortran / ChangeLog
1 2014-12-06 Tobias Burnus <burnus@net-b.de>
2 Manuel López-Ibáñez <manu@gcc.gnu.org>
3
4 * error.c (gfc_buffer_error, gfc_error_flag_test): Use bool not int.
5 (buffer_flag): Remove static variable.
6 (buffered_p): Add static variable.
7 (gfc_error_init_1): Call gfc_buffer_error.
8 (gfc_warning_1, gfc_warning, gfc_warning_now_1, gfc_error,
9 gfc_error_now_1): Update for static variable change.
10 * gfortran.h (gfc_buffer_error, gfc_error_flag_test): Update
11 prototype.
12 * parse.c (use_modules, decode_specification_statement,
13 next_fixed, next_statement, match_deferred_characteristics):
14 Update calls.
15 * decl.c (gfc_match_data_decl): Ditto.
16 * match.c (gfc_match_name): Ditto.
17
18 2014-12-05 Andre Vehreschild <vehre@gmx.de>
19
20 PR fortran/60414
21 * interface.c (compare_parameter): Remove class argument rank
22 check short circuit.
23
24 2014-12-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
25
26 * error.c (gfc_diagnostic_build_locus_prefix): Use
27 diagnostic_expand_location.
28
29 2014-12-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
30
31 * scanner.c (gfc_next_char_literal): Use gfc_warning_now.
32 (load_file): Use the line length as the column hint for
33 linemap_line_start. Reserve a location for the highest column of
34 the line.
35
36 2014-12-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
37
38 PR fortran/44054
39 * gfortran.h (gfc_warning): Now returns bool. Add overload that
40 accepts opt.
41 (gfc_warning_1): Declare.
42 * error.c
43 (pp_warning_buffer,warningcount_buffered,werrorcount_buffered): New.
44 (gfc_buffer_error): Set pp_warning_buffer.flush_p.
45 (gfc_clear_pp_buffer): New.
46 (gfc_warning_1): Renamed from gfc_warning.
47 (gfc_warning): Add three new overloads. One that takes just a
48 format string and ellipsis, another that takes also a warning
49 option, and another that takes also va_list instead of ellipsis.
50 (gfc_clear_warning): Clear pp_warning_buffer.
51 (gfc_warning_check): Flush pp_warning_buffer and update warning
52 and werror counters.
53 (gfc_diagnostics_init): Init pp_warning_buffer.
54
55 * Update all gfc_warning calls that do not use multiple
56 locations to use %qs and OPT_W*, otherwise use gfc_warning_1.
57
58 2014-12-02 Tobias Burnus <burnus@net-b.de>
59 Manuel López-Ibáñez <manu@gcc.gnu.org>
60
61 * error.c (warnings_not_errors): Use bool.
62 (gfc_clear_error): Update.
63 (gfc_get_errors): Ditto. Use bool argument.
64 * gfortran.h (gfc_get_errors): Update prototype.
65 * resolve.c (resolve_global_procedure): Update call.
66
67 2014-12-02 Richard Biener <rguenther@suse.de>
68
69 PR fortran/64137
70 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Check
71 proper expressions type, use proper type for computing
72 -Huge - 1.
73
74 2014-11-29 Jakub Jelinek <jakub@redhat.com>
75
76 * trans-openmp.c (gfc_omp_finish_clause,
77 gfc_trans_omp_array_reduction_or_udr, gfc_trans_omp_atomic): Remove
78 NULL last argument from create_tmp_var_raw and create_tmp_var calls.
79
80 2014-11-29 Tobias Burnus <burnus@net-b.de>
81
82 * scanner.c (skip_free_comments, gfc_gobble_whitespace): Use
83 gfc_warning_now instead of ..._now_1.
84
85 2014-11-29 Tobias Burnus <burnus@net-b.de>
86 Manuel López-Ibáñez <manu@gcc.gnu.org>
87
88 * lang.opt (Wtabs): Combine duplicated item into a single
89 one using || for LangEnabledBy.
90
91 2014-11-25 Tobias Burnus <burnus@net-b.de>
92
93 * error.c (gfc_internal_error): Convert to common diagnostics.
94 * interface.c (gfc_find_sym_in_symtree): Use %qs.
95 * intrinsic.c (make_generic, gfc_check_intrinsic_standard,
96 gfc_convert_type_warn): Ditto.
97 * module.c (write_symbol): Ditto.
98 * symbol.c (gfc_get_default_type): Ditto; use fatal instead
99 of internal error.
100 * trans-array.c (gfc_walk_subexpr): Replace internal_error by
101 gfc_internal_error.
102 * trans-decl.c (gfc_get_symbol_decl,
103 (gfc_create_module_variable): Ditto. Use %qs.
104 * trans-intrinsic.c (gfc_conv_intrinsic_lib_function): Ditto.
105 * trans-io.c (transfer_expr): Ditto.
106 * trans-openmp.c (gfc_trans_omp_workshare): Ditto.
107 * trans.c (trans_code): Ditto.
108
109 2014-11-25 Tobias Burnus <burnus@net-b.de>
110
111 * gfortran.h (gfc_option_t): Remove flags moved as Var to .opt.
112 (gfc_error_now_1): Renamed from gfc_error_now.
113 (gfc_error_now): Renamed from gfc_error_now_2.
114 (gfc_warning_now_1): Renamed from gfc_warning_now.
115 (gfc_warning_now): Renamed from gfc_warning_now_2.
116 * error.c (gfc_error_now_1): Renamed from gfc_error_now.
117 (gfc_error_now): Renamed from gfc_error_now_2.
118 (gfc_warning_now_1): Renamed from gfc_warning_now.
119 (gfc_warning_now): Renamed from gfc_warning_now_2.
120 (gfc_get_errors): Include common diagnostic in count.
121 * lang.opt (Wc-binding-type, Wconversion, Wconversion-extra,
122 Wintrinsics-std): Create a Var for those warnings.
123 * check.c (gfc_check_cmplx): Pass warning flag to
124 diagnostic function.
125 * decl.c (get_proc_name, gfc_verify_c_interop_param, build_sym
126 gfc_set_constant_character_len, verify_bind_c_sym): Ditto; use
127 _1 for old diagnostic, remove _2 for new diagnostic.
128 * expr.c (gfc_check_assign, gfc_check_vardef_context): Ditto.
129 * frontend-passes.c (doloop_code, do_function): Ditto.
130 * intrinsic.c (gfc_is_intrinsic, gfc_convert_type_warn): Ditto.
131 * match.c (gfc_match_common): Ditto.
132 * module.c (use_iso_fortran_env_module, gfc_use_module): Ditto.
133 * parse.c (decode_statement, decode_gcc_attribute, next_free,
134 next_fixed, gfc_check_do_variable): Ditto.
135 * resolve.c (resolve_common_vars, resolve_ordinary_assign):
136 Ditto.
137 * scanner.c (add_path_to_list, skip_free_comments,
138 gfc_next_char_literal, gfc_gobble_whitespace, load_line,
139 preprocessor_line, load_file): Ditto.
140 * symbol.c (gfc_set_default_type, verify_bind_c_derived_type):
141 Ditto.
142 * options.c (gfc_post_options): Ditto.
143 (gfc_init_options, set_Wall, gfc_handle_option): Ditto; remove
144 flags which now have a Var.
145 * invoke.texi (Wconversion-extra): Make clear that the flag
146 does not imply -Wconversion.
147
148 2014-11-24 Jakub Jelinek <jakub@redhat.com>
149
150 PR fortran/63938
151 * trans-openmp.c (gfc_trans_omp_atomic): Make sure lhsaddr is
152 simple enough for goa_lhs_expr_p.
153
154 2014-11-24 Tobias Burnus <burnus@net-b.de>
155
156 * error.c (gfc_fatal_error_1): Remove.
157 * gfortran.h (gfc_fatal_error_1): Remove.
158 * check.c (check_co_collective): Change gfc_fatal_error_1 to
159 gfc_fatal_error.
160 * match.c (gfc_match_name): Ditto.
161 * trans-array.c (gfc_conv_array_initializer): Ditto.
162 * trans-stmt.c (gfc_trans_sync): Ditto.
163
164 2014-11-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
165
166 PR fortran/44054
167 * decl.c (gfc_verify_c_interop_param): Use gfc_error_now_2.
168 (gfc_set_constant_character_len): Use gfc_warning_now_2.
169 * resolve.c (resolve_ordinary_assign): Likewise.
170 * gfortran.h (warn_character_truncation): Do not declare here.
171 * error.c (gfc_format_decoder): Handle %L.
172 * lang.opt (Wcharacter-truncation): Add Var and LangEnabledBy.
173 * options.c (gfc_init_options): Do not handle
174 warn_character_truncation explicitly.
175 (set_Wall): Likewise.
176 (gfc_handle_option): Likewise.
177
178 2014-11-23 Tobias Burnus <burnus@net-b.de>
179
180 * invoke.texi (-Wtabs): Swap -Wtabs/-Wno-tabs now that
181 -Wtabs enables the warning.
182
183 2014-11-23 Tobias Burnus <burnus@net-b.de>
184
185 * error.c (gfc_diagnostic_build_prefix): Correct coloring
186 of the colon of the prefix.
187
188 2014-11-23 Tobias Burnus <burnus@net-b.de>
189 Manuel López-Ibáñez <manu@gcc.gnu.org>
190
191 * gfortran.h (gfc_option_t): Remove warn_tabs.
192 * lang.opt (Wpedantic): Add.
193 (Wtabs): Use Var and LangEnabledBy.
194 * options.c (gfc_init_options, gfc_post_options,
195 set_Wall): Remove -Wtabs handling.
196 (gfc_handle_option): Update -std=, remove OPT_Wtabs.
197 * scanner.c (gfc_gobble_whitespace): Update for
198 flag-variable renaming.
199 (load_line): Ditto. Pass warn flag to diagnostic.
200
201 2014-11-22 Tobias Burnus <burnus@net-b.de>
202
203 * trans-expr.c (gfc_caf_get_image_index): Fix image calculation.
204
205 2014-11-15 Tobias Burnus <burnus@net-b.de>
206
207 * error.c (gfc_fatal_error_1): Renamed from gfc_fatal_error.
208 (gfc_fatal_error): Add; uses common diagnostics.
209 * array.c (gfc_match_array_ref, gfc_match_array_spec): Use
210 %< %>.
211 * check.c (check_co_collective, gfc_check_lcobound,
212 gfc_check_image_index, gfc_check_num_images,
213 gfc_check_this_image, gfc_check_ucobound): Ditto.
214 * cpp.c (gfc_cpp_post_options): Ditto.
215 (gfc_cpp_init_0, gfc_cpp_done): Change %s to %qs.
216 * gfc-diagnostic.def (DK_FATAL): Capitalize first letter.
217 * gfortran.h (gfc_fatal_error_1): Add.
218 * match.c (gfc_match_name, gfc_match_critical,
219 lock_unlock_statement, sync_statement): Add %< %>.
220 * module.c (bad_module, gfc_dump_module, gfc_use_module): Change
221 %s to %qs.
222 * options.c (gfc_handle_module_path_options, gfc_handle_fpe_option,
223 gfc_handle_coarray_option, gfc_handle_runtime_check_option,
224 gfc_handle_option): Add %< %>.
225 * simplify.c (gfc_simplify_num_images): Ditto.
226 * trans-stmt.c (gfc_trans_sync): Use gfc_fatal_error_1.
227 * trans-array.c (gfc_conv_array_initializer): Ditto.
228 * trans-types.c (gfc_init_kinds): Use gfc_fatal_error instead
229 of fatal_error; add %< %> quotations.
230
231 2014-11-13 Bernd Schmidt <bernds@codesourcery.com>
232 Thomas Schwinge <thomas@codesourcery.com>
233 Ilya Verbin <ilya.verbin@intel.com>
234 Andrey Turetskiy <andrey.turetskiy@intel.com>
235
236 * Make-lang.in (fortran.install-common): Do not install for the offload
237 compiler.
238
239 2014-11-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
240
241 PR fortran/44054
242 * gfortran.h (warn_use_without_only): Remove.
243 (gfc_diagnostics_finish): Declare.
244 * error.c: Include tree-diagnostics.h
245 (gfc_format_decoder): New.
246 (gfc_diagnostics_init): Use gfc_format_decoder. Set default caret
247 char.
248 (gfc_diagnostics_finish): Restore tree diagnostics defaults, but
249 keep gfc_diagnostics_starter and finalizer. Restore default caret.
250 * options.c: Remove all uses of warn_use_without_only.
251 * lang.opt (Wuse-without-only): Add Var.
252 * f95-lang.c (gfc_be_parse_file): Call gfc_diagnostics_finish.
253 * module.c (gfc_use_module): Use gfc_warning_now_2.
254 * parse.c (decode_statement): Likewise.
255 (decode_gcc_attribute): Likewise.
256 (next_free): Likewise.
257 (next_fixed): Likewise.
258
259 2014-11-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
260
261 PR fortran/63701
262 * trans-expr.c (gfc_get_tree_for_caf_expr): Initialise found to false.
263
264 2014-11-10 Janne Blomqvist <jb@gcc.gnu.org>
265
266 PR libfortran/47007
267 PR libfortran/61847
268 * gfortran.texi: Add note about locale issues to thread-safety
269 section.
270
271 2014-11-04 Bernd Schmidt <bernds@codesourcery.com>
272
273 * f95-lang.c (gfc_init_builtin_functions): Use type index 2 for
274 scalbn, scalbnl and scalbnf.
275 * mathbuiltins.def (JN, YN): Use type index 5.
276
277 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
278
279 * trans-types.c, trans-types.h: Remove redundant enum from
280 machine_mode.
281
282 2014-10-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
283
284 PR fortran/44054
285 * gfortran.h (gfc_warning_cmdline): Rename as gfc_warning_now_2.
286 (gfc_error_cmdline): Rename as gfc_error_now_2.
287 * error.c (gfc_diagnostic_build_locus_prefix): Remove trailing space.
288 (gfc_diagnostic_starter): Add space between locus and prefix.
289 (gfc_warning_now_2): Renamed from gfc_warning_cmdline.
290 (gfc_error_now_2): Renamed from gfc_error_cmdline.
291 * scanner.c (add_path_to_list): Use gfc_warning_now_2.
292 (load_line): Likewise.
293 (load_file): Likewise.
294 * options.c (gfc_post_options): Update all renamed functions.
295
296 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
297
298 * f95-lang.c: Adjust include files.
299 * trans-decl.c: Ditto.
300
301 2014-10-24 Tobias Burnus <burnus@net-b.de>
302
303 * check.c (check_co_collective): Reject coindexed A args.
304 (gfc_check_co_reduce): Add OPERATOR checks.
305 * gfortran.texi (_gfortran_caf_co_broadcast, _gfortran_caf_co_max,
306 _gfortran_caf_co_min, _gfortran_caf_co_sum,
307 _gfortran_caf_co_reduce): Add ABI documentation.
308 * intrinsic.texi (CO_REDUCE): Document intrinsic.
309 (DPROD): Returns double not single precision.
310 * trans-decl.c (gfor_fndecl_co_reduce): New global var.
311 (gfc_build_builtin_function_decls): Init it.
312 * trans.h (gfor_fndecl_co_reduce): Declare it.
313 * trans-intrinsic.c (conv_co_collective,
314 gfc_conv_intrinsic_subroutine): Handle CO_REDUCE.
315
316 2014-10-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
317
318 PR fortran/48979
319 * trans-const.c (gfc_build_nan): New function.
320 * trans-const.h (gfc_build_nan): New prototype.
321 * trans-intrinsic.c (gfc_conv_intrinsic_exponent): Handle special
322 values.
323 (gfc_conv_intrinsic_minmaxval): Use gfc_build_nan.
324 (gfc_conv_intrinsic_fraction): Handle special values.
325 (gfc_conv_intrinsic_spacing): Likewise.
326 (gfc_conv_intrinsic_rrspacing): Likewise.
327 (gfc_conv_intrinsic_set_exponent): Likewise.
328
329 2014-10-18 Paul Thomas <pault@gcc.gnu.org>
330
331 PR fortran/63553
332 * resolve.c (resolve_ordinary_assign): Add data component to
333 rvalue expression for class to type assignment.
334
335 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
336
337 * f95-lang.c: Adjust include files.
338 * trans-decl.c: Likewise.
339
340 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
341
342 * trans-decl.c, trans.c, trans.h: Use hash_table instead of hashtab.
343
344 2014-10-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
345
346 PR fortran/48979
347 * simplify.c (gfc_simplify_atan): Use mpfr_zero_p to check for zeros.
348 (gfc_simplify_log): Likewise.
349 (gfc_simplify_scale): Likewise.
350 (gfc_simplify_exponent): Handle infinities and NaNs.
351 (gfc_simplify_fraction): Handle infinities.
352 (gfc_simplify_rrspacing): Handle signed zeros and NaNs.
353 (gfc_simplify_set_exponent): Handle infinities and NaNs.
354 (gfc_simplify_spacing): Handle zeros, infinities and NaNs.
355
356 2014-10-10 Jakub Jelinek <jakub@redhat.com>
357
358 PR fortran/59488
359 * trans-openmp.c (gfc_omp_predetermined_sharing): Return
360 OMP_CLAUSE_DEFAULT_SHARED for parameters or vtables.
361
362 2014-10-10 Tobias Burnus <burnus@net-b.de>
363
364 * gfortran.h (gfc_set_implicit_none): Update prototype.
365 * symbol.c (gfc_set_implicit_none): Take and
366 use error location. Move diagnostic from here to ...
367 * decl.c (gfc_match_implicit_none): ... here. And
368 update call. Handle empty implicit-none-spec.
369 (gfc_match_implicit): Handle statement-separator ";".
370
371 2014-10-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
372
373 * f95-lang.c (gfc_init_builtin_functions): Add more floating-point
374 built-ins.
375 * mathbuiltins.def (OTHER_BUILTIN): Define built-ins for logb,
376 remainder, rint and signbit.
377 * trans-decl.c (save_fp_state, restore_fp_state): Move to
378 trans-intrinsic.c
379 (gfc_generate_function_code): Use new names for these two functions.
380 * trans-expr.c (gfc_conv_function_expr): Catch IEEE functions to
381 emit code from the front-end.
382 * trans-intrinsic.c (gfc_save_fp_state, gfc_restore_fp_state,
383 conv_ieee_function_args, conv_intrinsic_ieee_builtin,
384 conv_intrinsic_ieee_is_normal, conv_intrinsic_ieee_is_negative,
385 conv_intrinsic_ieee_logb_rint, conv_intrinsic_ieee_rem,
386 conv_intrinsic_ieee_next_after, conv_intrinsic_ieee_scalb,
387 conv_intrinsic_ieee_copy_sign, gfc_conv_ieee_arithmetic_function):
388 New functions.
389 * trans.h (gfc_conv_ieee_arithmetic_function,
390 gfc_save_fp_state, gfc_restore_fp_state): New prototypes.
391
392 2014-10-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
393
394 PR fortran/44054
395 PR fortran/54687
396 * gfortran.h (gfc_warning_cmdline): Add overload that takes an
397 option.
398 (gfc_error_cmdline): Declare.
399 * error.c (gfc_warning_cmdline): New overload that takes an option.
400 (gfc_error_cmdline): New.
401 * lang.opt (Wmissing-include-dirs): New.
402 * scanner.c (add_path_to_list): Use the new functions.
403 (load_file): Likewise.
404 * options.c (gfc_init_options): Wmissing-include-dirs is enabled
405 by default in Fortran.
406 (gfc_handle_option): Accept automatically handled options.
407
408 2014-10-06 Tobias Burnus <burnus@net-b.de>
409
410 * libgfortran.h (GFC_STD_F2015): Add.
411 * decl.c (gfc_match_implicit_none): Handle spec list.
412 (gfc_match_implicit): Move double intrinsic warning here.
413 * gfortran.h (gfc_namespace): Add has_implicit_none_export:1.
414 (gfc_set_implicit_none): Update interface.
415 * interface.c (gfc_procedure_use): Add implicit-none external
416 error check.
417 * parse.c (accept_statement): Remove call.
418 (verify_st_order): Permit that external-implict-none follows
419 implicit statement.
420 * symbol.c (gfc_set_implicit_none): Handle external/type
421 implicit none.
422
423 2014-10-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
424
425 PR fortran/36534
426 * resolve.c (resolve_fl_procedure): Clean up obsolescence warning.
427
428 2014-09-25 Tobias Burnus <burnus@net-b.de>
429
430 * check.c (check_co_collective): Renamed from check_co_minmaxsum,
431 handle co_reduce.
432 (gfc_check_co_minmax, gfc_check_co_sum): Update call.
433 (gfc_check_co_broadcast, gfc_check_co_reduce): New.
434 * gfortran.h (gfc_isym_id): Add GFC_ISYM_CO_BROADCAST and
435 GFC_ISYM_CO_REDUCE.
436 * intrinsic.c (add_subroutines): Add co_reduce and co_broadcast.
437 * intrinsic.h (gfc_check_co_broadcast, gfc_check_co_reduce): Add
438 proto types.
439 * intrinsic.texi (CO_BROADCAST): Add.
440 * trans.h (gfor_fndecl_co_broadcast): New.
441 * trans-decl.c (gfor_fndecl_co_broadcast): Ditto.
442 (gfc_build_builtin_function_decls): Add decl for it,
443 * trans-intrinsic.c (conv_co_collective): Renamed from
444 conv_co_minmaxsum. Handle co_reduce.
445 (gfc_conv_intrinsic_subroutine): Handle co_reduce.
446
447 2014-09-23 Jakub Jelinek <jakub@redhat.com>
448
449 PR fortran/63331
450 * trans-types.c (gfc_get_array_descr_info): Build DEBUG_EXPR_DECL
451 instead of VAR_DECL for base_decl.
452
453 2014-09-21 Jan Hubicka <hubicka@ucw.cz>
454
455 * openmp.c (omp_context): Rename to ...
456 (fortran_omp_context): ... this one.
457
458 2014-09-21 Dominique d'Humieres <dominiq@lps.ens.fr>
459
460 * resolve.c (resolve_fl_procedure): Remove duplicated lines.
461
462 2014-09-20 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
463 Tobias Burnus <burnus@net-b.de>
464
465 * trans-intrinsic.c (conv_intrinsic_atomic_op): Fix issue with
466 generating temporary for value argument.
467
468 2014-09-20 Joost VandeVondele <vondele@gcc.gnu.org>
469
470 * trans-expr.c (gfc_reset_vptr): Fix comment whitespace.
471 (gfc_conv_class_to_class): Likewise.
472 (gfc_conv_procedure_call): Likewise.
473 (arrayfunc_assign_needs_temporary): Likewise.
474 (realloc_lhs_loop_for_fcn_call): Likewise.
475 (gfc_trans_assignment_1): Likewise.
476 * trans-array.c (gfc_conv_array_ref): Likewise.
477 (gfc_array_allocate): Likewise.
478 (gfc_alloc_allocatable_for_assignment): Likewise.
479 * symbol.c (generate_isocbinding_symbol): Likewise.
480 * class.c (finalization_scalarizer): Likewise.
481 (finalizer_insert_packed_call): Likewise.
482 (generate_finalization_wrapper): Likewise.
483 (find_intrinsic_vtab): Likewise.
484 * decl.c (gfc_match_import): Likewise.
485 (match_procedure_decl): Likewise.
486 (gfc_match_subroutine): Likewise.
487 (gfc_match_bind_c): Likewise.
488 (gfc_match_volatile): Likewise.
489 * trans-common.c (create_common): Likewise.
490 * error.c (gfc_diagnostic_starter): Likewise.
491 * trans-stmt.c (gfc_trans_sync): Likewise.
492 (gfc_trans_critical): Likewise.
493 (gfc_trans_simple_do): Likewise.
494 (gfc_trans_do): Likewise.
495 (gfc_trans_where_assign): Likewise.
496 * expr.c (gfc_is_simply_contiguous): Likewise.
497 * module.c (unquote_string): Likewise.
498 * trans.c (gfc_add_finalizer_call): Likewise.
499 * trans-types.c (gfc_init_kinds): Likewise.
500 * scanner.c (preprocessor_line): Likewise.
501 * gfortranspec.c (lang_specific_driver): Likewise.
502 * frontend-passes.c (create_var): Likewise.
503 (cfe_expr_0): Likewise.
504 * resolve.c (check_host_association): Likewise.
505 (gfc_resolve_code): Likewise.
506 (resolve_fl_derived0): Likewise.
507 (resolve_symbol): Likewise.
508 * f95-lang.c (poplevel): Likewise.
509 * trans-decl.c (create_main_function): Likewise.
510 * trans-io.c (transfer_expr): Likewise.
511 * arith.c (gfc_arith_divide): Likewise.
512 * parse.c (resolve_all_program_units): Likewise.
513 * check.c (gfc_check_rank): Likewise.
514 (gfc_check_sizeof): Likewise.
515 (is_c_interoperable): Likewise.
516 * dependency.c (gfc_dep_difference): Likewise.
517 * primary.c (gfc_match_rvalue): Likewise.
518 * trans-intrinsic.c (conv_intrinsic_system_clock): Likewise.
519 (conv_isocbinding_subroutine): Likewise.
520 * options.c (gfc_post_options): Likewise.
521 (gfc_handle_fpe_option): Likewise.
522 (gfc_get_option_string): Likewise.
523 * simplify.c (simplify_transformation_to_scalar): Likewise.
524 (gfc_simplify_spread): Likewise.
525
526 2014-09-19 Joost VandeVondele <vondele@gcc.gnu.org>
527
528 PR fortran/63152
529 * trans-array.c (gfc_trans_deferred_array): Only nullify allocatables.
530
531 2014-09-15 Jakub Jelinek <jakub@redhat.com>
532
533 * Make-lang.in (check_gfortran_parallelize): Change to just an upper
534 bound number.
535
536 2014-09-13 Tobias Burnus <burnus@net-b.de>
537
538 PR fortran/63252
539 * trans-decl.c (gfc_build_builtin_function_decls): Fix
540 caf_unlock declaration.
541
542 2014-09-12 Joseph Myers <joseph@codesourcery.com>
543
544 * trans-types.c (gfc_init_kinds): Check
545 targetm.libgcc_floating_mode_supported_p for floating-point
546 modes. Check HAVE_TFmode instead of LIBGCC2_HAS_TF_MODE.
547
548 2014-09-05 Joost VandeVondele <vondele@gcc.gnu.org>
549
550 PR fortran/62245
551 * intrinsic.texi (INT): clarify result.
552
553 2014-09-03 Fritz Reese <Reese-Fritz@zai.com>
554
555 PR fortran/62174
556 * decl.c (variable_decl): Don't overwrite typespecs of Cray pointees
557 when matching a component declaration.
558
559 2014-09-02 Marek Polacek <polacek@redhat.com>
560
561 PR fortran/62270
562 * interface.c (compare_parameter): Fix condition.
563 * trans-expr.c (gfc_conv_procedure_call): Likewise.
564
565 2014-08-31 Fritz Reese <Reese-Fritz@zai.com>
566
567 PR fortran/62309
568 * resolve.c (apply_default_init_local): Don't treat variables
569 in RECURSIVE procedures as saved.
570
571 2014-08-31 Tobias Burnus <burnus@net-b.de>
572
573 * trans-decl.c (gfc_build_builtin_function_decls): Add
574 may_require_tmp dummy argument.
575 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get,
576 conv_caf_send): Handle may_require_tmp argument.
577 (gfc_conv_intrinsic_function): Update call.
578 * gfortran.texi (_gfortran_caf_send, _gfortran_caf_get,
579 _gfortran_caf_sendget): Update interface description.
580
581 2014-08-30 Tobias Burnus <burnus@net-b.de>
582
583 * trans.h (gfc_caf_get_image_index,
584 gfc_get_caf_token_offset): New prototypes.
585 * trans-expr.c (gfc_caf_get_image_index): Moved from
586 trans-intrinsic.c and renamed.
587 (gfc_get_caf_token_offset) Ditto; support offset = NULL
588 with early return.
589 * trans-intrinsic.c (get_caf_token_offset, caf_get_image_index):
590 Moved to trans-expr.
591 (gfc_conv_intrinsic_caf_get, conv_caf_send,
592 conv_intrinsic_atomic_op, conv_intrinsic_atomic_ref,
593 conv_intrinsic_atomic_cas): Update callers.
594
595 2014-08-30 Tobias Burnus <burnus@net-b.de>
596
597 PR fortran/62278
598 PR fortran/44735
599 PR fortran/60593
600 * dependency.c (gfc_check_dependency): Allow for optimizations
601 in the pointer-alias check.
602
603 2014-08-30 Janne Blomqvist <jb@gcc.gnu.org>
604
605 * module.c (gfc_dump_module): Use ISO C remove() instead of POSIX
606 unlink().
607
608 2014-08-29 Jeffrey Armstrong <jeffrey.armstrong@approximatrix.com>
609
610 PR fortran/62215
611 * module.c (gfc_dump_module): Unlink old module file before
612 renaming new one.
613
614 2014-08-26 Thomas Koenig <tkoenig@gcc.gnu.org>
615
616 * frontend_passes (expr_array): Replace by vec template.
617 (expr_size): Remove.
618 (expr_count): Remove.
619 (doloop_list): Replace by vec template.
620 (doloop_size): Remove.
621 (gfc_run_passes): Adjust to use of vec template.
622 (cfe_register_funcs): Likewise.
623 (cfe_expr_0): Likewise.
624 (doloop_code): Likewise.
625
626 2014-08-22 Steven Bosscher <steven@gcc.gnu.org>
627
628 PR fortran/62135
629 * resolve.c (resolve_select): Fix list traversal in case the
630 last element of the CASE list was dropped as unreachable code.
631
632 2014-08-22 Joost VandeVondele <Joost.VandeVondele@mat.ethz.ch>
633
634 PR fortran/61234
635 * lang.opt (Wuse-without-only): New flag.
636 * gfortran.h (gfc_option_t): Add it.
637 * invoke.texi: Document it.
638 * module.c (gfc_use_module): Warn if needed.
639 * options.c (gfc_init_options,gfc_handle_option): Init accordingly.
640
641 2014-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
642
643 PR fortran/62214
644 * frontend-passes.c (optimize_binop_array_assignment):
645 Do not try to optimize the array assignment for string
646 concatenation.
647
648 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
649
650 PR fortran/44054
651 * error.c (gfc_diagnostic_build_locus_prefix): New function.
652 (gfc_diagnostic_starter): Follow Fortran FE diagnostics.
653 (gfc_diagnostic_finalizer): Do not call default finalizer.
654
655 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
656
657 PR fortran/44054
658 * error.c (gfc_diagnostic_finalizer): Call default finalizer.
659
660 2014-08-20 Joost VandeVondele <Joost.VandeVondele@mat.ethz.ch>
661
662 * options.c (gfc_init_options_struct): assert that the frontend sets
663 flag_errno_math and flag_associative_math.
664
665 2014-08-17 Tobias Burnus <burnus@net-b.de>
666
667 * resolve.c (gfc_resolve_finalizers): Ensure that parents are
668 resolved first.
669
670 2014-08-17 Tobias Burnus <burnus@net-b.de>
671
672 * trans-io.c (gfc_build_io_library_fndecls): Fix decl of
673 IOCALL_SET_NML_VAL.
674 (transfer_namelist_element): Use proper int type as argument.
675
676 2014-08-15 Thomas Koenig <tkoenig@gcc.gnu.org>
677
678 PR fortran/62142
679 * trans-expr.c (is_runtime_conformable): Add NULL pointer checks.
680
681 2014-08-15 Tobias Burnus <burnus@net-b.de>
682
683 * resolve.c (resolve_critical): Fix name mangling.
684 * trans-stmt.c (gfc_trans_critical): Fix lock call.
685
686 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
687
688 PR fortran/44054
689 * gfortran.h: Define GCC_DIAG_STYLE.
690 (gfc_diagnostics_init,gfc_warning_cmdline): Declare.
691 * trans-array.c: Include gfortran.h before diagnostic-core.h.
692 * trans-expr.c: Likewise.
693 * trans-openmp.c: Likewise.
694 * trans-const.c: Likewise.
695 * trans.c: Likewise.
696 * trans-types.c: Likewise.
697 * f95-lang.c: Likewise.
698 * trans-decl.c: Likewise.
699 * trans-io.c: Likewise.
700 * trans-intrinsic.c: Likewise.
701 * error.c: Include diagnostic.h and diagnostic-color.h.
702 (gfc_diagnostic_build_prefix): New.
703 (gfc_diagnostic_starter): New.
704 (gfc_diagnostic_finalizer): New.
705 (gfc_warning_cmdline): New.
706 (gfc_diagnostics_init): New.
707 * gfc-diagnostic.def: New.
708 * options.c (gfc_init_options): Call gfc_diagnostics_init.
709 (gfc_post_options): Use gfc_warning_cmdline.
710
711 2014-08-15 Jakub Jelinek <jakub@redhat.com>
712 Tobias Burnus <burnus@net-b.de>
713
714 PR fortran/62131
715 * openmp.c (resolve_omp_atomic): Only complain if code->expr1's attr
716 is allocatable, rather than whenever var->attr.allocatable.
717
718 2014-08-15 Jakub Jelinek <jakub@redhat.com>
719
720 PR fortran/62107
721 * trans-openmp.c (gfc_omp_finish_clause): Handle scalar pointer
722 or allocatable passed by reference.
723 (gfc_trans_omp_clauses) <case OMP_LIST_MAP>: Likewise.
724
725 2014-08-14 Thomas Koenig <tkoenig@gcc.gnu.org>
726
727 PR fortran/62106
728 * gfortran.h (symbol_attribute): Add fe_temp flag.
729 * frontend-passes.c (is_fe_temp): New function.
730 (create_var): Don't add a temporary for an already
731 created variable or for a constant.
732 (combine_ARRAY_constructor): Remove special handling
733 for constants.
734
735 2014-08-14 Tobias Burnus <burnus@net-b.de>
736
737 * gfortran.texi (caf_register_t): Add CAF_REGTYPE_CRITICAL.
738 (_gfortran_caf_register): Update for locking/critical.
739 (_gfortran_caf_lock, _gfortran_caf_unlock): Add.
740 * resolve.c (resolve_critical): New.
741 (gfc_resolve_code): Call it.
742 * trans-decl.c (gfor_fndecl_caf_critical,
743 gfor_fndecl_caf_end_critical): Remove.
744 (gfor_fndecl_caf_lock, gfor_fndecl_caf_unlock): Add.
745 (gfc_build_builtin_function_decls): Remove critical,
746 assign locking declarations.
747 (generate_coarray_sym_init): Handle locking and
748 critical variables.
749 * trans-stmt.c (gfc_trans_critical): Add calls to
750 lock/unlock libcaf functions.
751 * trans.h (gfc_coarray_type): Update locking, add
752 critical enum values.
753 (gfor_fndecl_caf_critical, gfor_fndecl_caf_end_critical): Remove.
754 (gfor_fndecl_caf_lock, gfor_fndecl_caf_unlock): Add.
755
756 2014-08-14 Tobias Burnus <burnus@net-b.de>
757
758 * gfortran.texi (Coarray Programming): Add first ABI
759 documentation.
760
761 2014-08-14 Jakub Jelinek <jakub@redhat.com>
762
763 PR fortran/62076
764 * openmp.c (gfc_match_omp_clauses): When failed to match
765 operator name, defined op name or name, set buffer to
766 empty string. Don't call gfc_find_omp_udr if buffer is empty
767 string.
768 (gfc_match_omp_declare_reduction): Call gfc_undo_symbols ()
769 before calling gfc_free_omp_udr.
770
771 2014-08-11 Richard Biener <rguenther@suse.de>
772
773 PR fortran/61950
774 * trans-expr.c (gfc_conv_structure): Initialize _size with
775 a value of proper type.
776
777 2014-08-10 Thomas Koenig <tkoenig@gcc.gnu.org>
778
779 PR fortran/61999
780 * simplify.c (gfc_simplify_dot_product): Convert types of
781 vectors before calculating the result.
782
783 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
784
785 * openmp.c, trans-decl.c: Use hash_set instead of pointer_set.
786
787 2014-07-26 Tobias Burnus <burnus@net-b.de>
788
789 PR fortran/61881
790 PR fortran/61888
791 PR fortran/57305
792 * intrinsic.texi (SIZEOF): Document changed behavior
793 for polymorphic arrays.
794
795 2014-07-26 Tobias Burnus <burnus@net-b.de>
796
797 PR fortran/61881
798 PR fortran/61888
799 PR fortran/57305
800 * check.c (gfc_check_sizeof): Permit for assumed type if and
801 only if it has an array descriptor.
802 * intrinsic.c (do_ts29113_check): Permit SIZEOF.
803 (add_functions): SIZEOF is an Inquiry function.
804 * intrinsic.texi (SIZEOF): Add note that only contiguous
805 arrays are permitted.
806 * trans-expr.c (gfc_conv_intrinsic_to_class): Handle assumed
807 rank.
808 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Handle
809 assumed type + array descriptor, CLASS and assumed rank.
810 (gfc_conv_intrinsic_storage_size): Handle class arrays.
811
812 2014-07-25 Tobias Burnus <burnus@net-b.de>
813
814 * simplify.c (gfc_simplify_storage_size): Use proper
815 integer kind for the returned value.
816
817 2014-07-24 Uros Bizjak <ubizjak@gmail.com>
818
819 * intrinsic.texi (Intrinsic Procedures) <ATOMIC_DEFINE>: Move to
820 correct menu position to match sectioning.
821
822 2014-06-15 Tobias Burnus <burnus@net-b.de>
823
824 * symbol.c (check_conflict): Add codimension conflict with
825 pointer; fix cray-pointee check.
826
827 2014-06-14 Tobias Burnus <burnus@net-b.de>
828
829 * trans-intrinsic.c (conv_intrinsic_atomic_ref): Fix handling
830 for kind mismatch with -fcoarray=lib.
831
832 2014-07-12 Paul Thomas <pault@gcc.gnu.org>
833
834 PR fortran/61780
835 * dependency.c (gfc_dep_resolver): Index the 'reverse' array so
836 that elements are skipped. This then correctly aligns 'reverse'
837 with the scalarizer loops.
838
839 2014-07-12 Tobias Burnus <burnus@net-b.de>
840
841 PR fortran/61628
842 * trans-types.c (gfc_init_types): Fix data-type bug
843 with gfc_max_array_element_size.
844
845 2014-07-12 Tobias Burnus <burnus@net-b.de>
846
847 * libgfortran.h (libcaf_atomic_codes): Add.
848 * trans-decl.c (gfor_fndecl_caf_atomic_def,
849 gfor_fndecl_caf_atomic_ref, gfor_fndecl_caf_atomic_cas,
850 gfor_fndecl_caf_atomic_op): New variables.
851 (gfc_build_builtin_function_decls): Initialize them.
852 * trans.h (gfor_fndecl_caf_atomic_def,
853 gfor_fndecl_caf_atomic_ref, gfor_fndecl_caf_atomic_cas,
854 gfor_fndecl_caf_atomic_op): New variables.
855 * trans-intrinsic.c (conv_intrinsic_atomic_op,
856 conv_intrinsic_atomic_ref, conv_intrinsic_atomic_cas):
857 Add library calls with -fcoarray=lib.
858
859 2014-07-12 Tobias Burnus <burnus@net-b.de>
860
861 * check.c (gfc_check_atomic): Update for STAT=.
862 (gfc_check_atomic_def, gfc_check_atomic_ref): Update call.
863 (gfc_check_atomic_op, gfc_check_atomic_cas,
864 gfc_check_atomic_fetch_op): New.
865 * gfortran.h (gfc_isym_id): GFC_ISYM_ATOMIC_CAS, GFC_ISYM_ATOMIC_ADD,
866 GFC_ISYM_ATOMIC_AND, GFC_ISYM_ATOMIC_OR, GFC_ISYM_ATOMIC_XOR,
867 GFC_ISYM_ATOMIC_FETCH_ADD, GFC_ISYM_ATOMIC_FETCH_AND,
868 GFC_ISYM_ATOMIC_FETCH_OR and GFC_ISYM_ATOMIC_FETCH_XOR.
869 * intrinsic.c (add_subroutines): Handle them.
870 * intrinsic.texi: Add documentation for them.
871 (ATOMIC_REF, ATOMIC_DEFINE): Add STAT=.
872 (ISO_FORTRAN_ENV): Add STAT_FAILED_IMAGE.
873 * intrinsic.h (gfc_check_atomic_op, gfc_check_atomic_cas,
874 gfc_check_atomic_fetch_op): New
875 prototypes.
876 * libgfortran.h (libgfortran_stat_codes): Add GFC_STAT_FAILED_IMAGE.
877 * iso-fortran-env.def: Add it.
878 * trans-intrinsic.c (conv_intrinsic_atomic_op): Renamed from
879 conv_intrinsic_atomic_ref; handle more atomics.
880 (conv_intrinsic_atomic_def): Handle STAT=.
881 (conv_intrinsic_atomic_cas): New.
882 (gfc_conv_intrinsic_subroutine): Handle new atomics.
883
884 2014-07-09 Bernd Schmidt <bernds@codesourcery.com>
885
886 * trans-array.c (gfc_build_constant_array_constructor): Build a
887 static decl manually.
888 * trans-decl.c (create_main_function): Likewise.
889
890 2014-07-07 Paul Thomas <pault@gcc.gnu.org>
891
892 PR fortran/61459
893 PR fortran/58883
894 * trans-expr.c (fcncall_realloc_result): Use the natural type
895 for the address expression of 'res_desc'.
896
897 2014-07-07 Gerald Pfeifer <gerald@pfeifer.com>
898
899 * gfortran.texi (Fortran 2003 status): Fix grammar.
900
901 2014-07-04 Tobias Burnus <burnus@net-b.de>
902
903 * resolve.c (resolve_assoc_var): Fix corank setting.
904 * trans-array.c (gfc_conv_descriptor_token): Change assert.
905 for select-type temporaries.
906 * trans-decl.c (generate_coarray_sym_init): Skip for
907 attr.select_type_temporary.
908 * trans-expr.c (gfc_conv_procedure_call): Fix for
909 select-type temporaries.
910 * trans-intrinsic.c (get_caf_token_offset): Ditto.
911 (gfc_conv_intrinsic_caf_get, gfc_conv_intrinsic_caf_send): Set
912 the correct dtype.
913 * trans-types.h (gfc_get_dtype_rank_type): New.
914 * trans-types.c (gfc_get_dtype_rank_type): Ditto.
915
916 2014-07-03 Tobias Burnus <burnus@net-b.de>
917
918 * scanner.c (skip_free_comments): Fix indentation.
919
920 2014-07-02 Jakub Jelinek <jakub@redhat.com>
921 Fritz Reese <Reese-Fritz@zai.com>
922
923 * decl.c (variable_decl): Reject old style initialization
924 for derived type components.
925
926 2014-06-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
927
928 PR fortran/36275
929 PR fortran/38839
930 * decl.c (check_bind_name_identifier): New function.
931 (gfc_match_bind_c): Match any constant expression as binding
932 label.
933 * match.c (gfc_match_name_C): Remove.
934
935 2014-06-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
936
937 PR fortran/29383
938 * gfortran.h (gfc_simplify_ieee_selected_real_kind): New prototype.
939 * libgfortran.h (GFC_FPE_*): Use simple integer values, valid in
940 both C and Fortran.
941 * expr.c (gfc_check_init_expr): Simplify IEEE_SELECTED_REAL_KIND.
942 * simplify.c (gfc_simplify_ieee_selected_real_kind): New function.
943 * module.c (mio_symbol): Keep track of symbols which came from
944 intrinsic modules.
945 (gfc_use_module): Keep track of the IEEE modules.
946 * trans-decl.c (gfc_get_symbol_decl): Adjust code since
947 we have new intrinsic modules.
948 (gfc_build_builtin_function_decls): Build decls for
949 ieee_procedure_entry and ieee_procedure_exit.
950 (is_from_ieee_module, is_ieee_module_used, save_fp_state,
951 restore_fp_state): New functions.
952 (gfc_generate_function_code): Save and restore floating-point
953 state on procedure entry/exit, when IEEE modules are used.
954 * intrinsic.texi: Document the IEEE modules.
955
956 2014-06-25 Tobias Burnus <burnus@net-b.de>
957
958 * interface.c (check_intents): Fix diagnostic with
959 coindexed coarrays.
960
961 2014-06-25 Tobias Burnus <burnus@net-b.de>
962
963 * resolve.c (resolve_ordinary_assign): Don't invoke caf_send
964 when assigning a coindexed RHS scalar to a noncoindexed LHS
965 array.
966 * trans-intrinsic.c (conv_caf_send): Do numeric type conversion
967 for a noncoindexed scalar RHS.
968
969 2014-06-25 Tobias Burnus <burnus@net-b.de>
970
971 * check.c (check_co_minmaxsum): Add definable check.
972 * expr.c (gfc_check_vardef_context): Fix context == NULL case.
973 * trans-expr.c (get_scalar_to_descriptor_type): Handle pointer
974 arguments.
975 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Fix generation of
976 temporary strings.
977
978 2014-06-25 Jakub Jelinek <jakub@redhat.com>
979
980 * trans.h (gfc_omp_clause_linear_ctor): New prototype.
981 * trans-openmp.c (gfc_omp_linear_clause_add_loop,
982 gfc_omp_clause_linear_ctor): New functions.
983 (gfc_trans_omp_clauses): Make sure OMP_CLAUSE_LINEAR_STEP has
984 correct type. Set OMP_CLAUSE_LINEAR_ARRAY flag if needed.
985 * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR): Redefine.
986
987 2014-06-24 Jakub Jelinek <jakub@redhat.com>
988
989 * dump-parse-tree.c (show_omp_namelist): Use n->udr->udr instead
990 of n->udr.
991 * f95-lang.c (gfc_init_builtin_functions): Initialize
992 BUILT_IN_ASSUME_ALIGNED.
993 * gfortran.h (gfc_omp_namelist): Change udr field type to
994 struct gfc_omp_namelist_udr.
995 (gfc_omp_namelist_udr): New type.
996 (gfc_get_omp_namelist_udr): Define.
997 (gfc_resolve_code): New prototype.
998 * match.c (gfc_free_omp_namelist): Free name->udr.
999 * module.c (intrinsics): Add INTRINSIC_USER.
1000 (fix_mio_expr): Likewise.
1001 (mio_expr): Handle INSTRINSIC_USER and non-resolved EXPR_FUNCTION.
1002 * openmp.c (gfc_match_omp_clauses): Adjust initialization of n->udr.
1003 (gfc_match_omp_declare_reduction): Treat len=: the same as len=*.
1004 Set attr.flavor on omp_{out,in,priv,orig} artificial variables.
1005 (struct resolve_omp_udr_callback_data): New type.
1006 (resolve_omp_udr_callback, resolve_omp_udr_callback2,
1007 resolve_omp_udr_clause): New functions.
1008 (resolve_omp_clauses): Adjust for n->udr changes, resolve UDR clauses
1009 here.
1010 (omp_udr_callback): Don't check for implicitly declared functions
1011 here.
1012 (gfc_resolve_omp_udr): Don't call gfc_resolve. Don't check for
1013 implicitly declared subroutines here.
1014 * resolve.c (resolve_function): If value.function.isym is non-NULL,
1015 consider it already resolved.
1016 (resolve_code): Renamed to ...
1017 (gfc_resolve_code): ... this. No longer static.
1018 (gfc_resolve_blocks, generate_component_assignments, resolve_codes):
1019 Adjust callers.
1020 * trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize
1021 by reference type (C_PTR) variables.
1022 (gfc_omp_finish_clause): Make sure OMP_CLAUSE_SIZE is non-NULL.
1023 (gfc_trans_omp_udr_expr): Remove.
1024 (gfc_trans_omp_array_reduction_or_udr): Adjust for n->udr changes.
1025 Don't call gfc_trans_omp_udr_expr, even for sym->attr.dimension
1026 expand it as assignment or subroutine call. Don't initialize
1027 value.function.isym.
1028
1029 2014-06-23 Tobias Burnus <burnus@net-b.de>
1030
1031 * trans-decl.c (gfc_trans_deferred_vars): Fix handling of
1032 explicit-size arrays with -fcoarray=lib.
1033
1034 2014-06-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1035
1036 PR fortran/33363
1037 * invoke.texi: Don't mention nonexisting -fcase-lower option.
1038
1039 2014-06-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1040
1041 PR fortran/61454
1042 * expr.c (scalarize_intrinsic_call): Take care of optional
1043 arguments.
1044
1045 2014-06-19 Tobias Burnus <burnus@net-b.de>
1046
1047 * trans-intrinsic.c (conv_co_minmaxsum): Fix argument
1048 passing.
1049
1050 2014-06-18 Tobias Burnus <burnus@net-b.de>
1051
1052 * gfortran.texi (OpenMP): Update refs to OpenMP 4.0.
1053 * intrinsic.texi (OpenMP Modules): Ditto.
1054
1055 2014-06-18 Jakub Jelinek <jakub@redhat.com>
1056
1057 * cpp.c (cpp_define_builtins): Change _OPENMP macro to
1058 201307.
1059 * dump-parse-tree.c (show_omp_namelist): Add list_type
1060 argument. Adjust for rop being u.reduction_op now,
1061 handle depend_op or map_op.
1062 (show_omp_node): Adjust callers. Print some new
1063 OpenMP 4.0 clauses, adjust for OMP_LIST_DEPEND_{IN,OUT}
1064 becoming a single OMP_LIST_DEPEND.
1065 * f95-lang.c (gfc_handle_omp_declare_target_attribute): New
1066 function.
1067 (gfc_attribute_table): New variable.
1068 (LANG_HOOKS_OMP_FINISH_CLAUSE, LANG_HOOKS_ATTRIBUTE_TABLE): Redefine.
1069 * frontend-passes.c (gfc_code_walker): Handle new OpenMP target
1070 EXEC_OMP_* codes and new clauses.
1071 * gfortran.h (gfc_statement): Add ST_OMP_TARGET, ST_OMP_END_TARGET,
1072 ST_OMP_TARGET_DATA, ST_OMP_END_TARGET_DATA, ST_OMP_TARGET_UPDATE,
1073 ST_OMP_DECLARE_TARGET, ST_OMP_TEAMS, ST_OMP_END_TEAMS,
1074 ST_OMP_DISTRIBUTE, ST_OMP_END_DISTRIBUTE, ST_OMP_DISTRIBUTE_SIMD,
1075 ST_OMP_END_DISTRIBUTE_SIMD, ST_OMP_DISTRIBUTE_PARALLEL_DO,
1076 ST_OMP_END_DISTRIBUTE_PARALLEL_DO, ST_OMP_DISTRIBUTE_PARALLEL_DO_SIMD,
1077 ST_OMP_END_DISTRIBUTE_PARALLEL_DO_SIMD, ST_OMP_TARGET_TEAMS,
1078 ST_OMP_END_TARGET_TEAMS, ST_OMP_TEAMS_DISTRIBUTE,
1079 ST_OMP_END_TEAMS_DISTRIBUTE, ST_OMP_TEAMS_DISTRIBUTE_SIMD,
1080 ST_OMP_END_TEAMS_DISTRIBUTE_SIMD, ST_OMP_TARGET_TEAMS_DISTRIBUTE,
1081 ST_OMP_END_TARGET_TEAMS_DISTRIBUTE,
1082 ST_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD,
1083 ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_SIMD,
1084 ST_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO,
1085 ST_OMP_END_TEAMS_DISTRIBUTE_PARALLEL_DO,
1086 ST_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
1087 ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
1088 ST_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
1089 ST_OMP_END_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
1090 ST_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD and
1091 ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD.
1092 (symbol_attribute): Add omp_declare_target field.
1093 (gfc_omp_depend_op, gfc_omp_map_op): New enums.
1094 (gfc_omp_namelist): Replace rop field with union
1095 containing reduction_op, depend_op and map_op.
1096 (OMP_LIST_DEPEND_IN, OMP_LIST_DEPEND_OUT): Remove.
1097 (OMP_LIST_DEPEND, OMP_LIST_MAP, OMP_LIST_TO, OMP_LIST_FROM): New.
1098 (gfc_omp_clauses): Add num_teams, device, thread_limit,
1099 dist_sched_kind, dist_chunk_size fields.
1100 (gfc_common_head): Add omp_declare_target field.
1101 (gfc_exec_op): Add EXEC_OMP_TARGET, EXEC_OMP_TARGET_DATA,
1102 EXEC_OMP_TEAMS, EXEC_OMP_DISTRIBUTE, EXEC_OMP_DISTRIBUTE_SIMD,
1103 EXEC_OMP_DISTRIBUTE_PARALLEL_DO, EXEC_OMP_DISTRIBUTE_PARALLEL_DO_SIMD,
1104 EXEC_OMP_TARGET_TEAMS, EXEC_OMP_TEAMS_DISTRIBUTE,
1105 EXEC_OMP_TEAMS_DISTRIBUTE_SIMD, EXEC_OMP_TARGET_TEAMS_DISTRIBUTE,
1106 EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD,
1107 EXEC_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO,
1108 EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
1109 EXEC_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
1110 EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD and
1111 EXEC_OMP_TARGET_UPDATE.
1112 (gfc_add_omp_declare_target): New prototype.
1113 * match.h (gfc_match_omp_declare_target, gfc_match_omp_distribute,
1114 gfc_match_omp_distribute_parallel_do,
1115 gfc_match_omp_distribute_parallel_do_simd,
1116 gfc_match_omp_distribute_simd, gfc_match_omp_target,
1117 gfc_match_omp_target_data, gfc_match_omp_target_teams,
1118 gfc_match_omp_target_teams_distribute,
1119 gfc_match_omp_target_teams_distribute_parallel_do,
1120 gfc_match_omp_target_teams_distribute_parallel_do_simd,
1121 gfc_match_omp_target_teams_distribute_simd,
1122 gfc_match_omp_target_update, gfc_match_omp_teams,
1123 gfc_match_omp_teams_distribute,
1124 gfc_match_omp_teams_distribute_parallel_do,
1125 gfc_match_omp_teams_distribute_parallel_do_simd,
1126 gfc_match_omp_teams_distribute_simd): New prototypes.
1127 * module.c (ab_attribute): Add AB_OMP_DECLARE_TARGET.
1128 (attr_bits): Likewise.
1129 (mio_symbol_attribute): Handle omp_declare_target attribute.
1130 (gfc_free_omp_clauses): Free num_teams, device, thread_limit
1131 and dist_chunk_size expressions.
1132 (OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE, OMP_CLAUSE_LASTPRIVATE,
1133 OMP_CLAUSE_COPYPRIVATE, OMP_CLAUSE_SHARED, OMP_CLAUSE_COPYIN,
1134 OMP_CLAUSE_REDUCTION, OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS,
1135 OMP_CLAUSE_SCHEDULE, OMP_CLAUSE_DEFAULT, OMP_CLAUSE_ORDERED,
1136 OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL,
1137 OMP_CLAUSE_MERGEABLE, OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND,
1138 OMP_CLAUSE_INBRANCH, OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH,
1139 OMP_CLAUSE_PROC_BIND, OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN,
1140 OMP_CLAUSE_UNIFORM): Use 1U instead of 1.
1141 (OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP, OMP_CLAUSE_TO, OMP_CLAUSE_FROM,
1142 OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_THREAD_LIMIT,
1143 OMP_CLAUSE_DIST_SCHEDULE): Define.
1144 (gfc_match_omp_clauses): Change mask parameter to unsigned int.
1145 Adjust for rop becoming u.reduction_op. Disallow inbranch with
1146 notinbranch. For depend clause, always create OMP_LIST_DEPEND
1147 and fill in u.depend_op. Handle num_teams, device, map,
1148 to, from, thread_limit and dist_schedule clauses.
1149 (OMP_DECLARE_SIMD_CLAUSES): Or in OMP_CLAUSE_INBRANCH and
1150 OMP_CLAUSE_NOTINBRANCH.
1151 (OMP_TARGET_CLAUSES, OMP_TARGET_DATA_CLAUSES,
1152 OMP_TARGET_UPDATE_CLAUSES, OMP_TEAMS_CLAUSES,
1153 OMP_DISTRIBUTE_CLAUSES): Define.
1154 (match_omp): New function.
1155 (gfc_match_omp_do, gfc_match_omp_do_simd, gfc_match_omp_parallel,
1156 gfc_match_omp_parallel_do, gfc_match_omp_parallel_do_simd,
1157 gfc_match_omp_parallel_sections, gfc_match_omp_parallel_workshare,
1158 gfc_match_omp_sections, gfc_match_omp_simd, gfc_match_omp_single,
1159 gfc_match_omp_task): Rewritten using match_omp.
1160 (gfc_match_omp_threadprivate, gfc_match_omp_declare_reduction):
1161 Diagnose if the directives are followed by unexpected junk.
1162 (gfc_match_omp_distribute, gfc_match_omp_distribute_parallel_do,
1163 gfc_match_omp_distribute_parallel_do_simd,
1164 gfc_match_omp_distrbute_simd, gfc_match_omp_declare_target,
1165 gfc_match_omp_target, gfc_match_omp_target_data,
1166 gfc_match_omp_target_teams, gfc_match_omp_target_teams_distribute,
1167 gfc_match_omp_target_teams_distribute_parallel_do,
1168 gfc_match_omp_target_teams_distribute_parallel_do_simd,
1169 gfc_match_omp_target_teams_distrbute_simd, gfc_match_omp_target_update,
1170 gfc_match_omp_teams, gfc_match_omp_teams_distribute,
1171 gfc_match_omp_teams_distribute_parallel_do,
1172 gfc_match_omp_teams_distribute_parallel_do_simd,
1173 gfc_match_omp_teams_distrbute_simd): New functions.
1174 * openmp.c (resolve_omp_clauses): Adjust for
1175 OMP_LIST_DEPEND_{IN,OUT} being changed to OMP_LIST_DEPEND. Handle
1176 OMP_LIST_MAP, OMP_LIST_FROM, OMP_LIST_TO, num_teams, device,
1177 dist_chunk_size and thread_limit.
1178 (gfc_resolve_omp_parallel_blocks): Only put sharing clauses into
1179 ctx.sharing_clauses. Call gfc_resolve_omp_do_blocks for various
1180 new EXEC_OMP_* codes.
1181 (resolve_omp_do): Handle various new EXEC_OMP_* codes.
1182 (gfc_resolve_omp_directive): Likewise.
1183 (gfc_resolve_omp_declare_simd): Add missing space to diagnostics.
1184 * parse.c (decode_omp_directive): Handle parsing of OpenMP 4.0
1185 offloading related directives.
1186 (case_executable): Add ST_OMP_TARGET_UPDATE.
1187 (case_exec_markers): Add ST_OMP_TARGET*, ST_OMP_TEAMS*,
1188 ST_OMP_DISTRIBUTE*.
1189 (case_decl): Add ST_OMP_DECLARE_TARGET.
1190 (gfc_ascii_statement): Handle new ST_OMP_* codes.
1191 (parse_omp_do): Handle various new ST_OMP_* codes.
1192 (parse_executable): Likewise.
1193 * resolve.c (gfc_resolve_blocks): Handle various new EXEC_OMP_*
1194 codes.
1195 (resolve_code): Likewise.
1196 (resolve_symbol): Change that !$OMP DECLARE TARGET variables
1197 are saved.
1198 * st.c (gfc_free_statement): Handle various new EXEC_OMP_* codes.
1199 * symbol.c (check_conflict): Check omp_declare_target conflicts.
1200 (gfc_add_omp_declare_target): New function.
1201 (gfc_copy_attr): Copy omp_declare_target.
1202 * trans.c (trans_code): Handle various new EXEC_OMP_* codes.
1203 * trans-common.c (build_common_decl): Add "omp declare target"
1204 attribute if needed.
1205 * trans-decl.c (add_attributes_to_decl): Likewise.
1206 * trans.h (gfc_omp_finish_clause): New prototype.
1207 * trans-openmp.c (gfc_omp_finish_clause): New function.
1208 (gfc_trans_omp_reduction_list): Adjust for rop being renamed
1209 to u.reduction_op.
1210 (gfc_trans_omp_clauses): Adjust for OMP_LIST_DEPEND_{IN,OUT}
1211 change to OMP_LIST_DEPEND and fix up depend handling.
1212 Handle OMP_LIST_MAP, OMP_LIST_TO, OMP_LIST_FROM, num_teams,
1213 thread_limit, device, dist_chunk_size and dist_sched_kind.
1214 (gfc_trans_omp_do): Handle EXEC_OMP_DISTRIBUTE.
1215 (GFC_OMP_SPLIT_DISTRIBUTE, GFC_OMP_SPLIT_TEAMS,
1216 GFC_OMP_SPLIT_TARGET, GFC_OMP_SPLIT_NUM, GFC_OMP_MASK_DISTRIBUTE,
1217 GFC_OMP_MASK_TEAMS, GFC_OMP_MASK_TARGET, GFC_OMP_MASK_NUM): New.
1218 (gfc_split_omp_clauses): Handle splitting of clauses for new
1219 EXEC_OMP_* codes.
1220 (gfc_trans_omp_do_simd): Add pblock argument, adjust for being
1221 callable for combined constructs.
1222 (gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_do_simd): Likewise.
1223 (gfc_trans_omp_distribute, gfc_trans_omp_teams,
1224 gfc_trans_omp_target, gfc_trans_omp_target_data,
1225 gfc_trans_omp_target_update): New functions.
1226 (gfc_trans_omp_directive): Adjust gfc_trans_omp_* callers, handle
1227 new EXEC_OMP_* codes.
1228
1229 2014-06-18 Tobias Burnus <burnus@net-b.de>
1230
1231 PR fortran/61126
1232 * invoke.texi (-Wunused-parameter): Make clearer when
1233 -Wextra implies this option.
1234
1235 2014-06-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1236
1237 PR fortran/61126
1238 * options.c (gfc_handle_option): Remove call to
1239 handle_generated_option.
1240
1241 2014-06-17 Tobias Burnus <burnus@net-b.de>
1242
1243 * check.c (gfc_check_atomic, gfc_check_atomic_def):
1244 Use argument for GFC_ISYM_CAF_GET.
1245 * resolve.c (resolve_variable): Enable CAF_GET insertion.
1246 (resolve_lock_unlock): Remove GFC_ISYM_CAF_GET.
1247 (resolve_ordinary_assign): Enable CAF_SEND insertion.
1248 * trans-const.c (gfc_build_string_const,
1249 gfc_build_wide_string_const): Set TYPE_STRING_FLAG.
1250 * trans-decl.c (gfor_fndecl_caf_get, gfor_fndecl_caf_send,
1251 gfor_fndecl_caf_sendget): New global variables.
1252 (gfc_build_builtin_function_decls): Initialize them;
1253 update co_min/max/sum initialization.
1254 * trans-expr.c (gfc_get_tree_for_caf_expr): Renamed from
1255 get_tree_for_caf_expr and removed static.
1256 (gfc_conv_procedure_call): Update call.
1257 * trans-intrinsic.c (caf_get_image_index,
1258 conv_caf_vector_subscript_elem, conv_caf_vector_subscript,
1259 get_caf_token_offset, gfc_conv_intrinsic_caf_get,
1260 conv_caf_send): New.
1261 (gfc_conv_intrinsic_function, gfc_conv_intrinsic_subroutine,
1262 gfc_walk_intrinsic_function): Handle CAF_GET and CAF_SEND.
1263 (conv_co_minmaxsum): Update call for remove unused vector
1264 subscript.
1265 (conv_intrinsic_atomic_def, conv_intrinsic_atomic_ref):
1266 Skip a CAF_GET of the argument.
1267 * trans-types.c (gfc_get_caf_vector_type): New.
1268 * trans-types.h (gfc_get_caf_vector_type): New.
1269 * trans.h (gfor_fndecl_caf_get, gfor_fndecl_caf_send,
1270 gfor_fndecl_caf_sendget): New global variables.
1271 (gfc_get_tree_for_caf_expr): New prototypes.
1272
1273 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
1274
1275 * trans-common.c (build_common_decl): Use
1276 set_decl_tls_model.
1277 * trans-decl.c (gfc_finish_var_decl): Likewise.
1278 (get_proc_pointer_decl): Likewise.
1279
1280 2014-06-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1281
1282 PR fortran/28484
1283 PR fortran/61429
1284 * check.c (gfc_check_system_clock): Improve checking of arguments.
1285 * intrinsic.texi: Update doc of SYSTEM_CLOCK.
1286 * iresolve.c (gfc_resolve_system_clock): Choose library function
1287 used depending on argument kinds.
1288 * trans-decl.c (gfc_build_intrinsic_function_decls): Build
1289 decls for system_clock_4 and system_clock_8.
1290 * trans-intrinsic.c (conv_intrinsic_system_clock): New function.
1291 (gfc_conv_intrinsic_subroutine): Call conv_intrinsic_system_clock.
1292 * trans.h (gfor_fndecl_system_clock4, gfor_fndecl_system_clock8):
1293 New variables.
1294
1295 2014-06-12 Tobias Burnus <burnus@net-b.de>
1296
1297 * gfortran.h (gfc_copy_formal_args_intr): Update prototype.
1298 * symbol.c (gfc_copy_formal_args_intr): Handle the case
1299 that absent optional arguments should be ignored.
1300 * trans-intrinsic.c (gfc_get_symbol_for_expr): Ditto.
1301 (gfc_conv_intrinsic_funcall,
1302 conv_generic_with_optional_char_arg): Update call.
1303 * resolve.c (gfc_resolve_intrinsic): Ditto.
1304
1305 2014-06-10 Dominique d'Humieres <dominiq@lps.ens.fr>
1306 Mikael Morin <mikael@gcc.gnu.org>
1307
1308 PR fortran/41936
1309 * trans-expr.c (gfc_conv_expr_reference): Deallocate array
1310 components.
1311
1312 2014-06-10 Jakub Jelinek <jakub@redhat.com>
1313
1314 PR fortran/60928
1315 * f95-lang.c (gfc_init_builtin_functions): Handle -fopenmp-simd
1316 like -fopenmp.
1317 * openmp.c (resolve_omp_clauses): Remove allocatable components
1318 diagnostics. Add associate-name and intent(in) pointer
1319 diagnostics for various clauses, diagnose procedure pointers in
1320 reduction clause.
1321 * parse.c (match_word_omp_simd): New function.
1322 (matchs, matcho): New macros.
1323 (decode_omp_directive): Change match macros to either matchs
1324 or matcho. Handle -fopenmp-simd.
1325 (next_free, next_fixed): Handle -fopenmp-simd like -fopenmp.
1326 * scanner.c (skip_free_comments, skip_fixed_comments, include_line):
1327 Likewise.
1328 * trans-array.c (get_full_array_size): Rename to...
1329 (gfc_full_array_size): ... this. No longer static.
1330 (duplicate_allocatable): Adjust caller. Add NO_MEMCPY argument
1331 and handle it.
1332 (gfc_duplicate_allocatable, gfc_copy_allocatable_data): Adjust
1333 duplicate_allocatable callers.
1334 (gfc_duplicate_allocatable_nocopy): New function.
1335 (structure_alloc_comps): Adjust g*_full_array_size and
1336 duplicate_allocatable caller.
1337 * trans-array.h (gfc_full_array_size,
1338 gfc_duplicate_allocatable_nocopy): New prototypes.
1339 * trans-common.c (create_common): Call gfc_finish_decl_attrs.
1340 * trans-decl.c (gfc_finish_decl_attrs): New function.
1341 (gfc_finish_var_decl, create_function_arglist,
1342 gfc_get_fake_result_decl): Call it.
1343 (gfc_allocate_lang_decl): If DECL_LANG_SPECIFIC is already allocated,
1344 don't allocate it again.
1345 (gfc_get_symbol_decl): Set GFC_DECL_ASSOCIATE_VAR_P on
1346 associate-names.
1347 * trans.h (gfc_finish_decl_attrs): New prototype.
1348 (struct lang_decl): Add scalar_allocatable and scalar_pointer
1349 bitfields.
1350 (GFC_DECL_SCALAR_ALLOCATABLE, GFC_DECL_SCALAR_POINTER,
1351 GFC_DECL_GET_SCALAR_ALLOCATABLE, GFC_DECL_GET_SCALAR_POINTER,
1352 GFC_DECL_ASSOCIATE_VAR_P): Define.
1353 (GFC_POINTER_TYPE_P): Remove.
1354 * trans-openmp.c (gfc_omp_privatize_by_reference): Don't check
1355 GFC_POINTER_TYPE_P, instead test GFC_DECL_GET_SCALAR_ALLOCATABLE,
1356 GFC_DECL_GET_SCALAR_POINTER or GFC_DECL_CRAY_POINTEE on decl.
1357 (gfc_omp_predetermined_sharing): Associate-names are predetermined.
1358 (enum walk_alloc_comps): New.
1359 (gfc_has_alloc_comps, gfc_omp_unshare_expr_r, gfc_omp_unshare_expr,
1360 gfc_walk_alloc_comps): New functions.
1361 (gfc_omp_private_outer_ref): Return true for scalar allocatables or
1362 decls with allocatable components.
1363 (gfc_omp_clause_default_ctor, gfc_omp_clause_copy_ctor,
1364 gfc_omp_clause_assign_op, gfc_omp_clause_dtor): Fix up handling of
1365 allocatables, handle also OMP_CLAUSE_REDUCTION, handle scalar
1366 allocatables and decls with allocatable components.
1367 (gfc_trans_omp_array_reduction_or_udr): Don't handle allocatable
1368 arrays here.
1369 (gfc_trans_omp_reduction_list): Call
1370 gfc_trans_omp_array_reduction_or_udr even for allocatable scalars.
1371 (gfc_trans_omp_do_simd): If -fno-openmp, just expand it as OMP_SIMD.
1372 (gfc_trans_omp_parallel_do_simd): Likewise.
1373 * trans-types.c (gfc_sym_type): Don't set GFC_POINTER_TYPE_P.
1374 (gfc_get_derived_type): Call gfc_finish_decl_attrs.
1375
1376 2014-06-09 Paul Thomas <pault@gcc.gnu.org>
1377
1378 PR fortran/61406
1379 * trans-stmt.c (trans_associate_var): Check that array
1380 constructors are constant for direct reference.
1381
1382 2014-06-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1383
1384 PR fortran/36096
1385 * intrinsic.texi: Fix documentation of BESSEL_J0, BESSEL_J1,
1386 BESSEL_Y0, and BESSEL_Y1.
1387
1388 2014-06-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1389
1390 PR fortran/45187
1391 * trans-decl.c (gfc_create_module_variable): Don't create
1392 Cray-pointee decls twice.
1393
1394 2014-06-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1395
1396 * io.c (resolve_tag): Warn on non-default kind for NUMBER,
1397 NEXTREC, RECL, NAMED, OPENED and PENDING I/O specifiers.
1398
1399 2014-06-06 Jakub Jelinek <jakub@redhat.com>
1400
1401 * dump-parse-tree.c (show_omp_namelist): Dump reduction
1402 id in each list item.
1403 (show_omp_node): Only handle OMP_LIST_REDUCTION, not
1404 OMP_LIST_REDUCTION_FIRST .. OMP_LIST_REDUCTION_LAST. Don't
1405 dump reduction id here.
1406 * frontend-passes.c (dummy_code_callback): Renamed to...
1407 (gfc_dummy_code_callback): ... this. No longer static.
1408 (optimize_reduction): Use gfc_dummy_code_callback instead of
1409 dummy_code_callback.
1410 * gfortran.h (gfc_statement): Add ST_OMP_DECLARE_REDUCTION.
1411 (symbol_attribute): Add omp_udr_artificial_var bitfield.
1412 (gfc_omp_reduction_op): New enum.
1413 (gfc_omp_namelist): Add rop and udr fields.
1414 (OMP_LIST_PLUS, OMP_LIST_REDUCTION_FIRST, OMP_LIST_MULT,
1415 OMP_LIST_SUB, OMP_LIST_AND, OMP_LIST_OR, OMP_LIST_EQV,
1416 OMP_LIST_NEQV, OMP_LIST_MAX, OMP_LIST_MIN, OMP_LIST_IAND,
1417 OMP_LIST_IOR, OMP_LIST_IEOR, OMP_LIST_REDUCTION_LAST): Removed.
1418 (OMP_LIST_REDUCTION): New.
1419 (gfc_omp_udr): New type.
1420 (gfc_get_omp_udr): Define.
1421 (gfc_symtree): Add n.omp_udr field.
1422 (gfc_namespace): Add omp_udr_root field, add omp_udr_ns bitfield.
1423 (gfc_free_omp_udr, gfc_omp_udr_find, gfc_resolve_omp_udrs,
1424 gfc_dummy_code_callback): New prototypes.
1425 * match.h (gfc_match_omp_declare_reduction): New prototype.
1426 * module.c (MOD_VERSION): Increase to 13.
1427 (omp_declare_reduction_stmt): New array.
1428 (mio_omp_udr_expr, write_omp_udr, write_omp_udrs, load_omp_udrs):
1429 New functions.
1430 (read_module): Read OpenMP user defined reductions.
1431 (write_module): Write OpenMP user defined reductions.
1432 * openmp.c: Include arith.h.
1433 (gfc_free_omp_udr, gfc_find_omp_udr): New functions.
1434 (gfc_match_omp_clauses): Handle user defined reductions.
1435 Store reduction kind into gfc_omp_namelist instead of using
1436 several OMP_LIST_* entries.
1437 (match_udr_expr, gfc_omp_udr_predef, gfc_omp_udr_find,
1438 gfc_match_omp_declare_reduction): New functions.
1439 (resolve_omp_clauses): Adjust for reduction clauses being only
1440 in OMP_LIST_REDUCTION list. Diagnose missing UDRs.
1441 (struct omp_udr_callback_data): New type.
1442 (omp_udr_callback, gfc_resolve_omp_udr, gfc_resolve_omp_udrs): New
1443 functions.
1444 * parse.c (decode_omp_directive): Handle !$omp declare reduction.
1445 (case_decl): Add ST_OMP_DECLARE_REDUCTION.
1446 (gfc_ascii_statement): Print ST_OMP_DECLARE_REDUCTION.
1447 * resolve.c (resolve_fl_variable): Allow len=: or len=* on
1448 sym->attr.omp_udr_artificial_var symbols.
1449 (resolve_types): Call gfc_resolve_omp_udrs.
1450 * symbol.c (gfc_get_uop): If gfc_current_ns->omp_udr_ns,
1451 use parent ns instead of gfc_current_ns.
1452 (gfc_get_sym_tree): Don't insert symbols into
1453 namespaces with omp_udr_ns set.
1454 (free_omp_udr_tree): New function.
1455 (gfc_free_namespace): Call it.
1456 * trans-openmp.c (struct omp_udr_find_orig_data): New type.
1457 (omp_udr_find_orig, gfc_trans_omp_udr_expr): New functions.
1458 (gfc_trans_omp_array_reduction): Renamed to...
1459 (gfc_trans_omp_array_reduction_or_udr): ... this. Remove SYM
1460 argument, instead pass gfc_omp_namelist pointer N. Handle
1461 user defined reductions.
1462 (gfc_trans_omp_reduction_list): Remove REDUCTION_CODE argument.
1463 Handle user defined reductions and reduction ops in gfc_omp_namelist.
1464 (gfc_trans_omp_clauses): Adjust for just a single OMP_LIST_REDUCTION
1465 list.
1466 (gfc_split_omp_clauses): Likewise.
1467
1468 2014-06-05 Richard Biener <rguenther@suse.de>
1469
1470 PR fortran/61418
1471 * gfortranspec.c (spec_file): Remove.
1472 (find_spec_file): Likewise.
1473 (lang_specific_driver): Do not look for specs file in -L
1474 or append -specs command line argument.
1475 (lang_specific_pre_link): Always %:include libgfortran.spec.
1476
1477 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
1478
1479 * fortran/trans.c (trans_runtime_error_vararg): Call
1480 fold_build_call_array_loc instead of fold_builtin_call_array.
1481
1482 2014-06-02 Bernd Schmidt <bernds@codesourcery.com>
1483
1484 * trans-decl.c (gfc_build_builtin_function_decls): Correct number of
1485 arguments to caf_init.
1486
1487 2014-05-26 Tobias Burnus <burnus@net-b.de>
1488
1489 * gfortran.texi (Project Status): Fix broken link.
1490
1491 2014-05-26 Janne Blomqvist <jb@gcc.gnu.org>
1492
1493 PR libfortran/61310
1494 * intrinsics.texi (CTIME): Remove mention of locale-dependent
1495 behavior.
1496
1497 2014-05-26 Tobias Burnus <burnus@net-b.de>
1498
1499 PR fortran/55117
1500 * trans-io.c (nml_full_name, transfer_namelist_element): Insert
1501 a '+' rather then '%' to differentiate namelist variable names
1502 that are based on extended derived types.
1503
1504 2014-05-25 Tobias Burnus <burnus@net-b.de>
1505
1506 * check.c (gfc_check_num_images): New.
1507 (gfc_check_this_image): Handle distance argument.
1508 * intrinsic.c (add_functions): Update this_image and num_images
1509 for new distance and failed arguments.
1510 * intrinsic.texi (THIS_IMAGE, NUM_IMAGES): Document the new
1511 arguments.
1512 * intrinsic.h (gfc_check_num_images): New.
1513 (gfc_check_this_image, gfc_simplify_num_images,
1514 gfc_simplify_this_image, gfc_resolve_this_image): Update prototype.
1515 * iresolve.c (gfc_resolve_this_image): Handle distance argument.
1516 * simplify.c (gfc_simplify_num_images, gfc_simplify_this_image):
1517 Handle new arguments.
1518 * trans-intrinsic.c (trans_this_image, trans_num_images): Ditto.
1519 (gfc_conv_intrinsic_function): Update trans_num_images call.
1520
1521 2014-05-23 Tobias Burnus <burnus@net-b.de>
1522
1523 * gfc-internals.texi: Change URLs to HTTPS; fix broken links.
1524 * gfortran.texi: Ditto.
1525
1526 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1527
1528 * f95-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
1529 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
1530 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
1531 * types.def: Simplify examples for DEF_FUNCTION_TYPE_*.
1532
1533 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1534
1535 * f95-lang.c (pushlevel): Adjust.
1536 * trans-decl.c (gfc_allocate_lang_decl): Adjust.
1537 (gfc_find_module): Likewise.
1538 * trans-types.c (gfc_get_nodesc_array_type): Likewise.
1539 (gfc_get_array_type_bounds): Likewise.
1540 (gfc_nonrestricted_type): Likewise.
1541 * trans.h: Don't use variable_size gty attribute.
1542
1543 2014-05-17 Dominique d'Humieres <dominiq@lps.ens.fr>
1544
1545 * check.c (gfc_check_fn_rc2008): move "argument" to the right
1546 place.
1547
1548 2014-05-12 Tobias Burnus <burnus@net-b.de>
1549
1550 PR fortran/60127
1551 * openmp.c (resolve_omp_do): Reject do concurrent loops.
1552
1553 2014-05-12 Thomas Koenig <tkoenig@gcc.gnu.org>
1554
1555 PR fortran/60834
1556 * frontend-passes.c (in_assoc_list): New variable.
1557 (optimize_namespace): Initialize in_assoc_list
1558 (combine_array_constructor): Don't try to combine
1559 assoc lists.
1560 (gfc_code_walker): Keep track of in_assoc_list.
1561
1562 2014-05-11 Jakub Jelinek <jakub@redhat.com>
1563
1564 * gfortran.h (gfc_statement): Add ST_OMP_CANCEL,
1565 ST_OMP_CANCELLATION_POINT, ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP,
1566 ST_OMP_SIMD, ST_OMP_END_SIMD, ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD,
1567 ST_OMP_PARALLEL_DO_SIMD, ST_OMP_END_PARALLEL_DO_SIMD and
1568 ST_OMP_DECLARE_SIMD.
1569 (gfc_omp_namelist): New typedef.
1570 (gfc_get_omp_namelist): Define.
1571 (OMP_LIST_UNIFORM, OMP_LIST_ALIGNED, OMP_LIST_LINEAR,
1572 OMP_LIST_DEPEND_IN, OMP_LIST_DEPEND_OUT): New clause list kinds.
1573 (gfc_omp_proc_bind_kind, gfc_omp_cancel_kind): New enums.
1574 (gfc_omp_clauses): Change type of lists to gfc_omp_namelist *.
1575 Add inbranch, notinbranch, cancel, proc_bind, safelen_expr and
1576 simdlen_expr fields.
1577 (gfc_omp_declare_simd): New typedef.
1578 (gfc_get_omp_declare_simd): Define.
1579 (gfc_namespace): Add omp_declare_simd field.
1580 (gfc_exec_op): Add EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT,
1581 EXEC_OMP_TASKGROUP, EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD and
1582 EXEC_OMP_PARALLEL_DO_SIMD.
1583 (gfc_omp_atomic_op): Add GFC_OMP_ATOMIC_MASK, GFC_OMP_ATOMIC_SEQ_CST
1584 and GFC_OMP_ATOMIC_SWAP.
1585 (gfc_code): Change type of omp_namelist field to gfc_omp_namelist *.
1586 (gfc_free_omp_namelist, gfc_free_omp_declare_simd,
1587 gfc_free_omp_declare_simd_list, gfc_resolve_omp_declare_simd): New
1588 prototypes.
1589 * trans-stmt.h (gfc_trans_omp_declare_simd): New prototype.
1590 * symbol.c (gfc_free_namespace): Call gfc_free_omp_declare_simd.
1591 * openmp.c (gfc_free_omp_clauses): Free safelen_expr and
1592 simdlen_expr. Use gfc_free_omp_namelist instead of
1593 gfc_free_namelist.
1594 (gfc_free_omp_declare_simd, gfc_free_omp_declare_simd_list): New
1595 functions.
1596 (gfc_match_omp_variable_list): Add end_colon, headp and
1597 allow_sections arguments. Handle parsing of array sections.
1598 Use *omp_namelist* instead of *namelist* data structure and
1599 functions/macros. Allow termination at : character.
1600 (OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH,
1601 OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND,
1602 OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM): Define.
1603 (gfc_match_omp_clauses): Change first and needs_space variables
1604 into arguments with default values. Parse inbranch, notinbranch,
1605 proc_bind, safelen, simdlen, uniform, linear, aligned and
1606 depend clauses.
1607 (OMP_PARALLEL_CLAUSES): Add OMP_CLAUSE_PROC_BIND.
1608 (OMP_DECLARE_SIMD_CLAUSES, OMP_SIMD_CLAUSES): Define.
1609 (OMP_TASK_CLAUSES): Add OMP_CLAUSE_DEPEND.
1610 (gfc_match_omp_do_simd): New function.
1611 (gfc_match_omp_flush): Use *omp_namelist* instead of *namelist*
1612 data structure and functions/macros.
1613 (gfc_match_omp_simd, gfc_match_omp_declare_simd,
1614 gfc_match_omp_parallel_do_simd): New functions.
1615 (gfc_match_omp_atomic): Handle seq_cst clause. Handle atomic swap.
1616 (gfc_match_omp_taskgroup, gfc_match_omp_cancel_kind,
1617 gfc_match_omp_cancel, gfc_match_omp_cancellation_point): New
1618 functions.
1619 (resolve_omp_clauses): Add where, omp_clauses and ns arguments.
1620 Use *omp_namelist* instead of *namelist* data structure and
1621 functions/macros. Resolve uniform, aligned, linear, depend,
1622 safelen and simdlen clauses.
1623 (resolve_omp_atomic): Adjust for GFC_OMP_ATOMIC_{MASK,SEQ_CST,SWAP}
1624 addition, recognize atomic swap.
1625 (gfc_resolve_omp_parallel_blocks): Use gfc_omp_namelist instead
1626 of gfc_namelist. Handle EXEC_OMP_PARALLEL_DO_SIMD the same as
1627 EXEC_OMP_PARALLEL_DO.
1628 (gfc_resolve_do_iterator): Use *omp_namelist* instead of *namelist*
1629 data structure and functions/macros.
1630 (resolve_omp_do): Likewise. Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD,
1631 EXEC_OMP_PARALLEL_DO_SIMD.
1632 (gfc_resolve_omp_directive): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD,
1633 EXEC_OMP_PARALLEL_DO_SIMD and EXEC_OMP_CANCEL. Adjust
1634 resolve_omp_clauses caller.
1635 (gfc_resolve_omp_declare_simd): New function.
1636 * parse.c (decode_omp_directive): Parse cancellation point, cancel,
1637 declare simd, end do simd, end simd, end parallel do simd,
1638 end taskgroup, parallel do simd, simd and taskgroup directives.
1639 (case_executable): Add ST_OMP_CANCEL and ST_OMP_CANCELLATION_POINT.
1640 (case_exec_markers): Add ST_OMP_TASKGROUP, case ST_OMP_SIMD,
1641 ST_OMP_DO_SIMD and ST_OMP_PARALLEL_DO_SIMD.
1642 (case_decl): Add ST_OMP_DECLARE_SIMD.
1643 (gfc_ascii_statement): Handle ST_OMP_CANCEL,
1644 ST_OMP_CANCELLATION_POINT, ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP,
1645 ST_OMP_SIMD, ST_OMP_END_SIMD, ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD,
1646 ST_OMP_PARALLEL_DO_SIMD, ST_OMP_END_PARALLEL_DO_SIMD and
1647 ST_OMP_DECLARE_SIMD.
1648 (parse_omp_do): Handle ST_OMP_SIMD, ST_OMP_DO_SIMD and
1649 ST_OMP_PARALLEL_DO_SIMD.
1650 (parse_omp_atomic): Adjust for GFC_OMP_ATOMIC_* additions.
1651 (parse_omp_structured_block): Handle ST_OMP_TASKGROUP and
1652 ST_OMP_PARALLEL_DO_SIMD.
1653 (parse_executable): Handle ST_OMP_SIMD, ST_OMP_DO_SIMD,
1654 ST_OMP_PARALLEL_DO_SIMD and ST_OMP_TASKGROUP.
1655 * trans-decl.c (gfc_get_extern_function_decl,
1656 gfc_create_function_decl): Call gfc_trans_omp_declare_simd if
1657 needed.
1658 * frontend-passes.c (gfc_code_walker): Handle EXEC_OMP_SIMD,
1659 EXEC_OMP_DO_SIMD and EXEC_OMP_PARALLEL_DO_SIMD. Walk
1660 safelen_expr and simdlen_expr. Walk expressions in gfc_omp_namelist
1661 of depend, aligned and linear clauses.
1662 * match.c (match_exit_cycle): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD
1663 and EXEC_OMP_PARALLEL_DO_SIMD.
1664 (gfc_free_omp_namelist): New function.
1665 * dump-parse-tree.c (show_namelist): Removed.
1666 (show_omp_namelist): New function.
1667 (show_omp_node): Handle OpenMP 4.0 additions.
1668 (show_code_node): Handle EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT,
1669 EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and
1670 EXEC_OMP_TASKGROUP.
1671 * match.h (gfc_match_omp_cancel, gfc_match_omp_cancellation_point,
1672 gfc_match_omp_declare_simd, gfc_match_omp_do_simd,
1673 gfc_match_omp_parallel_do_simd, gfc_match_omp_simd,
1674 gfc_match_omp_taskgroup): New prototypes.
1675 * trans-openmp.c (gfc_trans_omp_variable): Add declare_simd
1676 argument, handle it. Allow current_function_decl to be NULL.
1677 (gfc_trans_omp_variable_list): Add declare_simd argument, pass
1678 it through to gfc_trans_omp_variable and disregard whether
1679 sym is referenced if declare_simd is true. Work on gfc_omp_namelist
1680 instead of gfc_namelist.
1681 (gfc_trans_omp_reduction_list): Work on gfc_omp_namelist instead of
1682 gfc_namelist. Adjust gfc_trans_omp_variable caller.
1683 (gfc_trans_omp_clauses): Add declare_simd argument, pass it through
1684 to gfc_trans_omp_variable{,_list} callers. Work on gfc_omp_namelist
1685 instead of gfc_namelist. Handle inbranch, notinbranch, safelen,
1686 simdlen, depend, uniform, linear, proc_bind and aligned clauses.
1687 Handle cancel kind.
1688 (gfc_trans_omp_atomic): Handle seq_cst clause, handle atomic swap,
1689 adjust for GFC_OMP_ATOMIC_* changes.
1690 (gfc_trans_omp_cancel, gfc_trans_omp_cancellation_point): New
1691 functions.
1692 (gfc_trans_omp_do): Add op argument, handle simd translation into
1693 generic.
1694 (GFC_OMP_SPLIT_SIMD, GFC_OMP_SPLIT_DO, GFC_OMP_SPLIT_PARALLEL,
1695 GFC_OMP_SPLIT_NUM, GFC_OMP_MASK_SIMD, GFC_OMP_MASK_DO,
1696 GFC_OMP_MASK_PARALLEL): New.
1697 (gfc_split_omp_clauses, gfc_trans_omp_do_simd): New functions.
1698 (gfc_trans_omp_parallel_do): Rework to use gfc_split_omp_clauses.
1699 (gfc_trans_omp_parallel_do_simd, gfc_trans_omp_taskgroup): New
1700 functions.
1701 (gfc_trans_omp_directive): Handle EXEC_OMP_CANCEL,
1702 EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
1703 EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
1704 Adjust gfc_trans_omp_do caller.
1705 (gfc_trans_omp_declare_simd): New function.
1706 * st.c (gfc_free_statement): Handle EXEC_OMP_CANCEL,
1707 EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
1708 EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
1709 For EXEC_OMP_FLUSH call gfc_free_omp_namelist instead of
1710 gfc_free_namelist.
1711 * module.c (omp_declare_simd_clauses): New variable.
1712 (mio_omp_declare_simd): New function.
1713 (mio_symbol): Call it.
1714 * trans.c (trans_code): Handle EXEC_OMP_CANCEL,
1715 EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
1716 EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
1717 * resolve.c (gfc_resolve_blocks): Handle EXEC_OMP_DO_SIMD,
1718 EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
1719 (resolve_code): Handle EXEC_OMP_CANCEL,
1720 EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
1721 EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
1722 (resolve_types): Call gfc_resolve_omp_declare_simd.
1723
1724 2014-05-11 Tobias Burnus <burnus@net-b.de>
1725
1726 * trans-intrinsic.c (gfc_build_builtin_function_decls):
1727 Change type of second argument to int.
1728
1729 2014-05-09 Mike Stump <mikestump@comcast.net>
1730
1731 PR fortran/61109
1732 * trans-array.c (gfc_conv_array_initializer): Fix wide-int
1733 conversion bug.
1734
1735 2014-05-08 Tobias Burnus <burnus@net-b.de>
1736
1737 * gfortran.h (gfc_isym_id): Add GFC_ISYM_CAF_GET
1738 and GFC_ISYM_CAF_SEND.
1739 * intrinsic.c (add_functions): Add only internally
1740 accessible caf_get and caf_send functions.
1741 * resolve.c (add_caf_get_intrinsic,
1742 remove_caf_get_intrinsic): New functions.
1743 (resolve_variable): Resolve expression rank and
1744 prepare for add_caf_get_intrinsic call.
1745 (gfc_resolve_expr): For variables, remove rank
1746 resolution.
1747 (resolve_ordinary_assign): Prepare call to
1748 GFC_ISYM_CAF_SEND.
1749 (resolve_code): Avoid call to GFC_ISYM_CAF_GET for
1750 the LHS of an assignment.
1751
1752 2014-05-08 Tobias Burnus <burnus@net-b.de>
1753
1754 * trans-intrinsic.c (conv_co_minmaxsum): Change condition style.
1755
1756 2014-05-08 Tobias Burnus <burnus@net-b.de>
1757
1758 * check.c (check_co_minmaxsum, gfc_check_co_minmax,
1759 gfc_check_co_sum): New.
1760 * error.c (gfc_notify_std): Update -std=f2008ts.
1761 * gfortran.h (gfc_isym_id): Add GFC_ISYM_CO_MAX,
1762 GFC_ISYM_CO_MIN, GFC_ISYM_CO_SUM.
1763 * intrinsic.h (gfc_check_co_minmax,
1764 gfc_check_co_sum): Declare.
1765 * intrinsic.c (add_subroutines): Add co_min, co_max
1766 and co_sum.
1767 (gfc_check_intrinsic_standard): Update text for
1768 -std=f2008ts.
1769 * intrinsic.texi (CO_MIN, CO_MAX, CO_SUM): Document
1770 them.
1771 * invoke.texi (-std=f2008ts): Update wording.
1772 * trans.h (gfor_fndecl_co_max,
1773 gfor_fndecl_co_min, gfor_fndecl_co_sum): Define.
1774 * trans-decl.c (gfor_fndecl_co_max,
1775 gfor_fndecl_co_min, gfor_fndecl_co_sum): Define.
1776 (gfc_build_builtin_function_decls): Assign to it.
1777 * trans-intrinsic.c (conv_co_minmaxsum): New.
1778 (gfc_conv_intrinsic_subroutine): Call it.
1779
1780 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1781 Mike Stump <mikestump@comcast.net>
1782 Richard Sandiford <rdsandiford@googlemail.com>
1783
1784 * target-memory.c: Include wide-int.h.
1785 (gfc_interpret_logical): Use wide-int interfaces.
1786 * trans-array.c: Include wide-int.h.
1787 (gfc_conv_array_initializer): Use wide-int interfaces.
1788 * trans-const.c: Include wide-int.h.
1789 (gfc_conv_string_init): Use wide-int interfaces.
1790 (gfc_conv_mpz_to_tree): Likewise.
1791 (gfc_conv_tree_to_mpz): Likewise.
1792 * trans-decl.c (gfc_can_put_var_on_stack): Use tree_fits_uhwi_p.
1793 * trans-expr.c: Include wide-int.h.
1794 (gfc_conv_cst_int_power): Use wide-int interfaces.
1795 (gfc_string_to_single_character): Likewise.
1796 (gfc_optimize_len_trim): Likewise.
1797 * trans-intrinsic.c: Include wide-int.h.
1798 (trans_this_image): Use wide-int interfaces.
1799 (gfc_conv_intrinsic_bound): Likewise.
1800 (conv_intrinsic_cobound): Likewise.
1801 * trans-types.c (gfc_init_types): Likewise.
1802 (gfc_get_array_type_bounds): Pass an integer of the correct type
1803 instead of using integer_one_node.
1804
1805 2014-04-30 Tobias Burnus <burnus@net-b.de>
1806
1807 * trans-decl.c (create_function_arglist): Add hidden coarray arguments
1808 also for polymorphic coarrays.
1809 * trans-expr.c (gfc_conv_procedure_call): Pass hidden coarray arguments
1810 also for polymorphic coarrays.
1811
1812 2014-04-30 Tobias Burnus <burnus@net-b.de>
1813
1814 * resolve.c (resolve_function): Don't do
1815 assumed-size check for lcobound/ucobound.
1816 * trans-types.c (gfc_build_array_type): Only build an array
1817 descriptor with codimensions for allocatable coarrays.
1818
1819 2014-04-30 Tobias Burnus <burnus@net-b.de>
1820
1821 * gfortran.h (gfc_init_coarray_decl): Remove.
1822 * parse.c (translate_all_program_units): Remove call to it.
1823 (gfc_parse_file): Update call.
1824 * trans.h (gfor_fndecl_caf_this_image,
1825 gfor_fndecl_caf_num_images): Add.
1826 (gfort_gvar_caf_num_images,
1827 gfort_gvar_caf_this_image): Remove.
1828 * trans-decl.c (gfor_fndecl_caf_this_image,
1829 gfor_fndecl_caf_num_images): Add.
1830 (gfort_gvar_caf_num_images,
1831 gfort_gvar_caf_this_image): Remove.
1832 (gfc_build_builtin_function_decls): Init new decl.
1833 (gfc_init_coarray_dec): Remove.
1834 (create_main_function): Change calls.
1835 * trans-intrinsic.c (trans_this_image, trans_image_index,
1836 conv_intrinsic_cobound): Generate call to new library function
1837 instead of to a static variable.
1838 * trans-stmt.c (gfc_trans_sync): Ditto.
1839
1840 2014-04-30 Tobias Burnus <burnus@net-b.de>
1841
1842 * trans-expr.c (get_tree_for_caf_expr): Fix handling of polymorphic
1843 and derived-type coarrays.
1844
1845 2014-04-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1846
1847 PR fortran/59604
1848 PR fortran/58003
1849 * gfortran.h (gfc_convert_mpz_to_signed): Add prototype.
1850 * arith.c (gfc_int2int): Convert number to signed if
1851 arithmetic overflow is not checked.
1852 * simplify.c (convert_mpz_to_unsigned): Only trigger assert for
1853 size if range checking is in force.
1854 (convert_mpz_to_signed): Make non-static, rename to
1855 (gfc_convert_mpz_to_signed).
1856 (simplify_dshift): Use gfc_convert_mpz_to_signed.
1857 (gfc_simplify_ibclr): Likewise.
1858 (gfc_simplify_ibits): Likewise.
1859 (gfc_simplify_ibset): Likewise.
1860 (simplify_shift): Likewise.
1861 (gfc_simplify_ishiftc): Likewise.
1862 (gfc_simplify_maskr): Likewise.
1863 (gfc_simplify_maskl): Likewise.
1864
1865 2014-04-22 Tobias Burnus <burnus@net-b.de>
1866
1867 PR fortran/60881
1868 * trans-expr.c (gfc_trans_subcomponent_assign): Fix handling
1869 of scalar coarrays.
1870
1871 2014-04-17 Jakub Jelinek <jakub@redhat.com>
1872
1873 * trans-types.c (gfc_init_kinds): Make sure GET_MODE_BITSIZE
1874 argument is enum machine_mode.
1875
1876 2014-04-13 Paul Thomas <pault@gcc.gnu.org>
1877
1878 PR fortran/58085
1879 PR fortran/60717
1880 * trans.h: Add 'use_offset' bitfield to gfc_se.
1881 * trans-array.c (gfc_conv_expr_descriptor): Use 'use_offset'
1882 as a trigger to unconditionally recalculate the offset for
1883 array slices and constant arrays.
1884 trans-expr.c (gfc_conv_intrinsic_to_class): Use it.
1885 trans-stmt.c (trans_associate_var): Ditto.
1886 (gfc_conv_procedure_call): Ditto.
1887
1888 2014-04-11 Tobias Burnus <burnus@net-b.de>
1889
1890 PR fortran/58880
1891 PR fortran/60495
1892 * resolve.c (gfc_resolve_finalizers): Ensure that vtables
1893 and finalization wrappers are generated.
1894
1895 2014-04-11 Janne Blomqvist <jb@gcc.gnu.org>
1896
1897 * intrinsic.texi (RANDOM_SEED): Improve example.
1898
1899 2014-04-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
1900
1901 * class.c (gfc_build_class_symbol): Append "_t" to target class
1902 names to make the generated type names unique.
1903
1904 2014-04-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
1905
1906 PR fortran/60191
1907 * trans-types.c (gfc_get_function_type): In case of recursion
1908 build a variadic function type with empty argument list instead of a
1909 stdarg-like function type with incomplete argument list.
1910
1911 2014-04-04 Tobias Burnus <burnus@net-b.de>
1912
1913 * check.c (gfc_check_cmplx): Fix typo.
1914
1915 2014-03-28 Mikael Morin <mikael@gcc.gnu.org>
1916 Tobias Burnus <burnus@net-b.de>
1917
1918 PR fortran/60576
1919 * trans-expr.c (gfc_conv_derived_to_class): Avoid
1920 generation of out-of-bounds range expr.
1921
1922 2014-03-28 Mikael Morin <mikael@gcc.gnu.org>
1923
1924 PR fortran/60677
1925 * trans-intrinsic.c (gfc_conv_intrinsic_ichar): Enlarge argument
1926 list buffer.
1927
1928 2014-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1929
1930 PR fortran/60522
1931 * frontend-passes.c (cfe_code): Do not walk subtrees
1932 for WHERE.
1933
1934 2014-03-27 Tobias Burnus <burnus@net-b.de>
1935
1936 PR fortran/58880
1937 * trans-expr.c (gfc_conv_scalar_to_descriptor): Fix handling
1938 of nonpointers.
1939
1940 2014-03-26 Dominique d'Humieres <dominiq@lps.ens.fr>
1941
1942 PR fortran/34928
1943 * fortran.texi: Document Volatile COMMON as not supported.
1944
1945 2014-03-22 Jakub Jelinek <jakub@redhat.com>
1946
1947 PR debug/60603
1948 * cpp.c (gfc_cpp_init): Restore cb_change_file call to
1949 <built-in>.
1950
1951 2014-03-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1952
1953 PR fortran/60148
1954 * gfortran.texi: Add description of namelist DELIM= behavior.
1955
1956 2014-03-19 Tobias Burnus <burnus@net-b.>
1957
1958 PR fortran/60543
1959 * io.c (check_io_constraints): Use gfc_unset_implicit_pure.
1960 * resolve.c (resolve_ordinary_assign): Ditto.
1961
1962 2014-03-19 Tobias Burnus <burnus@net-b.de>
1963
1964 PR fortran/60543
1965 PR fortran/60283
1966 * gfortran.h (gfc_unset_implicit_pure): New prototype.
1967 * resolve.c (gfc_unset_implicit_pure): New.
1968 (resolve_structure_cons, resolve_function,
1969 pure_subroutine): Use it.
1970 * decl.c (match_old_style_init, gfc_match_data,
1971 match_pointer_init, variable_decl): Ditto.
1972 * expr.c (gfc_check_pointer_assign): Ditto.
1973 * intrinsic.c (gfc_intrinsic_sub_interface): Ditto.
1974 * io.c (match_vtag, gfc_match_open, gfc_match_close,
1975 match_filepos, gfc_match_inquire, gfc_match_print,
1976 gfc_match_wait): Ditto.
1977 * match.c (gfc_match_critical, gfc_match_stopcode,
1978 lock_unlock_statement, sync_statement, gfc_match_allocate,
1979 gfc_match_deallocate): Ditto.
1980 * parse.c (decode_omp_directive): Ditto.
1981 * symbol.c (gfc_add_save): Ditto.
1982
1983 2014-03-18 Janus Weil <janus@gcc.gnu.org>
1984
1985 PR fortran/55207
1986 PR fortran/60549
1987 * decl.c (match_attr_spec): Revert r208590.
1988
1989 2014-03-18 Jakub Jelinek <jakub@redhat.com>
1990
1991 PR ipa/58721
1992 * trans.c (gfc_unlikely, gfc_likely): Don't add __builtin_expect
1993 if !optimize.
1994
1995 2014-03-18 Tobias Burnus <burnus@net-b.de>
1996
1997 PR ipa/58721
1998 * trans.h (gfc_unlikely, gfc_likely): Add predictor as argument.
1999 (gfc_trans_io_runtime_check): Remove.
2000 * trans-io.c (gfc_trans_io_runtime_check): Make static; add has_iostat
2001 as argument, add predictor to block.
2002 (set_parameter_value, gfc_trans_open, gfc_trans_close, build_filepos,
2003 gfc_trans_inquire, gfc_trans_wait, build_dt): Update calls.
2004 * trans.c (gfc_unlikely, gfc_likely): Add predictor as argument.
2005 (gfc_trans_runtime_check, gfc_allocate_using_malloc,
2006 gfc_allocate_allocatable, gfc_deallocate_with_status): Set explicitly
2007 branch predictor.
2008 * trans-expr.c (gfc_conv_procedure_call): Ditto.
2009 * trans-stmt.c (gfc_trans_allocate): Ditto.
2010 * trans-array.c (gfc_array_init_size, gfc_array_allocate): Ditto.
2011
2012 2014-03-15 Janus Weil <janus@gcc.gnu.org>
2013
2014 PR fortran/55207
2015 * decl.c (match_attr_spec): Variables in the main program implicitly
2016 get the SAVE attribute in Fortran 2008.
2017
2018 2014-03-14 Mikael Morin <mikael@gcc.gnu.org>
2019
2020 PR fortran/60392
2021 * trans-array.c (gfc_conv_array_parameter): Don't reuse the descriptor
2022 if it has transposed dimensions.
2023
2024 2014-03-08 Tobias Burnus <burnus@net-b.de>
2025
2026 PR fortran/60447
2027 * f95-lang.c (gfc_init): Return false when only
2028 preprocessing.
2029 * options.c (gfc_post_options): Ditto.
2030
2031 2014-03-08 Tobias Burnus <burnus@net-b.de>
2032
2033 * gfortran.texi (Fortran 2003 Status): Mention finalization,
2034 deferred-length character support and input rounding.
2035 (Fortran 2008 Status): Mention that at termination
2036 signalling exceptions are shown.
2037
2038 2014-03-06 Paul Thomas <pault@gcc.gnu.org>
2039 Janus Weil <janus@gcc.gnu.org>
2040
2041 PR fortran/51976
2042 * gfortran.h (symbol_attribute): Add deferred_parameter attribute.
2043 * primary.c (build_actual_constructor): It is not an error if
2044 a missing component has the deferred_parameter attribute;
2045 equally, if one is given a value, it is an error.
2046 * resolve.c (resolve_fl_derived0): Remove error for deferred
2047 character length components. Add the hidden string length
2048 field to the structure. Give it the deferred_parameter
2049 attribute.
2050 * trans-array.c (duplicate_allocatable): Add a strlen field
2051 which is used as the element size if it is non-null.
2052 (gfc_duplicate_allocatable, gfc_copy_allocatable_data): Pass a
2053 NULL to the new argument in duplicate_allocatable.
2054 (structure_alloc_comps): Set the hidden string length as
2055 appropriate. Use it in calls to duplicate_allocatable.
2056 (gfc_alloc_allocatable_for_assignment): When a deferred length
2057 backend declaration is variable, use that; otherwise use the
2058 string length from the expression evaluation.
2059 * trans-expr.c (gfc_conv_component_ref): If this is a deferred
2060 character length component, the string length should have the
2061 value of the hidden string length field.
2062 (gfc_trans_subcomponent_assign): Set the hidden string length
2063 field for deferred character length components. Allocate the
2064 necessary memory for the string.
2065 (alloc_scalar_allocatable_for_assignment): Same change as in
2066 gfc_alloc_allocatable_for_assignment above.
2067 * trans-stmt.c (gfc_trans_allocate): Likewise.
2068 * trans-intrinsic (size_of_string_in_bytes): Make non-static.
2069 * trans-types.c (gfc_get_derived_type): Set the tree type for
2070 a deferred character length component.
2071 * trans.c (gfc_deferred_strlen): New function.
2072 * trans.h (size_of_string_in_bytes,gfc_deferred_strlen): New prototypes.
2073
2074 2014-03-01 Mikael Morin <mikael@gcc.gnu.org>
2075
2076 PR fortran/60341
2077 * frontend-passes.c (optimize_comparison): Guard two union accesses
2078 with the corresponding tag checks.
2079
2080 2014-02-28 Janus Weil <janus@gcc.gnu.org>
2081
2082 PR fortran/60359
2083 * class.c (find_intrinsic_vtab): Prevent duplicate creation of copy
2084 procedure for characters.
2085
2086 2014-02-21 Janus Weil <janus@gcc.gnu.org>
2087
2088 PR fortran/60302
2089 * check.c (gfc_check_c_f_pointer): Only clear 'size' if 'gfc_array_size'
2090 is successful.
2091
2092 2014-02-21 Janus Weil <janus@gcc.gnu.org>
2093
2094 PR fortran/60234
2095 * gfortran.h (gfc_build_class_symbol): Removed argument.
2096 * class.c (gfc_add_component_ref): Fix up missing vtype if necessary.
2097 (gfc_build_class_symbol): Remove argument 'delayed_vtab'. vtab is always
2098 delayed now, except for unlimited polymorphics.
2099 (comp_is_finalizable): Procedure pointer components are not finalizable.
2100 * decl. (build_sym, build_struct, attr_decl1): Removed argument of
2101 'gfc_build_class_symbol'.
2102 * match.c (copy_ts_from_selector_to_associate, select_type_set_tmp):
2103 Ditto.
2104 * symbol.c (gfc_set_default_type): Ditto.
2105
2106 2014-02-19 Janus Weil <janus@gcc.gnu.org>
2107
2108 PR fortran/60232
2109 * expr.c (gfc_get_variable_expr): Don't add REF_ARRAY for dimensionful
2110 functions, which are used as procedure pointer target.
2111
2112 2014-02-18 Tobias Burnus <burnus@net-b.de>
2113
2114 PR fortran/49397
2115 * expr.c (gfc_check_pointer_assign): Add check for
2116 F2008Cor2, C729.
2117 * trans-decl.c (gfc_get_symbol_decl): Correctly generate external
2118 decl in a corner case.
2119
2120 2014-02-18 Janus Weil <janus@gcc.gnu.org>
2121
2122 PR fortran/60231
2123 * resolve.c (check_generic_tbp_ambiguity): Check for presence of dummy
2124 arguments to prevent ICE.
2125
2126 2014-02-17 Janus Weil <janus@gcc.gnu.org>
2127
2128 PR fortran/55907
2129 * resolve.c (build_default_init_expr): Don't initialize character
2130 variable if -fno-automatic is given.
2131
2132 2014-02-15 Mikael Morin <mikael@gcc.gnu.org>
2133
2134 PR fortran/59599
2135 * trans-intrinsic.c (gfc_conv_intrinsic_ichar): Calculate the
2136 number of arguments.
2137
2138 2014-02-11 Jakub Jelinek <jakub@redhat.com>
2139
2140 PR fortran/52370
2141 * trans-decl.c (gfc_build_dummy_array_decl): Set TREE_NO_WARNING
2142 on decl if sym->attr.optional.
2143
2144 2014-02-09 Paul Thomas <pault@gcc.gnu.org>
2145
2146 PR fortran/57522
2147 * resolve.c (resolve_assoc_var): Set the subref_array_pointer
2148 attribute for the 'associate-name' if necessary.
2149 * trans-stmt.c (trans_associate_var): If the 'associate-name'
2150 is a subref_array_pointer, assign the element size of the
2151 associate variable to 'span'.
2152
2153 2014-02-09 Paul Thomas <pault@gcc.gnu.org>
2154
2155 PR fortran/59026
2156 * trans-expr.c (gfc_conv_procedure_call): Pass the value of the
2157 actual argument to a formal argument with the value attribute
2158 in an elemental procedure.
2159
2160 2014-02-08 Janus Weil <janus@gcc.gnu.org>
2161 Mikael Morin <mikael.morin@gcc.gnu.org>
2162
2163 PR fortran/58470
2164 * class.c (generate_finalization_wrapper): Assert that proc_tree has
2165 been set in gfc_resolve_finalizers.
2166 * resolve.c (resolve_fl_derived0): Remove unnecessary call to
2167 gfc_is_finalizable.
2168
2169 2014-02-07 Benno Schulenberg <bensberg@justemail.net>
2170
2171 PR translation/52289
2172 * fortran/resolve.c (resolve_ordinary_assign): Fix typoed word
2173 in an error message.
2174
2175 2014-02-02 Mikael Morin <mikael@gcc.gnu.org>
2176
2177 PR fortran/57033
2178 * primary.c (gfc_convert_to_structure_constructor): Avoid null pointer
2179 dereference.
2180
2181 2014-02-01 Paul Thomas <pault@gcc.gnu.org>
2182
2183 PR fortran/59906
2184 * trans-stmt.c (gfc_add_loop_ss_code): In the case of character
2185 SS_REFERENCE, use gfc_conv_string_parameter to ensure that a
2186 pointer to the string is stored.
2187 * trans-expr.c (gfc_conv_expr_reference): Likewise, use
2188 gfc_conv_string_parameter to ensure that a pointer to is passed
2189 to the elemental function.
2190
2191 2014-01-28 Paul Thomas <pault@gcc.gnu.org>
2192
2193 PR fortran/59414
2194 * trans-stmt.c (gfc_trans_allocate): Before the pointer
2195 assignment to transfer the source _vptr to a class allocate
2196 expression, the final class reference should be exposed. The
2197 tail that includes the _data and array references is stored.
2198 This reduced expression is transferred to 'lhs' and the _vptr
2199 added. Then the tail is restored to the allocate expression.
2200
2201 2014-01-26 Mikael Morin <mikael@gcc.gnu.org>
2202
2203 PR fortran/58007
2204 * module.c (read_module): Assert for component name correctness.
2205
2206 2014-01-18 Mikael Morin <mikael@gcc.gnu.org>
2207
2208 PR fortran/58007
2209 * module.c (MOD_VERSION): Bump.
2210 (fp2, find_pointer2): Remove.
2211 (mio_component_ref): Don't forcedfully set the containing derived type
2212 symbol for loading. Remove unused argument.
2213 (mio_ref): Update caller
2214 (mio_symbol): Dump component list earlier.
2215 (skip_list): New argument nest_level. Initialize level with the new
2216 argument.
2217 (read_module): Add forced pointer components association for derived
2218 type symbols.
2219
2220 2014-01-12 Janus Weil <janus@gcc.gnu.org>
2221
2222 PR fortran/58026
2223 * decl.c (gfc_match_data_decl): Improve error recovery.
2224
2225 2014-01-09 Tobias Burnus <burnus@net-b.de>
2226
2227 * cpp.c (gfc_cpp_handle_option): Add missing break.
2228 * trans-io.c (transfer_expr): Silence unused value warning.
2229
2230 2014-01-08 Janus Weil <janus@gcc.gnu.org>
2231
2232 PR fortran/58182
2233 * resolve.c (gfc_verify_binding_labels): Modify order of checks.
2234
2235 2014-01-06 Janus Weil <janus@gcc.gnu.org>
2236
2237 PR fortran/59589
2238 * class.c (comp_is_finalizable): New function to dermine if a given
2239 component is finalizable.
2240 (finalize_component, generate_finalization_wrapper): Use it.
2241
2242 2014-01-06 Janus Weil <janus@gcc.gnu.org>
2243
2244 PR fortran/59023
2245 PR fortran/59662
2246 * resolve.c (resolve_global_procedure): Don't apply to c-binding
2247 procedures.
2248 (gfc_verify_binding_labels): Remove duplicate line.
2249
2250 2014-01-04 Janus Weil <janus@gcc.gnu.org>
2251
2252 PR fortran/59547
2253 * class.c (add_proc_comp): Copy pure attribute.
2254
2255 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2256
2257 Update copyright years
2258
2259 2014-01-02 Tobias Burnus <burnus@net-b.de>
2260
2261 * gfortranspec.c (lang_specific_driver): Update copyright notice
2262 dates.
2263 * gfc-internals.texi: Bump @copying's copyright year.
2264 * gfortran.texi: Ditto.
2265 * intrinsic.texi: Ditto.
2266 * invoke.texi: Ditto.
2267
2268 2014-01-02 Janus Weil <janus@gcc.gnu.org>
2269
2270 PR fortran/59654
2271 * resolve.c (resolve_typebound_procedures): No need to create the vtab
2272 here.
2273 \f
2274 Copyright (C) 2014 Free Software Foundation, Inc.
2275
2276 Copying and distribution of this file, with or without modification,
2277 are permitted in any medium without royalty provided the copyright
2278 notice and this notice are preserved.