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