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