1 2017-12-17 Janne Blomqvist <jb@gcc.gnu.org>
3 * decl.c (gfc_match_implicit_none): Use GFC_STD_F2018 instead of
5 * error.c (gfc_notify_std): Add GFC_STD_F2018{_DEL,_OBS} to
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
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.
19 2017-12-15 Jakub Jelinek <jakub@redhat.com>
21 * f95-lang.c (gfc_attribute_table): Swap affects_type_identity
22 and handler fields, adjust comments.
24 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
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.
33 2017-12-12 Thomas Koenig <tkoenig@gcc.gnu.org>
35 * intrinsic.texi (MAXLOC): Remove double description
39 2017-12-11 Thomas Koenig <tkoenig@gcc.gnu.org>
41 * intrinsic.texi (MAXLOC): Update documentation for
42 character arrays and KIND argument.
45 2017-12-11 Thomas Koenig <tkoenig@gcc.gnu.org>
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.
57 2017-12-10 Dominique d'Humieres <dominiq@lps.ens.fr>
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.
66 2017-12-09 Steven G. Kargl <kargl@gcc.gnu.org>
70 * match.c (gfc_match_allocate): Enforce F2008:C631.
72 2017-12-09 Thomas Koenig <tkoenig@gcc.gnu.org>
75 * arith.c (gfc_character2character): New function.
76 * arith.h: Add prototype.
77 * simplify.c (gfc_convert_constant): Handle character type.
79 2017-12-07 Martin Sebor <msebor@redhat.com>
82 * f95-lang.c (gfc_attribute_table): Initialize new member of struct
85 2017-12-03 Thomas Koenig <tkoenig@gcc.gnu.org>
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):
95 (gfc_conv_intrinsic_minmaxval): Resort arguments and call library
96 function if dealing with a character function.
98 2017-12-01 Qing Zhao <qing.zhao@oracle.com>
100 * decl.c (gfc_get_pdt_instance): Adjust the call to sprintf
101 to avoid the same buffer being both source and destination.
103 2017-12-01 Thomas Koenig <tkoenig@gcc.gnu.org>
106 * frontend-passes.c (create_var): Also handle
107 character arrays, handling deferred lenghts.
109 2017-12-01 Paul Thomas <pault@gcc.gnu.org>
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
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.
126 * trans-array.c (set_loop_bounds): If a GFC_SS_COMPONENT has an
127 info->end, use it rather than falling through to
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
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
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
151 (gfc_match_derived_decl): On reading a PDT parameter list, on
152 failure to match call gfc_error_recovery.
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.
162 2017-12-01 Jakub Jelinek <jakub@redhat.com>
165 * match.c (gfc_match): Add FALLTHRU comment to avoid
166 -Wimplicit-fallthrough warning.
168 2017-12-01 Thomas Koenig <tkoenig@gcc.gnu.org>
171 * frontend-passes.c (realloc_string_callback): Handle
172 case for which the RHS is an array expression.
174 2017-11-28 Janne Blomqvist <jb@gcc.gnu.org>
177 * gfortran.texi: Remove mentions of GFORTRAN_DEFAULT_RECL.
179 2017-11-28 Paul Thomas <pault@gcc.gnu.org>
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.
186 2017-11-28 Jakub Jelinek <jakub@redhat.com>
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):
194 2017-11-24 Jakub Jelinek <jakub@redhat.com>
197 * trans-openmp.c (gfc_trans_omp_array_reduction_or_udr): Set
198 attr.implicit_type in intrinsic_sym to avoid undesirable warning.
200 2017-11-23 Dirk Broemmel <d.broemmel@fz-juelich.de>
201 Jakub Jelinek <jakub@redhat.com>
204 * parse.c (parse_spec): Allow ST_OMP_THREADPRIVATE inside of
207 2017-11-23 Mike Stump <mikestump@comcast.net>
208 Eric Botcazou <ebotcazou@adacore.com>
210 * trans-stmt.c (gfc_trans_forall_loop): Pass 3rd operand to
213 2017-11-23 Paul Thomas <pault@gcc.gnu.org>
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.
220 2017-11-22 David Malcolm <dmalcolm@redhat.com>
223 * error.c (gfc_notify_std): Convert "quoted" param from bool to
226 2017-11-22 Thomas Koenig <tkoenig@gcc.gnu.org>
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.
237 2017-11-22 Paul Thomas <pault@gcc.gnu.org>
240 * trans-stmt.c (trans_associate_var): Weaken the over strong
241 condition for using the fake result decl.
243 2017-11-20 Paul Thomas <pault@gcc.gnu.org>
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.
252 2017-11-19 Paul Thomas <pault@gcc.gnu.org>
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
261 (build_class_array_ref): Change assertion into a condition.
262 (build_class_array_ref): Set the se class_vptr for class array
264 (gfc_walk_function_expr): Reference gfc_is_class_array_function
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
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
273 (gfc_conv_subref_array_arg): Rename reference to the above
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
280 * trans-intrinsic.c (gfc_conv_intrinsic_size): Ditto.
282 2017-11-18 Janne Blomqvist <jb@gcc.gnu.org>
285 * ioparm.def (IOPARM): Make nextrec a pintio.
287 2017-11-18 Janne Blomqvist <jb@gcc.gnu.org>
290 * ioparm.def (IOPARM): Make recl_in intio, and recl_out pintio.
292 2017-11-18 Thomas Koenig <tkoenig@gcc.gnu.org>
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
299 2017-11-17 Richard Biener <rguenther@suse.de>
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.
306 2017-11-15 Martin Liska <mliska@suse.cz>
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.
315 2017-11-13 Fritz Reese <fritzoreese@gmail.com>
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
323 2017-11-11 Janus Weil <janus@gcc.gnu.org>
326 * resolve.c (update_compcall_arglist): Improve error recovery,
329 2017-11-10 Fritz Reese <fritzoreese@gmail.com>
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).
339 2017-11-10 Martin Sebor <msebor@redhat.com>
342 * gcc/fortran/decl.c (build_sym): Use strcpy instead of strncpy.
344 2017-11-10 Paul Thomas <pault@gcc.gnu.org>
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;
351 2017-11-09 Paul Thomas <pault@gcc.gnu.org>
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
360 2017-11-09 Steven G. Kargl <kargl@gcc.gnu.org>
363 * interface.c (symbol_rank): Check for NULL pointer.
365 2017-11-08 Steven G. Kargl <kargl@kgcc.gnu.org>
368 * simplify.c(gfc_simplify_transfer): Do not dereference a NULL pointer.
371 2017-11-08 Steven G. Kargl <kargl@gcc.gnu.org>
374 * arith.c (gfc_hollerith2character): Clear pad.
376 2017-11-08 Janne Blomqvist <jb@gcc.gnu.org>
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
499 2017-11-06 Paul Thomas <pault@gcc.gnu.org>
502 * trans-expr.c (gfc_map_intrinsic_function): Return false for
503 bounds without the DIM argument instead of ICEing.
505 2017-11-06 Martin Liska <mliska@suse.cz>
508 * options.c (gfc_post_options): Set default value of
509 -Wreturn-type to false.
511 2017-11-05 Thomas Koenig <tkoenig@gcc.gnu.org>
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.
527 2017-11-05 Paul Thomas <pault@gcc.gnu.org>
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.
536 2017-11-05 Paul Thomas <pault@gcc.gnu.org>
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.
546 2017-11-05 Tom de Vries <tom@codesourcery.com>
549 * parse.c (match, matcha, matchs, matcho, matchds, matchdo): Remove
550 semicolon after "do {} while (0)".
552 2017-11-04 Andre Vehreschild <vehre@gcc.gnu.org>
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
558 * trans.c (get_array_span): Take the character kind into account when
559 doing pointer arithmetic.
561 2017-11-04 Thomas Koenig <tkoenig@gcc.gnu.org>
564 * gfortran.h (gfc_check_f): Replace fm3l with fm4l.
565 * intrinsic.h (gfc_resolve_maxloc): Add gfc_expr * to argument
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.
579 2017-11-04 Paul Thomas <pault@gcc.gnu.org>
582 * trans-decl.c (gfc_trans_deferred_vars): Do a better job of a
583 case where 'tmp' was used unititialized and remove TODO.
585 2017-11-03 Steven G. Kargl <kargl@gcc.gnu.org>
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.
592 2017-10-31 Jim Wilson <wilson@tuliptree.org>
594 * parse.c (unexpected_eof): Call gcc_unreachable before return.
596 2017-10-30 Paul Thomas <pault@gcc.gnu.org>
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
605 2017-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
607 * resolve.c (resolve_transfer): Set derived to correct symbol for
610 2017-10-29 Jim Wilson <wilson@tuliptree.org>
612 * invoke.texi: Delete adb and sdb references.
614 2017-10-28 Andre Vehreschild <vehre@gcc.gnu.org>
616 * check.c (gfc_check_co_reduce): Clarify error message.
618 2017-10-28 Paul Thomas <pault@gcc.gnu.org>
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
625 2017-10-27 Steven G. Kargl <kargl@gcc.gnu.org>
628 * match.c (gfc_match_allocate): Exit early on syntax error.
630 2017-10-27 Thomas Koenig <tkoenig@gcc.gnu.org>
633 * simplify.c (is_constant_array_expr): If the expression is
634 a parameter array, call gfc_simplify_expr.
636 2017-10-25 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
638 * match.c (gfc_match_type_is): Fix typo in error message.
640 2017-10-21 Paul Thomas <pault@gcc.gnu.org>
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.
655 * resolve.c (resolve_generic_f): Check that the derived type
656 can be used before resolving the struture constructor.
659 * symbol.c (check_conflict): Add the conflicts involving PDT
660 KIND and LEN attributes.
662 2017-10-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
664 * interface.c (check_sym_interfaces, check_uop_interfaces,
665 gfc_check_interfaces): Base interface_name buffer off
668 2017-10-19 Jakub Jelinek <jakub@redhat.com>
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
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.
686 2017-10-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
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.
711 2017-10-18 Thomas Koenig <tkoenig@gcc.gnu.org>
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
719 2017-10-18 Thomas Koenig <tkoenig@gcc.gnu.org>
722 * resolve.c (resovle_symbol): Change gcc_assert to
723 sensible error message.
725 2017-10-18 Paul Thomas <pault@gcc.gnu.org>
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'.
732 2017-10-16 Fritz Reese <fritzoreese@gmail.com>
735 * trans-io.c (transfer_expr): Treat BT_UNION as BT_DERIVED.
737 2017-10-15 Thomas Koenig <tkoenig@gcc.gnu.org>
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.
745 2017-10-13 Paul Thomas <pault@gcc.gnu.org>
748 * resolve.c (resolve_symbol): Ensure that derived type array
749 results get default initialization.
751 2017-10-11 Nathan Sidwell <nathan@acm.org>
753 * cpp.c (gfc_cpp_add_include_path): Update incpath_e names.
754 (gfc_cpp_add_include_path_after): Likewise.
756 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
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.
766 2017-10-08 Steven G. Kargl <kargl@gcc.gnu.org>
768 * check.c (gfc_check_x): Remove function.
769 * intrinsic.c (add_functions): Use gfc_check_fn_r.
771 2017-10-08 Paul Thomas <pault@gcc.gnu.org>
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.
779 2017-10-08 Thomas Koenig <tkoenig@gcc.gnu.org>
781 * dump_prase_tree (show_symbol): Output list of variables in
783 (show_code_node): Add new line for ELSE and END DO for DO
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.
789 2017-10-07 Paul Thomas <pault@gcc.gnu.org>
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
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
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
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.
824 2017-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
827 * expr.c (gfc_check_pointer_assign): Error
828 for non-contiguous rhs.
830 2017-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
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
837 (check_io_constraints): If this is for an asynchronous I/O
838 statement, set async_io_dt and set the asynchronous flag for
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.
845 2017-10-04 Paul Thomas <pault@gcc.gnu.org>
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.
861 2017-10-03 Thomas Koenig <tkoenig@gcc.gnu.org>
863 * io.c (match_wait_element): Correctly match END and EOR tags.
864 * dump-parse-tree.c (show_code_node): Handle EXEC_WAIT.
866 2017-10-02 Paul Thomas <pault@gcc.gnu.org>
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.
877 2017-10-01 Dominique d'Humieres <dominiq@lps.ens.fr>
880 * parse.c (gfc_global_used): Replace the gfc_internal_error
883 2017-09-29 Dominique d'Humieres <dominiq@lps.ens.fr>
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.
890 2017-09-27 Thomas Schwinge <thomas@codesourcery.com>
892 * lang.opt <Wdo-subscript>: End help text with a period.
894 2017-09-26 Thomas Koenig <tkoenig@gcc.gnu.org>
896 * frontend-passes.c (do_subscript): Don't do anything
897 if inside an associate list.
899 2017-09-25 Thomas Koenig <tkoenig@gcc.gnu.org>
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
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.
921 2017-09-25 Janne Blomqvist <jb@gcc.gnu.org>
923 * trans.c (gfc_unlikely): Remove unnecessary fold_convert.
924 (gfc_likely): Likewise.
926 2017-09-24 Thomas Koenig <tkoenig@gcc.gnu.org>
927 Steven G. Kargl <kargl@gcc.gnu.org>
930 * expr.c (gfc_get_full_arrayspec_from_expr): If there is
931 no symtree, set array spec to NULL.
933 2017-09-23 Janus Weil <janus@gcc.gnu.org>
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.
944 2017-09-21 Paul Thomas <pault@gcc.gnu.org>
947 * match.c (gfc_match_associate): Before failing the association
948 try again, allowing a proc pointer selector.
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.
963 * resolve.c (resolve_assoc_var): Selector must cannot be the
964 NULL expression and it must have a type.
967 * resolve.c (resolve_symbol): Allow associate names to be
970 2017-09-21 Cesar Philippidis <cesar@codesourcery.com>
972 * openmp.c (gfc_match_oacc_wait): Don't restrict wait directive
973 arguments to constant integers.
975 2017-09-17 Paul Thomas <pault@gcc.gnu.org>
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.
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.
989 2017-09-15 Paul Thomas <pault@gcc.gnu.org>
992 trans-decl.c (gfc_trans_deferred_vars): Do not null the 'span'
993 field if the symbol is either implicitly or explicitly saved.
995 2017-09-13 Paul Thomas <pault@gcc.gnu.org>
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.
1004 2017-09-12 Paul Thomas <pault@gcc.gnu.org>
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
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
1024 *primary.c (gfc_match_actual_arglist): Make sure that the first
1025 keyword argument is recognised when 'pdt' is set.
1027 2017-09-10 Paul Thomas <pault@gcc.gnu.org>
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
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
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
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
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
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.
1092 2017-09-09 Paul Thomas <pault@gcc.gnu.org>
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
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
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
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
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
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
1171 (gfc_match_structure_constructor, match_variable): Remove yet
1172 more trailing whitespace.
1173 * resolve.c (get_pdt_spec_expr, get_pdt_constructor): New
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
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
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.
1209 2017-09-01 Jakub Jelinek <jakub@redhat.com>
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
1219 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1220 Alan Hayward <alan.hayward@arm.com>
1221 David Sherwood <david.sherwood@arm.com>
1223 * trans-types.c (gfc_init_kinds): Use opt_scalar_int_mode for
1226 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1227 Alan Hayward <alan.hayward@arm.com>
1228 David Sherwood <david.sherwood@arm.com>
1230 * target-memory.c (size_integer): Use SCALAR_INT_TYPE_MODE.
1231 (size_logical): Likewise.
1233 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1234 Alan Hayward <alan.hayward@arm.com>
1235 David Sherwood <david.sherwood@arm.com>
1237 * trans-types.c (gfc_type_for_mode): Use is_a <scalar_int_mode>.
1239 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1240 Alan Hayward <alan.hayward@arm.com>
1241 David Sherwood <david.sherwood@arm.com>
1243 * trans-types.c (gfc_init_kinds): Use opt_scalar_float_mode
1244 and FOR_EACH_MODE_IN_CLASS.
1246 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1247 Alan Hayward <alan.hayward@arm.com>
1248 David Sherwood <david.sherwood@arm.com>
1250 * target-memory.c (size_float): Use SCALAR_FLOAT_TYPE_MODE
1251 instead of TYPE_MODE.
1253 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1254 Alan Hayward <alan.hayward@arm.com>
1255 David Sherwood <david.sherwood@arm.com>
1257 * trans-types.c (gfc_init_kinds): Use machine_mode instead of int
1260 2017-08-28 Janus Weil <janus@gcc.gnu.org>
1263 * expr.c (gfc_check_pointer_assign): Improve the check whether pointer
1264 may outlive pointer target.
1266 2017-08-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1269 * frontend-passes (inline_matumul_assign): Explicity
1270 set typespec for call to CONJG.
1272 2017-08-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1275 * trans-io.c (get_dtio_proc): Add check for format label and set
1276 formatted flag accordingly. Reorganize the code a little.
1278 2017-08-16 Thomas Koenig <tkoenig@gcc.gnu.org>
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.
1285 2017-08-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1287 * gfortran.texi: Document format of unformatted sequential files.
1289 2017-08-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1291 * invoke.texi: Actually commit change about -Ofast.
1293 2017-08-11 Thomas Koenig <tkoenig@gcc.gnu.org>
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
1301 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
1303 * options.c (set_dec_flags): Only set legacy standards when value
1306 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
1308 * options.c (set_dec_flags, gfc_post_options): Only set flag_d_lines
1309 with -fdec when not set by user.
1311 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
1313 * decl.c (attr_seen): New static variable.
1314 * decl.c (variable_decl): Match %FILL in STRUCTURE body.
1315 * gfortran.texi: Update documentation.
1317 2017-08-08 Martin Liska <mliska@suse.cz>
1319 * trans-types.c: Include header files.
1321 2017-08-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1325 * options.c: Make -Ofast honor -fmax-stack-var-size.
1326 * invoke.texi: Document change.
1328 2017-08-01 Thomas König <tkoenig@gcc.gnu.org>
1331 * intrisic.c (gfc_convert_type_warn): Only set typespec for
1332 empty array constructors which don't have it already.
1334 2017-08-01 Thomas Koenig <tkoenig@gcc.gnu.org>
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.
1352 2017-08-01 Dominique d'Humieres <dominiq@lps.ens.fr>
1355 * expr.c (gfc_check_init_expr): Use the renamed name.
1357 2017-07-31 Jakub Jelinek <jakub@redhat.com>
1359 * check.c (gfc_check_num_images): Fix a pasto.
1361 2017-07-29 Jakub Jelinek <jakub@redhat.com>
1363 * trans-decl.c (gfc_trans_use_stmts): Pass false as new argument to
1364 the imported_module_or_decl debug hook.
1366 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1368 * resolve.c (find_reachable_labels): Adjust.
1370 2017-07-25 Jakub Jelinek <jakub@redhat.com>
1372 * ioparm.def: Use 1U << 31 instead of 1 << 31 as flags2 mask.
1374 2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1376 * dump-parse-tree.c (show_symbol): Show binding label if present.
1378 2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1379 Mikael Morin <mikael@gcc.gnu.org>
1382 * fortran/trans-array.c (gfc_conv_resolve_dependencies):
1383 Break if dependency has been found.
1385 2017-07-23 Alexander Monakov <amonakov@ispras.ru>
1387 * interface.c (pair_cmp): Fix gfc_symbol comparison. Adjust comment.
1389 2017-07-18 Nathan Sidwell <nathan@acm.org>
1391 * trans.c (gfc_build_array_ref): Use TYPE_MAX_VALUE.
1393 2017-07-09 Dominique d'Humieres <dominiq@lps.ens.fr>
1396 * class.c (class_array_ref_detected): Remove a redundant
1399 2017-07-06 Harald Anlauf <anlauf@gmx.de>
1402 * array.c (gfc_ref_dimen_size): Handle bad subscript triplets.
1404 2017-07-03 Dominique d'Humieres <dominiq@lps.ens.fr>
1407 * resolve.c (resolve_symbol): Fix typo.
1409 2017-07-03 Dominique d'Humieres <dominiq@lps.ens.fr>
1412 * symbol.c (check_conflict): Add missing "conflicts".
1414 2017-06-29 Cesar Philippidis <cesar@codesourcery.com>
1417 * openmp.c (gfc_match_oacc_routine): Check if proc_name exist before
1418 comparing the routine name against it.
1420 2017-06-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1423 * trans-stmt.c (gfc_trans_call): If no code expr, use code->loc
1424 as warning/error locus.
1426 2017-06-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1429 * arith.c (wprecision_int_real): Set return value before
1430 mpz_clear and then return after it.
1432 2017-06-15 Janus Weil <janus@gcc.gnu.org>
1435 * trans-expr.c (gfc_conv_procedure_call): Deallocate the result of
1436 scalar allocatable procedure-pointer components.
1438 2017-06-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1441 * frontend-passes.c (traverse_io_block): Also
1442 check for variables occurring as indices multiple
1443 time in a single implied DO loop.
1445 2017-06-05 Janus Weil <janus@gcc.gnu.org>
1448 * trans-expr.c (gfc_conv_procedure_call): Fix detection of allocatable
1451 2017-06-05 Nicolas Koenig <koenigni@student.ethz.ch>
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.
1459 2017-06-02 Jakub Jelinek <jakub@redhat.com>
1462 * openmp.c (resolve_omp_clauses): Fix a typo.
1464 2017-05-30 David Malcolm <dmalcolm@redhat.com>
1466 * error.c (gfc_format_decoder): Update for new bool and
1467 const char ** params.
1469 2017-05-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1472 * frontend-passes.c (check_conjg_transpose_variable):
1474 (has_dimen_vector_ref): Likewise
1475 (matmul_temp_args): New function. Add prototype.
1476 (optimize_namespace): Call matmul_temp_args.
1478 2017-05-28 Thomas Koenig <tkoenig@gcc.gnu.org>
1480 * frontend-passes.c (matmul_lhs_realloc): Correct
1481 allocation size for case A1B2.
1483 2017-05-25 Thomas Koenig <tkoenig@gcc.gnu.org>
1485 * dump-parse-tree.c (show_expr): Also replace
1486 with dumpfile for showing values for forgotten
1489 2017-05-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1491 * dump-parse-tree.c (show_expr): Replace stdout
1492 with dumpfile for showing values.
1494 2017-05-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1497 * frontend-passes.c (matrix_case): Add A2TB2.
1498 (inline_limit_check): Handle MATMUL(TRANSPOSE(A),B)
1499 (inline_matmul_assign): Likewise.
1501 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1503 * openmp.c (OACC_KERNELS_CLAUSES): Add "OMP_CLAUSE_NUM_GANGS",
1504 "OMP_CLAUSE_NUM_WORKERS", "OMP_CLAUSE_VECTOR_LENGTH".
1506 2017-05-22 Janus Weil <janus@gcc.gnu.org>
1509 * resolve.c (resolve_fl_derived): Make sure that vtype symbols are
1512 2017-05-19 Paul Thomas <pault@gcc.gnu.org>
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
1520 2017-05-19 David Malcolm <dmalcolm@redhat.com>
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.
1530 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
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.
1538 2017-05-18 Fritz Reese <fritzoreese@gmail.com>
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.
1546 2017-05-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1549 * trans-io.c (transfer_namelist_element): Change check from
1550 NULL_TREE to null_pointer_node.
1552 2017-05-17 Fritz Reese <fritzoreese@gmail.com>
1555 * expr.c (component_initializer): Don't generate initializers for
1557 * invoke.texi (-finit-derived): Document.
1559 2017-05-16 Paul Thomas <pault@gcc.gnu.org>
1562 * decl.c (build_sym): In a submodule allow overriding of host
1563 associated symbols from the ancestor module with a new
1566 2017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>
1569 * trans-stmt.c (gfc_trans_integer_select): Remove redundant condition.
1571 2017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>
1574 * expr.c (gfc_generate_initializer): If type conversion fails,
1575 check for error and return NULL.
1577 2017-05-14 Nicolas Koenig <koenigni@student.ethz.ch>
1580 * array.c (gfc_ref_dimen_size): Simplify stride
1582 * data.c (gfc_advance_section): Simplify start,
1583 end and stride expressions
1584 (gfc_advance_section): Simplify start and end
1586 (gfc_get_section_index): Simplify start expression
1588 2017-05-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1590 * io.c (gfc_resolve_dt): Fix returns to bool type.
1592 2017-05-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
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.
1602 2017-05-11 Nathan Sidwell <nathan@acm.org>
1604 * trans-decl.c: Include dumpfile.h not tree-dump.h,
1606 2017-05-09 Janus Weil <janus@gcc.gnu.org>
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.
1613 2017-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
1616 * frontend-passes.c (matmul_to_var_expr): New function,
1618 (matmul_to_var_code): Likewise.
1619 (optimize_namespace): Use them from gfc_code_walker.
1621 2017-05-05 David Malcolm <dmalcolm@redhat.com>
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.
1634 2017-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1637 * frontend-passes.c (inline_matmul_assign): Also check bounds
1638 for allocatable lhs and matrix-vector-multiplication.
1640 2017-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
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.
1647 2017-04-22 Janus Weil <janus@gcc.gnu.org>
1650 * trans-types.c (gfc_conv_procedure_call): Deallocate the components
1651 of allocatable intent(out) arguments.
1653 2017-04-21 Janus Weil <janus@gcc.gnu.org>
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.
1660 2017-04-17 Paul Thomas <pault@gcc.gnu.org>
1663 * module.c (find_symtree_for_symbol): Delete.
1664 (read_module): Remove the call to the above.
1666 2017-04-14 Janus Weil <janus@gcc.gnu.org>
1669 * class.c (generate_finalization_wrapper): Give the finalization wrapper
1670 the recursive attribute.
1672 2017-04-10 Nicolas Koenig <koenigni@student.ethz.ch>
1673 Paul Thomas <pault@gcc.gnu.org>
1676 * module.c (gfc_match_submodule): Add error
1677 if function is called in the wrong state.
1679 2017-04-10 Janus Weil <janus@gcc.gnu.org>
1682 * expr.c (gfc_check_pointer_assign): Check if procedure pointer
1683 components in a pointer assignment need an explicit interface.
1685 2017-03-18 Nicolas Koenig <koenigni@student.ethz.ch>
1688 * symbol.c (gfc_delete_symtree): If there is a period in the name, ignore
1689 everything before it.
1691 2017-03-28 Janus Weil <janus@gcc.gnu.org>
1694 * trans-io.c (transfer_namelist_element): Perform a polymorphic call
1695 to a DTIO procedure if necessary.
1697 2017-03-25 Paul Thomas <pault@gcc.gnu.org>
1701 * decl.c (access_attr_decl): Remove the error for an absent
1702 generic DTIO interface and ensure that symbol has the flavor
1705 2017-03-22 Dominique d'Humieres <dominiq@lps.ens.fr>
1708 * module.c: Remove trailing period.
1710 2017-03-22 Dominique d'Humieres <dominiq@lps.ens.fr>
1713 * decl.c: Replace '%s' with %qs.
1715 * interface.c: Likewise.
1716 * match.c: Likewise.
1717 * primary.c: Likewise.
1718 * resolve.c: Likewise.
1722 * io.c: Remove trailing spaces.
1723 * match.c: Likewise.
1724 * openmp.c: Likewise.
1725 * resolve.c: Likewise.
1726 * trans-intrinsic.c: Likewise.
1729 * expr.c: Remove a double spaces.
1732 * primary.c: Remove spurious quotes around %qs.
1734 2017-03-22 Thomas Koenig <tkoenig@gcc.gnu.org>
1737 * frontend-passes.c (combine_array_constructor): Take
1738 location of new expression from constructor expression instead
1741 2017-03-20 Nicolas Koenig <koenigni@student.ethz.ch>
1744 * symbol.c (check_conflict): Report an error if an EQUIVALENCE
1747 2017-03-18 Nicolas Koenig <koenigni@student.ethz.ch>
1750 * decl.c (add_hidden_procptr_result): Fixed Refs count of the
1751 created "ppr@" symbol.
1753 2017-03-18 Paul Thomas <pault@gcc.gnu.org>
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.
1762 2017-03-18 Paul Thomas <pault@gcc.gnu.org>
1765 * symbol.c (check_conflict): A dummy procedure in a submodule,
1766 module procedure is not an error.
1767 (gfc_add_flavor): Ditto.
1769 2017-03-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1772 * openmp.c (check_symbol_not_pointer): Adjust diagnostics.
1774 2017-03-16 Jakub Jelinek <jakub@redhat.com>
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.
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.
1791 2017-03-15 David Malcolm <dmalcolm@redhat.com>
1794 * resolve.c (resolve_contained_fntype): Make error messages more
1795 amenable to translation.
1797 2017-03-06 Richard Biener <rguenther@suse.de>
1800 * trans.c (gfc_add_modify_loc): Weaken assert.
1802 2017-03-05 Andre Vehreschild <vehre@gcc.gnu.org>,
1803 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
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
1818 * intrinsic.h: Added prototypes.
1819 * iresolve.c (gfc_resolve_failed_images): Resolve the failed_images
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.
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
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
1840 * trans-intrinsic.c (conv_intrinsic_image_status): Translate
1842 (gfc_conv_intrinsic_function): Add support for image_status.
1843 (gfc_is_intrinsic_libcall): Add support for the remaining new
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.
1850 2017-03-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1853 * openmp.c (check_symbol_not_pointer): Adjust diagnostic.
1855 2017-02-28 Paul Thomas <pault@gcc.gnu.org>
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.
1862 2017-02-28 Jakub Jelinek <jakub@redhat.com>
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.
1869 2017-02-26 Thomas Koenig <tkoenig@gcc.gnu.org>
1872 * options.c (gfc_post_options): Set default limit for matmul
1874 * invoke.texi: Document change.
1876 2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
1879 * interface.c (check_dtio_arg_TKR_intent): Change 'intent'
1882 2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
1885 * interface.c (gfc_match_end_interface): Remove spurious comma
1886 and space, replace 'got %s' with 'got %qs'.
1888 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1891 * interface.c (check_dtio_arg_TKR_intent): Supply 'must'
1892 missing from error message.
1894 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1897 * interface.c (gfc_find_typebound_dtio_proc): Guard test for
1898 flavor attribute by checking that symbol is resolved.
1900 2017-02-16 Paul Thomas <pault@gcc.gnu.org>
1903 * decl.c (access_attr_decl): Test for presence of generic DTIO
1904 interface and emit error if not present.
1906 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
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
1916 2017-02-19 Paul Thomas <pault@gcc.gnu.org>
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.
1924 2017-02-19 Paul Thomas <pault@gcc.gnu.org>
1927 * resolve.c (fixup_unique_dummy): New function.
1928 (gfc_resolve_expr): Call it for dummy variables with a unique
1931 2017-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
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.
1937 2017-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
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.
1945 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1947 * trans-expr.c (gfc_conv_substring): Add missing space in diagnostics.
1949 2017-02-12 Thomas Koenig <tkoenig@gcc.gnu.org>
1952 * intrinsic.c (gfc_intrinsic_func_interface): Return an error
1953 for -std=f95 for disallowed transformational functions in
1954 initialization expressions.
1956 2017-02-09 Cesar Philippidis <cesar@codesourcery.com>
1957 Joseph Myers <joseph@codesourcery.com>
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
1965 2017-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
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
1971 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
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.
1978 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1981 * trans-decl.c (generate_coarray_sym_init): Retrieve the symbol's
1982 attributes before using them.
1984 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1987 * trans-stmt.c (gfc_trans_allocate): Add the multiplying the _len
1988 component of unlimited polymorphic objects when source-allocating.
1990 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1993 * trans-array.c (structure_alloc_comps): Ignore pointer components when
1996 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1999 * f95-lang.c (gfc_create_decls): Include stringpool.h.
2000 Pass main_input_filename to build_translation_unit_decl.
2002 2017-01-23 Thomas Koenig <tkoenig@netcologne.de>
2004 * arith.c (arith_power): If simplifying integer power expression
2005 to zero, warn if -Winteger-division is given.
2007 2017-01-22 Jakub Jelinek <jakub@redhat.com>
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.
2016 2017-01-21 Gerald Pfeifer <gerald@pfeifer.com>
2018 * gfc-internals.texi (Symbol Versioning): Change references
2019 to www.akkadia.org to https.
2021 2017-01-21 Jakub Jelinek <jakub@redhat.com>
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
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
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
2081 * frontend-passes.c (optimize_minmaxloc): Likewise.
2083 2017-01-19 Andre Vehreschild <vehre@gcc.gnu.org>
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.
2089 2017-01-18 Louis Krupp <louis.krupp@zoho.com>
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.
2104 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
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.
2111 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
2113 * gfortran.texi: Add missing parameters to caf-API functions. Correct
2114 typos and clarify some descriptions.
2116 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
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
2125 2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org>
2128 * resolve.c (resolve_lock_unlock_event): Resolve the expression for
2129 event's until_count.
2131 2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org>
2134 * trans-expr.c (gfc_get_tree_for_caf_expr): Ensure the backend_decl
2135 is valid before accessing it.
2137 2017-01-09 Jakub Jelinek <jakub@redhat.com>
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.
2148 2017-01-08 Martin Sebor <msebor@redhat.com>
2150 PR tree-optimization/78913
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.
2156 2017-01-07 Andre Vehreschild <vehre@gcc.gnu.org>
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
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
2177 (trans_caf_token_assign): Handle assignment of token of scalar pointer
2179 (gfc_trans_pointer_assignment): Call above routine.
2180 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Add treating pointer
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.
2200 2017-01-06 Jakub Jelinek <jakub@redhat.com>
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}.
2206 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
2208 * simplify.c (simplify_transformation_to_array): Silence
2209 array bounds warning. Fix whitespace.
2211 2017-01-04 Alexandre Oliva <aoliva@redhat.com>
2213 * module.c (load_omp_udrs): Initialize name.
2215 2017-01-02 Janne Blomqvist <jb@gcc.gnu.org>
2218 * trans-expr.c (gfc_trans_string_copy): Rework string copy
2219 algorithm to avoid -Wstringop-overflow warning.
2221 2017-01-01 Jakub Jelinek <jakub@redhat.com>
2223 Update copyright years.
2225 * gfortranspec.c (lang_specific_driver): Update copyright notice
2227 * gfc-internals.texi: Bump @copying's copyright year.
2228 * gfortran.texi: Ditto.
2229 * intrinsic.texi: Ditto.
2230 * invoke.texi: Ditto.
2232 Copyright (C) 2017 Free Software Foundation, Inc.
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.