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