comparison gcc/fortran/ChangeLog-2017 @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 2017-12-28 Steven G. Kargl <kargl@gcc.gnu.org>
2
3 PR Fortran/83548
4 * match.c (gfc_match_type_spec): Check for LOGICAL conflict in
5 type-spec versus LOGICAL intrinsic subprogram.
6
7 2017-12-28 Janne Blomqvist <jb@gcc.gnu.org>
8
9 PR fortran/83344
10 * resolve.c (resolve_assoc_var): Don't set the constant value
11 unless the target is a constant expression.
12
13 2017-12-28 Paul Thomas <pault@gcc.gnu.org>
14
15 PR fortran/83567
16 * trans-expr.c (gfc_trans_assignment_1): Free parameterized
17 components of the lhs if dealloc is set.
18 *trans-decl.c (gfc_trans_deferred_vars): Do not free the
19 parameterized components of function results on leaving scope.
20
21 2017_12_27 Louis Krupp <louis.krupp@zoho.com>
22
23 PR fortran/83092
24 * expr.c (gfc_apply_init): Check that typespec has character type
25 before using character length field.
26
27 2017-12-26 Thomas Koenig <tkoenig@gcc.gnu.org>
28
29 PR fortran/83540
30 * frontend-passes.c (create_var): If an array to be created
31 has unknown size and -fno-realloc-lhs is in effect,
32 return NULL.
33
34 2017-12-22 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
35 Eric Botcazou <ebotcazou@adacore.com>
36
37 * array.c (gfc_copy_iterator): Copy unroll field.
38 * decl.c (directive_unroll): New global variable.
39 (gfc_match_gcc_unroll): New function.
40 * gfortran.h (gfc_iterator]): Add unroll field.
41 (directive_unroll): Declare:
42 * match.c (gfc_match_do): Use memset to initialize the iterator.
43 * match.h (gfc_match_gcc_unroll): New prototype.
44 * parse.c (decode_gcc_attribute): Match "unroll".
45 (parse_do_block): Set iterator's unroll.
46 (parse_executable): Diagnose misplaced unroll directive.
47 * trans-stmt.c (gfc_trans_simple_do) Annotate loop condition with
48 annot_expr_unroll_kind.
49 (gfc_trans_do): Likewise.
50 * gfortran.texi (GNU Fortran Compiler Directives): Split section into
51 subections 'ATTRIBUTES directive' and 'UNROLL directive'.
52
53 2017-12-19 Jakub Jelinek <jakub@redhat.com>
54
55 * scanner.c (preprocessor_line): Replace Yoda conditions with typical
56 order conditions.
57 * dependency.c (check_section_vs_section): Likewise.
58 * trans-array.c (gfc_conv_expr_descriptor): Likewise.
59
60 2017-12-17 Janne Blomqvist <jb@gcc.gnu.org>
61
62 * decl.c (gfc_match_implicit_none): Use GFC_STD_F2018 instead of
63 GFC_STD_F2015.
64 * error.c (gfc_notify_std): Add GFC_STD_F2018{_DEL,_OBS} to
65 switch.
66 * gfortran.texi: Document -std=f2018.
67 * interface.c (compare_parameter): Fix comment.
68 * invoke.texi: Document -std=f2018.
69 * lang.opt: Add -std=f2018 argumnet.
70 * libgfortran.h (GFC_STD_F2015): Rename to GFC_STD_F0218, use
71 separate flag bit.
72 (GFC_STD_F2018_DEL): New macro.
73 (GFC_STD_F2018_OBS): Likewise.
74 * match.c (gfc_match_stopcode): Use GFC_STD_F2018.
75 * options.c (set_default_std_flags): Add F2018 flags to defaults.
76 (gfc_handle_option): Set options for -std=f2018.
77
78 2017-12-15 Jakub Jelinek <jakub@redhat.com>
79
80 * f95-lang.c (gfc_attribute_table): Swap affects_type_identity
81 and handler fields, adjust comments.
82
83 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
84
85 PR middle_end/79538
86 * class.c (gfc_build_class_symbol): Replace call to
87 sprintf with xasprintf to avoid format-overflow warning.
88 (generate_finalization_wrapper): Likewise.
89 (gfc_find_derived_vtab): Likewise.
90 (find_intrinsic_vtab): Likewise.
91
92 2017-12-12 Thomas Koenig <tkoenig@gcc.gnu.org>
93
94 * intrinsic.texi (MAXLOC): Remove double description
95 of return value.
96 (MINLOC): Likewise.
97
98 2017-12-11 Thomas Koenig <tkoenig@gcc.gnu.org>
99
100 * intrinsic.texi (MAXLOC): Update documentation for
101 character arrays and KIND argument.
102 (MINLOC): Likewise.
103
104 2017-12-11 Thomas Koenig <tkoenig@gcc.gnu.org>
105
106 PR fortran/45689
107 * simplify.c (min_max_choose): Add prototype.
108 (gfc_count): Format correctly.
109 (simplify_transformation): Pass array argument to init_result_expr.
110 (gfc_simplify_minval_maxval): Remove.
111 (gfc_min): New function.
112 (gfc_simplify_minval): Call simplify_transformation.
113 (gfc_max): New function.
114 (gfc_simplify_maxval): Call simplify_transformation.
115
116 2017-12-10 Dominique d'Humieres <dominiq@lps.ens.fr>
117
118 PR fortran/53478
119 * gfortran.h (gfc_find_case_gsymbol): New prototype.
120 * symbol.c (gfc_find_case_gsymbol): New procedure, case
121 insensistive version of gfc_find_gsymbol.
122 * resolve.c (resolve_common_blocks): Use it.
123 Replace %s with %qs where needed.
124
125 2017-12-09 Steven G. Kargl <kargl@gcc.gnu.org>
126
127 PR fortran/82934
128 PR fortran/83318
129 * match.c (gfc_match_allocate): Enforce F2008:C631.
130
131 2017-12-09 Thomas Koenig <tkoenig@gcc.gnu.org>
132
133 PR fortran/83316
134 * arith.c (gfc_character2character): New function.
135 * arith.h: Add prototype.
136 * simplify.c (gfc_convert_constant): Handle character type.
137
138 2017-12-07 Martin Sebor <msebor@redhat.com>
139
140 PR c/81544
141 * f95-lang.c (gfc_attribute_table): Initialize new member of struct
142 attribute_spec.
143
144 2017-12-03 Thomas Koenig <tkoenig@gcc.gnu.org>
145
146 PR fortran/36313
147 * check.c (gfc_check_minval_maxval): Use
148 int_orLreal_or_char_check_f2003 for array argument.
149 * iresolve.c (gfc_resolve_maxval): Insert number in
150 function name for character arguments.
151 (gfc_resolve_minval): Likewise.
152 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc):
153 Fix comment.
154 (gfc_conv_intrinsic_minmaxval): Resort arguments and call library
155 function if dealing with a character function.
156
157 2017-12-01 Qing Zhao <qing.zhao@oracle.com>
158
159 * decl.c (gfc_get_pdt_instance): Adjust the call to sprintf
160 to avoid the same buffer being both source and destination.
161
162 2017-12-01 Thomas Koenig <tkoenig@gcc.gnu.org>
163
164 PR fortran/83224
165 * frontend-passes.c (create_var): Also handle
166 character arrays, handling deferred lenghts.
167
168 2017-12-01 Paul Thomas <pault@gcc.gnu.org>
169
170 PR fortran/82605
171 * resolve.c (get_pdt_constructor): Initialize 'cons' to NULL.
172 (resolve_pdt): Correct typo in prior comment. Emit an error if
173 any parameters are deferred and the object is neither pointer
174 nor allocatable.
175
176 PR fortran/82606
177 * decl.c (gfc_get_pdt_instance): Continue if the parameter sym
178 is not present or has no name. Select the parameter by name
179 of component, rather than component order. Remove all the other
180 manipulations of 'tail' when building the pdt instance.
181 (gfc_match_formal_arglist): Emit and error if a star is picked
182 up in a PDT decl parameter list.
183
184 PR fortran/82622
185 * trans-array.c (set_loop_bounds): If a GFC_SS_COMPONENT has an
186 info->end, use it rather than falling through to
187 gcc_unreachable.
188 (structure_alloc_comps): Check that param->name is non-null
189 before comparing with the component name.
190 * trans-decl.c (gfc_get_symbol_decl): Do not use the static
191 initializer for PDT symbols.
192 (gfc_init_default_dt): Do nothing for PDT symbols.
193 * trans-io.c (transfer_array_component): Parameterized array
194 components use the descriptor ubound since the shape is not
195 available.
196
197 PR fortran/82719
198 PR fortran/82720
199 * trans-expr.c (gfc_conv_component_ref): Do not use the charlen
200 backend_decl of pdt strings. Use the hidden component instead.
201 * trans-io.c (transfer_expr): Do not do IO on "hidden" string
202 lengths. Use the hidden string length for pdt string transfers
203 by adding it to the se structure. When finished nullify the
204 se string length.
205
206 PR fortran/82866
207 * decl.c (gfc_match_formal_arglist): If a name is not found or
208 star is found, while reading a type parameter list, emit an
209 immediate error.
210 (gfc_match_derived_decl): On reading a PDT parameter list, on
211 failure to match call gfc_error_recovery.
212
213 PR fortran/82978
214 * decl.c (build_struct): Character kind defaults to 1, so use
215 kind_expr whatever is the set value.
216 (gfc_get_pdt_instance): Ditto.
217 * trans-array.c (structure_alloc_comps): Copy the expression
218 for the PDT string length before parameter substitution. Use
219 this expression for evaluation and free it after use.
220
221 2017-12-01 Jakub Jelinek <jakub@redhat.com>
222
223 PR c/79153
224 * match.c (gfc_match): Add FALLTHRU comment to avoid
225 -Wimplicit-fallthrough warning.
226
227 2017-12-01 Thomas Koenig <tkoenig@gcc.gnu.org>
228
229 PR fortran/83224
230 * frontend-passes.c (realloc_string_callback): Handle
231 case for which the RHS is an array expression.
232
233 2017-11-28 Janne Blomqvist <jb@gcc.gnu.org>
234
235 PR fortran/53796
236 * gfortran.texi: Remove mentions of GFORTRAN_DEFAULT_RECL.
237
238 2017-11-28 Paul Thomas <pault@gcc.gnu.org>
239
240 PR fortran/83021
241 * resolve.c (resolve_component): Only escape for use assciated
242 vtypes if the current namespace has no proc_name and is most
243 particularly block data.
244
245 2017-11-28 Jakub Jelinek <jakub@redhat.com>
246
247 * trans-decl.c (gfc_trans_entry_master_switch): Build SWITCH_EXPR
248 using fold_build2_loc instead of fold_build3_loc.
249 * trans-io.c (io_result): Likewise.
250 * trans-stmt.c (gfc_trans_integer_select, gfc_trans_character_select):
251 Likewise.
252
253 2017-11-24 Jakub Jelinek <jakub@redhat.com>
254
255 PR fortran/81304
256 * trans-openmp.c (gfc_trans_omp_array_reduction_or_udr): Set
257 attr.implicit_type in intrinsic_sym to avoid undesirable warning.
258
259 2017-11-23 Dirk Broemmel <d.broemmel@fz-juelich.de>
260 Jakub Jelinek <jakub@redhat.com>
261
262 PR fortran/81841
263 * parse.c (parse_spec): Allow ST_OMP_THREADPRIVATE inside of
264 BLOCK DATA.
265
266 2017-11-23 Mike Stump <mikestump@comcast.net>
267 Eric Botcazou <ebotcazou@adacore.com>
268
269 * trans-stmt.c (gfc_trans_forall_loop): Pass 3rd operand to
270 ANNOTATE_EXPR.
271
272 2017-11-23 Paul Thomas <pault@gcc.gnu.org>
273
274 PR fortran/82814
275 * trans-types.c (gfc_sym_type): If a character function result
276 is missing the charlen backend_decl, use the one from the name-
277 space procedure symbol, if present.
278
279 2017-11-22 David Malcolm <dmalcolm@redhat.com>
280
281 PR c++/62170
282 * error.c (gfc_notify_std): Convert "quoted" param from bool to
283 bool *.
284
285 2017-11-22 Thomas Koenig <tkoenig@gcc.gnu.org>
286
287 PR fortran/36313
288 * check.c (int_or_real_or_char_check_f2003): New function.
289 * iresolve.c (gfc_resolve_maxloc): Add number "2" for
290 character arguments and rank-zero return value.
291 (gfc_resolve_minloc): Likewise.
292 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Handle case of
293 character arguments and rank-zero return value by removing
294 unneeded arguments and calling the library function.
295
296 2017-11-22 Paul Thomas <pault@gcc.gnu.org>
297
298 PR fortran/79072
299 * trans-stmt.c (trans_associate_var): Weaken the over strong
300 condition for using the fake result decl.
301
302 2017-11-20 Paul Thomas <pault@gcc.gnu.org>
303
304 PR fortran/79072
305 * trans-expr.c (trans_class_vptr_len_assignment): Set from_len
306 if the temporary is unlimited polymorphic.
307 * trans-stmt.c (trans_associate_var): Use the fake result decl
308 to obtain the 'len' field from an explicit function result when
309 in that function scope.
310
311 2017-11-19 Paul Thomas <pault@gcc.gnu.org>
312
313 PR fortran/78990
314 * expr.c (gfc_is_class_array_function): Renamed from
315 'gfc_is_alloc_class_array_function' and modified to return true
316 for pointers as well as allocatable results.
317 * gfortran.h : Change of name for prototype of above function.
318 * trans-array.c (gfc_add_loop_ss_code): Force finalization of
319 class array results.
320 (build_class_array_ref): Change assertion into a condition.
321 (build_class_array_ref): Set the se class_vptr for class array
322 function results.
323 (gfc_walk_function_expr): Reference gfc_is_class_array_function
324 as above.
325 * trans-decl.c (get_proc_result): Move it up before
326 gfc_trans_deferred_vars.
327 (gfc_trans_deferred_vars): Nullify explicit return class arrays
328 on entry.
329 * trans-expr.c (gfc_conv_class_to_class): Allow conversion of
330 class array functions that have an se class_vptr and use it
331 for the result vptr.
332 (gfc_conv_subref_array_arg): Rename reference to the above
333 function.
334 (gfc_conv_procedure_call): Ditto. Add the se pre block to the
335 loop pre block before the function is evaluated. Do not
336 finalize class pointer results.
337 (arrayfunc_assign_needs_temporary, gfc_trans_assignment_1) More
338 renamed references.
339 * trans-intrinsic.c (gfc_conv_intrinsic_size): Ditto.
340
341 2017-11-18 Janne Blomqvist <jb@gcc.gnu.org>
342
343 PR fortran/83036
344 * ioparm.def (IOPARM): Make nextrec a pintio.
345
346 2017-11-18 Janne Blomqvist <jb@gcc.gnu.org>
347
348 PR fortran/44292
349 * ioparm.def (IOPARM): Make recl_in intio, and recl_out pintio.
350
351 2017-11-18 Thomas Koenig <tkoenig@gcc.gnu.org>
352
353 PR fortran/83012
354 * expr.c (gfc_is_simply_contiguous): If a function call through a
355 class variable is done through a reference, check the function's
356 interface.
357
358 2017-11-17 Richard Biener <rguenther@suse.de>
359
360 PR fortran/83017
361 * trans-stmt.c (gfc_trans_forall_loop): Annotate DO CONCURRENT
362 loops with annot_expr_parallel_kind instead of just
363 annot_expr_ivdep_kind.
364
365 2017-11-15 Martin Liska <mliska@suse.cz>
366
367 * options.c (gfc_post_options):
368 Do not set default value of warn_return_type.
369 * trans-decl.c (gfc_trans_deferred_vars):
370 Compare warn_return_type for greater than zero.
371 (generate_local_decl): Likewise
372 (gfc_generate_function_code): Likewise.
373
374 2017-11-13 Fritz Reese <fritzoreese@gmail.com>
375
376 PR fortran/78240
377 * decl.c (match_clist_expr): Replace gcc_assert with proper
378 handling of bad result from spec_size().
379 * resolve.c (check_data_variable): Avoid NULL dereference when passing
380 locus to gfc_error.
381
382 2017-11-11 Janus Weil <janus@gcc.gnu.org>
383
384 PR fortran/82932
385 * resolve.c (update_compcall_arglist): Improve error recovery,
386 remove a gcc_assert.
387
388 2017-11-10 Fritz Reese <fritzoreese@gmail.com>
389
390 PR fortran/82886
391 * gfortran.h (gfc_build_init_expr): New prototype.
392 * invoke.texi (finit-derived): Update documentation.
393 * expr.c (gfc_build_init_expr): New, from gfc_build_default_init_expr.
394 (gfc_build_default_init_expr): Redirect to gfc_build_init_expr(,,false)
395 (component_initializer): Force building initializers using
396 gfc_build_init_expr(,,true).
397
398 2017-11-10 Martin Sebor <msebor@redhat.com>
399
400 PR c/81117
401 * gcc/fortran/decl.c (build_sym): Use strcpy instead of strncpy.
402
403 2017-11-10 Paul Thomas <pault@gcc.gnu.org>
404
405 PR fortran/82934
406 * trans-stmt.c (gfc_trans_allocate): Remove the gcc_assert on
407 null string length for assumed length typespec and set
408 expr3_esize to NULL_TREE;
409
410 2017-11-09 Paul Thomas <pault@gcc.gnu.org>
411
412 PR fortran/78619
413 * check.c (same_type_check): Introduce a new argument 'assoc'
414 with default value false. If this is true, use the symbol type
415 spec of BT_PROCEDURE expressions.
416 (gfc_check_associated): Set 'assoc' true in the call to
417 'same_type_check'.
418
419 2017-11-09 Steven G. Kargl <kargl@gcc.gnu.org>
420
421 PR fortran/78814
422 * interface.c (symbol_rank): Check for NULL pointer.
423
424 2017-11-08 Steven G. Kargl <kargl@kgcc.gnu.org>
425
426 PR Fortran/82841
427 * simplify.c(gfc_simplify_transfer): Do not dereference a NULL pointer.
428 Unwrap a short line.
429
430 2017-11-08 Steven G. Kargl <kargl@gcc.gnu.org>
431
432 PR fortran/82884
433 * arith.c (gfc_hollerith2character): Clear pad.
434
435 2017-11-08 Janne Blomqvist <jb@gcc.gnu.org>
436
437 PR 82869
438 * convert.c (truthvalue_conversion): Use logical_type_node.
439 * trans-array.c (gfc_trans_allocate_array_storage): Likewise.
440 (gfc_trans_create_temp_array): Likewise.
441 (gfc_trans_array_ctor_element): Likewise.
442 (gfc_trans_array_constructor_value): Likewise.
443 (trans_array_constructor): Likewise.
444 (trans_array_bound_check): Likewise.
445 (gfc_conv_array_ref): Likewise.
446 (gfc_trans_scalarized_loop_end): Likewise.
447 (gfc_conv_array_extent_dim): Likewise.
448 (gfc_array_init_size): Likewise.
449 (gfc_array_allocate): Likewise.
450 (gfc_trans_array_bounds): Likewise.
451 (gfc_trans_dummy_array_bias): Likewise.
452 (gfc_conv_array_parameter): Likewise.
453 (duplicate_allocatable): Likewise.
454 (duplicate_allocatable_coarray): Likewise.
455 (structure_alloc_comps): Likewise
456 (get_std_lbound): Likewise
457 (gfc_alloc_allocatable_for_assignment): Likewise
458 * trans-decl.c (add_argument_checking): Likewise
459 (gfc_generate_function_code): Likewise
460 * trans-expr.c (gfc_copy_class_to_class): Likewise
461 (gfc_trans_class_array_init_assign): Likewise
462 (gfc_trans_class_init_assign): Likewise
463 (gfc_conv_expr_present): Likewise
464 (gfc_conv_substring): Likewise
465 (gfc_conv_cst_int_power): Likewise
466 (gfc_conv_expr_op): Likewise
467 (gfc_conv_procedure_call): Likewise
468 (fill_with_spaces): Likewise
469 (gfc_trans_string_copy): Likewise
470 (gfc_trans_alloc_subarray_assign): Likewise
471 (gfc_trans_pointer_assignment): Likewise
472 (gfc_trans_scalar_assign): Likewise
473 (fcncall_realloc_result): Likewise
474 (alloc_scalar_allocatable_for_assignment): Likewise
475 (trans_class_assignment): Likewise
476 (gfc_trans_assignment_1): Likewise
477 * trans-intrinsic.c (build_fixbound_expr): Likewise
478 (gfc_conv_intrinsic_aint): Likewise
479 (gfc_trans_same_strlen_check): Likewise
480 (conv_caf_send): Likewise
481 (trans_this_image): Likewise
482 (conv_intrinsic_image_status): Likewise
483 (trans_image_index): Likewise
484 (gfc_conv_intrinsic_bound): Likewise
485 (conv_intrinsic_cobound): Likewise
486 (gfc_conv_intrinsic_mod): Likewise
487 (gfc_conv_intrinsic_dshift): Likewise
488 (gfc_conv_intrinsic_dim): Likewise
489 (gfc_conv_intrinsic_sign): Likewise
490 (gfc_conv_intrinsic_ctime): Likewise
491 (gfc_conv_intrinsic_fdate): Likewise
492 (gfc_conv_intrinsic_ttynam): Likewise
493 (gfc_conv_intrinsic_minmax): Likewise
494 (gfc_conv_intrinsic_minmax_char): Likewise
495 (gfc_conv_intrinsic_anyall): Likewise
496 (gfc_conv_intrinsic_arith): Likewise
497 (gfc_conv_intrinsic_minmaxloc): Likewise
498 (gfc_conv_intrinsic_minmaxval): Likewise
499 (gfc_conv_intrinsic_btest): Likewise
500 (gfc_conv_intrinsic_bitcomp): Likewise
501 (gfc_conv_intrinsic_shift): Likewise
502 (gfc_conv_intrinsic_ishft): Likewise
503 (gfc_conv_intrinsic_ishftc): Likewise
504 (gfc_conv_intrinsic_leadz): Likewise
505 (gfc_conv_intrinsic_trailz): Likewise
506 (gfc_conv_intrinsic_mask): Likewise
507 (gfc_conv_intrinsic_spacing): Likewise
508 (gfc_conv_intrinsic_rrspacing): Likewise
509 (gfc_conv_intrinsic_size): Likewise
510 (gfc_conv_intrinsic_sizeof): Likewise
511 (gfc_conv_intrinsic_transfer): Likewise
512 (gfc_conv_allocated): Likewise
513 (gfc_conv_associated): Likewise
514 (gfc_conv_same_type_as): Likewise
515 (gfc_conv_intrinsic_trim): Likewise
516 (gfc_conv_intrinsic_repeat): Likewise
517 (conv_isocbinding_function): Likewise
518 (conv_intrinsic_ieee_is_normal): Likewise
519 (conv_intrinsic_ieee_is_negative): Likewise
520 (conv_intrinsic_ieee_copy_sign): Likewise
521 (conv_intrinsic_move_alloc): Likewise
522 * trans-io.c (set_parameter_value_chk): Likewise
523 (set_parameter_value_inquire): Likewise
524 (set_string): Likewise
525 * trans-openmp.c (gfc_walk_alloc_comps): Likewise
526 (gfc_omp_clause_default_ctor): Likewise
527 (gfc_omp_clause_copy_ctor): Likewise
528 (gfc_omp_clause_assign_op): Likewise
529 (gfc_omp_clause_dtor): Likewise
530 (gfc_omp_finish_clause): Likewise
531 (gfc_trans_omp_clauses): Likewise
532 (gfc_trans_omp_do): Likewise
533 * trans-stmt.c (gfc_trans_goto): Likewise
534 (gfc_trans_sync): Likewise
535 (gfc_trans_arithmetic_if): Likewise
536 (gfc_trans_simple_do): Likewise
537 (gfc_trans_do): Likewise
538 (gfc_trans_forall_loop): Likewise
539 (gfc_trans_where_2): Likewise
540 (gfc_trans_allocate): Likewise
541 (gfc_trans_deallocate): Likewise
542 * trans-types.c (gfc_init_types): Initialize logical_type_node and
543 their true/false trees.
544 (gfc_get_array_descr_info): Use logical_type_node.
545 * trans-types.h (logical_type_node): New tree.
546 (logical_true_node): Likewise.
547 (logical_false_node): Likewise.
548 * trans.c (gfc_trans_runtime_check): Use logical_type_node.
549 (gfc_call_malloc): Likewise
550 (gfc_allocate_using_malloc): Likewise
551 (gfc_allocate_allocatable): Likewise
552 (gfc_add_comp_finalizer_call): Likewise
553 (gfc_add_finalizer_call): Likewise
554 (gfc_deallocate_with_status): Likewise
555 (gfc_deallocate_scalar_with_status): Likewise
556 (gfc_call_realloc): Likewise
557
558 2017-11-06 Paul Thomas <pault@gcc.gnu.org>
559
560 PR fortran/69739
561 * trans-expr.c (gfc_map_intrinsic_function): Return false for
562 bounds without the DIM argument instead of ICEing.
563
564 2017-11-06 Martin Liska <mliska@suse.cz>
565
566 PR middle-end/82404
567 * options.c (gfc_post_options): Set default value of
568 -Wreturn-type to false.
569
570 2017-11-05 Thomas Koenig <tkoenig@gcc.gnu.org>
571
572 PR fortran/82471
573 * lang.opt (ffrontend-loop-interchange): New option.
574 (Wfrontend-loop-interchange): New option.
575 * options.c (gfc_post_options): Handle ffrontend-loop-interchange.
576 * frontend-passes.c (gfc_run_passes): Run
577 optimize_namespace if flag_frontend_optimize or
578 flag_frontend_loop_interchange are set.
579 (optimize_namespace): Run functions according to flags set;
580 also call index_interchange.
581 (ind_type): New function.
582 (has_var): New function.
583 (index_cost): New function.
584 (loop_comp): New function.
585
586 2017-11-05 Paul Thomas <pault@gcc.gnu.org>
587
588 PR fortran/78641
589 * resolve.c (resolve_ordinary_assign): Do not add the _data
590 component for class valued array constructors being assigned
591 to derived type arrays.
592 * trans-array.c (gfc_trans_array_ctor_element): Take the _data
593 of class valued elements for assignment to derived type arrays.
594
595 2017-11-05 Paul Thomas <pault@gcc.gnu.org>
596
597 PR fortran/81447
598 PR fortran/82783
599 * resolve.c (resolve_component): There is no need to resolve
600 the components of a use associated vtype.
601 (resolve_fl_derived): Unconditionally generate a vtable for any
602 module derived type, as long as the standard is F2003 or later
603 and it is not a vtype or a PDT template.
604
605 2017-11-05 Tom de Vries <tom@codesourcery.com>
606
607 PR other/82784
608 * parse.c (match, matcha, matchs, matcho, matchds, matchdo): Remove
609 semicolon after "do {} while (0)".
610
611 2017-11-04 Andre Vehreschild <vehre@gcc.gnu.org>
612
613 * trans-expr.c (gfc_trans_assignment_1): Character kind conversion may
614 create a loop variant temporary, too.
615 * trans-intrinsic.c (conv_caf_send): Treat char arrays as arrays and
616 not as scalars.
617 * trans.c (get_array_span): Take the character kind into account when
618 doing pointer arithmetic.
619
620 2017-11-04 Thomas Koenig <tkoenig@gcc.gnu.org>
621
622 PR fortran/29600
623 * gfortran.h (gfc_check_f): Replace fm3l with fm4l.
624 * intrinsic.h (gfc_resolve_maxloc): Add gfc_expr * to argument
625 list in protoytpe.
626 (gfc_resolve_minloc): Likewise.
627 * check.c (gfc_check_minloc_maxloc): Handle kind argument.
628 * intrinsic.c (add_sym_3_ml): Rename to
629 (add_sym_4_ml): and handle kind argument.
630 (add_function): Replace add_sym_3ml with add_sym_4ml and add
631 extra arguments for maxloc and minloc.
632 (check_specific): Change use of check.f3ml with check.f4ml.
633 * iresolve.c (gfc_resolve_maxloc): Handle kind argument. If
634 the kind is smaller than the smallest library version available,
635 use gfc_default_integer_kind and convert afterwards.
636 (gfc_resolve_minloc): Likewise.
637
638 2017-11-04 Paul Thomas <pault@gcc.gnu.org>
639
640 PR fortran/81735
641 * trans-decl.c (gfc_trans_deferred_vars): Do a better job of a
642 case where 'tmp' was used unititialized and remove TODO.
643
644 2017-11-03 Steven G. Kargl <kargl@gcc.gnu.org>
645
646 PR fortran/82796
647 * resolve.c (resolve_equivalence): An entity in a common block within
648 a module cannot appear in an equivalence statement if the entity is
649 with a pure procedure.
650
651 2017-10-31 Jim Wilson <wilson@tuliptree.org>
652
653 * parse.c (unexpected_eof): Call gcc_unreachable before return.
654
655 2017-10-30 Paul Thomas <pault@gcc.gnu.org>
656
657 PR fortran/80850
658 * trans_expr.c (gfc_conv_procedure_call): When passing a class
659 argument to an unlimited polymorphic dummy, it is wrong to cast
660 the passed expression as unlimited, unless it is unlimited. The
661 correct way is to assign to each of the fields and set the _len
662 field to zero.
663
664 2017-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
665
666 * resolve.c (resolve_transfer): Set derived to correct symbol for
667 BT_CLASS.
668
669 2017-10-29 Jim Wilson <wilson@tuliptree.org>
670
671 * invoke.texi: Delete adb and sdb references.
672
673 2017-10-28 Andre Vehreschild <vehre@gcc.gnu.org>
674
675 * check.c (gfc_check_co_reduce): Clarify error message.
676
677 2017-10-28 Paul Thomas <pault@gcc.gnu.org>
678
679 PR fortran/81758
680 * trans-expr.c (trans_class_vptr_len_assignment): 'vptr_expr'
681 must only be set if the right hand side expression is of type
682 class.
683
684 2017-10-27 Steven G. Kargl <kargl@gcc.gnu.org>
685
686 PR fortran/82620
687 * match.c (gfc_match_allocate): Exit early on syntax error.
688
689 2017-10-27 Thomas Koenig <tkoenig@gcc.gnu.org>
690
691 PR fortran/56342
692 * simplify.c (is_constant_array_expr): If the expression is
693 a parameter array, call gfc_simplify_expr.
694
695 2017-10-25 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
696
697 * match.c (gfc_match_type_is): Fix typo in error message.
698
699 2017-10-21 Paul Thomas <pault@gcc.gnu.org>
700
701 PR fortran/82586
702 * decl.c (gfc_get_pdt_instance): Remove the error message that
703 the parameter does not have a corresponding component since
704 this is now taken care of when the derived type is resolved. Go
705 straight to error return instead.
706 (gfc_match_formal_arglist): Make the PDT relevant errors
707 immediate so that parsing of the derived type can continue.
708 (gfc_match_derived_decl): Do not check the match status on
709 return from gfc_match_formal_arglist for the same reason.
710 * resolve.c (resolve_fl_derived0): Check that each type
711 parameter has a corresponding component.
712
713 PR fortran/82587
714 * resolve.c (resolve_generic_f): Check that the derived type
715 can be used before resolving the struture constructor.
716
717 PR fortran/82589
718 * symbol.c (check_conflict): Add the conflicts involving PDT
719 KIND and LEN attributes.
720
721 2017-10-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
722
723 * interface.c (check_sym_interfaces, check_uop_interfaces,
724 gfc_check_interfaces): Base interface_name buffer off
725 GFC_MAX_SYMBOL_LEN.
726
727 2017-10-19 Jakub Jelinek <jakub@redhat.com>
728
729 PR fortran/82568
730 * gfortran.h (gfc_resolve_do_iterator): Add a bool arg.
731 (gfc_resolve_omp_local_vars): New declaration.
732 * openmp.c (omp_current_ctx): Make static.
733 (gfc_resolve_omp_parallel_blocks): Handle EXEC_OMP_TASKLOOP
734 and EXEC_OMP_TASKLOOP_SIMD.
735 (gfc_resolve_do_iterator): Add ADD_CLAUSE argument, if false,
736 don't actually add any clause. Move omp_current_ctx test
737 earlier.
738 (handle_local_var, gfc_resolve_omp_local_vars): New functions.
739 * resolve.c (gfc_resolve_code): Call gfc_resolve_omp_parallel_blocks
740 instead of just gfc_resolve_omp_do_blocks for EXEC_OMP_TASKLOOP
741 and EXEC_OMP_TASKLOOP_SIMD.
742 (gfc_resolve_code): Adjust gfc_resolve_do_iterator caller.
743 (resolve_codes): Call gfc_resolve_omp_local_vars.
744
745 2017-10-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
746
747 * gfortran.h (gfc_lookup_function_fuzzy): New declaration.
748 (gfc_closest_fuzzy_match): New declaration.
749 (vec_push): New definition.
750 * misc.c (gfc_closest_fuzzy_match): New definition.
751 * resolve.c: Include spellcheck.h.
752 (lookup_function_fuzzy_find_candidates): New static function.
753 (lookup_uop_fuzzy_find_candidates): Likewise.
754 (lookup_uop_fuzzy): Likewise.
755 (resolve_operator) <INTRINSIC_USER>: Call lookup_uop_fuzzy.
756 (gfc_lookup_function_fuzzy): New definition.
757 (resolve_unknown_f): Call gfc_lookup_function_fuzzy.
758 * interface.c (check_interface0): Likewise.
759 (lookup_arg_fuzzy_find_candidates): New static function.
760 (lookup_arg_fuzzy ): Likewise.
761 (compare_actual_formal): Call lookup_arg_fuzzy.
762 * symbol.c: Include spellcheck.h.
763 (lookup_symbol_fuzzy_find_candidates): New static function.
764 (lookup_symbol_fuzzy): Likewise.
765 (gfc_set_default_type): Call lookup_symbol_fuzzy.
766 (lookup_component_fuzzy_find_candidates): New static function.
767 (lookup_component_fuzzy): Likewise.
768 (gfc_find_component): Call lookup_component_fuzzy.
769
770 2017-10-18 Thomas Koenig <tkoenig@gcc.gnu.org>
771
772 PR fortran/82567
773 * frontend-passes.c (combine_array_constructor): If an array
774 constructor is all constants and has more elements than a small
775 constant, don't convert a*[b,c] to [a*b,a*c] to reduce compilation
776 times.
777
778 2017-10-18 Thomas Koenig <tkoenig@gcc.gnu.org>
779
780 PR fortran/79795
781 * resolve.c (resovle_symbol): Change gcc_assert to
782 sensible error message.
783
784 2017-10-18 Paul Thomas <pault@gcc.gnu.org>
785
786 PR fortran/82550
787 * trans_decl.c (gfc_get_symbol_decl): Procedure symbols that
788 have the 'used_in_submodule' attribute should be processed by
789 'gfc_get_extern_function_decl'.
790
791 2017-10-16 Fritz Reese <fritzoreese@gmail.com>
792
793 PR fortran/82511
794 * trans-io.c (transfer_expr): Treat BT_UNION as BT_DERIVED.
795
796 2017-10-15 Thomas Koenig <tkoenig@gcc.gnu.org>
797
798 PR fortran/82372
799 * fortran/scanner.c (last_error_char): New global variable.
800 (gfc_scanner_init_1): Set last_error_char to NULL.
801 (gfc_gobble_whitespace): If a character not printable or
802 not newline, issue an error.
803
804 2017-10-13 Paul Thomas <pault@gcc.gnu.org>
805
806 PR fortran/81048
807 * resolve.c (resolve_symbol): Ensure that derived type array
808 results get default initialization.
809
810 2017-10-11 Nathan Sidwell <nathan@acm.org>
811
812 * cpp.c (gfc_cpp_add_include_path): Update incpath_e names.
813 (gfc_cpp_add_include_path_after): Likewise.
814
815 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
816
817 * target-memory.c (gfc_interpret_logical): Use wi::to_wide when
818 operating on trees as wide_ints.
819 * trans-const.c (gfc_conv_tree_to_mpz): Likewise.
820 * trans-expr.c (gfc_conv_cst_int_power): Likewise.
821 * trans-intrinsic.c (trans_this_image): Likewise.
822 (gfc_conv_intrinsic_bound): Likewise.
823 (conv_intrinsic_cobound): Likewise.
824
825 2017-10-08 Steven G. Kargl <kargl@gcc.gnu.org>
826
827 * check.c (gfc_check_x): Remove function.
828 * intrinsic.c (add_functions): Use gfc_check_fn_r.
829
830 2017-10-08 Paul Thomas <pault@gcc.gnu.org>
831
832 PR fortran/82375
833 * module.c : Bump up MOD_VERSION to 15.
834 (mio_component): Edit comment about PDT specification list.
835 (mio_expr, mio_symbol): Include the expression and symbol PDT
836 specification lists in the same way as in mio_component.
837
838 2017-10-08 Thomas Koenig <tkoenig@gcc.gnu.org>
839
840 * dump_prase_tree (show_symbol): Output list of variables in
841 NAMELIST.
842 (show_code_node): Add new line for ELSE and END DO for DO
843 CONCURRENT.
844 * invoke.texi: Document that the output of
845 -fdump-fortran-original, -fdump-fortran-optimized and
846 -fdump-parse-tree is unsable and may lead to ICEs.
847
848 2017-10-07 Paul Thomas <pault@gcc.gnu.org>
849
850 PR fortran/82375
851 * class.c (gfc_find_derived_vtab): Return NULL for a passed
852 pdt template to prevent bad procedures from being written.
853 * decl.c (gfc_get_pdt_instance): Do not use the default
854 initializer for pointer and allocatable pdt type components. If
855 the component is allocatbale, set the 'alloc_comp' attribute of
856 'instance'.
857 * module.c : Add a prototype for 'mio_actual_arglist'. Add a
858 boolean argument 'pdt'.
859 (mio_component): Call it for the parameter list of pdt type
860 components with 'pdt' set to true.
861 (mio_actual_arg): Add the boolean 'pdt' and, if it is set, call
862 mio_integer for the 'spec_type'.
863 (mio_actual_arglist): Add the boolean 'pdt' and use it in the
864 call to mio_actual_arg.
865 (mio_expr, mio_omp_udr_expr): Call mio_actual_arglist with
866 'pdt' set false.
867 * resolve.c (get_pdt_spec_expr): Add the parameter name to the
868 KIND parameter error.
869 (get_pdt_constructor): Check that cons->expr is non-null.
870 * trans-array.c (structure_alloc_comps): For deallocation of
871 allocatable components, ensure that parameterized components
872 are deallocated first. Likewise, when parameterized components
873 are allocated, nullify allocatable components first. Do not
874 recurse into pointer or allocatable pdt components while
875 allocating or deallocating parameterized components. Test that
876 parameterized arrays or strings are allocated before freeing
877 them.
878 (gfc_trans_pointer_assignment): Call the new function. Tidy up
879 a minor whitespace issue.
880 trans-decl.c (gfc_trans_deferred_vars): Set 'tmp' to NULL_TREE
881 to prevent the expression from being used a second time.
882
883 2017-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
884
885 PR fortran/49232
886 * expr.c (gfc_check_pointer_assign): Error
887 for non-contiguous rhs.
888
889 2017-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
890
891 * gfortran.h (async_io_dt): Add external reference.
892 * io.c (async_io_dt): Add variable.
893 (compare_to_allowed_values): Add prototyte. Add optional argument
894 num. If present, set it to the number of the entry that was
895 matched.
896 (check_io_constraints): If this is for an asynchronous I/O
897 statement, set async_io_dt and set the asynchronous flag for
898 a SIZE tag.
899 * resolve.c (resolve_transfer): If async_io_dt is set, set
900 the asynchronous flag on the variable.
901 (resolve_fl_namelist): If async_io_dt is set, set the asynchronous
902 flag on all elements of the namelist.
903
904 2017-10-04 Paul Thomas <pault@gcc.gnu.org>
905
906 PR fortran/60458
907 PR fortran/77296
908 * resolve.c (resolve_assoc_var): Deferred character type
909 associate names must not receive an integer conatant length.
910 * symbol.c (gfc_is_associate_pointer): Deferred character
911 length functions also require an associate pointer.
912 * trans-decl.c (gfc_get_symbol_decl): Deferred character
913 length functions or derived type components require the assoc
914 name to have variable string length.
915 * trans-stmt.c (trans_associate_var): Set the string length of
916 deferred string length associate names. The address expression
917 is not needed for allocatable, pointer or dummy targets. Change
918 the comment about defered string length targets.
919
920 2017-10-03 Thomas Koenig <tkoenig@gcc.gnu.org>
921
922 * io.c (match_wait_element): Correctly match END and EOR tags.
923 * dump-parse-tree.c (show_code_node): Handle EXEC_WAIT.
924
925 2017-10-02 Paul Thomas <pault@gcc.gnu.org>
926
927 PR fortran/82312
928 * resolve.c (gfc_resolve_code): Simplify condition for class
929 pointer assignments becoming regular assignments by asserting
930 that only class valued targets are permitted.
931 * trans-expr.c (trans_class_pointer_fcn): New function using a
932 block of code from gfc_trans_pointer_assignment.
933 (gfc_trans_pointer_assignment): Call the new function. Tidy up
934 a minor whitespace issue.
935
936 2017-10-01 Dominique d'Humieres <dominiq@lps.ens.fr>
937
938 PR fortran/61450
939 * parse.c (gfc_global_used): Replace the gfc_internal_error
940 with an error.
941
942 2017-09-29 Dominique d'Humieres <dominiq@lps.ens.fr>
943
944 PR fortran/25071
945 * interface.c (compare_actual_formal): Change warnings to errors
946 when "Actual argument contains too few elements for dummy
947 argument", unless -std=legacy is used.
948
949 2017-09-27 Thomas Schwinge <thomas@codesourcery.com>
950
951 * lang.opt <Wdo-subscript>: End help text with a period.
952
953 2017-09-26 Thomas Koenig <tkoenig@gcc.gnu.org>
954
955 * frontend-passes.c (do_subscript): Don't do anything
956 if inside an associate list.
957
958 2017-09-25 Thomas Koenig <tkoenig@gcc.gnu.org>
959
960 * lang.opt: Add -Wdo-subscript.
961 * frontend-passes.c (do_t): New type.
962 (doloop_list): Use variable of do_type.
963 (if_level): Variable to track if levels.
964 (select_level): Variable to track select levels.
965 (gfc_run_passes): Initialize i_level and select_level.
966 (doloop_code): Record current level of if + select
967 level in doloop_list. Add seen_goto if there could
968 be a branch outside the loop. Use different type for
969 doloop_list.
970 (doloop_function): Call do_intent and do_subscript; move
971 functionality of checking INTENT to do_intent.
972 (insert_index_t): New type, for callback_insert_index.
973 (callback_insert_index): New function.
974 (insert_index): New function.
975 (do_subscript): New function.
976 (do_intent): New function.
977 (gfc_code_walker): Keep track of if_level and select_level.
978 * invoke.texi: Document -Wdo-subscript.
979
980 2017-09-25 Janne Blomqvist <jb@gcc.gnu.org>
981
982 * trans.c (gfc_unlikely): Remove unnecessary fold_convert.
983 (gfc_likely): Likewise.
984
985 2017-09-24 Thomas Koenig <tkoenig@gcc.gnu.org>
986 Steven G. Kargl <kargl@gcc.gnu.org>
987
988 PR fortran/80118
989 * expr.c (gfc_get_full_arrayspec_from_expr): If there is
990 no symtree, set array spec to NULL.
991
992 2017-09-23 Janus Weil <janus@gcc.gnu.org>
993
994 PR fortran/82143
995 * lang.opt: Add the options -fdefault-real-10 and -fdefault-real-16.
996 Rename flag_default_real to flag_default_real_8.
997 * invoke.texi: Add documentation.
998 * module.c (use_iso_fortran_env_module): flag_default_real is renamed.
999 * trans-types.c (gfc_init_kinds): Implement the flags
1000 -fdefault-real-10 and -fdefault-real-16. Make -fdefault-double-8 work
1001 without -fdefault-real-8.
1002
1003 2017-09-21 Paul Thomas <pault@gcc.gnu.org>
1004
1005 PR fortran/52832
1006 * match.c (gfc_match_associate): Before failing the association
1007 try again, allowing a proc pointer selector.
1008
1009 PR fortran/80120
1010 PR fortran/81903
1011 PR fortran/82121
1012 * primary.c (gfc_match_varspec): Introduce 'tgt_expr', which
1013 points to the associate selector, if any. Go through selector
1014 references, after resolution for variables, to catch any full
1015 or section array references. If a class associate name does
1016 not have the same declared type as the selector, resolve the
1017 selector and copy the declared type to the associate name.
1018 Before throwing a no implicit type error, resolve all allowed
1019 selector expressions, and copy the resulting typespec.
1020
1021 PR fortran/67543
1022 * resolve.c (resolve_assoc_var): Selector must cannot be the
1023 NULL expression and it must have a type.
1024
1025 PR fortran/78152
1026 * resolve.c (resolve_symbol): Allow associate names to be
1027 coarrays.
1028
1029 2017-09-21 Cesar Philippidis <cesar@codesourcery.com>
1030
1031 * openmp.c (gfc_match_oacc_wait): Don't restrict wait directive
1032 arguments to constant integers.
1033
1034 2017-09-17 Paul Thomas <pault@gcc.gnu.org>
1035
1036 PR fortran/82173
1037 * decl.c (gfc_get_pdt_instance): Use the component initializer
1038 expression for the default, rather than the parameter value.
1039 * resolve.c (resolve_pdt): New function.
1040 (resolve_symbol): Call it. Remove false error, prohibiting
1041 deferred type parameters for dummy arguments.
1042
1043 PR fortran/60483
1044 * primary.c (gfc_match_varspec): If the type of an associate
1045 name is unknown and yet there is a match, try resolving the
1046 target expression and using its type.
1047
1048 2017-09-15 Paul Thomas <pault@gcc.gnu.org>
1049
1050 PR fortran/82184
1051 trans-decl.c (gfc_trans_deferred_vars): Do not null the 'span'
1052 field if the symbol is either implicitly or explicitly saved.
1053
1054 2017-09-13 Paul Thomas <pault@gcc.gnu.org>
1055
1056 PR fortran/82173
1057 * decl.c (match_char_kind): If the kind expression is
1058 parameterized, save it in saved_kind_expr and set kind = 0.
1059 (gfc_get_pdt_instance): Resolve and simplify before emitting
1060 error on expression kind. Insert a missing simplification after
1061 insertion of kind expressions.
1062
1063 2017-09-12 Paul Thomas <pault@gcc.gnu.org>
1064
1065 PR fortran/82173
1066 PR fortran/82168
1067 * decl.c (variable_decl): Check pdt template components for
1068 appearance of KIND/LEN components in the type parameter name
1069 list, that components corresponding to type parameters have
1070 either KIND or LEN attributes and that KIND or LEN components
1071 are scalar. Copy the initializer to the parameter value.
1072 (gfc_get_pdt_instance): Add a label 'error_return' and follow
1073 it with repeated code, while replacing this code with a jump.
1074 Check if a parameter appears as a component in the template.
1075 Make sure that the parameter expressions are integer. Validate
1076 KIND expressions.
1077 (gfc_match_decl_type_spec): Search for pdt_types in the parent
1078 namespace since they are instantiated in the template ns.
1079 * expr.c (gfc_extract_int): Use a KIND parameter if it
1080 appears as a component expression.
1081 (gfc_check_init_expr): Allow expressions with the pdt_kind
1082 attribute.
1083 *primary.c (gfc_match_actual_arglist): Make sure that the first
1084 keyword argument is recognised when 'pdt' is set.
1085
1086 2017-09-10 Paul Thomas <pault@gcc.gnu.org>
1087
1088 PR fortran/34640
1089 PR fortran/40737
1090 PR fortran/55763
1091 PR fortran/57019
1092 PR fortran/57116
1093
1094 * expr.c (is_subref_array): Add class pointer array dummies
1095 to the list of expressions that return true.
1096 * trans-array.c: Add SPAN_FIELD and update indices for
1097 subsequent fields.
1098 (gfc_conv_descriptor_span, gfc_conv_descriptor_span_get,
1099 gfc_conv_descriptor_span_set, is_pointer_array,
1100 get_array_span): New functions.
1101 (gfc_get_descriptor_offsets_for_info): New function to preserve
1102 API for access to descriptor fields for trans-types.c.
1103 (gfc_conv_scalarized_array_ref): If the expression is a subref
1104 array, make sure that info->descriptor is a descriptor type.
1105 Otherwise, if info->descriptor is a pointer array, set 'decl'
1106 and fix it if it is a component reference.
1107 (build_array_ref): Simplify handling of class array refs by
1108 passing the vptr to gfc_build_array_ref rather than generating
1109 the pointer arithmetic in this function.
1110 (gfc_conv_array_ref): As in gfc_conv_scalarized_array_ref, set
1111 'decl'.
1112 (gfc_array_allocate): Set the span field if this is a pointer
1113 array. Use the expr3 element size if it is available, so that
1114 the dynamic type element size is used.
1115 (gfc_conv_expr_descriptor): Set the span field for pointer
1116 assignments.
1117 * trans-array.h: Prototypes for gfc_conv_descriptor_span_get
1118 gfc_conv_descriptor_span_set and
1119 gfc_get_descriptor_offsets_for_info added.
1120 trans-decl.c (gfc_get_symbol_decl): If a non-class pointer
1121 array, mark the declaration as a GFC_DECL_PTR_ARRAY_P. Remove
1122 the setting of GFC_DECL_SPAN.
1123 (gfc_trans_deferred_vars): Set the span field to zero in thge
1124 originating scope.
1125 * trans-expr.c (gfc_conv_procedure_call): Do not use copy-in/
1126 copy-out to pass subref expressions to a pointer dummy.
1127 (gfc_trans_pointer_assignment): Remove code for setting of
1128 GFC_DECL_SPAN. Set the 'span' field for non-class pointers to
1129 class function results. Likewise for rank remap. In the case
1130 that the target is not a whole array, use the target array ref
1131 for remap and, since the 'start' indices are missing, set the
1132 lbounds to one, as required by the standard.
1133 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Pick up the
1134 'token' offset from the field decl in the descriptor.
1135 (conv_isocbinding_subroutine): Set the 'span' field.
1136 * trans-io.c (gfc_trans_transfer): Always scalarize pointer
1137 array io.
1138 * trans-stmt.c (trans_associate_var): Set the 'span' field.
1139 * trans-types.c (gfc_get_array_descriptor_base): Add the 'span'
1140 field to the array descriptor.
1141 (gfc_get_derived_type): Pointer array components are marked as
1142 GFC_DECL_PTR_ARRAY_P.
1143 (gfc_get_array_descr_info): Replaced API breaking code for
1144 descriptor offset calling gfc_get_descriptor_offsets_for_info.
1145 * trans.c (get_array_span): New function.
1146 (gfc_build_array_ref): Simplify by calling get_array_span and
1147 obtain 'span' if 'decl' or 'vptr' present.
1148 * trans.h : Rename DECL_LANG_FLAG_6, GFC_DECL_SUBREF_ARRAY_P,
1149 as GFC_DECL_PTR_ARRAY_P.
1150
1151 2017-09-09 Paul Thomas <pault@gcc.gnu.org>
1152
1153 * decl.c : Add decl_type_param_list, type_param_spec_list as
1154 static variables to hold PDT spec lists.
1155 (build_sym): Copy 'type_param_spec_list' to symbol spec_list.
1156 (build_struct): Copy the 'saved_kind_expr' to the component
1157 'kind_expr'. Check that KIND or LEN components appear in the
1158 decl_type_param_list. These should appear as symbols in the
1159 f2k_derived namespace. If the component is itself a PDT type,
1160 copy the decl_type_param_list to the component param_list.
1161 (gfc_match_kind_spec): If the KIND expression is parameterized
1162 set KIND to zero and store the expression in 'saved_kind_expr'.
1163 (insert_parameter_exprs): New function.
1164 (gfc_insert_kind_parameter_exprs): New function.
1165 (gfc_insert_parameter_exprs): New function.
1166 (gfc_get_pdt_instance): New function.
1167 (gfc_match_decl_type_spec): Match the decl_type_spec_list if it
1168 is present. If it is, call 'gfc_get_pdt_instance' to obtain the
1169 specific instance of the PDT.
1170 (match_attr_spec): Match KIND and LEN attributes. Check for the
1171 standard and for type/kind of the parameter. They are also not
1172 allowed outside a derived type definition.
1173 (gfc_match_data_decl): Null the decl_type_param_list and the
1174 type_param_spec_list on entry and free them on exit.
1175 (gfc_match_formal_arglist): If 'typeparam' is true, add the
1176 formal symbol to the f2k_derived namespace.
1177 (gfc_match_derived_decl): Register the decl_type_param_list
1178 if this is a PDT. If this is a type extension, gather up all
1179 the type parameters and put them in the right order.
1180 *dump-parse-tree.c (show_attr): Signal PDT templates and the
1181 parameter attributes.
1182 (show_components): Output parameter atrributes and component
1183 parameter list.
1184 (show_symbol): Show variable parameter lists.
1185 * expr.c (expr.c): Copy the expression parameter list.
1186 (gfc_is_constant_expr): Pass on symbols representing PDT
1187 parameters.
1188 (gfc_check_init_expr): Break on PDT KIND parameters and
1189 PDT parameter expressions.
1190 (gfc_check_assign): Assigning to KIND or LEN components is an
1191 error.
1192 (derived_parameter_expr): New function.
1193 (gfc_derived_parameter_expr): New function.
1194 (gfc_spec_list_type): New function.
1195 * gfortran.h : Add enum gfc_param_spec_type. Add the PDT attrs
1196 to the structure symbol_attr. Add the 'kind_expr' and
1197 'param_list' field to the gfc_component structure. Comment on
1198 the reuse of the gfc_actual_arglist structure as storage for
1199 type parameter spec lists. Add the new field 'spec_type' to
1200 this structure. Add 'param_list' fields to gfc_symbol and
1201 gfc_expr. Add prototypes for gfc_insert_kind_parameter_exprs,
1202 gfc_insert_parameter_exprs, gfc_add_kind, gfc_add_len,
1203 gfc_derived_parameter_expr and gfc_spec_list_type.
1204 * interface.c (gfc_compare_derived_types): Treat PDTs in the
1205 same way as sequence types.
1206 * match.c : Add variable 'type_param_spec_list'.
1207 (gfc_op2string, gfc_match_member_sep, gfc_match_label): Remove
1208 trailing whitespace.
1209 (match_derived_type_spec): Match PDTs and find specific
1210 instance.
1211 (gfc_match_type_spec): Remove more trailing whitespace.
1212 (gfc_match_allocate): Assumed or deferred parameters cannot
1213 appear here. Copy the type parameter spec list to the expr for
1214 the allocatable entity. Free 'type_param_spec_list'.
1215 (gfc_match_common, gfc_match_namelist, gfc_match_module): Still
1216 more trailing whitespace to remove.
1217 (gfc_match_type_is): Allow PDT typespecs.
1218 * match.h : Modify prototypes for gfc_match_formal_arglist and
1219 gfc_match_actual_arglist.
1220 * module.c (ab_attribute, mstring attr_bits): PDT attributes
1221 added.
1222 (mio_symbol_attribute): PDT attributes handled.
1223 (mio_component): Deal with 'kind_expr' field.
1224 (mio_full_f2k_derived): For PDT templates, transfer the formal
1225 namespace symroot to the f2k_derived namespace.
1226 *primary.c (match_keyword_arg, gfc_match_actual_arglist): Add
1227 modifications to handle PDT spec lists. These are flagged in
1228 both cases by new boolean arguments, whose prototype defaults
1229 are false.
1230 (gfc_match_structure_constructor, match_variable): Remove yet
1231 more trailing whitespace.
1232 * resolve.c (get_pdt_spec_expr, get_pdt_constructor): New
1233 functions.
1234 (resolve_structure_cons): If the constructor is a PDT template,
1235 call get_pdt_constructor to build it using the parameter lists
1236 and then get the specific instance of the PDT.
1237 (resolve_component): PDT strings need a hidden string length
1238 component like deferred characters.
1239 (resolve_symbol): Dummy PDTs cannot have deferred parameters.
1240 * symbol.c (gfc_add_kind, gfc_add_len): New functions.
1241 (free_components): Free 'kind_expr' and 'param_list' fields.
1242 (gfc_free_symbol): Free the 'param_list' field.
1243 (gfc_find_sym_tree): If the current state is a PDT template,
1244 look for the symtree in the f2k_derived namspaces.
1245 trans-array.c (structure_alloc_comps): Allocate and deallocate
1246 PDTs. Check dummy arguments for compliance of LEN parameters.
1247 Add the new functions to the preceeding enum.
1248 (gfc_allocate_pdt_comp, gfc_deallocate_pdt_comp and
1249 gfc_check_pdt_dummy): New functions calling above.
1250 * trans-array.h : Add prototypes for these functions.
1251 trans-decl.c (gfc_get_symbol_decl): Call gfc_defer_symbol_init
1252 as appropriate for PDT symbols.
1253 (gfc_trans_deferred_vars): Allocate/deallocate PDT entities as
1254 they come into and out of scope. Exclude pdt_types from being
1255 'gcc_unreachable'.
1256 (gfc_trans_subcomponent_assign): PDT array components must be
1257 handles as if they are allocatable.
1258 * trans-stmt.c (gfc_trans_allocate): Handle initialization of
1259 PDT entities.
1260 (gfc_trans_deallocate): Likewise.
1261 * trans-types.c (gfc_get_derived_type): PDT templates must not
1262 arrive here. PDT string components are handles as if deferred.
1263 Similarly, PDT arrays are treated as if allocatable. PDT
1264 strings are pointer types.
1265 * trans.c (gfc_deferred_strlen): Handle PDT strings in the same
1266 way as deferred characters.
1267
1268 2017-09-01 Jakub Jelinek <jakub@redhat.com>
1269
1270 PR c/81887
1271 * parse.c (decode_omp_directive): Use matchs instead of matcho for
1272 end ordered and ordered directives, except for ordered depend. For
1273 -fopenmp-simd and ordered depend, reject the stmt.
1274 * trans-openmp.c (gfc_trans_omp_ordered): For -fopenmp-simd ignore
1275 threads clause and if simd clause isn't present, just translate the
1276 body.
1277
1278 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1279 Alan Hayward <alan.hayward@arm.com>
1280 David Sherwood <david.sherwood@arm.com>
1281
1282 * trans-types.c (gfc_init_kinds): Use opt_scalar_int_mode for
1283 the mode iterator.
1284
1285 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1286 Alan Hayward <alan.hayward@arm.com>
1287 David Sherwood <david.sherwood@arm.com>
1288
1289 * target-memory.c (size_integer): Use SCALAR_INT_TYPE_MODE.
1290 (size_logical): Likewise.
1291
1292 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1293 Alan Hayward <alan.hayward@arm.com>
1294 David Sherwood <david.sherwood@arm.com>
1295
1296 * trans-types.c (gfc_type_for_mode): Use is_a <scalar_int_mode>.
1297
1298 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1299 Alan Hayward <alan.hayward@arm.com>
1300 David Sherwood <david.sherwood@arm.com>
1301
1302 * trans-types.c (gfc_init_kinds): Use opt_scalar_float_mode
1303 and FOR_EACH_MODE_IN_CLASS.
1304
1305 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1306 Alan Hayward <alan.hayward@arm.com>
1307 David Sherwood <david.sherwood@arm.com>
1308
1309 * target-memory.c (size_float): Use SCALAR_FLOAT_TYPE_MODE
1310 instead of TYPE_MODE.
1311
1312 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1313 Alan Hayward <alan.hayward@arm.com>
1314 David Sherwood <david.sherwood@arm.com>
1315
1316 * trans-types.c (gfc_init_kinds): Use machine_mode instead of int
1317 for "mode".
1318
1319 2017-08-28 Janus Weil <janus@gcc.gnu.org>
1320
1321 PR fortran/81770
1322 * expr.c (gfc_check_pointer_assign): Improve the check whether pointer
1323 may outlive pointer target.
1324
1325 2017-08-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1326
1327 PR fortran/81974
1328 * frontend-passes (inline_matumul_assign): Explicity
1329 set typespec for call to CONJG.
1330
1331 2017-08-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1332
1333 PR fortran/81296
1334 * trans-io.c (get_dtio_proc): Add check for format label and set
1335 formatted flag accordingly. Reorganize the code a little.
1336
1337 2017-08-16 Thomas Koenig <tkoenig@gcc.gnu.org>
1338
1339 PR fortran/81116
1340 * frontend-passes.c (realloc_string_callback): If expression is a
1341 concatenation, also check for dependency.
1342 (constant_string_length): Check for presence of symtree.
1343
1344 2017-08-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1345
1346 * gfortran.texi: Document format of unformatted sequential files.
1347
1348 2017-08-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1349
1350 * invoke.texi: Actually commit change about -Ofast.
1351
1352 2017-08-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1353
1354 PR fortran/60355
1355 * resolve.c (resolve_symbol): Adjust (and reformat)
1356 comment. Perform check if a BIND(C) is declared
1357 at module level regardless of whether it is typed
1358 implicitly or not.
1359
1360 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
1361
1362 * options.c (set_dec_flags): Only set legacy standards when value
1363 is not zero.
1364
1365 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
1366
1367 * options.c (set_dec_flags, gfc_post_options): Only set flag_d_lines
1368 with -fdec when not set by user.
1369
1370 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
1371
1372 * decl.c (attr_seen): New static variable.
1373 * decl.c (variable_decl): Match %FILL in STRUCTURE body.
1374 * gfortran.texi: Update documentation.
1375
1376 2017-08-08 Martin Liska <mliska@suse.cz>
1377
1378 * trans-types.c: Include header files.
1379
1380 2017-08-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1381
1382 PR fortran/68829
1383 PR fortran/81701
1384 * options.c: Make -Ofast honor -fmax-stack-var-size.
1385 * invoke.texi: Document change.
1386
1387 2017-08-01 Thomas König <tkoenig@gcc.gnu.org>
1388
1389 PR fortran/79312
1390 * intrisic.c (gfc_convert_type_warn): Only set typespec for
1391 empty array constructors which don't have it already.
1392
1393 2017-08-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1394
1395 PR fortran/45435
1396 * lang.opt (fc-prototypes): Add option.
1397 * gfortran.h (gfc_typespec): Add interop_kind to struct.
1398 (gfc_dump_c_prototypes): Add prototype.
1399 * decl.c (gfc_match_kind_spec): Copy symbol used for kind to typespec.
1400 * parse.c (gfc_parse_file): Call gfc_dump_prototypes.
1401 * dump-parse-tree.c (gfc_dump_c_prototypes): New function.
1402 (type_return): New enum.
1403 (get_c_type_name): New function.
1404 (write_decl): New function.
1405 (write_type): New function.
1406 (write_variable): New function.
1407 (write_proc): New function.
1408 (write_interop_decl): New function.
1409 * invoke.texi: Document -fc-prototypes.
1410
1411 2017-08-01 Dominique d'Humieres <dominiq@lps.ens.fr>
1412
1413 PR fortran/53542
1414 * expr.c (gfc_check_init_expr): Use the renamed name.
1415
1416 2017-07-31 Jakub Jelinek <jakub@redhat.com>
1417
1418 * check.c (gfc_check_num_images): Fix a pasto.
1419
1420 2017-07-29 Jakub Jelinek <jakub@redhat.com>
1421
1422 * trans-decl.c (gfc_trans_use_stmts): Pass false as new argument to
1423 the imported_module_or_decl debug hook.
1424
1425 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1426
1427 * resolve.c (find_reachable_labels): Adjust.
1428
1429 2017-07-25 Jakub Jelinek <jakub@redhat.com>
1430
1431 * ioparm.def: Use 1U << 31 instead of 1 << 31 as flags2 mask.
1432
1433 2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1434
1435 * dump-parse-tree.c (show_symbol): Show binding label if present.
1436
1437 2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1438 Mikael Morin <mikael@gcc.gnu.org>
1439
1440 PR fortran/66102
1441 * fortran/trans-array.c (gfc_conv_resolve_dependencies):
1442 Break if dependency has been found.
1443
1444 2017-07-23 Alexander Monakov <amonakov@ispras.ru>
1445
1446 * interface.c (pair_cmp): Fix gfc_symbol comparison. Adjust comment.
1447
1448 2017-07-18 Nathan Sidwell <nathan@acm.org>
1449
1450 * trans.c (gfc_build_array_ref): Use TYPE_MAX_VALUE.
1451
1452 2017-07-09 Dominique d'Humieres <dominiq@lps.ens.fr>
1453
1454 PR fortran/81341
1455 * class.c (class_array_ref_detected): Remove a redundant
1456 condition.
1457
1458 2017-07-06 Harald Anlauf <anlauf@gmx.de>
1459
1460 PR fortran/70071
1461 * array.c (gfc_ref_dimen_size): Handle bad subscript triplets.
1462
1463 2017-07-03 Dominique d'Humieres <dominiq@lps.ens.fr>
1464
1465 PR fortran/79866
1466 * resolve.c (resolve_symbol): Fix typo.
1467
1468 2017-07-03 Dominique d'Humieres <dominiq@lps.ens.fr>
1469
1470 PR fortran/79843
1471 * symbol.c (check_conflict): Add missing "conflicts".
1472
1473 2017-06-29 Cesar Philippidis <cesar@codesourcery.com>
1474
1475 PR fortran/77765
1476 * openmp.c (gfc_match_oacc_routine): Check if proc_name exist before
1477 comparing the routine name against it.
1478
1479 2017-06-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1480
1481 PR fortran/80164
1482 * trans-stmt.c (gfc_trans_call): If no code expr, use code->loc
1483 as warning/error locus.
1484
1485 2017-06-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1486
1487 PR fortran/81160
1488 * arith.c (wprecision_int_real): Set return value before
1489 mpz_clear and then return after it.
1490
1491 2017-06-15 Janus Weil <janus@gcc.gnu.org>
1492
1493 PR fortran/80983
1494 * trans-expr.c (gfc_conv_procedure_call): Deallocate the result of
1495 scalar allocatable procedure-pointer components.
1496
1497 2017-06-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1498
1499 PR fortran/80988
1500 * frontend-passes.c (traverse_io_block): Also
1501 check for variables occurring as indices multiple
1502 time in a single implied DO loop.
1503
1504 2017-06-05 Janus Weil <janus@gcc.gnu.org>
1505
1506 PR fortran/70601
1507 * trans-expr.c (gfc_conv_procedure_call): Fix detection of allocatable
1508 function results.
1509
1510 2017-06-05 Nicolas Koenig <koenigni@student.ethz.ch>
1511
1512 PR fortran/35339
1513 * frontend-passes.c (traverse_io_block): New function.
1514 (simplify_io_impl_do): New function.
1515 (optimize_namespace): Invoke gfc_code_walker with
1516 simplify_io_impl_do.
1517
1518 2017-06-02 Jakub Jelinek <jakub@redhat.com>
1519
1520 PR fortran/80918
1521 * openmp.c (resolve_omp_clauses): Fix a typo.
1522
1523 2017-05-30 David Malcolm <dmalcolm@redhat.com>
1524
1525 * error.c (gfc_format_decoder): Update for new bool and
1526 const char ** params.
1527
1528 2017-05-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1529
1530 PR fortran/37131
1531 * frontend-passes.c (check_conjg_transpose_variable):
1532 Add prototype.
1533 (has_dimen_vector_ref): Likewise
1534 (matmul_temp_args): New function. Add prototype.
1535 (optimize_namespace): Call matmul_temp_args.
1536
1537 2017-05-28 Thomas Koenig <tkoenig@gcc.gnu.org>
1538
1539 * frontend-passes.c (matmul_lhs_realloc): Correct
1540 allocation size for case A1B2.
1541
1542 2017-05-25 Thomas Koenig <tkoenig@gcc.gnu.org>
1543
1544 * dump-parse-tree.c (show_expr): Also replace
1545 with dumpfile for showing values for forgotten
1546 case.
1547
1548 2017-05-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1549
1550 * dump-parse-tree.c (show_expr): Replace stdout
1551 with dumpfile for showing values.
1552
1553 2017-05-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1554
1555 PR fortran/66094
1556 * frontend-passes.c (matrix_case): Add A2TB2.
1557 (inline_limit_check): Handle MATMUL(TRANSPOSE(A),B)
1558 (inline_matmul_assign): Likewise.
1559
1560 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1561
1562 * openmp.c (OACC_KERNELS_CLAUSES): Add "OMP_CLAUSE_NUM_GANGS",
1563 "OMP_CLAUSE_NUM_WORKERS", "OMP_CLAUSE_VECTOR_LENGTH".
1564
1565 2017-05-22 Janus Weil <janus@gcc.gnu.org>
1566
1567 PR fortran/80766
1568 * resolve.c (resolve_fl_derived): Make sure that vtype symbols are
1569 properly resolved.
1570
1571 2017-05-19 Paul Thomas <pault@gcc.gnu.org>
1572
1573 PR fortran/80333
1574 * trans-io.c (nml_get_addr_expr): If we are dealing with class
1575 type data set tmp tree to get that address.
1576 (transfer_namelist_element): Set the array spec to point to the
1577 the class data.
1578
1579 2017-05-19 David Malcolm <dmalcolm@redhat.com>
1580
1581 PR fortran/79852
1582 * bbt.c (insert): Remove trailing exclamation mark from message.
1583 * decl.c (gfc_match_final_decl): Likewise.
1584 * dump-parse-tree.c (show_expr): Likewise.
1585 * module.c (gfc_use_module): Likewise.
1586 * primary.c (build_actual_constructor): Likewise.
1587 (gfc_convert_to_structure_constructor): Likewise.
1588
1589 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1590
1591 * gfortran.h (enum gfc_omp_default_sharing): Add
1592 "OMP_DEFAULT_PRESENT".
1593 * dump-parse-tree.c (show_omp_clauses): Handle it.
1594 * openmp.c (gfc_match_omp_clauses): Likewise.
1595 * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
1596
1597 2017-05-18 Fritz Reese <fritzoreese@gmail.com>
1598
1599 PR fortran/79968
1600 * decl.c (match_attr_spec, gfc_match_automatic,
1601 gfc_match_static, gfc_match_structure_decl): Unify diagnostic
1602 errors regarding -fdec options.
1603 * io.c (match_dec_etag, match_dec_vtag, match_dec_ftag): Ditto.
1604
1605 2017-05-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1606
1607 PR fortran/80741
1608 * trans-io.c (transfer_namelist_element): Change check from
1609 NULL_TREE to null_pointer_node.
1610
1611 2017-05-17 Fritz Reese <fritzoreese@gmail.com>
1612
1613 PR fortran/80668
1614 * expr.c (component_initializer): Don't generate initializers for
1615 pointer components.
1616 * invoke.texi (-finit-derived): Document.
1617
1618 2017-05-16 Paul Thomas <pault@gcc.gnu.org>
1619
1620 PR fortran/80554
1621 * decl.c (build_sym): In a submodule allow overriding of host
1622 associated symbols from the ancestor module with a new
1623 declaration.
1624
1625 2017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>
1626
1627 PR fortran/80674
1628 * trans-stmt.c (gfc_trans_integer_select): Remove redundant condition.
1629
1630 2017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>
1631
1632 PR fortran/80752
1633 * expr.c (gfc_generate_initializer): If type conversion fails,
1634 check for error and return NULL.
1635
1636 2017-05-14 Nicolas Koenig <koenigni@student.ethz.ch>
1637
1638 PR fortran/80442
1639 * array.c (gfc_ref_dimen_size): Simplify stride
1640 expression
1641 * data.c (gfc_advance_section): Simplify start,
1642 end and stride expressions
1643 (gfc_advance_section): Simplify start and end
1644 expressions
1645 (gfc_get_section_index): Simplify start expression
1646
1647 2017-05-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1648
1649 * io.c (gfc_resolve_dt): Fix returns to bool type.
1650
1651 2017-05-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1652
1653 PR fortran/78659
1654 * io.c (dtio_procs_present): Add new function to check for DTIO
1655 procedures relative to I/O statement READ or WRITE.
1656 (gfc_resolve_dt): Add namelist checks using the new function.
1657 * resolve.c (dtio_procs_present): Remove function and related
1658 namelist checks. (resolve_fl_namelist): Add check specific to
1659 Fortran 95 restriction on namelist objects.
1660
1661 2017-05-11 Nathan Sidwell <nathan@acm.org>
1662
1663 * trans-decl.c: Include dumpfile.h not tree-dump.h,
1664
1665 2017-05-09 Janus Weil <janus@gcc.gnu.org>
1666
1667 PR fortran/79311
1668 * resolve.c (gfc_resolve_finalizers): Ensure that derived-type
1669 components have a their finalizers resolved, also if the superordinate
1670 type itself has a finalizer.
1671
1672 2017-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
1673
1674 PR fortran/79930
1675 * frontend-passes.c (matmul_to_var_expr): New function,
1676 add prototype.
1677 (matmul_to_var_code): Likewise.
1678 (optimize_namespace): Use them from gfc_code_walker.
1679
1680 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1681
1682 * cpp.c (cb_cpp_error): Replace report_diagnostic
1683 with diagnostic_report_diagnostic.
1684 * error.c (gfc_warning): Likewise.
1685 (gfc_warning_now_at): Likewise.
1686 (gfc_warning_now): Likewise.
1687 (gfc_warning_internal): Likewise.
1688 (gfc_error_now): Likewise.
1689 (gfc_fatal_error): Likewise.
1690 (gfc_error_opt): Likewise.
1691 (gfc_internal_error): Likewise.
1692
1693 2017-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1694
1695 PR fortran/37131
1696 * frontend-passes.c (inline_matmul_assign): Also check bounds
1697 for allocatable lhs and matrix-vector-multiplication.
1698
1699 2017-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1700
1701 PR fortran/80484
1702 * io.c (format_lex): Check for '/' and set token to FMT_SLASH.
1703 (check_format): Move FMT_DT checking code to data_desc section.
1704 * module.c (gfc_match_use): Include the case of INTERFACE_DTIO.
1705
1706 2017-04-22 Janus Weil <janus@gcc.gnu.org>
1707
1708 PR fortran/80121
1709 * trans-types.c (gfc_conv_procedure_call): Deallocate the components
1710 of allocatable intent(out) arguments.
1711
1712 2017-04-21 Janus Weil <janus@gcc.gnu.org>
1713
1714 PR fortran/80392
1715 * trans-types.c (gfc_get_derived_type): Prevent an infinite loop when
1716 building a derived type that includes a procedure pointer component
1717 with a polymorphic result.
1718
1719 2017-04-17 Paul Thomas <pault@gcc.gnu.org>
1720
1721 PR fortran/80440
1722 * module.c (find_symtree_for_symbol): Delete.
1723 (read_module): Remove the call to the above.
1724
1725 2017-04-14 Janus Weil <janus@gcc.gnu.org>
1726
1727 PR fortran/80361
1728 * class.c (generate_finalization_wrapper): Give the finalization wrapper
1729 the recursive attribute.
1730
1731 2017-04-10 Nicolas Koenig <koenigni@student.ethz.ch>
1732 Paul Thomas <pault@gcc.gnu.org>
1733
1734 PR fortran/69498
1735 * module.c (gfc_match_submodule): Add error
1736 if function is called in the wrong state.
1737
1738 2017-04-10 Janus Weil <janus@gcc.gnu.org>
1739
1740 PR fortran/80046
1741 * expr.c (gfc_check_pointer_assign): Check if procedure pointer
1742 components in a pointer assignment need an explicit interface.
1743
1744 2017-03-18 Nicolas Koenig <koenigni@student.ethz.ch>
1745
1746 PR fortran/69498
1747 * symbol.c (gfc_delete_symtree): If there is a period in the name, ignore
1748 everything before it.
1749
1750 2017-03-28 Janus Weil <janus@gcc.gnu.org>
1751
1752 PR fortran/78661
1753 * trans-io.c (transfer_namelist_element): Perform a polymorphic call
1754 to a DTIO procedure if necessary.
1755
1756 2017-03-25 Paul Thomas <pault@gcc.gnu.org>
1757
1758 PR fortran/80156
1759 PR fortran/79382
1760 * decl.c (access_attr_decl): Remove the error for an absent
1761 generic DTIO interface and ensure that symbol has the flavor
1762 FL_PROCEDURE.
1763
1764 2017-03-22 Dominique d'Humieres <dominiq@lps.ens.fr>
1765
1766 PR fortran/79838
1767 * module.c: Remove trailing period.
1768
1769 2017-03-22 Dominique d'Humieres <dominiq@lps.ens.fr>
1770
1771 PR fortran/79602
1772 * decl.c: Replace '%s' with %qs.
1773 * expr.c: Likewise.
1774 * interface.c: Likewise.
1775 * match.c: Likewise.
1776 * primary.c: Likewise.
1777 * resolve.c: Likewise.
1778
1779 PR fortran/79844
1780 PR fortran/80011
1781 * io.c: Remove trailing spaces.
1782 * match.c: Likewise.
1783 * openmp.c: Likewise.
1784 * resolve.c: Likewise.
1785 * trans-intrinsic.c: Likewise.
1786
1787 PR fortran/79853
1788 * expr.c: Remove a double spaces.
1789
1790 PR fortran/79859
1791 * primary.c: Remove spurious quotes around %qs.
1792
1793 2017-03-22 Thomas Koenig <tkoenig@gcc.gnu.org>
1794
1795 PR fortran/80142
1796 * frontend-passes.c (combine_array_constructor): Take
1797 location of new expression from constructor expression instead
1798 of constructor.
1799
1800 2017-03-20 Nicolas Koenig <koenigni@student.ethz.ch>
1801
1802 PR fortran/39239
1803 * symbol.c (check_conflict): Report an error if an EQUIVALENCE
1804 object is BIND(C)
1805
1806 2017-03-18 Nicolas Koenig <koenigni@student.ethz.ch>
1807
1808 PR fortran/69498
1809 * decl.c (add_hidden_procptr_result): Fixed Refs count of the
1810 created "ppr@" symbol.
1811
1812 2017-03-18 Paul Thomas <pault@gcc.gnu.org>
1813
1814 PR fortran/79676
1815 * module.c (mio_symbol_attribute): Remove reset of the flag
1816 'no_module_procedures'.
1817 (check_for_module_procedures): New function. Move declaration
1818 of 'no_module_procedures' to above it.
1819 (gfc_dump_module): Traverse namespace calling new function.
1820
1821 2017-03-18 Paul Thomas <pault@gcc.gnu.org>
1822
1823 PR fortran/71838
1824 * symbol.c (check_conflict): A dummy procedure in a submodule,
1825 module procedure is not an error.
1826 (gfc_add_flavor): Ditto.
1827
1828 2017-03-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1829
1830 PR fortran/79841
1831 * openmp.c (check_symbol_not_pointer): Adjust diagnostics.
1832
1833 2017-03-16 Jakub Jelinek <jakub@redhat.com>
1834
1835 PR fortran/80010
1836 * parse.c (gfc_ascii_statement): Use !$ACC for ST_OACC_ATOMIC
1837 and ST_OACC_END_ATOMIC, instead of !ACC.
1838 * trans-decl.c (finish_oacc_declare): Use !$ACC instead of $!ACC.
1839 * openmp.c (gfc_match_oacc_declare, gfc_match_oacc_wait,
1840 gfc_resolve_oacc_declare): Likewise.
1841
1842 PR fortran/79886
1843 * error.c (gfc_format_decoder): Rename plus argument to set_locus,
1844 remove ATTRIBUTE_UNUSED from all arguments, call default_tree_printer
1845 if not a Fortran specific spec.
1846 * trans-io.c: Include options.h.
1847 (gfc_build_st_parameter): Temporarily disable -Wpadded around layout
1848 of artificial IO data structures.
1849
1850 2017-03-15 David Malcolm <dmalcolm@redhat.com>
1851
1852 PR fortran/79860
1853 * resolve.c (resolve_contained_fntype): Make error messages more
1854 amenable to translation.
1855
1856 2017-03-06 Richard Biener <rguenther@suse.de>
1857
1858 PR fortran/79894
1859 * trans.c (gfc_add_modify_loc): Weaken assert.
1860
1861 2017-03-05 Andre Vehreschild <vehre@gcc.gnu.org>,
1862 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
1863
1864 * check.c (positive_check): Add new function checking constant for
1865 being greater then zero.
1866 (gfc_check_image_status): Add checking of image_status arguments.
1867 (gfc_check_failed_or_stopped_images): Same but for failed_- and
1868 stopped_images function.
1869 * dump-parse-tree.c (show_code_node): Added output of FAIL IMAGE.
1870 * gfortran.h (enum gfc_statement): Added FAIL_IMAGE_ST.
1871 (enum gfc_isym_id): Added new intrinsic symbols.
1872 (enum gfc_exec_op): Added EXEC_FAIL_IMAGE.
1873 * gfortran.texi: Added description for the new API functions. Updated
1874 coverage of gfortran of TS18508.
1875 * intrinsic.c (add_functions): Added symbols to resolve new intrinsic
1876 functions.
1877 * intrinsic.h: Added prototypes.
1878 * iresolve.c (gfc_resolve_failed_images): Resolve the failed_images
1879 intrinsic.
1880 (gfc_resolve_image_status): Same for image_status.
1881 (gfc_resolve_stopped_images): Same for stopped_images.
1882 * libgfortran.h: Added prototypes.
1883 * match.c (gfc_match_if): Added matching of FAIL IMAGE statement.
1884 (gfc_match_fail_image): Match a FAIL IMAGE statement.
1885 * match.h: Added prototype.
1886 * parse.c (decode_statement): Added matching for FAIL IMAGE.
1887 (next_statement): Same.
1888 (gfc_ascii_statement): Same.
1889 * resolve.c: Same.
1890 * simplify.c (gfc_simplify_failed_or_stopped_images): For COARRAY=
1891 single a constant result can be returne.d
1892 (gfc_simplify_image_status): For COARRAY=single the result is constant.
1893 * st.c (gfc_free_statement): Added FAIL_IMAGE handling.
1894 * trans-decl.c (gfc_build_builtin_function_decls): Added decls of the
1895 new intrinsics.
1896 * trans-expr.c (gfc_conv_procedure_call): This is first time all
1897 arguments of a function are optional, which is now handled here
1898 correctly.
1899 * trans-intrinsic.c (conv_intrinsic_image_status): Translate
1900 image_status.
1901 (gfc_conv_intrinsic_function): Add support for image_status.
1902 (gfc_is_intrinsic_libcall): Add support for the remaining new
1903 intrinsics.
1904 * trans-stmt.c (gfc_trans_fail_image): Trans a fail image.
1905 * trans-stmt.h: Add the prototype for the above.
1906 * trans.c (trans_code): Dispatch for fail_image.
1907 * trans.h: Add the trees for the new intrinsics.
1908
1909 2017-03-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1910
1911 PR fortran/79841
1912 * openmp.c (check_symbol_not_pointer): Adjust diagnostic.
1913
1914 2017-02-28 Paul Thomas <pault@gcc.gnu.org>
1915
1916 PR fortran/79739
1917 * resolve.c (resolve_fl_procedure): Deal with the case where
1918 'submodule_name' is NULL so that gfc_error does not ICE.
1919 Reformat the error message to make it more consistent.
1920
1921 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1922
1923 * parse.c (parse_critical_block): Use cond ? G_("...") : G_("...")
1924 instead of just cond ? "..." : "...".
1925 * scanner.c (gfc_next_char_literal): Likewise.
1926 * match.c (match_exit_cycle): Likewise.
1927
1928 2017-02-26 Thomas Koenig <tkoenig@gcc.gnu.org>
1929
1930 PR fortran/51119
1931 * options.c (gfc_post_options): Set default limit for matmul
1932 inlining to 30.
1933 * invoke.texi: Document change.
1934
1935 2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
1936
1937 PR fortran/79601
1938 * interface.c (check_dtio_arg_TKR_intent): Change 'intent'
1939 to 'INTENT'.
1940
1941 2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
1942
1943 PR fortran/79597
1944 * interface.c (gfc_match_end_interface): Remove spurious comma
1945 and space, replace 'got %s' with 'got %qs'.
1946
1947 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1948
1949 PR fortran/79599
1950 * interface.c (check_dtio_arg_TKR_intent): Supply 'must'
1951 missing from error message.
1952
1953 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1954
1955 PR fortran/79523
1956 * interface.c (gfc_find_typebound_dtio_proc): Guard test for
1957 flavor attribute by checking that symbol is resolved.
1958
1959 2017-02-16 Paul Thomas <pault@gcc.gnu.org>
1960
1961 PR fortran/79382
1962 * decl.c (access_attr_decl): Test for presence of generic DTIO
1963 interface and emit error if not present.
1964
1965 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1966
1967 PR fortran/79434
1968 * parse.c (check_component, parse_union): Whitespace.
1969 (set_syms_host_assoc): For a derived type, check if the module
1970 in which it was declared is one of the submodule ancestors. If
1971 it is, make the components public. Otherwise, reset attribute
1972 'host_assoc' and set 'use-assoc' so that encapsulation is
1973 preserved.
1974
1975 2017-02-19 Paul Thomas <pault@gcc.gnu.org>
1976
1977 PR fortran/79447
1978 * decl.c (gfc_set_constant_character_len): Whitespace.
1979 (gfc_match_end): Catch case where a procedure is contained in
1980 a module procedure and ensure that 'end procedure' is the
1981 correct termination.
1982
1983 2017-02-19 Paul Thomas <pault@gcc.gnu.org>
1984
1985 PR fortran/79402
1986 * resolve.c (fixup_unique_dummy): New function.
1987 (gfc_resolve_expr): Call it for dummy variables with a unique
1988 symtree name.
1989
1990 2017-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
1991
1992 PR fortran/79229
1993 * trans-expr.c (gfc_trans_assignment_1): Deref indirect refs when
1994 compiling with -fcheck=mem to check the pointer and not the data.
1995
1996 2017-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
1997
1998 PR fortran/79335
1999 * trans-array.c (duplicate_allocatable_coarray): Ensure attributes
2000 passed are properly initialized.
2001 (structure_alloc_comps): Same.
2002 * trans-expr.c (gfc_trans_structure_assign): Same.
2003
2004 2017-02-13 Jakub Jelinek <jakub@redhat.com>
2005
2006 * trans-expr.c (gfc_conv_substring): Add missing space in diagnostics.
2007
2008 2017-02-12 Thomas Koenig <tkoenig@gcc.gnu.org>
2009
2010 PR fortran/65542
2011 * intrinsic.c (gfc_intrinsic_func_interface): Return an error
2012 for -std=f95 for disallowed transformational functions in
2013 initialization expressions.
2014
2015 2017-02-09 Cesar Philippidis <cesar@codesourcery.com>
2016 Joseph Myers <joseph@codesourcery.com>
2017
2018 * openmp.c (resolve_omp_clauses): Error on directives
2019 containing both tile and collapse clauses.
2020 (resolve_oacc_loop_blocks): Represent '*' tile arguments as zero.
2021 * trans-openmp.c (gfc_trans_omp_do): Lower tiled loops like
2022 collapsed loops.
2023
2024 2017-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
2025
2026 * trans-types.c (gfc_get_int_kind_from_width_isofortranen): Choose
2027 REAL type with the widest precision if two (or more) have the same
2028 storage size.
2029
2030 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
2031
2032 PR fortran/79344
2033 * trans-stmt.c (gfc_trans_allocate): Only deallocate the components of
2034 the temporary, when a new object was created for the temporary. Not
2035 when it is just an alias to an existing object.
2036
2037 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
2038
2039 PR fortran/79335
2040 * trans-decl.c (generate_coarray_sym_init): Retrieve the symbol's
2041 attributes before using them.
2042
2043 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
2044
2045 PR fortran/78958
2046 * trans-stmt.c (gfc_trans_allocate): Add the multiplying the _len
2047 component of unlimited polymorphic objects when source-allocating.
2048
2049 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
2050
2051 PR fortran/79230
2052 * trans-array.c (structure_alloc_comps): Ignore pointer components when
2053 freeing structures.
2054
2055 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2056
2057 PR lto/79061
2058 * f95-lang.c (gfc_create_decls): Include stringpool.h.
2059 Pass main_input_filename to build_translation_unit_decl.
2060
2061 2017-01-23 Thomas Koenig <tkoenig@netcologne.de>
2062
2063 * arith.c (arith_power): If simplifying integer power expression
2064 to zero, warn if -Winteger-division is given.
2065
2066 2017-01-22 Jakub Jelinek <jakub@redhat.com>
2067
2068 PR fortran/79154
2069 * parse.c (matchs, matcho, matchds, matchdo): Replace return st;
2070 with { ret = st; goto finish; }.
2071 (decode_omp_directive): Allow declare simd, declare target and
2072 simd directives in PURE/ELEMENTAL procedures. Only call
2073 gfc_unset_implicit_pure on successful match of other procedures.
2074
2075 2017-01-21 Gerald Pfeifer <gerald@pfeifer.com>
2076
2077 * gfc-internals.texi (Symbol Versioning): Change references
2078 to www.akkadia.org to https.
2079
2080 2017-01-21 Jakub Jelinek <jakub@redhat.com>
2081
2082 * gfortran.h (gfc_extract_int): Change return type to bool. Add
2083 int argument with = 0.
2084 * decl.c (gfc_match_kind_spec): Adjust gfc_extract_int caller, pass
2085 1 as new last argument to it, don't emit gfc_error.
2086 (match_char_kind): Likewise.
2087 (gfc_match_decl_type_spec): Use gfc_get_string ("%s", x) instead of
2088 gfc_get_string (x).
2089 (gfc_match_derived_decl, match_binding_attributes): Likewise.
2090 (gfc_match_structure_decl): Don't sprintf back to name, call
2091 get_struct_decl directly with gfc_dt_upper_string (name) result.
2092 * trans-stmt.c (gfc_trans_allocate): Use gfc_get_string ("%s", x)
2093 instead of gfc_get_string (x).
2094 * module.c (gfc_dt_lower_string, gfc_dt_upper_string,
2095 gfc_match_use, gfc_match_submodule, find_true_name, mio_pool_string,
2096 mio_symtree_ref, mio_expr, mio_omp_udr_expr, load_generic_interfaces,
2097 load_omp_udrs, load_needed, read_module, dump_module,
2098 create_intrinsic_function, import_iso_c_binding_module,
2099 create_int_parameter, create_int_parameter_array, create_derived_type,
2100 use_iso_fortran_env_module): Likewise.
2101 * error.c (gfc_diagnostic_starter, gfc_diagnostic_start_span): Use
2102 pp_verbatim (context->printer, "%s", x) instead of
2103 pp_verbatim (context->printer, x).
2104 * match.c (gfc_match_small_int): Adjust gfc_extract_int caller, pass
2105 1 as new last argument to it, don't emit gfc_error.
2106 (gfc_match_small_int_expr): Likewise.
2107 * iresolve.c (gfc_get_string): Optimize format "%s" case.
2108 (resolve_bound): Use gfc_get_string ("%s", x) instead of
2109 gfc_get_string (x).
2110 (resolve_transformational): Formatting fix.
2111 (gfc_resolve_char_achar): Change name argument to bool is_achar,
2112 use a single format string and if is_achar add "a" before "char".
2113 (gfc_resolve_achar, gfc_resolve_char): Adjust callers.
2114 * expr.c (gfc_extract_int): Change return type to bool, return true
2115 if some error occurred. Add REPORT_ERROR argument, if non-zero
2116 call either gfc_error or gfc_error_now depending on its sign.
2117 * arith.c (arith_power): Adjust gfc_extract_int caller.
2118 * symbol.c (gfc_add_component): Use gfc_get_string ("%s", x) instead
2119 of gfc_get_string (x).
2120 (gfc_new_symtree, gfc_delete_symtree, gfc_get_uop, gfc_new_symbol,
2121 gfc_get_gsymbol, generate_isocbinding_symbol): Likewise.
2122 * openmp.c (gfc_match_omp_clauses): Adjust gfc_extract_int caller, pass
2123 -1 as new last argument to it, don't emit gfc_error_now.
2124 (gfc_match_omp_declare_reduction): Use gfc_get_string ("%s", x)
2125 instead of gfc_get_string (x).
2126 * check.c (kind_check): Adjust gfc_extract_int caller.
2127 * intrinsic.c (add_sym, find_sym, make_alias): Use
2128 gfc_get_string ("%s", x) instead of gfc_get_string (x).
2129 * simplify.c (get_kind, gfc_simplify_btest, gfc_simplify_maskr,
2130 gfc_simplify_maskl, gfc_simplify_poppar, gfc_simplify_repeat,
2131 gfc_simplify_selected_int_kind, gfc_simplify_selected_real_kind):
2132 Adjust gfc_extract_int callers.
2133 * trans-decl.c (gfc_find_module): Use gfc_get_string ("%s", x)
2134 instead of gfc_get_string (x).
2135 * matchexp.c (expression_syntax): Add const.
2136 * primary.c (match_kind_param, match_hollerith_constant,
2137 match_string_constant): Adjust gfc_extract_int callers.
2138 (match_keyword_arg): Use gfc_get_string ("%s", x) instead of
2139 gfc_get_string (x).
2140 * frontend-passes.c (optimize_minmaxloc): Likewise.
2141
2142 2017-01-19 Andre Vehreschild <vehre@gcc.gnu.org>
2143
2144 PR fortran/70696
2145 * trans-decl.c (gfc_build_qualified_array): Add static decl to parent
2146 function only, when the decl-context is not the translation unit.
2147
2148 2017-01-18 Louis Krupp <louis.krupp@zoho.com>
2149
2150 PR fortran/50069
2151 PR fortran/55086
2152 * trans-expr.c (gfc_conv_variable): Don't treat temporary variables
2153 as function arguments.
2154 * trans-stmt.c (forall_make_variable_temp,
2155 generate_loop_for_temp_to_lhs, gfc_trans_assign_need_temp,
2156 gfc_trans_forall_1): Don't adjust offset of forall temporary
2157 for array sections, make forall temporaries work for substring
2158 expressions, improve test coverage by adding -ftest-forall-temp
2159 option to request usage of temporary array in forall code.
2160 * lang.opt: Add -ftest-forall-temp option.
2161 * invoke.texi: Add -ftest-forall-temp option.
2162
2163 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
2164
2165 * primary.c (caf_variable_attr): Improve figuring whether the current
2166 component is the last one refed.
2167 * trans-stmt.c (gfc_trans_allocate): Do not generate sync_all calls
2168 when allocating pointer or allocatable components.
2169
2170 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
2171
2172 * gfortran.texi: Add missing parameters to caf-API functions. Correct
2173 typos and clarify some descriptions.
2174
2175 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
2176
2177 PR fortran/70696
2178 Missed some cases, here they are:
2179 * trans-decl.c (gfc_build_qualified_array): Add static tokens to the
2180 parent function's scope.
2181 * trans-expr.c (gfc_get_tree_for_caf_expr): Shorten code. Remove
2182 unnecessary assert.
2183
2184 2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org>
2185
2186 PR fortran/70697
2187 * resolve.c (resolve_lock_unlock_event): Resolve the expression for
2188 event's until_count.
2189
2190 2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org>
2191
2192 PR fortran/70696
2193 * trans-expr.c (gfc_get_tree_for_caf_expr): Ensure the backend_decl
2194 is valid before accessing it.
2195
2196 2017-01-09 Jakub Jelinek <jakub@redhat.com>
2197
2198 PR translation/79019
2199 PR translation/79020
2200 * decl.c (attr_decl1): Fix spelling in translatable string.
2201 * intrinsic.texi: Fix spelling - invokation -> invocation.
2202 * lang.opt (faggressive-function-elimination, gfc_convert): Fix
2203 typos in descriptions.
2204 * openmp.c (resolve_omp_clauses): Add missing whitespace to
2205 translatable strings.
2206
2207 2017-01-08 Martin Sebor <msebor@redhat.com>
2208
2209 PR tree-optimization/78913
2210 PR middle-end/77708
2211 * trans-common.c (build_equiv_decl): Increase buffer size to avoid
2212 truncation for any argument.
2213 * trans-types.c (gfc_build_logical_type): Same.
2214
2215 2017-01-07 Andre Vehreschild <vehre@gcc.gnu.org>
2216
2217 PR fortran/78781
2218 PR fortran/78935
2219 * expr.c (gfc_check_pointer_assign): Return the same error message for
2220 rewritten coarray pointer assignments like for plain ones.
2221 * gfortran.h: Change prototype.
2222 * primary.c (caf_variable_attr): Set attributes used ones only only
2223 ones. Add setting of pointer_comp attribute.
2224 (gfc_caf_attr): Add setting of pointer_comp attribute.
2225 * trans-array.c (gfc_array_allocate): Add flag that the component to
2226 allocate is not an ultimate coarray component. Add allocation of
2227 pointer arrays.
2228 (structure_alloc_comps): Extend nullify to treat pointer components in
2229 coarrays correctly. Restructure nullify to remove redundant code.
2230 (gfc_nullify_alloc_comp): Allow setting caf_mode flags.
2231 * trans-array.h: Change prototype of gfc_nullify_alloc_comp ().
2232 * trans-decl.c (generate_coarray_sym_init): Call nullify_alloc_comp for
2233 derived type coarrays with pointer components.
2234 * trans-expr.c (gfc_trans_structure_assign): Also treat pointer
2235 components.
2236 (trans_caf_token_assign): Handle assignment of token of scalar pointer
2237 components.
2238 (gfc_trans_pointer_assignment): Call above routine.
2239 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Add treating pointer
2240 components.
2241 (gfc_conv_intrinsic_caf_get): Likewise.
2242 (conv_caf_send): Likewise.
2243 * trans-stmt.c (gfc_trans_allocate): After allocating a derived type in
2244 a coarray pre-register the tokens.
2245 (gfc_trans_deallocate): Simply determining the coarray type (scalar or
2246 array) and deregistering it correctly.
2247 * trans-types.c (gfc_typenode_for_spec): Replace in_coarray flag by the
2248 actual codim to allow lookup of array types in the cache.
2249 (gfc_build_array_type): Likewise.
2250 (gfc_get_array_descriptor_base): Likewise.
2251 (gfc_get_array_type_bounds): Likewise.
2252 (gfc_get_derived_type): Likewise.
2253 * trans-types.h: Likewise.
2254 * trans.c (gfc_deallocate_with_status): Enable deregistering of all kind
2255 of coarray components.
2256 (gfc_deallocate_scalar_with_status): Use free() in fcoarray_single mode
2257 instead of caf_deregister.
2258
2259 2017-01-06 Jakub Jelinek <jakub@redhat.com>
2260
2261 * simplify.c (simplify_transformation_to_array): Use
2262 GCC_DIAGNOSTIC_PUSH_IGNORED and GCC_DIAGNOSTIC_POP instead of
2263 #pragma GCC diagnostic {push,ignored,pop}.
2264
2265 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
2266
2267 * simplify.c (simplify_transformation_to_array): Silence
2268 array bounds warning. Fix whitespace.
2269
2270 2017-01-04 Alexandre Oliva <aoliva@redhat.com>
2271
2272 * module.c (load_omp_udrs): Initialize name.
2273
2274 2017-01-02 Janne Blomqvist <jb@gcc.gnu.org>
2275
2276 PR fortran/78534
2277 * trans-expr.c (gfc_trans_string_copy): Rework string copy
2278 algorithm to avoid -Wstringop-overflow warning.
2279
2280 2017-01-01 Jakub Jelinek <jakub@redhat.com>
2281
2282 Update copyright years.
2283
2284 * gfortranspec.c (lang_specific_driver): Update copyright notice
2285 dates.
2286 * gfc-internals.texi: Bump @copying's copyright year.
2287 * gfortran.texi: Ditto.
2288 * intrinsic.texi: Ditto.
2289 * invoke.texi: Ditto.
2290
2291 Copyright (C) 2017 Free Software Foundation, Inc.
2292
2293 Copying and distribution of this file, with or without modification,
2294 are permitted in any medium without royalty provided the copyright
2295 notice and this notice are preserved.