1 2017-12-22 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2 Eric Botcazou <ebotcazou@adacore.com>
4 * array.c (gfc_copy_iterator): Copy unroll field.
5 * decl.c (directive_unroll): New global variable.
6 (gfc_match_gcc_unroll): New function.
7 * gfortran.h (gfc_iterator]): Add unroll field.
8 (directive_unroll): Declare:
9 * match.c (gfc_match_do): Use memset to initialize the iterator.
10 * match.h (gfc_match_gcc_unroll): New prototype.
11 * parse.c (decode_gcc_attribute): Match "unroll".
12 (parse_do_block): Set iterator's unroll.
13 (parse_executable): Diagnose misplaced unroll directive.
14 * trans-stmt.c (gfc_trans_simple_do) Annotate loop condition with
15 annot_expr_unroll_kind.
16 (gfc_trans_do): Likewise.
17 * gfortran.texi (GNU Fortran Compiler Directives): Split section into
18 subections 'ATTRIBUTES directive' and 'UNROLL directive'.
20 2017-12-19 Jakub Jelinek <jakub@redhat.com>
22 * scanner.c (preprocessor_line): Replace Yoda conditions with typical
24 * dependency.c (check_section_vs_section): Likewise.
25 * trans-array.c (gfc_conv_expr_descriptor): Likewise.
27 2017-12-17 Janne Blomqvist <jb@gcc.gnu.org>
29 * decl.c (gfc_match_implicit_none): Use GFC_STD_F2018 instead of
31 * error.c (gfc_notify_std): Add GFC_STD_F2018{_DEL,_OBS} to
33 * gfortran.texi: Document -std=f2018.
34 * interface.c (compare_parameter): Fix comment.
35 * invoke.texi: Document -std=f2018.
36 * lang.opt: Add -std=f2018 argumnet.
37 * libgfortran.h (GFC_STD_F2015): Rename to GFC_STD_F0218, use
39 (GFC_STD_F2018_DEL): New macro.
40 (GFC_STD_F2018_OBS): Likewise.
41 * match.c (gfc_match_stopcode): Use GFC_STD_F2018.
42 * options.c (set_default_std_flags): Add F2018 flags to defaults.
43 (gfc_handle_option): Set options for -std=f2018.
45 2017-12-15 Jakub Jelinek <jakub@redhat.com>
47 * f95-lang.c (gfc_attribute_table): Swap affects_type_identity
48 and handler fields, adjust comments.
50 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
53 * class.c (gfc_build_class_symbol): Replace call to
54 sprintf with xasprintf to avoid format-overflow warning.
55 (generate_finalization_wrapper): Likewise.
56 (gfc_find_derived_vtab): Likewise.
57 (find_intrinsic_vtab): Likewise.
59 2017-12-12 Thomas Koenig <tkoenig@gcc.gnu.org>
61 * intrinsic.texi (MAXLOC): Remove double description
65 2017-12-11 Thomas Koenig <tkoenig@gcc.gnu.org>
67 * intrinsic.texi (MAXLOC): Update documentation for
68 character arrays and KIND argument.
71 2017-12-11 Thomas Koenig <tkoenig@gcc.gnu.org>
74 * simplify.c (min_max_choose): Add prototype.
75 (gfc_count): Format correctly.
76 (simplify_transformation): Pass array argument to init_result_expr.
77 (gfc_simplify_minval_maxval): Remove.
78 (gfc_min): New function.
79 (gfc_simplify_minval): Call simplify_transformation.
80 (gfc_max): New function.
81 (gfc_simplify_maxval): Call simplify_transformation.
83 2017-12-10 Dominique d'Humieres <dominiq@lps.ens.fr>
86 * gfortran.h (gfc_find_case_gsymbol): New prototype.
87 * symbol.c (gfc_find_case_gsymbol): New procedure, case
88 insensistive version of gfc_find_gsymbol.
89 * resolve.c (resolve_common_blocks): Use it.
90 Replace %s with %qs where needed.
92 2017-12-09 Steven G. Kargl <kargl@gcc.gnu.org>
96 * match.c (gfc_match_allocate): Enforce F2008:C631.
98 2017-12-09 Thomas Koenig <tkoenig@gcc.gnu.org>
101 * arith.c (gfc_character2character): New function.
102 * arith.h: Add prototype.
103 * simplify.c (gfc_convert_constant): Handle character type.
105 2017-12-07 Martin Sebor <msebor@redhat.com>
108 * f95-lang.c (gfc_attribute_table): Initialize new member of struct
111 2017-12-03 Thomas Koenig <tkoenig@gcc.gnu.org>
114 * check.c (gfc_check_minval_maxval): Use
115 int_orLreal_or_char_check_f2003 for array argument.
116 * iresolve.c (gfc_resolve_maxval): Insert number in
117 function name for character arguments.
118 (gfc_resolve_minval): Likewise.
119 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc):
121 (gfc_conv_intrinsic_minmaxval): Resort arguments and call library
122 function if dealing with a character function.
124 2017-12-01 Qing Zhao <qing.zhao@oracle.com>
126 * decl.c (gfc_get_pdt_instance): Adjust the call to sprintf
127 to avoid the same buffer being both source and destination.
129 2017-12-01 Thomas Koenig <tkoenig@gcc.gnu.org>
132 * frontend-passes.c (create_var): Also handle
133 character arrays, handling deferred lenghts.
135 2017-12-01 Paul Thomas <pault@gcc.gnu.org>
138 * resolve.c (get_pdt_constructor): Initialize 'cons' to NULL.
139 (resolve_pdt): Correct typo in prior comment. Emit an error if
140 any parameters are deferred and the object is neither pointer
144 * decl.c (gfc_get_pdt_instance): Continue if the parameter sym
145 is not present or has no name. Select the parameter by name
146 of component, rather than component order. Remove all the other
147 manipulations of 'tail' when building the pdt instance.
148 (gfc_match_formal_arglist): Emit and error if a star is picked
149 up in a PDT decl parameter list.
152 * trans-array.c (set_loop_bounds): If a GFC_SS_COMPONENT has an
153 info->end, use it rather than falling through to
155 (structure_alloc_comps): Check that param->name is non-null
156 before comparing with the component name.
157 * trans-decl.c (gfc_get_symbol_decl): Do not use the static
158 initializer for PDT symbols.
159 (gfc_init_default_dt): Do nothing for PDT symbols.
160 * trans-io.c (transfer_array_component): Parameterized array
161 components use the descriptor ubound since the shape is not
166 * trans-expr.c (gfc_conv_component_ref): Do not use the charlen
167 backend_decl of pdt strings. Use the hidden component instead.
168 * trans-io.c (transfer_expr): Do not do IO on "hidden" string
169 lengths. Use the hidden string length for pdt string transfers
170 by adding it to the se structure. When finished nullify the
174 * decl.c (gfc_match_formal_arglist): If a name is not found or
175 star is found, while reading a type parameter list, emit an
177 (gfc_match_derived_decl): On reading a PDT parameter list, on
178 failure to match call gfc_error_recovery.
181 * decl.c (build_struct): Character kind defaults to 1, so use
182 kind_expr whatever is the set value.
183 (gfc_get_pdt_instance): Ditto.
184 * trans-array.c (structure_alloc_comps): Copy the expression
185 for the PDT string length before parameter substitution. Use
186 this expression for evaluation and free it after use.
188 2017-12-01 Jakub Jelinek <jakub@redhat.com>
191 * match.c (gfc_match): Add FALLTHRU comment to avoid
192 -Wimplicit-fallthrough warning.
194 2017-12-01 Thomas Koenig <tkoenig@gcc.gnu.org>
197 * frontend-passes.c (realloc_string_callback): Handle
198 case for which the RHS is an array expression.
200 2017-11-28 Janne Blomqvist <jb@gcc.gnu.org>
203 * gfortran.texi: Remove mentions of GFORTRAN_DEFAULT_RECL.
205 2017-11-28 Paul Thomas <pault@gcc.gnu.org>
208 * resolve.c (resolve_component): Only escape for use assciated
209 vtypes if the current namespace has no proc_name and is most
210 particularly block data.
212 2017-11-28 Jakub Jelinek <jakub@redhat.com>
214 * trans-decl.c (gfc_trans_entry_master_switch): Build SWITCH_EXPR
215 using fold_build2_loc instead of fold_build3_loc.
216 * trans-io.c (io_result): Likewise.
217 * trans-stmt.c (gfc_trans_integer_select, gfc_trans_character_select):
220 2017-11-24 Jakub Jelinek <jakub@redhat.com>
223 * trans-openmp.c (gfc_trans_omp_array_reduction_or_udr): Set
224 attr.implicit_type in intrinsic_sym to avoid undesirable warning.
226 2017-11-23 Dirk Broemmel <d.broemmel@fz-juelich.de>
227 Jakub Jelinek <jakub@redhat.com>
230 * parse.c (parse_spec): Allow ST_OMP_THREADPRIVATE inside of
233 2017-11-23 Mike Stump <mikestump@comcast.net>
234 Eric Botcazou <ebotcazou@adacore.com>
236 * trans-stmt.c (gfc_trans_forall_loop): Pass 3rd operand to
239 2017-11-23 Paul Thomas <pault@gcc.gnu.org>
242 * trans-types.c (gfc_sym_type): If a character function result
243 is missing the charlen backend_decl, use the one from the name-
244 space procedure symbol, if present.
246 2017-11-22 David Malcolm <dmalcolm@redhat.com>
249 * error.c (gfc_notify_std): Convert "quoted" param from bool to
252 2017-11-22 Thomas Koenig <tkoenig@gcc.gnu.org>
255 * check.c (int_or_real_or_char_check_f2003): New function.
256 * iresolve.c (gfc_resolve_maxloc): Add number "2" for
257 character arguments and rank-zero return value.
258 (gfc_resolve_minloc): Likewise.
259 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Handle case of
260 character arguments and rank-zero return value by removing
261 unneeded arguments and calling the library function.
263 2017-11-22 Paul Thomas <pault@gcc.gnu.org>
266 * trans-stmt.c (trans_associate_var): Weaken the over strong
267 condition for using the fake result decl.
269 2017-11-20 Paul Thomas <pault@gcc.gnu.org>
272 * trans-expr.c (trans_class_vptr_len_assignment): Set from_len
273 if the temporary is unlimited polymorphic.
274 * trans-stmt.c (trans_associate_var): Use the fake result decl
275 to obtain the 'len' field from an explicit function result when
276 in that function scope.
278 2017-11-19 Paul Thomas <pault@gcc.gnu.org>
281 * expr.c (gfc_is_class_array_function): Renamed from
282 'gfc_is_alloc_class_array_function' and modified to return true
283 for pointers as well as allocatable results.
284 * gfortran.h : Change of name for prototype of above function.
285 * trans-array.c (gfc_add_loop_ss_code): Force finalization of
287 (build_class_array_ref): Change assertion into a condition.
288 (build_class_array_ref): Set the se class_vptr for class array
290 (gfc_walk_function_expr): Reference gfc_is_class_array_function
292 * trans-decl.c (get_proc_result): Move it up before
293 gfc_trans_deferred_vars.
294 (gfc_trans_deferred_vars): Nullify explicit return class arrays
296 * trans-expr.c (gfc_conv_class_to_class): Allow conversion of
297 class array functions that have an se class_vptr and use it
299 (gfc_conv_subref_array_arg): Rename reference to the above
301 (gfc_conv_procedure_call): Ditto. Add the se pre block to the
302 loop pre block before the function is evaluated. Do not
303 finalize class pointer results.
304 (arrayfunc_assign_needs_temporary, gfc_trans_assignment_1) More
306 * trans-intrinsic.c (gfc_conv_intrinsic_size): Ditto.
308 2017-11-18 Janne Blomqvist <jb@gcc.gnu.org>
311 * ioparm.def (IOPARM): Make nextrec a pintio.
313 2017-11-18 Janne Blomqvist <jb@gcc.gnu.org>
316 * ioparm.def (IOPARM): Make recl_in intio, and recl_out pintio.
318 2017-11-18 Thomas Koenig <tkoenig@gcc.gnu.org>
321 * expr.c (gfc_is_simply_contiguous): If a function call through a
322 class variable is done through a reference, check the function's
325 2017-11-17 Richard Biener <rguenther@suse.de>
328 * trans-stmt.c (gfc_trans_forall_loop): Annotate DO CONCURRENT
329 loops with annot_expr_parallel_kind instead of just
330 annot_expr_ivdep_kind.
332 2017-11-15 Martin Liska <mliska@suse.cz>
334 * options.c (gfc_post_options):
335 Do not set default value of warn_return_type.
336 * trans-decl.c (gfc_trans_deferred_vars):
337 Compare warn_return_type for greater than zero.
338 (generate_local_decl): Likewise
339 (gfc_generate_function_code): Likewise.
341 2017-11-13 Fritz Reese <fritzoreese@gmail.com>
344 * decl.c (match_clist_expr): Replace gcc_assert with proper
345 handling of bad result from spec_size().
346 * resolve.c (check_data_variable): Avoid NULL dereference when passing
349 2017-11-11 Janus Weil <janus@gcc.gnu.org>
352 * resolve.c (update_compcall_arglist): Improve error recovery,
355 2017-11-10 Fritz Reese <fritzoreese@gmail.com>
358 * gfortran.h (gfc_build_init_expr): New prototype.
359 * invoke.texi (finit-derived): Update documentation.
360 * expr.c (gfc_build_init_expr): New, from gfc_build_default_init_expr.
361 (gfc_build_default_init_expr): Redirect to gfc_build_init_expr(,,false)
362 (component_initializer): Force building initializers using
363 gfc_build_init_expr(,,true).
365 2017-11-10 Martin Sebor <msebor@redhat.com>
368 * gcc/fortran/decl.c (build_sym): Use strcpy instead of strncpy.
370 2017-11-10 Paul Thomas <pault@gcc.gnu.org>
373 * trans-stmt.c (gfc_trans_allocate): Remove the gcc_assert on
374 null string length for assumed length typespec and set
375 expr3_esize to NULL_TREE;
377 2017-11-09 Paul Thomas <pault@gcc.gnu.org>
380 * check.c (same_type_check): Introduce a new argument 'assoc'
381 with default value false. If this is true, use the symbol type
382 spec of BT_PROCEDURE expressions.
383 (gfc_check_associated): Set 'assoc' true in the call to
386 2017-11-09 Steven G. Kargl <kargl@gcc.gnu.org>
389 * interface.c (symbol_rank): Check for NULL pointer.
391 2017-11-08 Steven G. Kargl <kargl@kgcc.gnu.org>
394 * simplify.c(gfc_simplify_transfer): Do not dereference a NULL pointer.
397 2017-11-08 Steven G. Kargl <kargl@gcc.gnu.org>
400 * arith.c (gfc_hollerith2character): Clear pad.
402 2017-11-08 Janne Blomqvist <jb@gcc.gnu.org>
405 * convert.c (truthvalue_conversion): Use logical_type_node.
406 * trans-array.c (gfc_trans_allocate_array_storage): Likewise.
407 (gfc_trans_create_temp_array): Likewise.
408 (gfc_trans_array_ctor_element): Likewise.
409 (gfc_trans_array_constructor_value): Likewise.
410 (trans_array_constructor): Likewise.
411 (trans_array_bound_check): Likewise.
412 (gfc_conv_array_ref): Likewise.
413 (gfc_trans_scalarized_loop_end): Likewise.
414 (gfc_conv_array_extent_dim): Likewise.
415 (gfc_array_init_size): Likewise.
416 (gfc_array_allocate): Likewise.
417 (gfc_trans_array_bounds): Likewise.
418 (gfc_trans_dummy_array_bias): Likewise.
419 (gfc_conv_array_parameter): Likewise.
420 (duplicate_allocatable): Likewise.
421 (duplicate_allocatable_coarray): Likewise.
422 (structure_alloc_comps): Likewise
423 (get_std_lbound): Likewise
424 (gfc_alloc_allocatable_for_assignment): Likewise
425 * trans-decl.c (add_argument_checking): Likewise
426 (gfc_generate_function_code): Likewise
427 * trans-expr.c (gfc_copy_class_to_class): Likewise
428 (gfc_trans_class_array_init_assign): Likewise
429 (gfc_trans_class_init_assign): Likewise
430 (gfc_conv_expr_present): Likewise
431 (gfc_conv_substring): Likewise
432 (gfc_conv_cst_int_power): Likewise
433 (gfc_conv_expr_op): Likewise
434 (gfc_conv_procedure_call): Likewise
435 (fill_with_spaces): Likewise
436 (gfc_trans_string_copy): Likewise
437 (gfc_trans_alloc_subarray_assign): Likewise
438 (gfc_trans_pointer_assignment): Likewise
439 (gfc_trans_scalar_assign): Likewise
440 (fcncall_realloc_result): Likewise
441 (alloc_scalar_allocatable_for_assignment): Likewise
442 (trans_class_assignment): Likewise
443 (gfc_trans_assignment_1): Likewise
444 * trans-intrinsic.c (build_fixbound_expr): Likewise
445 (gfc_conv_intrinsic_aint): Likewise
446 (gfc_trans_same_strlen_check): Likewise
447 (conv_caf_send): Likewise
448 (trans_this_image): Likewise
449 (conv_intrinsic_image_status): Likewise
450 (trans_image_index): Likewise
451 (gfc_conv_intrinsic_bound): Likewise
452 (conv_intrinsic_cobound): Likewise
453 (gfc_conv_intrinsic_mod): Likewise
454 (gfc_conv_intrinsic_dshift): Likewise
455 (gfc_conv_intrinsic_dim): Likewise
456 (gfc_conv_intrinsic_sign): Likewise
457 (gfc_conv_intrinsic_ctime): Likewise
458 (gfc_conv_intrinsic_fdate): Likewise
459 (gfc_conv_intrinsic_ttynam): Likewise
460 (gfc_conv_intrinsic_minmax): Likewise
461 (gfc_conv_intrinsic_minmax_char): Likewise
462 (gfc_conv_intrinsic_anyall): Likewise
463 (gfc_conv_intrinsic_arith): Likewise
464 (gfc_conv_intrinsic_minmaxloc): Likewise
465 (gfc_conv_intrinsic_minmaxval): Likewise
466 (gfc_conv_intrinsic_btest): Likewise
467 (gfc_conv_intrinsic_bitcomp): Likewise
468 (gfc_conv_intrinsic_shift): Likewise
469 (gfc_conv_intrinsic_ishft): Likewise
470 (gfc_conv_intrinsic_ishftc): Likewise
471 (gfc_conv_intrinsic_leadz): Likewise
472 (gfc_conv_intrinsic_trailz): Likewise
473 (gfc_conv_intrinsic_mask): Likewise
474 (gfc_conv_intrinsic_spacing): Likewise
475 (gfc_conv_intrinsic_rrspacing): Likewise
476 (gfc_conv_intrinsic_size): Likewise
477 (gfc_conv_intrinsic_sizeof): Likewise
478 (gfc_conv_intrinsic_transfer): Likewise
479 (gfc_conv_allocated): Likewise
480 (gfc_conv_associated): Likewise
481 (gfc_conv_same_type_as): Likewise
482 (gfc_conv_intrinsic_trim): Likewise
483 (gfc_conv_intrinsic_repeat): Likewise
484 (conv_isocbinding_function): Likewise
485 (conv_intrinsic_ieee_is_normal): Likewise
486 (conv_intrinsic_ieee_is_negative): Likewise
487 (conv_intrinsic_ieee_copy_sign): Likewise
488 (conv_intrinsic_move_alloc): Likewise
489 * trans-io.c (set_parameter_value_chk): Likewise
490 (set_parameter_value_inquire): Likewise
491 (set_string): Likewise
492 * trans-openmp.c (gfc_walk_alloc_comps): Likewise
493 (gfc_omp_clause_default_ctor): Likewise
494 (gfc_omp_clause_copy_ctor): Likewise
495 (gfc_omp_clause_assign_op): Likewise
496 (gfc_omp_clause_dtor): Likewise
497 (gfc_omp_finish_clause): Likewise
498 (gfc_trans_omp_clauses): Likewise
499 (gfc_trans_omp_do): Likewise
500 * trans-stmt.c (gfc_trans_goto): Likewise
501 (gfc_trans_sync): Likewise
502 (gfc_trans_arithmetic_if): Likewise
503 (gfc_trans_simple_do): Likewise
504 (gfc_trans_do): Likewise
505 (gfc_trans_forall_loop): Likewise
506 (gfc_trans_where_2): Likewise
507 (gfc_trans_allocate): Likewise
508 (gfc_trans_deallocate): Likewise
509 * trans-types.c (gfc_init_types): Initialize logical_type_node and
510 their true/false trees.
511 (gfc_get_array_descr_info): Use logical_type_node.
512 * trans-types.h (logical_type_node): New tree.
513 (logical_true_node): Likewise.
514 (logical_false_node): Likewise.
515 * trans.c (gfc_trans_runtime_check): Use logical_type_node.
516 (gfc_call_malloc): Likewise
517 (gfc_allocate_using_malloc): Likewise
518 (gfc_allocate_allocatable): Likewise
519 (gfc_add_comp_finalizer_call): Likewise
520 (gfc_add_finalizer_call): Likewise
521 (gfc_deallocate_with_status): Likewise
522 (gfc_deallocate_scalar_with_status): Likewise
523 (gfc_call_realloc): Likewise
525 2017-11-06 Paul Thomas <pault@gcc.gnu.org>
528 * trans-expr.c (gfc_map_intrinsic_function): Return false for
529 bounds without the DIM argument instead of ICEing.
531 2017-11-06 Martin Liska <mliska@suse.cz>
534 * options.c (gfc_post_options): Set default value of
535 -Wreturn-type to false.
537 2017-11-05 Thomas Koenig <tkoenig@gcc.gnu.org>
540 * lang.opt (ffrontend-loop-interchange): New option.
541 (Wfrontend-loop-interchange): New option.
542 * options.c (gfc_post_options): Handle ffrontend-loop-interchange.
543 * frontend-passes.c (gfc_run_passes): Run
544 optimize_namespace if flag_frontend_optimize or
545 flag_frontend_loop_interchange are set.
546 (optimize_namespace): Run functions according to flags set;
547 also call index_interchange.
548 (ind_type): New function.
549 (has_var): New function.
550 (index_cost): New function.
551 (loop_comp): New function.
553 2017-11-05 Paul Thomas <pault@gcc.gnu.org>
556 * resolve.c (resolve_ordinary_assign): Do not add the _data
557 component for class valued array constructors being assigned
558 to derived type arrays.
559 * trans-array.c (gfc_trans_array_ctor_element): Take the _data
560 of class valued elements for assignment to derived type arrays.
562 2017-11-05 Paul Thomas <pault@gcc.gnu.org>
566 * resolve.c (resolve_component): There is no need to resolve
567 the components of a use associated vtype.
568 (resolve_fl_derived): Unconditionally generate a vtable for any
569 module derived type, as long as the standard is F2003 or later
570 and it is not a vtype or a PDT template.
572 2017-11-05 Tom de Vries <tom@codesourcery.com>
575 * parse.c (match, matcha, matchs, matcho, matchds, matchdo): Remove
576 semicolon after "do {} while (0)".
578 2017-11-04 Andre Vehreschild <vehre@gcc.gnu.org>
580 * trans-expr.c (gfc_trans_assignment_1): Character kind conversion may
581 create a loop variant temporary, too.
582 * trans-intrinsic.c (conv_caf_send): Treat char arrays as arrays and
584 * trans.c (get_array_span): Take the character kind into account when
585 doing pointer arithmetic.
587 2017-11-04 Thomas Koenig <tkoenig@gcc.gnu.org>
590 * gfortran.h (gfc_check_f): Replace fm3l with fm4l.
591 * intrinsic.h (gfc_resolve_maxloc): Add gfc_expr * to argument
593 (gfc_resolve_minloc): Likewise.
594 * check.c (gfc_check_minloc_maxloc): Handle kind argument.
595 * intrinsic.c (add_sym_3_ml): Rename to
596 (add_sym_4_ml): and handle kind argument.
597 (add_function): Replace add_sym_3ml with add_sym_4ml and add
598 extra arguments for maxloc and minloc.
599 (check_specific): Change use of check.f3ml with check.f4ml.
600 * iresolve.c (gfc_resolve_maxloc): Handle kind argument. If
601 the kind is smaller than the smallest library version available,
602 use gfc_default_integer_kind and convert afterwards.
603 (gfc_resolve_minloc): Likewise.
605 2017-11-04 Paul Thomas <pault@gcc.gnu.org>
608 * trans-decl.c (gfc_trans_deferred_vars): Do a better job of a
609 case where 'tmp' was used unititialized and remove TODO.
611 2017-11-03 Steven G. Kargl <kargl@gcc.gnu.org>
614 * resolve.c (resolve_equivalence): An entity in a common block within
615 a module cannot appear in an equivalence statement if the entity is
616 with a pure procedure.
618 2017-10-31 Jim Wilson <wilson@tuliptree.org>
620 * parse.c (unexpected_eof): Call gcc_unreachable before return.
622 2017-10-30 Paul Thomas <pault@gcc.gnu.org>
625 * trans_expr.c (gfc_conv_procedure_call): When passing a class
626 argument to an unlimited polymorphic dummy, it is wrong to cast
627 the passed expression as unlimited, unless it is unlimited. The
628 correct way is to assign to each of the fields and set the _len
631 2017-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
633 * resolve.c (resolve_transfer): Set derived to correct symbol for
636 2017-10-29 Jim Wilson <wilson@tuliptree.org>
638 * invoke.texi: Delete adb and sdb references.
640 2017-10-28 Andre Vehreschild <vehre@gcc.gnu.org>
642 * check.c (gfc_check_co_reduce): Clarify error message.
644 2017-10-28 Paul Thomas <pault@gcc.gnu.org>
647 * trans-expr.c (trans_class_vptr_len_assignment): 'vptr_expr'
648 must only be set if the right hand side expression is of type
651 2017-10-27 Steven G. Kargl <kargl@gcc.gnu.org>
654 * match.c (gfc_match_allocate): Exit early on syntax error.
656 2017-10-27 Thomas Koenig <tkoenig@gcc.gnu.org>
659 * simplify.c (is_constant_array_expr): If the expression is
660 a parameter array, call gfc_simplify_expr.
662 2017-10-25 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
664 * match.c (gfc_match_type_is): Fix typo in error message.
666 2017-10-21 Paul Thomas <pault@gcc.gnu.org>
669 * decl.c (gfc_get_pdt_instance): Remove the error message that
670 the parameter does not have a corresponding component since
671 this is now taken care of when the derived type is resolved. Go
672 straight to error return instead.
673 (gfc_match_formal_arglist): Make the PDT relevant errors
674 immediate so that parsing of the derived type can continue.
675 (gfc_match_derived_decl): Do not check the match status on
676 return from gfc_match_formal_arglist for the same reason.
677 * resolve.c (resolve_fl_derived0): Check that each type
678 parameter has a corresponding component.
681 * resolve.c (resolve_generic_f): Check that the derived type
682 can be used before resolving the struture constructor.
685 * symbol.c (check_conflict): Add the conflicts involving PDT
686 KIND and LEN attributes.
688 2017-10-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
690 * interface.c (check_sym_interfaces, check_uop_interfaces,
691 gfc_check_interfaces): Base interface_name buffer off
694 2017-10-19 Jakub Jelinek <jakub@redhat.com>
697 * gfortran.h (gfc_resolve_do_iterator): Add a bool arg.
698 (gfc_resolve_omp_local_vars): New declaration.
699 * openmp.c (omp_current_ctx): Make static.
700 (gfc_resolve_omp_parallel_blocks): Handle EXEC_OMP_TASKLOOP
701 and EXEC_OMP_TASKLOOP_SIMD.
702 (gfc_resolve_do_iterator): Add ADD_CLAUSE argument, if false,
703 don't actually add any clause. Move omp_current_ctx test
705 (handle_local_var, gfc_resolve_omp_local_vars): New functions.
706 * resolve.c (gfc_resolve_code): Call gfc_resolve_omp_parallel_blocks
707 instead of just gfc_resolve_omp_do_blocks for EXEC_OMP_TASKLOOP
708 and EXEC_OMP_TASKLOOP_SIMD.
709 (gfc_resolve_code): Adjust gfc_resolve_do_iterator caller.
710 (resolve_codes): Call gfc_resolve_omp_local_vars.
712 2017-10-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
714 * gfortran.h (gfc_lookup_function_fuzzy): New declaration.
715 (gfc_closest_fuzzy_match): New declaration.
716 (vec_push): New definition.
717 * misc.c (gfc_closest_fuzzy_match): New definition.
718 * resolve.c: Include spellcheck.h.
719 (lookup_function_fuzzy_find_candidates): New static function.
720 (lookup_uop_fuzzy_find_candidates): Likewise.
721 (lookup_uop_fuzzy): Likewise.
722 (resolve_operator) <INTRINSIC_USER>: Call lookup_uop_fuzzy.
723 (gfc_lookup_function_fuzzy): New definition.
724 (resolve_unknown_f): Call gfc_lookup_function_fuzzy.
725 * interface.c (check_interface0): Likewise.
726 (lookup_arg_fuzzy_find_candidates): New static function.
727 (lookup_arg_fuzzy ): Likewise.
728 (compare_actual_formal): Call lookup_arg_fuzzy.
729 * symbol.c: Include spellcheck.h.
730 (lookup_symbol_fuzzy_find_candidates): New static function.
731 (lookup_symbol_fuzzy): Likewise.
732 (gfc_set_default_type): Call lookup_symbol_fuzzy.
733 (lookup_component_fuzzy_find_candidates): New static function.
734 (lookup_component_fuzzy): Likewise.
735 (gfc_find_component): Call lookup_component_fuzzy.
737 2017-10-18 Thomas Koenig <tkoenig@gcc.gnu.org>
740 * frontend-passes.c (combine_array_constructor): If an array
741 constructor is all constants and has more elements than a small
742 constant, don't convert a*[b,c] to [a*b,a*c] to reduce compilation
745 2017-10-18 Thomas Koenig <tkoenig@gcc.gnu.org>
748 * resolve.c (resovle_symbol): Change gcc_assert to
749 sensible error message.
751 2017-10-18 Paul Thomas <pault@gcc.gnu.org>
754 * trans_decl.c (gfc_get_symbol_decl): Procedure symbols that
755 have the 'used_in_submodule' attribute should be processed by
756 'gfc_get_extern_function_decl'.
758 2017-10-16 Fritz Reese <fritzoreese@gmail.com>
761 * trans-io.c (transfer_expr): Treat BT_UNION as BT_DERIVED.
763 2017-10-15 Thomas Koenig <tkoenig@gcc.gnu.org>
766 * fortran/scanner.c (last_error_char): New global variable.
767 (gfc_scanner_init_1): Set last_error_char to NULL.
768 (gfc_gobble_whitespace): If a character not printable or
769 not newline, issue an error.
771 2017-10-13 Paul Thomas <pault@gcc.gnu.org>
774 * resolve.c (resolve_symbol): Ensure that derived type array
775 results get default initialization.
777 2017-10-11 Nathan Sidwell <nathan@acm.org>
779 * cpp.c (gfc_cpp_add_include_path): Update incpath_e names.
780 (gfc_cpp_add_include_path_after): Likewise.
782 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
784 * target-memory.c (gfc_interpret_logical): Use wi::to_wide when
785 operating on trees as wide_ints.
786 * trans-const.c (gfc_conv_tree_to_mpz): Likewise.
787 * trans-expr.c (gfc_conv_cst_int_power): Likewise.
788 * trans-intrinsic.c (trans_this_image): Likewise.
789 (gfc_conv_intrinsic_bound): Likewise.
790 (conv_intrinsic_cobound): Likewise.
792 2017-10-08 Steven G. Kargl <kargl@gcc.gnu.org>
794 * check.c (gfc_check_x): Remove function.
795 * intrinsic.c (add_functions): Use gfc_check_fn_r.
797 2017-10-08 Paul Thomas <pault@gcc.gnu.org>
800 * module.c : Bump up MOD_VERSION to 15.
801 (mio_component): Edit comment about PDT specification list.
802 (mio_expr, mio_symbol): Include the expression and symbol PDT
803 specification lists in the same way as in mio_component.
805 2017-10-08 Thomas Koenig <tkoenig@gcc.gnu.org>
807 * dump_prase_tree (show_symbol): Output list of variables in
809 (show_code_node): Add new line for ELSE and END DO for DO
811 * invoke.texi: Document that the output of
812 -fdump-fortran-original, -fdump-fortran-optimized and
813 -fdump-parse-tree is unsable and may lead to ICEs.
815 2017-10-07 Paul Thomas <pault@gcc.gnu.org>
818 * class.c (gfc_find_derived_vtab): Return NULL for a passed
819 pdt template to prevent bad procedures from being written.
820 * decl.c (gfc_get_pdt_instance): Do not use the default
821 initializer for pointer and allocatable pdt type components. If
822 the component is allocatbale, set the 'alloc_comp' attribute of
824 * module.c : Add a prototype for 'mio_actual_arglist'. Add a
825 boolean argument 'pdt'.
826 (mio_component): Call it for the parameter list of pdt type
827 components with 'pdt' set to true.
828 (mio_actual_arg): Add the boolean 'pdt' and, if it is set, call
829 mio_integer for the 'spec_type'.
830 (mio_actual_arglist): Add the boolean 'pdt' and use it in the
831 call to mio_actual_arg.
832 (mio_expr, mio_omp_udr_expr): Call mio_actual_arglist with
834 * resolve.c (get_pdt_spec_expr): Add the parameter name to the
835 KIND parameter error.
836 (get_pdt_constructor): Check that cons->expr is non-null.
837 * trans-array.c (structure_alloc_comps): For deallocation of
838 allocatable components, ensure that parameterized components
839 are deallocated first. Likewise, when parameterized components
840 are allocated, nullify allocatable components first. Do not
841 recurse into pointer or allocatable pdt components while
842 allocating or deallocating parameterized components. Test that
843 parameterized arrays or strings are allocated before freeing
845 (gfc_trans_pointer_assignment): Call the new function. Tidy up
846 a minor whitespace issue.
847 trans-decl.c (gfc_trans_deferred_vars): Set 'tmp' to NULL_TREE
848 to prevent the expression from being used a second time.
850 2017-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
853 * expr.c (gfc_check_pointer_assign): Error
854 for non-contiguous rhs.
856 2017-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
858 * gfortran.h (async_io_dt): Add external reference.
859 * io.c (async_io_dt): Add variable.
860 (compare_to_allowed_values): Add prototyte. Add optional argument
861 num. If present, set it to the number of the entry that was
863 (check_io_constraints): If this is for an asynchronous I/O
864 statement, set async_io_dt and set the asynchronous flag for
866 * resolve.c (resolve_transfer): If async_io_dt is set, set
867 the asynchronous flag on the variable.
868 (resolve_fl_namelist): If async_io_dt is set, set the asynchronous
869 flag on all elements of the namelist.
871 2017-10-04 Paul Thomas <pault@gcc.gnu.org>
875 * resolve.c (resolve_assoc_var): Deferred character type
876 associate names must not receive an integer conatant length.
877 * symbol.c (gfc_is_associate_pointer): Deferred character
878 length functions also require an associate pointer.
879 * trans-decl.c (gfc_get_symbol_decl): Deferred character
880 length functions or derived type components require the assoc
881 name to have variable string length.
882 * trans-stmt.c (trans_associate_var): Set the string length of
883 deferred string length associate names. The address expression
884 is not needed for allocatable, pointer or dummy targets. Change
885 the comment about defered string length targets.
887 2017-10-03 Thomas Koenig <tkoenig@gcc.gnu.org>
889 * io.c (match_wait_element): Correctly match END and EOR tags.
890 * dump-parse-tree.c (show_code_node): Handle EXEC_WAIT.
892 2017-10-02 Paul Thomas <pault@gcc.gnu.org>
895 * resolve.c (gfc_resolve_code): Simplify condition for class
896 pointer assignments becoming regular assignments by asserting
897 that only class valued targets are permitted.
898 * trans-expr.c (trans_class_pointer_fcn): New function using a
899 block of code from gfc_trans_pointer_assignment.
900 (gfc_trans_pointer_assignment): Call the new function. Tidy up
901 a minor whitespace issue.
903 2017-10-01 Dominique d'Humieres <dominiq@lps.ens.fr>
906 * parse.c (gfc_global_used): Replace the gfc_internal_error
909 2017-09-29 Dominique d'Humieres <dominiq@lps.ens.fr>
912 * interface.c (compare_actual_formal): Change warnings to errors
913 when "Actual argument contains too few elements for dummy
914 argument", unless -std=legacy is used.
916 2017-09-27 Thomas Schwinge <thomas@codesourcery.com>
918 * lang.opt <Wdo-subscript>: End help text with a period.
920 2017-09-26 Thomas Koenig <tkoenig@gcc.gnu.org>
922 * frontend-passes.c (do_subscript): Don't do anything
923 if inside an associate list.
925 2017-09-25 Thomas Koenig <tkoenig@gcc.gnu.org>
927 * lang.opt: Add -Wdo-subscript.
928 * frontend-passes.c (do_t): New type.
929 (doloop_list): Use variable of do_type.
930 (if_level): Variable to track if levels.
931 (select_level): Variable to track select levels.
932 (gfc_run_passes): Initialize i_level and select_level.
933 (doloop_code): Record current level of if + select
934 level in doloop_list. Add seen_goto if there could
935 be a branch outside the loop. Use different type for
937 (doloop_function): Call do_intent and do_subscript; move
938 functionality of checking INTENT to do_intent.
939 (insert_index_t): New type, for callback_insert_index.
940 (callback_insert_index): New function.
941 (insert_index): New function.
942 (do_subscript): New function.
943 (do_intent): New function.
944 (gfc_code_walker): Keep track of if_level and select_level.
945 * invoke.texi: Document -Wdo-subscript.
947 2017-09-25 Janne Blomqvist <jb@gcc.gnu.org>
949 * trans.c (gfc_unlikely): Remove unnecessary fold_convert.
950 (gfc_likely): Likewise.
952 2017-09-24 Thomas Koenig <tkoenig@gcc.gnu.org>
953 Steven G. Kargl <kargl@gcc.gnu.org>
956 * expr.c (gfc_get_full_arrayspec_from_expr): If there is
957 no symtree, set array spec to NULL.
959 2017-09-23 Janus Weil <janus@gcc.gnu.org>
962 * lang.opt: Add the options -fdefault-real-10 and -fdefault-real-16.
963 Rename flag_default_real to flag_default_real_8.
964 * invoke.texi: Add documentation.
965 * module.c (use_iso_fortran_env_module): flag_default_real is renamed.
966 * trans-types.c (gfc_init_kinds): Implement the flags
967 -fdefault-real-10 and -fdefault-real-16. Make -fdefault-double-8 work
968 without -fdefault-real-8.
970 2017-09-21 Paul Thomas <pault@gcc.gnu.org>
973 * match.c (gfc_match_associate): Before failing the association
974 try again, allowing a proc pointer selector.
979 * primary.c (gfc_match_varspec): Introduce 'tgt_expr', which
980 points to the associate selector, if any. Go through selector
981 references, after resolution for variables, to catch any full
982 or section array references. If a class associate name does
983 not have the same declared type as the selector, resolve the
984 selector and copy the declared type to the associate name.
985 Before throwing a no implicit type error, resolve all allowed
986 selector expressions, and copy the resulting typespec.
989 * resolve.c (resolve_assoc_var): Selector must cannot be the
990 NULL expression and it must have a type.
993 * resolve.c (resolve_symbol): Allow associate names to be
996 2017-09-21 Cesar Philippidis <cesar@codesourcery.com>
998 * openmp.c (gfc_match_oacc_wait): Don't restrict wait directive
999 arguments to constant integers.
1001 2017-09-17 Paul Thomas <pault@gcc.gnu.org>
1004 * decl.c (gfc_get_pdt_instance): Use the component initializer
1005 expression for the default, rather than the parameter value.
1006 * resolve.c (resolve_pdt): New function.
1007 (resolve_symbol): Call it. Remove false error, prohibiting
1008 deferred type parameters for dummy arguments.
1011 * primary.c (gfc_match_varspec): If the type of an associate
1012 name is unknown and yet there is a match, try resolving the
1013 target expression and using its type.
1015 2017-09-15 Paul Thomas <pault@gcc.gnu.org>
1018 trans-decl.c (gfc_trans_deferred_vars): Do not null the 'span'
1019 field if the symbol is either implicitly or explicitly saved.
1021 2017-09-13 Paul Thomas <pault@gcc.gnu.org>
1024 * decl.c (match_char_kind): If the kind expression is
1025 parameterized, save it in saved_kind_expr and set kind = 0.
1026 (gfc_get_pdt_instance): Resolve and simplify before emitting
1027 error on expression kind. Insert a missing simplification after
1028 insertion of kind expressions.
1030 2017-09-12 Paul Thomas <pault@gcc.gnu.org>
1034 * decl.c (variable_decl): Check pdt template components for
1035 appearance of KIND/LEN components in the type parameter name
1036 list, that components corresponding to type parameters have
1037 either KIND or LEN attributes and that KIND or LEN components
1038 are scalar. Copy the initializer to the parameter value.
1039 (gfc_get_pdt_instance): Add a label 'error_return' and follow
1040 it with repeated code, while replacing this code with a jump.
1041 Check if a parameter appears as a component in the template.
1042 Make sure that the parameter expressions are integer. Validate
1044 (gfc_match_decl_type_spec): Search for pdt_types in the parent
1045 namespace since they are instantiated in the template ns.
1046 * expr.c (gfc_extract_int): Use a KIND parameter if it
1047 appears as a component expression.
1048 (gfc_check_init_expr): Allow expressions with the pdt_kind
1050 *primary.c (gfc_match_actual_arglist): Make sure that the first
1051 keyword argument is recognised when 'pdt' is set.
1053 2017-09-10 Paul Thomas <pault@gcc.gnu.org>
1061 * expr.c (is_subref_array): Add class pointer array dummies
1062 to the list of expressions that return true.
1063 * trans-array.c: Add SPAN_FIELD and update indices for
1065 (gfc_conv_descriptor_span, gfc_conv_descriptor_span_get,
1066 gfc_conv_descriptor_span_set, is_pointer_array,
1067 get_array_span): New functions.
1068 (gfc_get_descriptor_offsets_for_info): New function to preserve
1069 API for access to descriptor fields for trans-types.c.
1070 (gfc_conv_scalarized_array_ref): If the expression is a subref
1071 array, make sure that info->descriptor is a descriptor type.
1072 Otherwise, if info->descriptor is a pointer array, set 'decl'
1073 and fix it if it is a component reference.
1074 (build_array_ref): Simplify handling of class array refs by
1075 passing the vptr to gfc_build_array_ref rather than generating
1076 the pointer arithmetic in this function.
1077 (gfc_conv_array_ref): As in gfc_conv_scalarized_array_ref, set
1079 (gfc_array_allocate): Set the span field if this is a pointer
1080 array. Use the expr3 element size if it is available, so that
1081 the dynamic type element size is used.
1082 (gfc_conv_expr_descriptor): Set the span field for pointer
1084 * trans-array.h: Prototypes for gfc_conv_descriptor_span_get
1085 gfc_conv_descriptor_span_set and
1086 gfc_get_descriptor_offsets_for_info added.
1087 trans-decl.c (gfc_get_symbol_decl): If a non-class pointer
1088 array, mark the declaration as a GFC_DECL_PTR_ARRAY_P. Remove
1089 the setting of GFC_DECL_SPAN.
1090 (gfc_trans_deferred_vars): Set the span field to zero in thge
1092 * trans-expr.c (gfc_conv_procedure_call): Do not use copy-in/
1093 copy-out to pass subref expressions to a pointer dummy.
1094 (gfc_trans_pointer_assignment): Remove code for setting of
1095 GFC_DECL_SPAN. Set the 'span' field for non-class pointers to
1096 class function results. Likewise for rank remap. In the case
1097 that the target is not a whole array, use the target array ref
1098 for remap and, since the 'start' indices are missing, set the
1099 lbounds to one, as required by the standard.
1100 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Pick up the
1101 'token' offset from the field decl in the descriptor.
1102 (conv_isocbinding_subroutine): Set the 'span' field.
1103 * trans-io.c (gfc_trans_transfer): Always scalarize pointer
1105 * trans-stmt.c (trans_associate_var): Set the 'span' field.
1106 * trans-types.c (gfc_get_array_descriptor_base): Add the 'span'
1107 field to the array descriptor.
1108 (gfc_get_derived_type): Pointer array components are marked as
1109 GFC_DECL_PTR_ARRAY_P.
1110 (gfc_get_array_descr_info): Replaced API breaking code for
1111 descriptor offset calling gfc_get_descriptor_offsets_for_info.
1112 * trans.c (get_array_span): New function.
1113 (gfc_build_array_ref): Simplify by calling get_array_span and
1114 obtain 'span' if 'decl' or 'vptr' present.
1115 * trans.h : Rename DECL_LANG_FLAG_6, GFC_DECL_SUBREF_ARRAY_P,
1116 as GFC_DECL_PTR_ARRAY_P.
1118 2017-09-09 Paul Thomas <pault@gcc.gnu.org>
1120 * decl.c : Add decl_type_param_list, type_param_spec_list as
1121 static variables to hold PDT spec lists.
1122 (build_sym): Copy 'type_param_spec_list' to symbol spec_list.
1123 (build_struct): Copy the 'saved_kind_expr' to the component
1124 'kind_expr'. Check that KIND or LEN components appear in the
1125 decl_type_param_list. These should appear as symbols in the
1126 f2k_derived namespace. If the component is itself a PDT type,
1127 copy the decl_type_param_list to the component param_list.
1128 (gfc_match_kind_spec): If the KIND expression is parameterized
1129 set KIND to zero and store the expression in 'saved_kind_expr'.
1130 (insert_parameter_exprs): New function.
1131 (gfc_insert_kind_parameter_exprs): New function.
1132 (gfc_insert_parameter_exprs): New function.
1133 (gfc_get_pdt_instance): New function.
1134 (gfc_match_decl_type_spec): Match the decl_type_spec_list if it
1135 is present. If it is, call 'gfc_get_pdt_instance' to obtain the
1136 specific instance of the PDT.
1137 (match_attr_spec): Match KIND and LEN attributes. Check for the
1138 standard and for type/kind of the parameter. They are also not
1139 allowed outside a derived type definition.
1140 (gfc_match_data_decl): Null the decl_type_param_list and the
1141 type_param_spec_list on entry and free them on exit.
1142 (gfc_match_formal_arglist): If 'typeparam' is true, add the
1143 formal symbol to the f2k_derived namespace.
1144 (gfc_match_derived_decl): Register the decl_type_param_list
1145 if this is a PDT. If this is a type extension, gather up all
1146 the type parameters and put them in the right order.
1147 *dump-parse-tree.c (show_attr): Signal PDT templates and the
1148 parameter attributes.
1149 (show_components): Output parameter atrributes and component
1151 (show_symbol): Show variable parameter lists.
1152 * expr.c (expr.c): Copy the expression parameter list.
1153 (gfc_is_constant_expr): Pass on symbols representing PDT
1155 (gfc_check_init_expr): Break on PDT KIND parameters and
1156 PDT parameter expressions.
1157 (gfc_check_assign): Assigning to KIND or LEN components is an
1159 (derived_parameter_expr): New function.
1160 (gfc_derived_parameter_expr): New function.
1161 (gfc_spec_list_type): New function.
1162 * gfortran.h : Add enum gfc_param_spec_type. Add the PDT attrs
1163 to the structure symbol_attr. Add the 'kind_expr' and
1164 'param_list' field to the gfc_component structure. Comment on
1165 the reuse of the gfc_actual_arglist structure as storage for
1166 type parameter spec lists. Add the new field 'spec_type' to
1167 this structure. Add 'param_list' fields to gfc_symbol and
1168 gfc_expr. Add prototypes for gfc_insert_kind_parameter_exprs,
1169 gfc_insert_parameter_exprs, gfc_add_kind, gfc_add_len,
1170 gfc_derived_parameter_expr and gfc_spec_list_type.
1171 * interface.c (gfc_compare_derived_types): Treat PDTs in the
1172 same way as sequence types.
1173 * match.c : Add variable 'type_param_spec_list'.
1174 (gfc_op2string, gfc_match_member_sep, gfc_match_label): Remove
1175 trailing whitespace.
1176 (match_derived_type_spec): Match PDTs and find specific
1178 (gfc_match_type_spec): Remove more trailing whitespace.
1179 (gfc_match_allocate): Assumed or deferred parameters cannot
1180 appear here. Copy the type parameter spec list to the expr for
1181 the allocatable entity. Free 'type_param_spec_list'.
1182 (gfc_match_common, gfc_match_namelist, gfc_match_module): Still
1183 more trailing whitespace to remove.
1184 (gfc_match_type_is): Allow PDT typespecs.
1185 * match.h : Modify prototypes for gfc_match_formal_arglist and
1186 gfc_match_actual_arglist.
1187 * module.c (ab_attribute, mstring attr_bits): PDT attributes
1189 (mio_symbol_attribute): PDT attributes handled.
1190 (mio_component): Deal with 'kind_expr' field.
1191 (mio_full_f2k_derived): For PDT templates, transfer the formal
1192 namespace symroot to the f2k_derived namespace.
1193 *primary.c (match_keyword_arg, gfc_match_actual_arglist): Add
1194 modifications to handle PDT spec lists. These are flagged in
1195 both cases by new boolean arguments, whose prototype defaults
1197 (gfc_match_structure_constructor, match_variable): Remove yet
1198 more trailing whitespace.
1199 * resolve.c (get_pdt_spec_expr, get_pdt_constructor): New
1201 (resolve_structure_cons): If the constructor is a PDT template,
1202 call get_pdt_constructor to build it using the parameter lists
1203 and then get the specific instance of the PDT.
1204 (resolve_component): PDT strings need a hidden string length
1205 component like deferred characters.
1206 (resolve_symbol): Dummy PDTs cannot have deferred parameters.
1207 * symbol.c (gfc_add_kind, gfc_add_len): New functions.
1208 (free_components): Free 'kind_expr' and 'param_list' fields.
1209 (gfc_free_symbol): Free the 'param_list' field.
1210 (gfc_find_sym_tree): If the current state is a PDT template,
1211 look for the symtree in the f2k_derived namspaces.
1212 trans-array.c (structure_alloc_comps): Allocate and deallocate
1213 PDTs. Check dummy arguments for compliance of LEN parameters.
1214 Add the new functions to the preceeding enum.
1215 (gfc_allocate_pdt_comp, gfc_deallocate_pdt_comp and
1216 gfc_check_pdt_dummy): New functions calling above.
1217 * trans-array.h : Add prototypes for these functions.
1218 trans-decl.c (gfc_get_symbol_decl): Call gfc_defer_symbol_init
1219 as appropriate for PDT symbols.
1220 (gfc_trans_deferred_vars): Allocate/deallocate PDT entities as
1221 they come into and out of scope. Exclude pdt_types from being
1223 (gfc_trans_subcomponent_assign): PDT array components must be
1224 handles as if they are allocatable.
1225 * trans-stmt.c (gfc_trans_allocate): Handle initialization of
1227 (gfc_trans_deallocate): Likewise.
1228 * trans-types.c (gfc_get_derived_type): PDT templates must not
1229 arrive here. PDT string components are handles as if deferred.
1230 Similarly, PDT arrays are treated as if allocatable. PDT
1231 strings are pointer types.
1232 * trans.c (gfc_deferred_strlen): Handle PDT strings in the same
1233 way as deferred characters.
1235 2017-09-01 Jakub Jelinek <jakub@redhat.com>
1238 * parse.c (decode_omp_directive): Use matchs instead of matcho for
1239 end ordered and ordered directives, except for ordered depend. For
1240 -fopenmp-simd and ordered depend, reject the stmt.
1241 * trans-openmp.c (gfc_trans_omp_ordered): For -fopenmp-simd ignore
1242 threads clause and if simd clause isn't present, just translate the
1245 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1246 Alan Hayward <alan.hayward@arm.com>
1247 David Sherwood <david.sherwood@arm.com>
1249 * trans-types.c (gfc_init_kinds): Use opt_scalar_int_mode for
1252 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1253 Alan Hayward <alan.hayward@arm.com>
1254 David Sherwood <david.sherwood@arm.com>
1256 * target-memory.c (size_integer): Use SCALAR_INT_TYPE_MODE.
1257 (size_logical): Likewise.
1259 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1260 Alan Hayward <alan.hayward@arm.com>
1261 David Sherwood <david.sherwood@arm.com>
1263 * trans-types.c (gfc_type_for_mode): Use is_a <scalar_int_mode>.
1265 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1266 Alan Hayward <alan.hayward@arm.com>
1267 David Sherwood <david.sherwood@arm.com>
1269 * trans-types.c (gfc_init_kinds): Use opt_scalar_float_mode
1270 and FOR_EACH_MODE_IN_CLASS.
1272 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1273 Alan Hayward <alan.hayward@arm.com>
1274 David Sherwood <david.sherwood@arm.com>
1276 * target-memory.c (size_float): Use SCALAR_FLOAT_TYPE_MODE
1277 instead of TYPE_MODE.
1279 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1280 Alan Hayward <alan.hayward@arm.com>
1281 David Sherwood <david.sherwood@arm.com>
1283 * trans-types.c (gfc_init_kinds): Use machine_mode instead of int
1286 2017-08-28 Janus Weil <janus@gcc.gnu.org>
1289 * expr.c (gfc_check_pointer_assign): Improve the check whether pointer
1290 may outlive pointer target.
1292 2017-08-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1295 * frontend-passes (inline_matumul_assign): Explicity
1296 set typespec for call to CONJG.
1298 2017-08-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1301 * trans-io.c (get_dtio_proc): Add check for format label and set
1302 formatted flag accordingly. Reorganize the code a little.
1304 2017-08-16 Thomas Koenig <tkoenig@gcc.gnu.org>
1307 * frontend-passes.c (realloc_string_callback): If expression is a
1308 concatenation, also check for dependency.
1309 (constant_string_length): Check for presence of symtree.
1311 2017-08-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1313 * gfortran.texi: Document format of unformatted sequential files.
1315 2017-08-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1317 * invoke.texi: Actually commit change about -Ofast.
1319 2017-08-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1322 * resolve.c (resolve_symbol): Adjust (and reformat)
1323 comment. Perform check if a BIND(C) is declared
1324 at module level regardless of whether it is typed
1327 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
1329 * options.c (set_dec_flags): Only set legacy standards when value
1332 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
1334 * options.c (set_dec_flags, gfc_post_options): Only set flag_d_lines
1335 with -fdec when not set by user.
1337 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
1339 * decl.c (attr_seen): New static variable.
1340 * decl.c (variable_decl): Match %FILL in STRUCTURE body.
1341 * gfortran.texi: Update documentation.
1343 2017-08-08 Martin Liska <mliska@suse.cz>
1345 * trans-types.c: Include header files.
1347 2017-08-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1351 * options.c: Make -Ofast honor -fmax-stack-var-size.
1352 * invoke.texi: Document change.
1354 2017-08-01 Thomas König <tkoenig@gcc.gnu.org>
1357 * intrisic.c (gfc_convert_type_warn): Only set typespec for
1358 empty array constructors which don't have it already.
1360 2017-08-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1363 * lang.opt (fc-prototypes): Add option.
1364 * gfortran.h (gfc_typespec): Add interop_kind to struct.
1365 (gfc_dump_c_prototypes): Add prototype.
1366 * decl.c (gfc_match_kind_spec): Copy symbol used for kind to typespec.
1367 * parse.c (gfc_parse_file): Call gfc_dump_prototypes.
1368 * dump-parse-tree.c (gfc_dump_c_prototypes): New function.
1369 (type_return): New enum.
1370 (get_c_type_name): New function.
1371 (write_decl): New function.
1372 (write_type): New function.
1373 (write_variable): New function.
1374 (write_proc): New function.
1375 (write_interop_decl): New function.
1376 * invoke.texi: Document -fc-prototypes.
1378 2017-08-01 Dominique d'Humieres <dominiq@lps.ens.fr>
1381 * expr.c (gfc_check_init_expr): Use the renamed name.
1383 2017-07-31 Jakub Jelinek <jakub@redhat.com>
1385 * check.c (gfc_check_num_images): Fix a pasto.
1387 2017-07-29 Jakub Jelinek <jakub@redhat.com>
1389 * trans-decl.c (gfc_trans_use_stmts): Pass false as new argument to
1390 the imported_module_or_decl debug hook.
1392 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1394 * resolve.c (find_reachable_labels): Adjust.
1396 2017-07-25 Jakub Jelinek <jakub@redhat.com>
1398 * ioparm.def: Use 1U << 31 instead of 1 << 31 as flags2 mask.
1400 2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1402 * dump-parse-tree.c (show_symbol): Show binding label if present.
1404 2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1405 Mikael Morin <mikael@gcc.gnu.org>
1408 * fortran/trans-array.c (gfc_conv_resolve_dependencies):
1409 Break if dependency has been found.
1411 2017-07-23 Alexander Monakov <amonakov@ispras.ru>
1413 * interface.c (pair_cmp): Fix gfc_symbol comparison. Adjust comment.
1415 2017-07-18 Nathan Sidwell <nathan@acm.org>
1417 * trans.c (gfc_build_array_ref): Use TYPE_MAX_VALUE.
1419 2017-07-09 Dominique d'Humieres <dominiq@lps.ens.fr>
1422 * class.c (class_array_ref_detected): Remove a redundant
1425 2017-07-06 Harald Anlauf <anlauf@gmx.de>
1428 * array.c (gfc_ref_dimen_size): Handle bad subscript triplets.
1430 2017-07-03 Dominique d'Humieres <dominiq@lps.ens.fr>
1433 * resolve.c (resolve_symbol): Fix typo.
1435 2017-07-03 Dominique d'Humieres <dominiq@lps.ens.fr>
1438 * symbol.c (check_conflict): Add missing "conflicts".
1440 2017-06-29 Cesar Philippidis <cesar@codesourcery.com>
1443 * openmp.c (gfc_match_oacc_routine): Check if proc_name exist before
1444 comparing the routine name against it.
1446 2017-06-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1449 * trans-stmt.c (gfc_trans_call): If no code expr, use code->loc
1450 as warning/error locus.
1452 2017-06-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1455 * arith.c (wprecision_int_real): Set return value before
1456 mpz_clear and then return after it.
1458 2017-06-15 Janus Weil <janus@gcc.gnu.org>
1461 * trans-expr.c (gfc_conv_procedure_call): Deallocate the result of
1462 scalar allocatable procedure-pointer components.
1464 2017-06-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1467 * frontend-passes.c (traverse_io_block): Also
1468 check for variables occurring as indices multiple
1469 time in a single implied DO loop.
1471 2017-06-05 Janus Weil <janus@gcc.gnu.org>
1474 * trans-expr.c (gfc_conv_procedure_call): Fix detection of allocatable
1477 2017-06-05 Nicolas Koenig <koenigni@student.ethz.ch>
1480 * frontend-passes.c (traverse_io_block): New function.
1481 (simplify_io_impl_do): New function.
1482 (optimize_namespace): Invoke gfc_code_walker with
1483 simplify_io_impl_do.
1485 2017-06-02 Jakub Jelinek <jakub@redhat.com>
1488 * openmp.c (resolve_omp_clauses): Fix a typo.
1490 2017-05-30 David Malcolm <dmalcolm@redhat.com>
1492 * error.c (gfc_format_decoder): Update for new bool and
1493 const char ** params.
1495 2017-05-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1498 * frontend-passes.c (check_conjg_transpose_variable):
1500 (has_dimen_vector_ref): Likewise
1501 (matmul_temp_args): New function. Add prototype.
1502 (optimize_namespace): Call matmul_temp_args.
1504 2017-05-28 Thomas Koenig <tkoenig@gcc.gnu.org>
1506 * frontend-passes.c (matmul_lhs_realloc): Correct
1507 allocation size for case A1B2.
1509 2017-05-25 Thomas Koenig <tkoenig@gcc.gnu.org>
1511 * dump-parse-tree.c (show_expr): Also replace
1512 with dumpfile for showing values for forgotten
1515 2017-05-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1517 * dump-parse-tree.c (show_expr): Replace stdout
1518 with dumpfile for showing values.
1520 2017-05-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1523 * frontend-passes.c (matrix_case): Add A2TB2.
1524 (inline_limit_check): Handle MATMUL(TRANSPOSE(A),B)
1525 (inline_matmul_assign): Likewise.
1527 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1529 * openmp.c (OACC_KERNELS_CLAUSES): Add "OMP_CLAUSE_NUM_GANGS",
1530 "OMP_CLAUSE_NUM_WORKERS", "OMP_CLAUSE_VECTOR_LENGTH".
1532 2017-05-22 Janus Weil <janus@gcc.gnu.org>
1535 * resolve.c (resolve_fl_derived): Make sure that vtype symbols are
1538 2017-05-19 Paul Thomas <pault@gcc.gnu.org>
1541 * trans-io.c (nml_get_addr_expr): If we are dealing with class
1542 type data set tmp tree to get that address.
1543 (transfer_namelist_element): Set the array spec to point to the
1546 2017-05-19 David Malcolm <dmalcolm@redhat.com>
1549 * bbt.c (insert): Remove trailing exclamation mark from message.
1550 * decl.c (gfc_match_final_decl): Likewise.
1551 * dump-parse-tree.c (show_expr): Likewise.
1552 * module.c (gfc_use_module): Likewise.
1553 * primary.c (build_actual_constructor): Likewise.
1554 (gfc_convert_to_structure_constructor): Likewise.
1556 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1558 * gfortran.h (enum gfc_omp_default_sharing): Add
1559 "OMP_DEFAULT_PRESENT".
1560 * dump-parse-tree.c (show_omp_clauses): Handle it.
1561 * openmp.c (gfc_match_omp_clauses): Likewise.
1562 * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
1564 2017-05-18 Fritz Reese <fritzoreese@gmail.com>
1567 * decl.c (match_attr_spec, gfc_match_automatic,
1568 gfc_match_static, gfc_match_structure_decl): Unify diagnostic
1569 errors regarding -fdec options.
1570 * io.c (match_dec_etag, match_dec_vtag, match_dec_ftag): Ditto.
1572 2017-05-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1575 * trans-io.c (transfer_namelist_element): Change check from
1576 NULL_TREE to null_pointer_node.
1578 2017-05-17 Fritz Reese <fritzoreese@gmail.com>
1581 * expr.c (component_initializer): Don't generate initializers for
1583 * invoke.texi (-finit-derived): Document.
1585 2017-05-16 Paul Thomas <pault@gcc.gnu.org>
1588 * decl.c (build_sym): In a submodule allow overriding of host
1589 associated symbols from the ancestor module with a new
1592 2017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>
1595 * trans-stmt.c (gfc_trans_integer_select): Remove redundant condition.
1597 2017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>
1600 * expr.c (gfc_generate_initializer): If type conversion fails,
1601 check for error and return NULL.
1603 2017-05-14 Nicolas Koenig <koenigni@student.ethz.ch>
1606 * array.c (gfc_ref_dimen_size): Simplify stride
1608 * data.c (gfc_advance_section): Simplify start,
1609 end and stride expressions
1610 (gfc_advance_section): Simplify start and end
1612 (gfc_get_section_index): Simplify start expression
1614 2017-05-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1616 * io.c (gfc_resolve_dt): Fix returns to bool type.
1618 2017-05-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1621 * io.c (dtio_procs_present): Add new function to check for DTIO
1622 procedures relative to I/O statement READ or WRITE.
1623 (gfc_resolve_dt): Add namelist checks using the new function.
1624 * resolve.c (dtio_procs_present): Remove function and related
1625 namelist checks. (resolve_fl_namelist): Add check specific to
1626 Fortran 95 restriction on namelist objects.
1628 2017-05-11 Nathan Sidwell <nathan@acm.org>
1630 * trans-decl.c: Include dumpfile.h not tree-dump.h,
1632 2017-05-09 Janus Weil <janus@gcc.gnu.org>
1635 * resolve.c (gfc_resolve_finalizers): Ensure that derived-type
1636 components have a their finalizers resolved, also if the superordinate
1637 type itself has a finalizer.
1639 2017-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
1642 * frontend-passes.c (matmul_to_var_expr): New function,
1644 (matmul_to_var_code): Likewise.
1645 (optimize_namespace): Use them from gfc_code_walker.
1647 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1649 * cpp.c (cb_cpp_error): Replace report_diagnostic
1650 with diagnostic_report_diagnostic.
1651 * error.c (gfc_warning): Likewise.
1652 (gfc_warning_now_at): Likewise.
1653 (gfc_warning_now): Likewise.
1654 (gfc_warning_internal): Likewise.
1655 (gfc_error_now): Likewise.
1656 (gfc_fatal_error): Likewise.
1657 (gfc_error_opt): Likewise.
1658 (gfc_internal_error): Likewise.
1660 2017-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1663 * frontend-passes.c (inline_matmul_assign): Also check bounds
1664 for allocatable lhs and matrix-vector-multiplication.
1666 2017-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1669 * io.c (format_lex): Check for '/' and set token to FMT_SLASH.
1670 (check_format): Move FMT_DT checking code to data_desc section.
1671 * module.c (gfc_match_use): Include the case of INTERFACE_DTIO.
1673 2017-04-22 Janus Weil <janus@gcc.gnu.org>
1676 * trans-types.c (gfc_conv_procedure_call): Deallocate the components
1677 of allocatable intent(out) arguments.
1679 2017-04-21 Janus Weil <janus@gcc.gnu.org>
1682 * trans-types.c (gfc_get_derived_type): Prevent an infinite loop when
1683 building a derived type that includes a procedure pointer component
1684 with a polymorphic result.
1686 2017-04-17 Paul Thomas <pault@gcc.gnu.org>
1689 * module.c (find_symtree_for_symbol): Delete.
1690 (read_module): Remove the call to the above.
1692 2017-04-14 Janus Weil <janus@gcc.gnu.org>
1695 * class.c (generate_finalization_wrapper): Give the finalization wrapper
1696 the recursive attribute.
1698 2017-04-10 Nicolas Koenig <koenigni@student.ethz.ch>
1699 Paul Thomas <pault@gcc.gnu.org>
1702 * module.c (gfc_match_submodule): Add error
1703 if function is called in the wrong state.
1705 2017-04-10 Janus Weil <janus@gcc.gnu.org>
1708 * expr.c (gfc_check_pointer_assign): Check if procedure pointer
1709 components in a pointer assignment need an explicit interface.
1711 2017-03-18 Nicolas Koenig <koenigni@student.ethz.ch>
1714 * symbol.c (gfc_delete_symtree): If there is a period in the name, ignore
1715 everything before it.
1717 2017-03-28 Janus Weil <janus@gcc.gnu.org>
1720 * trans-io.c (transfer_namelist_element): Perform a polymorphic call
1721 to a DTIO procedure if necessary.
1723 2017-03-25 Paul Thomas <pault@gcc.gnu.org>
1727 * decl.c (access_attr_decl): Remove the error for an absent
1728 generic DTIO interface and ensure that symbol has the flavor
1731 2017-03-22 Dominique d'Humieres <dominiq@lps.ens.fr>
1734 * module.c: Remove trailing period.
1736 2017-03-22 Dominique d'Humieres <dominiq@lps.ens.fr>
1739 * decl.c: Replace '%s' with %qs.
1741 * interface.c: Likewise.
1742 * match.c: Likewise.
1743 * primary.c: Likewise.
1744 * resolve.c: Likewise.
1748 * io.c: Remove trailing spaces.
1749 * match.c: Likewise.
1750 * openmp.c: Likewise.
1751 * resolve.c: Likewise.
1752 * trans-intrinsic.c: Likewise.
1755 * expr.c: Remove a double spaces.
1758 * primary.c: Remove spurious quotes around %qs.
1760 2017-03-22 Thomas Koenig <tkoenig@gcc.gnu.org>
1763 * frontend-passes.c (combine_array_constructor): Take
1764 location of new expression from constructor expression instead
1767 2017-03-20 Nicolas Koenig <koenigni@student.ethz.ch>
1770 * symbol.c (check_conflict): Report an error if an EQUIVALENCE
1773 2017-03-18 Nicolas Koenig <koenigni@student.ethz.ch>
1776 * decl.c (add_hidden_procptr_result): Fixed Refs count of the
1777 created "ppr@" symbol.
1779 2017-03-18 Paul Thomas <pault@gcc.gnu.org>
1782 * module.c (mio_symbol_attribute): Remove reset of the flag
1783 'no_module_procedures'.
1784 (check_for_module_procedures): New function. Move declaration
1785 of 'no_module_procedures' to above it.
1786 (gfc_dump_module): Traverse namespace calling new function.
1788 2017-03-18 Paul Thomas <pault@gcc.gnu.org>
1791 * symbol.c (check_conflict): A dummy procedure in a submodule,
1792 module procedure is not an error.
1793 (gfc_add_flavor): Ditto.
1795 2017-03-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1798 * openmp.c (check_symbol_not_pointer): Adjust diagnostics.
1800 2017-03-16 Jakub Jelinek <jakub@redhat.com>
1803 * parse.c (gfc_ascii_statement): Use !$ACC for ST_OACC_ATOMIC
1804 and ST_OACC_END_ATOMIC, instead of !ACC.
1805 * trans-decl.c (finish_oacc_declare): Use !$ACC instead of $!ACC.
1806 * openmp.c (gfc_match_oacc_declare, gfc_match_oacc_wait,
1807 gfc_resolve_oacc_declare): Likewise.
1810 * error.c (gfc_format_decoder): Rename plus argument to set_locus,
1811 remove ATTRIBUTE_UNUSED from all arguments, call default_tree_printer
1812 if not a Fortran specific spec.
1813 * trans-io.c: Include options.h.
1814 (gfc_build_st_parameter): Temporarily disable -Wpadded around layout
1815 of artificial IO data structures.
1817 2017-03-15 David Malcolm <dmalcolm@redhat.com>
1820 * resolve.c (resolve_contained_fntype): Make error messages more
1821 amenable to translation.
1823 2017-03-06 Richard Biener <rguenther@suse.de>
1826 * trans.c (gfc_add_modify_loc): Weaken assert.
1828 2017-03-05 Andre Vehreschild <vehre@gcc.gnu.org>,
1829 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
1831 * check.c (positive_check): Add new function checking constant for
1832 being greater then zero.
1833 (gfc_check_image_status): Add checking of image_status arguments.
1834 (gfc_check_failed_or_stopped_images): Same but for failed_- and
1835 stopped_images function.
1836 * dump-parse-tree.c (show_code_node): Added output of FAIL IMAGE.
1837 * gfortran.h (enum gfc_statement): Added FAIL_IMAGE_ST.
1838 (enum gfc_isym_id): Added new intrinsic symbols.
1839 (enum gfc_exec_op): Added EXEC_FAIL_IMAGE.
1840 * gfortran.texi: Added description for the new API functions. Updated
1841 coverage of gfortran of TS18508.
1842 * intrinsic.c (add_functions): Added symbols to resolve new intrinsic
1844 * intrinsic.h: Added prototypes.
1845 * iresolve.c (gfc_resolve_failed_images): Resolve the failed_images
1847 (gfc_resolve_image_status): Same for image_status.
1848 (gfc_resolve_stopped_images): Same for stopped_images.
1849 * libgfortran.h: Added prototypes.
1850 * match.c (gfc_match_if): Added matching of FAIL IMAGE statement.
1851 (gfc_match_fail_image): Match a FAIL IMAGE statement.
1852 * match.h: Added prototype.
1853 * parse.c (decode_statement): Added matching for FAIL IMAGE.
1854 (next_statement): Same.
1855 (gfc_ascii_statement): Same.
1857 * simplify.c (gfc_simplify_failed_or_stopped_images): For COARRAY=
1858 single a constant result can be returne.d
1859 (gfc_simplify_image_status): For COARRAY=single the result is constant.
1860 * st.c (gfc_free_statement): Added FAIL_IMAGE handling.
1861 * trans-decl.c (gfc_build_builtin_function_decls): Added decls of the
1863 * trans-expr.c (gfc_conv_procedure_call): This is first time all
1864 arguments of a function are optional, which is now handled here
1866 * trans-intrinsic.c (conv_intrinsic_image_status): Translate
1868 (gfc_conv_intrinsic_function): Add support for image_status.
1869 (gfc_is_intrinsic_libcall): Add support for the remaining new
1871 * trans-stmt.c (gfc_trans_fail_image): Trans a fail image.
1872 * trans-stmt.h: Add the prototype for the above.
1873 * trans.c (trans_code): Dispatch for fail_image.
1874 * trans.h: Add the trees for the new intrinsics.
1876 2017-03-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1879 * openmp.c (check_symbol_not_pointer): Adjust diagnostic.
1881 2017-02-28 Paul Thomas <pault@gcc.gnu.org>
1884 * resolve.c (resolve_fl_procedure): Deal with the case where
1885 'submodule_name' is NULL so that gfc_error does not ICE.
1886 Reformat the error message to make it more consistent.
1888 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1890 * parse.c (parse_critical_block): Use cond ? G_("...") : G_("...")
1891 instead of just cond ? "..." : "...".
1892 * scanner.c (gfc_next_char_literal): Likewise.
1893 * match.c (match_exit_cycle): Likewise.
1895 2017-02-26 Thomas Koenig <tkoenig@gcc.gnu.org>
1898 * options.c (gfc_post_options): Set default limit for matmul
1900 * invoke.texi: Document change.
1902 2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
1905 * interface.c (check_dtio_arg_TKR_intent): Change 'intent'
1908 2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
1911 * interface.c (gfc_match_end_interface): Remove spurious comma
1912 and space, replace 'got %s' with 'got %qs'.
1914 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1917 * interface.c (check_dtio_arg_TKR_intent): Supply 'must'
1918 missing from error message.
1920 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1923 * interface.c (gfc_find_typebound_dtio_proc): Guard test for
1924 flavor attribute by checking that symbol is resolved.
1926 2017-02-16 Paul Thomas <pault@gcc.gnu.org>
1929 * decl.c (access_attr_decl): Test for presence of generic DTIO
1930 interface and emit error if not present.
1932 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1935 * parse.c (check_component, parse_union): Whitespace.
1936 (set_syms_host_assoc): For a derived type, check if the module
1937 in which it was declared is one of the submodule ancestors. If
1938 it is, make the components public. Otherwise, reset attribute
1939 'host_assoc' and set 'use-assoc' so that encapsulation is
1942 2017-02-19 Paul Thomas <pault@gcc.gnu.org>
1945 * decl.c (gfc_set_constant_character_len): Whitespace.
1946 (gfc_match_end): Catch case where a procedure is contained in
1947 a module procedure and ensure that 'end procedure' is the
1948 correct termination.
1950 2017-02-19 Paul Thomas <pault@gcc.gnu.org>
1953 * resolve.c (fixup_unique_dummy): New function.
1954 (gfc_resolve_expr): Call it for dummy variables with a unique
1957 2017-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
1960 * trans-expr.c (gfc_trans_assignment_1): Deref indirect refs when
1961 compiling with -fcheck=mem to check the pointer and not the data.
1963 2017-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
1966 * trans-array.c (duplicate_allocatable_coarray): Ensure attributes
1967 passed are properly initialized.
1968 (structure_alloc_comps): Same.
1969 * trans-expr.c (gfc_trans_structure_assign): Same.
1971 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1973 * trans-expr.c (gfc_conv_substring): Add missing space in diagnostics.
1975 2017-02-12 Thomas Koenig <tkoenig@gcc.gnu.org>
1978 * intrinsic.c (gfc_intrinsic_func_interface): Return an error
1979 for -std=f95 for disallowed transformational functions in
1980 initialization expressions.
1982 2017-02-09 Cesar Philippidis <cesar@codesourcery.com>
1983 Joseph Myers <joseph@codesourcery.com>
1985 * openmp.c (resolve_omp_clauses): Error on directives
1986 containing both tile and collapse clauses.
1987 (resolve_oacc_loop_blocks): Represent '*' tile arguments as zero.
1988 * trans-openmp.c (gfc_trans_omp_do): Lower tiled loops like
1991 2017-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
1993 * trans-types.c (gfc_get_int_kind_from_width_isofortranen): Choose
1994 REAL type with the widest precision if two (or more) have the same
1997 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
2000 * trans-stmt.c (gfc_trans_allocate): Only deallocate the components of
2001 the temporary, when a new object was created for the temporary. Not
2002 when it is just an alias to an existing object.
2004 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
2007 * trans-decl.c (generate_coarray_sym_init): Retrieve the symbol's
2008 attributes before using them.
2010 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
2013 * trans-stmt.c (gfc_trans_allocate): Add the multiplying the _len
2014 component of unlimited polymorphic objects when source-allocating.
2016 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
2019 * trans-array.c (structure_alloc_comps): Ignore pointer components when
2022 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2025 * f95-lang.c (gfc_create_decls): Include stringpool.h.
2026 Pass main_input_filename to build_translation_unit_decl.
2028 2017-01-23 Thomas Koenig <tkoenig@netcologne.de>
2030 * arith.c (arith_power): If simplifying integer power expression
2031 to zero, warn if -Winteger-division is given.
2033 2017-01-22 Jakub Jelinek <jakub@redhat.com>
2036 * parse.c (matchs, matcho, matchds, matchdo): Replace return st;
2037 with { ret = st; goto finish; }.
2038 (decode_omp_directive): Allow declare simd, declare target and
2039 simd directives in PURE/ELEMENTAL procedures. Only call
2040 gfc_unset_implicit_pure on successful match of other procedures.
2042 2017-01-21 Gerald Pfeifer <gerald@pfeifer.com>
2044 * gfc-internals.texi (Symbol Versioning): Change references
2045 to www.akkadia.org to https.
2047 2017-01-21 Jakub Jelinek <jakub@redhat.com>
2049 * gfortran.h (gfc_extract_int): Change return type to bool. Add
2050 int argument with = 0.
2051 * decl.c (gfc_match_kind_spec): Adjust gfc_extract_int caller, pass
2052 1 as new last argument to it, don't emit gfc_error.
2053 (match_char_kind): Likewise.
2054 (gfc_match_decl_type_spec): Use gfc_get_string ("%s", x) instead of
2056 (gfc_match_derived_decl, match_binding_attributes): Likewise.
2057 (gfc_match_structure_decl): Don't sprintf back to name, call
2058 get_struct_decl directly with gfc_dt_upper_string (name) result.
2059 * trans-stmt.c (gfc_trans_allocate): Use gfc_get_string ("%s", x)
2060 instead of gfc_get_string (x).
2061 * module.c (gfc_dt_lower_string, gfc_dt_upper_string,
2062 gfc_match_use, gfc_match_submodule, find_true_name, mio_pool_string,
2063 mio_symtree_ref, mio_expr, mio_omp_udr_expr, load_generic_interfaces,
2064 load_omp_udrs, load_needed, read_module, dump_module,
2065 create_intrinsic_function, import_iso_c_binding_module,
2066 create_int_parameter, create_int_parameter_array, create_derived_type,
2067 use_iso_fortran_env_module): Likewise.
2068 * error.c (gfc_diagnostic_starter, gfc_diagnostic_start_span): Use
2069 pp_verbatim (context->printer, "%s", x) instead of
2070 pp_verbatim (context->printer, x).
2071 * match.c (gfc_match_small_int): Adjust gfc_extract_int caller, pass
2072 1 as new last argument to it, don't emit gfc_error.
2073 (gfc_match_small_int_expr): Likewise.
2074 * iresolve.c (gfc_get_string): Optimize format "%s" case.
2075 (resolve_bound): Use gfc_get_string ("%s", x) instead of
2077 (resolve_transformational): Formatting fix.
2078 (gfc_resolve_char_achar): Change name argument to bool is_achar,
2079 use a single format string and if is_achar add "a" before "char".
2080 (gfc_resolve_achar, gfc_resolve_char): Adjust callers.
2081 * expr.c (gfc_extract_int): Change return type to bool, return true
2082 if some error occurred. Add REPORT_ERROR argument, if non-zero
2083 call either gfc_error or gfc_error_now depending on its sign.
2084 * arith.c (arith_power): Adjust gfc_extract_int caller.
2085 * symbol.c (gfc_add_component): Use gfc_get_string ("%s", x) instead
2086 of gfc_get_string (x).
2087 (gfc_new_symtree, gfc_delete_symtree, gfc_get_uop, gfc_new_symbol,
2088 gfc_get_gsymbol, generate_isocbinding_symbol): Likewise.
2089 * openmp.c (gfc_match_omp_clauses): Adjust gfc_extract_int caller, pass
2090 -1 as new last argument to it, don't emit gfc_error_now.
2091 (gfc_match_omp_declare_reduction): Use gfc_get_string ("%s", x)
2092 instead of gfc_get_string (x).
2093 * check.c (kind_check): Adjust gfc_extract_int caller.
2094 * intrinsic.c (add_sym, find_sym, make_alias): Use
2095 gfc_get_string ("%s", x) instead of gfc_get_string (x).
2096 * simplify.c (get_kind, gfc_simplify_btest, gfc_simplify_maskr,
2097 gfc_simplify_maskl, gfc_simplify_poppar, gfc_simplify_repeat,
2098 gfc_simplify_selected_int_kind, gfc_simplify_selected_real_kind):
2099 Adjust gfc_extract_int callers.
2100 * trans-decl.c (gfc_find_module): Use gfc_get_string ("%s", x)
2101 instead of gfc_get_string (x).
2102 * matchexp.c (expression_syntax): Add const.
2103 * primary.c (match_kind_param, match_hollerith_constant,
2104 match_string_constant): Adjust gfc_extract_int callers.
2105 (match_keyword_arg): Use gfc_get_string ("%s", x) instead of
2107 * frontend-passes.c (optimize_minmaxloc): Likewise.
2109 2017-01-19 Andre Vehreschild <vehre@gcc.gnu.org>
2112 * trans-decl.c (gfc_build_qualified_array): Add static decl to parent
2113 function only, when the decl-context is not the translation unit.
2115 2017-01-18 Louis Krupp <louis.krupp@zoho.com>
2119 * trans-expr.c (gfc_conv_variable): Don't treat temporary variables
2120 as function arguments.
2121 * trans-stmt.c (forall_make_variable_temp,
2122 generate_loop_for_temp_to_lhs, gfc_trans_assign_need_temp,
2123 gfc_trans_forall_1): Don't adjust offset of forall temporary
2124 for array sections, make forall temporaries work for substring
2125 expressions, improve test coverage by adding -ftest-forall-temp
2126 option to request usage of temporary array in forall code.
2127 * lang.opt: Add -ftest-forall-temp option.
2128 * invoke.texi: Add -ftest-forall-temp option.
2130 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
2132 * primary.c (caf_variable_attr): Improve figuring whether the current
2133 component is the last one refed.
2134 * trans-stmt.c (gfc_trans_allocate): Do not generate sync_all calls
2135 when allocating pointer or allocatable components.
2137 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
2139 * gfortran.texi: Add missing parameters to caf-API functions. Correct
2140 typos and clarify some descriptions.
2142 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
2145 Missed some cases, here they are:
2146 * trans-decl.c (gfc_build_qualified_array): Add static tokens to the
2147 parent function's scope.
2148 * trans-expr.c (gfc_get_tree_for_caf_expr): Shorten code. Remove
2151 2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org>
2154 * resolve.c (resolve_lock_unlock_event): Resolve the expression for
2155 event's until_count.
2157 2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org>
2160 * trans-expr.c (gfc_get_tree_for_caf_expr): Ensure the backend_decl
2161 is valid before accessing it.
2163 2017-01-09 Jakub Jelinek <jakub@redhat.com>
2165 PR translation/79019
2166 PR translation/79020
2167 * decl.c (attr_decl1): Fix spelling in translatable string.
2168 * intrinsic.texi: Fix spelling - invokation -> invocation.
2169 * lang.opt (faggressive-function-elimination, gfc_convert): Fix
2170 typos in descriptions.
2171 * openmp.c (resolve_omp_clauses): Add missing whitespace to
2172 translatable strings.
2174 2017-01-08 Martin Sebor <msebor@redhat.com>
2176 PR tree-optimization/78913
2178 * trans-common.c (build_equiv_decl): Increase buffer size to avoid
2179 truncation for any argument.
2180 * trans-types.c (gfc_build_logical_type): Same.
2182 2017-01-07 Andre Vehreschild <vehre@gcc.gnu.org>
2186 * expr.c (gfc_check_pointer_assign): Return the same error message for
2187 rewritten coarray pointer assignments like for plain ones.
2188 * gfortran.h: Change prototype.
2189 * primary.c (caf_variable_attr): Set attributes used ones only only
2190 ones. Add setting of pointer_comp attribute.
2191 (gfc_caf_attr): Add setting of pointer_comp attribute.
2192 * trans-array.c (gfc_array_allocate): Add flag that the component to
2193 allocate is not an ultimate coarray component. Add allocation of
2195 (structure_alloc_comps): Extend nullify to treat pointer components in
2196 coarrays correctly. Restructure nullify to remove redundant code.
2197 (gfc_nullify_alloc_comp): Allow setting caf_mode flags.
2198 * trans-array.h: Change prototype of gfc_nullify_alloc_comp ().
2199 * trans-decl.c (generate_coarray_sym_init): Call nullify_alloc_comp for
2200 derived type coarrays with pointer components.
2201 * trans-expr.c (gfc_trans_structure_assign): Also treat pointer
2203 (trans_caf_token_assign): Handle assignment of token of scalar pointer
2205 (gfc_trans_pointer_assignment): Call above routine.
2206 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Add treating pointer
2208 (gfc_conv_intrinsic_caf_get): Likewise.
2209 (conv_caf_send): Likewise.
2210 * trans-stmt.c (gfc_trans_allocate): After allocating a derived type in
2211 a coarray pre-register the tokens.
2212 (gfc_trans_deallocate): Simply determining the coarray type (scalar or
2213 array) and deregistering it correctly.
2214 * trans-types.c (gfc_typenode_for_spec): Replace in_coarray flag by the
2215 actual codim to allow lookup of array types in the cache.
2216 (gfc_build_array_type): Likewise.
2217 (gfc_get_array_descriptor_base): Likewise.
2218 (gfc_get_array_type_bounds): Likewise.
2219 (gfc_get_derived_type): Likewise.
2220 * trans-types.h: Likewise.
2221 * trans.c (gfc_deallocate_with_status): Enable deregistering of all kind
2222 of coarray components.
2223 (gfc_deallocate_scalar_with_status): Use free() in fcoarray_single mode
2224 instead of caf_deregister.
2226 2017-01-06 Jakub Jelinek <jakub@redhat.com>
2228 * simplify.c (simplify_transformation_to_array): Use
2229 GCC_DIAGNOSTIC_PUSH_IGNORED and GCC_DIAGNOSTIC_POP instead of
2230 #pragma GCC diagnostic {push,ignored,pop}.
2232 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
2234 * simplify.c (simplify_transformation_to_array): Silence
2235 array bounds warning. Fix whitespace.
2237 2017-01-04 Alexandre Oliva <aoliva@redhat.com>
2239 * module.c (load_omp_udrs): Initialize name.
2241 2017-01-02 Janne Blomqvist <jb@gcc.gnu.org>
2244 * trans-expr.c (gfc_trans_string_copy): Rework string copy
2245 algorithm to avoid -Wstringop-overflow warning.
2247 2017-01-01 Jakub Jelinek <jakub@redhat.com>
2249 Update copyright years.
2251 * gfortranspec.c (lang_specific_driver): Update copyright notice
2253 * gfc-internals.texi: Bump @copying's copyright year.
2254 * gfortran.texi: Ditto.
2255 * intrinsic.texi: Ditto.
2256 * invoke.texi: Ditto.
2258 Copyright (C) 2017 Free Software Foundation, Inc.
2260 Copying and distribution of this file, with or without modification,
2261 are permitted in any medium without royalty provided the copyright
2262 notice and this notice are preserved.