1 2017-12-01 Qing Zhao <qing.zhao@oracle.com>
3 * decl.c (gfc_get_pdt_instance): Adjust the call to sprintf
4 to avoid the same buffer being both source and destination.
6 2017-12-01 Thomas Koenig <tkoenig@gcc.gnu.org>
9 * frontend-passes.c (create_var): Also handle
10 character arrays, handling deferred lenghts.
12 2017-12-01 Paul Thomas <pault@gcc.gnu.org>
15 * resolve.c (get_pdt_constructor): Initialize 'cons' to NULL.
16 (resolve_pdt): Correct typo in prior comment. Emit an error if
17 any parameters are deferred and the object is neither pointer
21 * decl.c (gfc_get_pdt_instance): Continue if the parameter sym
22 is not present or has no name. Select the parameter by name
23 of component, rather than component order. Remove all the other
24 manipulations of 'tail' when building the pdt instance.
25 (gfc_match_formal_arglist): Emit and error if a star is picked
26 up in a PDT decl parameter list.
29 * trans-array.c (set_loop_bounds): If a GFC_SS_COMPONENT has an
30 info->end, use it rather than falling through to
32 (structure_alloc_comps): Check that param->name is non-null
33 before comparing with the component name.
34 * trans-decl.c (gfc_get_symbol_decl): Do not use the static
35 initializer for PDT symbols.
36 (gfc_init_default_dt): Do nothing for PDT symbols.
37 * trans-io.c (transfer_array_component): Parameterized array
38 components use the descriptor ubound since the shape is not
43 * trans-expr.c (gfc_conv_component_ref): Do not use the charlen
44 backend_decl of pdt strings. Use the hidden component instead.
45 * trans-io.c (transfer_expr): Do not do IO on "hidden" string
46 lengths. Use the hidden string length for pdt string transfers
47 by adding it to the se structure. When finished nullify the
51 * decl.c (gfc_match_formal_arglist): If a name is not found or
52 star is found, while reading a type parameter list, emit an
54 (gfc_match_derived_decl): On reading a PDT parameter list, on
55 failure to match call gfc_error_recovery.
58 * decl.c (build_struct): Character kind defaults to 1, so use
59 kind_expr whatever is the set value.
60 (gfc_get_pdt_instance): Ditto.
61 * trans-array.c (structure_alloc_comps): Copy the expression
62 for the PDT string length before parameter substitution. Use
63 this expression for evaluation and free it after use.
65 2017-12-01 Jakub Jelinek <jakub@redhat.com>
68 * match.c (gfc_match): Add FALLTHRU comment to avoid
69 -Wimplicit-fallthrough warning.
71 2017-12-01 Thomas Koenig <tkoenig@gcc.gnu.org>
74 * frontend-passes.c (realloc_string_callback): Handle
75 case for which the RHS is an array expression.
77 2017-11-28 Janne Blomqvist <jb@gcc.gnu.org>
80 * gfortran.texi: Remove mentions of GFORTRAN_DEFAULT_RECL.
82 2017-11-28 Paul Thomas <pault@gcc.gnu.org>
85 * resolve.c (resolve_component): Only escape for use assciated
86 vtypes if the current namespace has no proc_name and is most
87 particularly block data.
89 2017-11-28 Jakub Jelinek <jakub@redhat.com>
91 * trans-decl.c (gfc_trans_entry_master_switch): Build SWITCH_EXPR
92 using fold_build2_loc instead of fold_build3_loc.
93 * trans-io.c (io_result): Likewise.
94 * trans-stmt.c (gfc_trans_integer_select, gfc_trans_character_select):
97 2017-11-24 Jakub Jelinek <jakub@redhat.com>
100 * trans-openmp.c (gfc_trans_omp_array_reduction_or_udr): Set
101 attr.implicit_type in intrinsic_sym to avoid undesirable warning.
103 2017-11-23 Dirk Broemmel <d.broemmel@fz-juelich.de>
104 Jakub Jelinek <jakub@redhat.com>
107 * parse.c (parse_spec): Allow ST_OMP_THREADPRIVATE inside of
110 2017-11-23 Mike Stump <mikestump@comcast.net>
111 Eric Botcazou <ebotcazou@adacore.com>
113 * trans-stmt.c (gfc_trans_forall_loop): Pass 3rd operand to
116 2017-11-23 Paul Thomas <pault@gcc.gnu.org>
119 * trans-types.c (gfc_sym_type): If a character function result
120 is missing the charlen backend_decl, use the one from the name-
121 space procedure symbol, if present.
123 2017-11-22 David Malcolm <dmalcolm@redhat.com>
126 * error.c (gfc_notify_std): Convert "quoted" param from bool to
129 2017-11-22 Thomas Koenig <tkoenig@gcc.gnu.org>
132 * check.c (int_or_real_or_char_check_f2003): New function.
133 * iresolve.c (gfc_resolve_maxloc): Add number "2" for
134 character arguments and rank-zero return value.
135 (gfc_resolve_minloc): Likewise.
136 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Handle case of
137 character arguments and rank-zero return value by removing
138 unneeded arguments and calling the library function.
140 2017-11-22 Paul Thomas <pault@gcc.gnu.org>
143 * trans-stmt.c (trans_associate_var): Weaken the over strong
144 condition for using the fake result decl.
146 2017-11-20 Paul Thomas <pault@gcc.gnu.org>
149 * trans-expr.c (trans_class_vptr_len_assignment): Set from_len
150 if the temporary is unlimited polymorphic.
151 * trans-stmt.c (trans_associate_var): Use the fake result decl
152 to obtain the 'len' field from an explicit function result when
153 in that function scope.
155 2017-11-19 Paul Thomas <pault@gcc.gnu.org>
158 * expr.c (gfc_is_class_array_function): Renamed from
159 'gfc_is_alloc_class_array_function' and modified to return true
160 for pointers as well as allocatable results.
161 * gfortran.h : Change of name for prototype of above function.
162 * trans-array.c (gfc_add_loop_ss_code): Force finalization of
164 (build_class_array_ref): Change assertion into a condition.
165 (build_class_array_ref): Set the se class_vptr for class array
167 (gfc_walk_function_expr): Reference gfc_is_class_array_function
169 * trans-decl.c (get_proc_result): Move it up before
170 gfc_trans_deferred_vars.
171 (gfc_trans_deferred_vars): Nullify explicit return class arrays
173 * trans-expr.c (gfc_conv_class_to_class): Allow conversion of
174 class array functions that have an se class_vptr and use it
176 (gfc_conv_subref_array_arg): Rename reference to the above
178 (gfc_conv_procedure_call): Ditto. Add the se pre block to the
179 loop pre block before the function is evaluated. Do not
180 finalize class pointer results.
181 (arrayfunc_assign_needs_temporary, gfc_trans_assignment_1) More
183 * trans-intrinsic.c (gfc_conv_intrinsic_size): Ditto.
185 2017-11-18 Janne Blomqvist <jb@gcc.gnu.org>
188 * ioparm.def (IOPARM): Make nextrec a pintio.
190 2017-11-18 Janne Blomqvist <jb@gcc.gnu.org>
193 * ioparm.def (IOPARM): Make recl_in intio, and recl_out pintio.
195 2017-11-18 Thomas Koenig <tkoenig@gcc.gnu.org>
198 * expr.c (gfc_is_simply_contiguous): If a function call through a
199 class variable is done through a reference, check the function's
202 2017-11-17 Richard Biener <rguenther@suse.de>
205 * trans-stmt.c (gfc_trans_forall_loop): Annotate DO CONCURRENT
206 loops with annot_expr_parallel_kind instead of just
207 annot_expr_ivdep_kind.
209 2017-11-15 Martin Liska <mliska@suse.cz>
211 * options.c (gfc_post_options):
212 Do not set default value of warn_return_type.
213 * trans-decl.c (gfc_trans_deferred_vars):
214 Compare warn_return_type for greater than zero.
215 (generate_local_decl): Likewise
216 (gfc_generate_function_code): Likewise.
218 2017-11-13 Fritz Reese <fritzoreese@gmail.com>
221 * decl.c (match_clist_expr): Replace gcc_assert with proper
222 handling of bad result from spec_size().
223 * resolve.c (check_data_variable): Avoid NULL dereference when passing
226 2017-11-11 Janus Weil <janus@gcc.gnu.org>
229 * resolve.c (update_compcall_arglist): Improve error recovery,
232 2017-11-10 Fritz Reese <fritzoreese@gmail.com>
235 * gfortran.h (gfc_build_init_expr): New prototype.
236 * invoke.texi (finit-derived): Update documentation.
237 * expr.c (gfc_build_init_expr): New, from gfc_build_default_init_expr.
238 (gfc_build_default_init_expr): Redirect to gfc_build_init_expr(,,false)
239 (component_initializer): Force building initializers using
240 gfc_build_init_expr(,,true).
242 2017-11-10 Martin Sebor <msebor@redhat.com>
245 * gcc/fortran/decl.c (build_sym): Use strcpy instead of strncpy.
247 2017-11-10 Paul Thomas <pault@gcc.gnu.org>
250 * trans-stmt.c (gfc_trans_allocate): Remove the gcc_assert on
251 null string length for assumed length typespec and set
252 expr3_esize to NULL_TREE;
254 2017-11-09 Paul Thomas <pault@gcc.gnu.org>
257 * check.c (same_type_check): Introduce a new argument 'assoc'
258 with default value false. If this is true, use the symbol type
259 spec of BT_PROCEDURE expressions.
260 (gfc_check_associated): Set 'assoc' true in the call to
263 2017-11-09 Steven G. Kargl <kargl@gcc.gnu.org>
266 * interface.c (symbol_rank): Check for NULL pointer.
268 2017-11-08 Steven G. Kargl <kargl@kgcc.gnu.org>
271 * simplify.c(gfc_simplify_transfer): Do not dereference a NULL pointer.
274 2017-11-08 Steven G. Kargl <kargl@gcc.gnu.org>
277 * arith.c (gfc_hollerith2character): Clear pad.
279 2017-11-08 Janne Blomqvist <jb@gcc.gnu.org>
282 * convert.c (truthvalue_conversion): Use logical_type_node.
283 * trans-array.c (gfc_trans_allocate_array_storage): Likewise.
284 (gfc_trans_create_temp_array): Likewise.
285 (gfc_trans_array_ctor_element): Likewise.
286 (gfc_trans_array_constructor_value): Likewise.
287 (trans_array_constructor): Likewise.
288 (trans_array_bound_check): Likewise.
289 (gfc_conv_array_ref): Likewise.
290 (gfc_trans_scalarized_loop_end): Likewise.
291 (gfc_conv_array_extent_dim): Likewise.
292 (gfc_array_init_size): Likewise.
293 (gfc_array_allocate): Likewise.
294 (gfc_trans_array_bounds): Likewise.
295 (gfc_trans_dummy_array_bias): Likewise.
296 (gfc_conv_array_parameter): Likewise.
297 (duplicate_allocatable): Likewise.
298 (duplicate_allocatable_coarray): Likewise.
299 (structure_alloc_comps): Likewise
300 (get_std_lbound): Likewise
301 (gfc_alloc_allocatable_for_assignment): Likewise
302 * trans-decl.c (add_argument_checking): Likewise
303 (gfc_generate_function_code): Likewise
304 * trans-expr.c (gfc_copy_class_to_class): Likewise
305 (gfc_trans_class_array_init_assign): Likewise
306 (gfc_trans_class_init_assign): Likewise
307 (gfc_conv_expr_present): Likewise
308 (gfc_conv_substring): Likewise
309 (gfc_conv_cst_int_power): Likewise
310 (gfc_conv_expr_op): Likewise
311 (gfc_conv_procedure_call): Likewise
312 (fill_with_spaces): Likewise
313 (gfc_trans_string_copy): Likewise
314 (gfc_trans_alloc_subarray_assign): Likewise
315 (gfc_trans_pointer_assignment): Likewise
316 (gfc_trans_scalar_assign): Likewise
317 (fcncall_realloc_result): Likewise
318 (alloc_scalar_allocatable_for_assignment): Likewise
319 (trans_class_assignment): Likewise
320 (gfc_trans_assignment_1): Likewise
321 * trans-intrinsic.c (build_fixbound_expr): Likewise
322 (gfc_conv_intrinsic_aint): Likewise
323 (gfc_trans_same_strlen_check): Likewise
324 (conv_caf_send): Likewise
325 (trans_this_image): Likewise
326 (conv_intrinsic_image_status): Likewise
327 (trans_image_index): Likewise
328 (gfc_conv_intrinsic_bound): Likewise
329 (conv_intrinsic_cobound): Likewise
330 (gfc_conv_intrinsic_mod): Likewise
331 (gfc_conv_intrinsic_dshift): Likewise
332 (gfc_conv_intrinsic_dim): Likewise
333 (gfc_conv_intrinsic_sign): Likewise
334 (gfc_conv_intrinsic_ctime): Likewise
335 (gfc_conv_intrinsic_fdate): Likewise
336 (gfc_conv_intrinsic_ttynam): Likewise
337 (gfc_conv_intrinsic_minmax): Likewise
338 (gfc_conv_intrinsic_minmax_char): Likewise
339 (gfc_conv_intrinsic_anyall): Likewise
340 (gfc_conv_intrinsic_arith): Likewise
341 (gfc_conv_intrinsic_minmaxloc): Likewise
342 (gfc_conv_intrinsic_minmaxval): Likewise
343 (gfc_conv_intrinsic_btest): Likewise
344 (gfc_conv_intrinsic_bitcomp): Likewise
345 (gfc_conv_intrinsic_shift): Likewise
346 (gfc_conv_intrinsic_ishft): Likewise
347 (gfc_conv_intrinsic_ishftc): Likewise
348 (gfc_conv_intrinsic_leadz): Likewise
349 (gfc_conv_intrinsic_trailz): Likewise
350 (gfc_conv_intrinsic_mask): Likewise
351 (gfc_conv_intrinsic_spacing): Likewise
352 (gfc_conv_intrinsic_rrspacing): Likewise
353 (gfc_conv_intrinsic_size): Likewise
354 (gfc_conv_intrinsic_sizeof): Likewise
355 (gfc_conv_intrinsic_transfer): Likewise
356 (gfc_conv_allocated): Likewise
357 (gfc_conv_associated): Likewise
358 (gfc_conv_same_type_as): Likewise
359 (gfc_conv_intrinsic_trim): Likewise
360 (gfc_conv_intrinsic_repeat): Likewise
361 (conv_isocbinding_function): Likewise
362 (conv_intrinsic_ieee_is_normal): Likewise
363 (conv_intrinsic_ieee_is_negative): Likewise
364 (conv_intrinsic_ieee_copy_sign): Likewise
365 (conv_intrinsic_move_alloc): Likewise
366 * trans-io.c (set_parameter_value_chk): Likewise
367 (set_parameter_value_inquire): Likewise
368 (set_string): Likewise
369 * trans-openmp.c (gfc_walk_alloc_comps): Likewise
370 (gfc_omp_clause_default_ctor): Likewise
371 (gfc_omp_clause_copy_ctor): Likewise
372 (gfc_omp_clause_assign_op): Likewise
373 (gfc_omp_clause_dtor): Likewise
374 (gfc_omp_finish_clause): Likewise
375 (gfc_trans_omp_clauses): Likewise
376 (gfc_trans_omp_do): Likewise
377 * trans-stmt.c (gfc_trans_goto): Likewise
378 (gfc_trans_sync): Likewise
379 (gfc_trans_arithmetic_if): Likewise
380 (gfc_trans_simple_do): Likewise
381 (gfc_trans_do): Likewise
382 (gfc_trans_forall_loop): Likewise
383 (gfc_trans_where_2): Likewise
384 (gfc_trans_allocate): Likewise
385 (gfc_trans_deallocate): Likewise
386 * trans-types.c (gfc_init_types): Initialize logical_type_node and
387 their true/false trees.
388 (gfc_get_array_descr_info): Use logical_type_node.
389 * trans-types.h (logical_type_node): New tree.
390 (logical_true_node): Likewise.
391 (logical_false_node): Likewise.
392 * trans.c (gfc_trans_runtime_check): Use logical_type_node.
393 (gfc_call_malloc): Likewise
394 (gfc_allocate_using_malloc): Likewise
395 (gfc_allocate_allocatable): Likewise
396 (gfc_add_comp_finalizer_call): Likewise
397 (gfc_add_finalizer_call): Likewise
398 (gfc_deallocate_with_status): Likewise
399 (gfc_deallocate_scalar_with_status): Likewise
400 (gfc_call_realloc): Likewise
402 2017-11-06 Paul Thomas <pault@gcc.gnu.org>
405 * trans-expr.c (gfc_map_intrinsic_function): Return false for
406 bounds without the DIM argument instead of ICEing.
408 2017-11-06 Martin Liska <mliska@suse.cz>
411 * options.c (gfc_post_options): Set default value of
412 -Wreturn-type to false.
414 2017-11-05 Thomas Koenig <tkoenig@gcc.gnu.org>
417 * lang.opt (ffrontend-loop-interchange): New option.
418 (Wfrontend-loop-interchange): New option.
419 * options.c (gfc_post_options): Handle ffrontend-loop-interchange.
420 * frontend-passes.c (gfc_run_passes): Run
421 optimize_namespace if flag_frontend_optimize or
422 flag_frontend_loop_interchange are set.
423 (optimize_namespace): Run functions according to flags set;
424 also call index_interchange.
425 (ind_type): New function.
426 (has_var): New function.
427 (index_cost): New function.
428 (loop_comp): New function.
430 2017-11-05 Paul Thomas <pault@gcc.gnu.org>
433 * resolve.c (resolve_ordinary_assign): Do not add the _data
434 component for class valued array constructors being assigned
435 to derived type arrays.
436 * trans-array.c (gfc_trans_array_ctor_element): Take the _data
437 of class valued elements for assignment to derived type arrays.
439 2017-11-05 Paul Thomas <pault@gcc.gnu.org>
443 * resolve.c (resolve_component): There is no need to resolve
444 the components of a use associated vtype.
445 (resolve_fl_derived): Unconditionally generate a vtable for any
446 module derived type, as long as the standard is F2003 or later
447 and it is not a vtype or a PDT template.
449 2017-11-05 Tom de Vries <tom@codesourcery.com>
452 * parse.c (match, matcha, matchs, matcho, matchds, matchdo): Remove
453 semicolon after "do {} while (0)".
455 2017-11-04 Andre Vehreschild <vehre@gcc.gnu.org>
457 * trans-expr.c (gfc_trans_assignment_1): Character kind conversion may
458 create a loop variant temporary, too.
459 * trans-intrinsic.c (conv_caf_send): Treat char arrays as arrays and
461 * trans.c (get_array_span): Take the character kind into account when
462 doing pointer arithmetic.
464 2017-11-04 Thomas Koenig <tkoenig@gcc.gnu.org>
467 * gfortran.h (gfc_check_f): Replace fm3l with fm4l.
468 * intrinsic.h (gfc_resolve_maxloc): Add gfc_expr * to argument
470 (gfc_resolve_minloc): Likewise.
471 * check.c (gfc_check_minloc_maxloc): Handle kind argument.
472 * intrinsic.c (add_sym_3_ml): Rename to
473 (add_sym_4_ml): and handle kind argument.
474 (add_function): Replace add_sym_3ml with add_sym_4ml and add
475 extra arguments for maxloc and minloc.
476 (check_specific): Change use of check.f3ml with check.f4ml.
477 * iresolve.c (gfc_resolve_maxloc): Handle kind argument. If
478 the kind is smaller than the smallest library version available,
479 use gfc_default_integer_kind and convert afterwards.
480 (gfc_resolve_minloc): Likewise.
482 2017-11-04 Paul Thomas <pault@gcc.gnu.org>
485 * trans-decl.c (gfc_trans_deferred_vars): Do a better job of a
486 case where 'tmp' was used unititialized and remove TODO.
488 2017-11-03 Steven G. Kargl <kargl@gcc.gnu.org>
491 * resolve.c (resolve_equivalence): An entity in a common block within
492 a module cannot appear in an equivalence statement if the entity is
493 with a pure procedure.
495 2017-10-31 Jim Wilson <wilson@tuliptree.org>
497 * parse.c (unexpected_eof): Call gcc_unreachable before return.
499 2017-10-30 Paul Thomas <pault@gcc.gnu.org>
502 * trans_expr.c (gfc_conv_procedure_call): When passing a class
503 argument to an unlimited polymorphic dummy, it is wrong to cast
504 the passed expression as unlimited, unless it is unlimited. The
505 correct way is to assign to each of the fields and set the _len
508 2017-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
510 * resolve.c (resolve_transfer): Set derived to correct symbol for
513 2017-10-29 Jim Wilson <wilson@tuliptree.org>
515 * invoke.texi: Delete adb and sdb references.
517 2017-10-28 Andre Vehreschild <vehre@gcc.gnu.org>
519 * check.c (gfc_check_co_reduce): Clarify error message.
521 2017-10-28 Paul Thomas <pault@gcc.gnu.org>
524 * trans-expr.c (trans_class_vptr_len_assignment): 'vptr_expr'
525 must only be set if the right hand side expression is of type
528 2017-10-27 Steven G. Kargl <kargl@gcc.gnu.org>
531 * match.c (gfc_match_allocate): Exit early on syntax error.
533 2017-10-27 Thomas Koenig <tkoenig@gcc.gnu.org>
536 * simplify.c (is_constant_array_expr): If the expression is
537 a parameter array, call gfc_simplify_expr.
539 2017-10-25 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
541 * match.c (gfc_match_type_is): Fix typo in error message.
543 2017-10-21 Paul Thomas <pault@gcc.gnu.org>
546 * decl.c (gfc_get_pdt_instance): Remove the error message that
547 the parameter does not have a corresponding component since
548 this is now taken care of when the derived type is resolved. Go
549 straight to error return instead.
550 (gfc_match_formal_arglist): Make the PDT relevant errors
551 immediate so that parsing of the derived type can continue.
552 (gfc_match_derived_decl): Do not check the match status on
553 return from gfc_match_formal_arglist for the same reason.
554 * resolve.c (resolve_fl_derived0): Check that each type
555 parameter has a corresponding component.
558 * resolve.c (resolve_generic_f): Check that the derived type
559 can be used before resolving the struture constructor.
562 * symbol.c (check_conflict): Add the conflicts involving PDT
563 KIND and LEN attributes.
565 2017-10-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
567 * interface.c (check_sym_interfaces, check_uop_interfaces,
568 gfc_check_interfaces): Base interface_name buffer off
571 2017-10-19 Jakub Jelinek <jakub@redhat.com>
574 * gfortran.h (gfc_resolve_do_iterator): Add a bool arg.
575 (gfc_resolve_omp_local_vars): New declaration.
576 * openmp.c (omp_current_ctx): Make static.
577 (gfc_resolve_omp_parallel_blocks): Handle EXEC_OMP_TASKLOOP
578 and EXEC_OMP_TASKLOOP_SIMD.
579 (gfc_resolve_do_iterator): Add ADD_CLAUSE argument, if false,
580 don't actually add any clause. Move omp_current_ctx test
582 (handle_local_var, gfc_resolve_omp_local_vars): New functions.
583 * resolve.c (gfc_resolve_code): Call gfc_resolve_omp_parallel_blocks
584 instead of just gfc_resolve_omp_do_blocks for EXEC_OMP_TASKLOOP
585 and EXEC_OMP_TASKLOOP_SIMD.
586 (gfc_resolve_code): Adjust gfc_resolve_do_iterator caller.
587 (resolve_codes): Call gfc_resolve_omp_local_vars.
589 2017-10-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
591 * gfortran.h (gfc_lookup_function_fuzzy): New declaration.
592 (gfc_closest_fuzzy_match): New declaration.
593 (vec_push): New definition.
594 * misc.c (gfc_closest_fuzzy_match): New definition.
595 * resolve.c: Include spellcheck.h.
596 (lookup_function_fuzzy_find_candidates): New static function.
597 (lookup_uop_fuzzy_find_candidates): Likewise.
598 (lookup_uop_fuzzy): Likewise.
599 (resolve_operator) <INTRINSIC_USER>: Call lookup_uop_fuzzy.
600 (gfc_lookup_function_fuzzy): New definition.
601 (resolve_unknown_f): Call gfc_lookup_function_fuzzy.
602 * interface.c (check_interface0): Likewise.
603 (lookup_arg_fuzzy_find_candidates): New static function.
604 (lookup_arg_fuzzy ): Likewise.
605 (compare_actual_formal): Call lookup_arg_fuzzy.
606 * symbol.c: Include spellcheck.h.
607 (lookup_symbol_fuzzy_find_candidates): New static function.
608 (lookup_symbol_fuzzy): Likewise.
609 (gfc_set_default_type): Call lookup_symbol_fuzzy.
610 (lookup_component_fuzzy_find_candidates): New static function.
611 (lookup_component_fuzzy): Likewise.
612 (gfc_find_component): Call lookup_component_fuzzy.
614 2017-10-18 Thomas Koenig <tkoenig@gcc.gnu.org>
617 * frontend-passes.c (combine_array_constructor): If an array
618 constructor is all constants and has more elements than a small
619 constant, don't convert a*[b,c] to [a*b,a*c] to reduce compilation
622 2017-10-18 Thomas Koenig <tkoenig@gcc.gnu.org>
625 * resolve.c (resovle_symbol): Change gcc_assert to
626 sensible error message.
628 2017-10-18 Paul Thomas <pault@gcc.gnu.org>
631 * trans_decl.c (gfc_get_symbol_decl): Procedure symbols that
632 have the 'used_in_submodule' attribute should be processed by
633 'gfc_get_extern_function_decl'.
635 2017-10-16 Fritz Reese <fritzoreese@gmail.com>
638 * trans-io.c (transfer_expr): Treat BT_UNION as BT_DERIVED.
640 2017-10-15 Thomas Koenig <tkoenig@gcc.gnu.org>
643 * fortran/scanner.c (last_error_char): New global variable.
644 (gfc_scanner_init_1): Set last_error_char to NULL.
645 (gfc_gobble_whitespace): If a character not printable or
646 not newline, issue an error.
648 2017-10-13 Paul Thomas <pault@gcc.gnu.org>
651 * resolve.c (resolve_symbol): Ensure that derived type array
652 results get default initialization.
654 2017-10-11 Nathan Sidwell <nathan@acm.org>
656 * cpp.c (gfc_cpp_add_include_path): Update incpath_e names.
657 (gfc_cpp_add_include_path_after): Likewise.
659 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
661 * target-memory.c (gfc_interpret_logical): Use wi::to_wide when
662 operating on trees as wide_ints.
663 * trans-const.c (gfc_conv_tree_to_mpz): Likewise.
664 * trans-expr.c (gfc_conv_cst_int_power): Likewise.
665 * trans-intrinsic.c (trans_this_image): Likewise.
666 (gfc_conv_intrinsic_bound): Likewise.
667 (conv_intrinsic_cobound): Likewise.
669 2017-10-08 Steven G. Kargl <kargl@gcc.gnu.org>
671 * check.c (gfc_check_x): Remove function.
672 * intrinsic.c (add_functions): Use gfc_check_fn_r.
674 2017-10-08 Paul Thomas <pault@gcc.gnu.org>
677 * module.c : Bump up MOD_VERSION to 15.
678 (mio_component): Edit comment about PDT specification list.
679 (mio_expr, mio_symbol): Include the expression and symbol PDT
680 specification lists in the same way as in mio_component.
682 2017-10-08 Thomas Koenig <tkoenig@gcc.gnu.org>
684 * dump_prase_tree (show_symbol): Output list of variables in
686 (show_code_node): Add new line for ELSE and END DO for DO
688 * invoke.texi: Document that the output of
689 -fdump-fortran-original, -fdump-fortran-optimized and
690 -fdump-parse-tree is unsable and may lead to ICEs.
692 2017-10-07 Paul Thomas <pault@gcc.gnu.org>
695 * class.c (gfc_find_derived_vtab): Return NULL for a passed
696 pdt template to prevent bad procedures from being written.
697 * decl.c (gfc_get_pdt_instance): Do not use the default
698 initializer for pointer and allocatable pdt type components. If
699 the component is allocatbale, set the 'alloc_comp' attribute of
701 * module.c : Add a prototype for 'mio_actual_arglist'. Add a
702 boolean argument 'pdt'.
703 (mio_component): Call it for the parameter list of pdt type
704 components with 'pdt' set to true.
705 (mio_actual_arg): Add the boolean 'pdt' and, if it is set, call
706 mio_integer for the 'spec_type'.
707 (mio_actual_arglist): Add the boolean 'pdt' and use it in the
708 call to mio_actual_arg.
709 (mio_expr, mio_omp_udr_expr): Call mio_actual_arglist with
711 * resolve.c (get_pdt_spec_expr): Add the parameter name to the
712 KIND parameter error.
713 (get_pdt_constructor): Check that cons->expr is non-null.
714 * trans-array.c (structure_alloc_comps): For deallocation of
715 allocatable components, ensure that parameterized components
716 are deallocated first. Likewise, when parameterized components
717 are allocated, nullify allocatable components first. Do not
718 recurse into pointer or allocatable pdt components while
719 allocating or deallocating parameterized components. Test that
720 parameterized arrays or strings are allocated before freeing
722 (gfc_trans_pointer_assignment): Call the new function. Tidy up
723 a minor whitespace issue.
724 trans-decl.c (gfc_trans_deferred_vars): Set 'tmp' to NULL_TREE
725 to prevent the expression from being used a second time.
727 2017-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
730 * expr.c (gfc_check_pointer_assign): Error
731 for non-contiguous rhs.
733 2017-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
735 * gfortran.h (async_io_dt): Add external reference.
736 * io.c (async_io_dt): Add variable.
737 (compare_to_allowed_values): Add prototyte. Add optional argument
738 num. If present, set it to the number of the entry that was
740 (check_io_constraints): If this is for an asynchronous I/O
741 statement, set async_io_dt and set the asynchronous flag for
743 * resolve.c (resolve_transfer): If async_io_dt is set, set
744 the asynchronous flag on the variable.
745 (resolve_fl_namelist): If async_io_dt is set, set the asynchronous
746 flag on all elements of the namelist.
748 2017-10-04 Paul Thomas <pault@gcc.gnu.org>
752 * resolve.c (resolve_assoc_var): Deferred character type
753 associate names must not receive an integer conatant length.
754 * symbol.c (gfc_is_associate_pointer): Deferred character
755 length functions also require an associate pointer.
756 * trans-decl.c (gfc_get_symbol_decl): Deferred character
757 length functions or derived type components require the assoc
758 name to have variable string length.
759 * trans-stmt.c (trans_associate_var): Set the string length of
760 deferred string length associate names. The address expression
761 is not needed for allocatable, pointer or dummy targets. Change
762 the comment about defered string length targets.
764 2017-10-03 Thomas Koenig <tkoenig@gcc.gnu.org>
766 * io.c (match_wait_element): Correctly match END and EOR tags.
767 * dump-parse-tree.c (show_code_node): Handle EXEC_WAIT.
769 2017-10-02 Paul Thomas <pault@gcc.gnu.org>
772 * resolve.c (gfc_resolve_code): Simplify condition for class
773 pointer assignments becoming regular assignments by asserting
774 that only class valued targets are permitted.
775 * trans-expr.c (trans_class_pointer_fcn): New function using a
776 block of code from gfc_trans_pointer_assignment.
777 (gfc_trans_pointer_assignment): Call the new function. Tidy up
778 a minor whitespace issue.
780 2017-10-01 Dominique d'Humieres <dominiq@lps.ens.fr>
783 * parse.c (gfc_global_used): Replace the gfc_internal_error
786 2017-09-29 Dominique d'Humieres <dominiq@lps.ens.fr>
789 * interface.c (compare_actual_formal): Change warnings to errors
790 when "Actual argument contains too few elements for dummy
791 argument", unless -std=legacy is used.
793 2017-09-27 Thomas Schwinge <thomas@codesourcery.com>
795 * lang.opt <Wdo-subscript>: End help text with a period.
797 2017-09-26 Thomas Koenig <tkoenig@gcc.gnu.org>
799 * frontend-passes.c (do_subscript): Don't do anything
800 if inside an associate list.
802 2017-09-25 Thomas Koenig <tkoenig@gcc.gnu.org>
804 * lang.opt: Add -Wdo-subscript.
805 * frontend-passes.c (do_t): New type.
806 (doloop_list): Use variable of do_type.
807 (if_level): Variable to track if levels.
808 (select_level): Variable to track select levels.
809 (gfc_run_passes): Initialize i_level and select_level.
810 (doloop_code): Record current level of if + select
811 level in doloop_list. Add seen_goto if there could
812 be a branch outside the loop. Use different type for
814 (doloop_function): Call do_intent and do_subscript; move
815 functionality of checking INTENT to do_intent.
816 (insert_index_t): New type, for callback_insert_index.
817 (callback_insert_index): New function.
818 (insert_index): New function.
819 (do_subscript): New function.
820 (do_intent): New function.
821 (gfc_code_walker): Keep track of if_level and select_level.
822 * invoke.texi: Document -Wdo-subscript.
824 2017-09-25 Janne Blomqvist <jb@gcc.gnu.org>
826 * trans.c (gfc_unlikely): Remove unnecessary fold_convert.
827 (gfc_likely): Likewise.
829 2017-09-24 Thomas Koenig <tkoenig@gcc.gnu.org>
830 Steven G. Kargl <kargl@gcc.gnu.org>
833 * expr.c (gfc_get_full_arrayspec_from_expr): If there is
834 no symtree, set array spec to NULL.
836 2017-09-23 Janus Weil <janus@gcc.gnu.org>
839 * lang.opt: Add the options -fdefault-real-10 and -fdefault-real-16.
840 Rename flag_default_real to flag_default_real_8.
841 * invoke.texi: Add documentation.
842 * module.c (use_iso_fortran_env_module): flag_default_real is renamed.
843 * trans-types.c (gfc_init_kinds): Implement the flags
844 -fdefault-real-10 and -fdefault-real-16. Make -fdefault-double-8 work
845 without -fdefault-real-8.
847 2017-09-21 Paul Thomas <pault@gcc.gnu.org>
850 * match.c (gfc_match_associate): Before failing the association
851 try again, allowing a proc pointer selector.
856 * primary.c (gfc_match_varspec): Introduce 'tgt_expr', which
857 points to the associate selector, if any. Go through selector
858 references, after resolution for variables, to catch any full
859 or section array references. If a class associate name does
860 not have the same declared type as the selector, resolve the
861 selector and copy the declared type to the associate name.
862 Before throwing a no implicit type error, resolve all allowed
863 selector expressions, and copy the resulting typespec.
866 * resolve.c (resolve_assoc_var): Selector must cannot be the
867 NULL expression and it must have a type.
870 * resolve.c (resolve_symbol): Allow associate names to be
873 2017-09-21 Cesar Philippidis <cesar@codesourcery.com>
875 * openmp.c (gfc_match_oacc_wait): Don't restrict wait directive
876 arguments to constant integers.
878 2017-09-17 Paul Thomas <pault@gcc.gnu.org>
881 * decl.c (gfc_get_pdt_instance): Use the component initializer
882 expression for the default, rather than the parameter value.
883 * resolve.c (resolve_pdt): New function.
884 (resolve_symbol): Call it. Remove false error, prohibiting
885 deferred type parameters for dummy arguments.
888 * primary.c (gfc_match_varspec): If the type of an associate
889 name is unknown and yet there is a match, try resolving the
890 target expression and using its type.
892 2017-09-15 Paul Thomas <pault@gcc.gnu.org>
895 trans-decl.c (gfc_trans_deferred_vars): Do not null the 'span'
896 field if the symbol is either implicitly or explicitly saved.
898 2017-09-13 Paul Thomas <pault@gcc.gnu.org>
901 * decl.c (match_char_kind): If the kind expression is
902 parameterized, save it in saved_kind_expr and set kind = 0.
903 (gfc_get_pdt_instance): Resolve and simplify before emitting
904 error on expression kind. Insert a missing simplification after
905 insertion of kind expressions.
907 2017-09-12 Paul Thomas <pault@gcc.gnu.org>
911 * decl.c (variable_decl): Check pdt template components for
912 appearance of KIND/LEN components in the type parameter name
913 list, that components corresponding to type parameters have
914 either KIND or LEN attributes and that KIND or LEN components
915 are scalar. Copy the initializer to the parameter value.
916 (gfc_get_pdt_instance): Add a label 'error_return' and follow
917 it with repeated code, while replacing this code with a jump.
918 Check if a parameter appears as a component in the template.
919 Make sure that the parameter expressions are integer. Validate
921 (gfc_match_decl_type_spec): Search for pdt_types in the parent
922 namespace since they are instantiated in the template ns.
923 * expr.c (gfc_extract_int): Use a KIND parameter if it
924 appears as a component expression.
925 (gfc_check_init_expr): Allow expressions with the pdt_kind
927 *primary.c (gfc_match_actual_arglist): Make sure that the first
928 keyword argument is recognised when 'pdt' is set.
930 2017-09-10 Paul Thomas <pault@gcc.gnu.org>
938 * expr.c (is_subref_array): Add class pointer array dummies
939 to the list of expressions that return true.
940 * trans-array.c: Add SPAN_FIELD and update indices for
942 (gfc_conv_descriptor_span, gfc_conv_descriptor_span_get,
943 gfc_conv_descriptor_span_set, is_pointer_array,
944 get_array_span): New functions.
945 (gfc_get_descriptor_offsets_for_info): New function to preserve
946 API for access to descriptor fields for trans-types.c.
947 (gfc_conv_scalarized_array_ref): If the expression is a subref
948 array, make sure that info->descriptor is a descriptor type.
949 Otherwise, if info->descriptor is a pointer array, set 'decl'
950 and fix it if it is a component reference.
951 (build_array_ref): Simplify handling of class array refs by
952 passing the vptr to gfc_build_array_ref rather than generating
953 the pointer arithmetic in this function.
954 (gfc_conv_array_ref): As in gfc_conv_scalarized_array_ref, set
956 (gfc_array_allocate): Set the span field if this is a pointer
957 array. Use the expr3 element size if it is available, so that
958 the dynamic type element size is used.
959 (gfc_conv_expr_descriptor): Set the span field for pointer
961 * trans-array.h: Prototypes for gfc_conv_descriptor_span_get
962 gfc_conv_descriptor_span_set and
963 gfc_get_descriptor_offsets_for_info added.
964 trans-decl.c (gfc_get_symbol_decl): If a non-class pointer
965 array, mark the declaration as a GFC_DECL_PTR_ARRAY_P. Remove
966 the setting of GFC_DECL_SPAN.
967 (gfc_trans_deferred_vars): Set the span field to zero in thge
969 * trans-expr.c (gfc_conv_procedure_call): Do not use copy-in/
970 copy-out to pass subref expressions to a pointer dummy.
971 (gfc_trans_pointer_assignment): Remove code for setting of
972 GFC_DECL_SPAN. Set the 'span' field for non-class pointers to
973 class function results. Likewise for rank remap. In the case
974 that the target is not a whole array, use the target array ref
975 for remap and, since the 'start' indices are missing, set the
976 lbounds to one, as required by the standard.
977 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Pick up the
978 'token' offset from the field decl in the descriptor.
979 (conv_isocbinding_subroutine): Set the 'span' field.
980 * trans-io.c (gfc_trans_transfer): Always scalarize pointer
982 * trans-stmt.c (trans_associate_var): Set the 'span' field.
983 * trans-types.c (gfc_get_array_descriptor_base): Add the 'span'
984 field to the array descriptor.
985 (gfc_get_derived_type): Pointer array components are marked as
986 GFC_DECL_PTR_ARRAY_P.
987 (gfc_get_array_descr_info): Replaced API breaking code for
988 descriptor offset calling gfc_get_descriptor_offsets_for_info.
989 * trans.c (get_array_span): New function.
990 (gfc_build_array_ref): Simplify by calling get_array_span and
991 obtain 'span' if 'decl' or 'vptr' present.
992 * trans.h : Rename DECL_LANG_FLAG_6, GFC_DECL_SUBREF_ARRAY_P,
993 as GFC_DECL_PTR_ARRAY_P.
995 2017-09-09 Paul Thomas <pault@gcc.gnu.org>
997 * decl.c : Add decl_type_param_list, type_param_spec_list as
998 static variables to hold PDT spec lists.
999 (build_sym): Copy 'type_param_spec_list' to symbol spec_list.
1000 (build_struct): Copy the 'saved_kind_expr' to the component
1001 'kind_expr'. Check that KIND or LEN components appear in the
1002 decl_type_param_list. These should appear as symbols in the
1003 f2k_derived namespace. If the component is itself a PDT type,
1004 copy the decl_type_param_list to the component param_list.
1005 (gfc_match_kind_spec): If the KIND expression is parameterized
1006 set KIND to zero and store the expression in 'saved_kind_expr'.
1007 (insert_parameter_exprs): New function.
1008 (gfc_insert_kind_parameter_exprs): New function.
1009 (gfc_insert_parameter_exprs): New function.
1010 (gfc_get_pdt_instance): New function.
1011 (gfc_match_decl_type_spec): Match the decl_type_spec_list if it
1012 is present. If it is, call 'gfc_get_pdt_instance' to obtain the
1013 specific instance of the PDT.
1014 (match_attr_spec): Match KIND and LEN attributes. Check for the
1015 standard and for type/kind of the parameter. They are also not
1016 allowed outside a derived type definition.
1017 (gfc_match_data_decl): Null the decl_type_param_list and the
1018 type_param_spec_list on entry and free them on exit.
1019 (gfc_match_formal_arglist): If 'typeparam' is true, add the
1020 formal symbol to the f2k_derived namespace.
1021 (gfc_match_derived_decl): Register the decl_type_param_list
1022 if this is a PDT. If this is a type extension, gather up all
1023 the type parameters and put them in the right order.
1024 *dump-parse-tree.c (show_attr): Signal PDT templates and the
1025 parameter attributes.
1026 (show_components): Output parameter atrributes and component
1028 (show_symbol): Show variable parameter lists.
1029 * expr.c (expr.c): Copy the expression parameter list.
1030 (gfc_is_constant_expr): Pass on symbols representing PDT
1032 (gfc_check_init_expr): Break on PDT KIND parameters and
1033 PDT parameter expressions.
1034 (gfc_check_assign): Assigning to KIND or LEN components is an
1036 (derived_parameter_expr): New function.
1037 (gfc_derived_parameter_expr): New function.
1038 (gfc_spec_list_type): New function.
1039 * gfortran.h : Add enum gfc_param_spec_type. Add the PDT attrs
1040 to the structure symbol_attr. Add the 'kind_expr' and
1041 'param_list' field to the gfc_component structure. Comment on
1042 the reuse of the gfc_actual_arglist structure as storage for
1043 type parameter spec lists. Add the new field 'spec_type' to
1044 this structure. Add 'param_list' fields to gfc_symbol and
1045 gfc_expr. Add prototypes for gfc_insert_kind_parameter_exprs,
1046 gfc_insert_parameter_exprs, gfc_add_kind, gfc_add_len,
1047 gfc_derived_parameter_expr and gfc_spec_list_type.
1048 * interface.c (gfc_compare_derived_types): Treat PDTs in the
1049 same way as sequence types.
1050 * match.c : Add variable 'type_param_spec_list'.
1051 (gfc_op2string, gfc_match_member_sep, gfc_match_label): Remove
1052 trailing whitespace.
1053 (match_derived_type_spec): Match PDTs and find specific
1055 (gfc_match_type_spec): Remove more trailing whitespace.
1056 (gfc_match_allocate): Assumed or deferred parameters cannot
1057 appear here. Copy the type parameter spec list to the expr for
1058 the allocatable entity. Free 'type_param_spec_list'.
1059 (gfc_match_common, gfc_match_namelist, gfc_match_module): Still
1060 more trailing whitespace to remove.
1061 (gfc_match_type_is): Allow PDT typespecs.
1062 * match.h : Modify prototypes for gfc_match_formal_arglist and
1063 gfc_match_actual_arglist.
1064 * module.c (ab_attribute, mstring attr_bits): PDT attributes
1066 (mio_symbol_attribute): PDT attributes handled.
1067 (mio_component): Deal with 'kind_expr' field.
1068 (mio_full_f2k_derived): For PDT templates, transfer the formal
1069 namespace symroot to the f2k_derived namespace.
1070 *primary.c (match_keyword_arg, gfc_match_actual_arglist): Add
1071 modifications to handle PDT spec lists. These are flagged in
1072 both cases by new boolean arguments, whose prototype defaults
1074 (gfc_match_structure_constructor, match_variable): Remove yet
1075 more trailing whitespace.
1076 * resolve.c (get_pdt_spec_expr, get_pdt_constructor): New
1078 (resolve_structure_cons): If the constructor is a PDT template,
1079 call get_pdt_constructor to build it using the parameter lists
1080 and then get the specific instance of the PDT.
1081 (resolve_component): PDT strings need a hidden string length
1082 component like deferred characters.
1083 (resolve_symbol): Dummy PDTs cannot have deferred parameters.
1084 * symbol.c (gfc_add_kind, gfc_add_len): New functions.
1085 (free_components): Free 'kind_expr' and 'param_list' fields.
1086 (gfc_free_symbol): Free the 'param_list' field.
1087 (gfc_find_sym_tree): If the current state is a PDT template,
1088 look for the symtree in the f2k_derived namspaces.
1089 trans-array.c (structure_alloc_comps): Allocate and deallocate
1090 PDTs. Check dummy arguments for compliance of LEN parameters.
1091 Add the new functions to the preceeding enum.
1092 (gfc_allocate_pdt_comp, gfc_deallocate_pdt_comp and
1093 gfc_check_pdt_dummy): New functions calling above.
1094 * trans-array.h : Add prototypes for these functions.
1095 trans-decl.c (gfc_get_symbol_decl): Call gfc_defer_symbol_init
1096 as appropriate for PDT symbols.
1097 (gfc_trans_deferred_vars): Allocate/deallocate PDT entities as
1098 they come into and out of scope. Exclude pdt_types from being
1100 (gfc_trans_subcomponent_assign): PDT array components must be
1101 handles as if they are allocatable.
1102 * trans-stmt.c (gfc_trans_allocate): Handle initialization of
1104 (gfc_trans_deallocate): Likewise.
1105 * trans-types.c (gfc_get_derived_type): PDT templates must not
1106 arrive here. PDT string components are handles as if deferred.
1107 Similarly, PDT arrays are treated as if allocatable. PDT
1108 strings are pointer types.
1109 * trans.c (gfc_deferred_strlen): Handle PDT strings in the same
1110 way as deferred characters.
1112 2017-09-01 Jakub Jelinek <jakub@redhat.com>
1115 * parse.c (decode_omp_directive): Use matchs instead of matcho for
1116 end ordered and ordered directives, except for ordered depend. For
1117 -fopenmp-simd and ordered depend, reject the stmt.
1118 * trans-openmp.c (gfc_trans_omp_ordered): For -fopenmp-simd ignore
1119 threads clause and if simd clause isn't present, just translate the
1122 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1123 Alan Hayward <alan.hayward@arm.com>
1124 David Sherwood <david.sherwood@arm.com>
1126 * trans-types.c (gfc_init_kinds): Use opt_scalar_int_mode for
1129 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1130 Alan Hayward <alan.hayward@arm.com>
1131 David Sherwood <david.sherwood@arm.com>
1133 * target-memory.c (size_integer): Use SCALAR_INT_TYPE_MODE.
1134 (size_logical): Likewise.
1136 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1137 Alan Hayward <alan.hayward@arm.com>
1138 David Sherwood <david.sherwood@arm.com>
1140 * trans-types.c (gfc_type_for_mode): Use is_a <scalar_int_mode>.
1142 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1143 Alan Hayward <alan.hayward@arm.com>
1144 David Sherwood <david.sherwood@arm.com>
1146 * trans-types.c (gfc_init_kinds): Use opt_scalar_float_mode
1147 and FOR_EACH_MODE_IN_CLASS.
1149 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1150 Alan Hayward <alan.hayward@arm.com>
1151 David Sherwood <david.sherwood@arm.com>
1153 * target-memory.c (size_float): Use SCALAR_FLOAT_TYPE_MODE
1154 instead of TYPE_MODE.
1156 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1157 Alan Hayward <alan.hayward@arm.com>
1158 David Sherwood <david.sherwood@arm.com>
1160 * trans-types.c (gfc_init_kinds): Use machine_mode instead of int
1163 2017-08-28 Janus Weil <janus@gcc.gnu.org>
1166 * expr.c (gfc_check_pointer_assign): Improve the check whether pointer
1167 may outlive pointer target.
1169 2017-08-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1172 * frontend-passes (inline_matumul_assign): Explicity
1173 set typespec for call to CONJG.
1175 2017-08-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1178 * trans-io.c (get_dtio_proc): Add check for format label and set
1179 formatted flag accordingly. Reorganize the code a little.
1181 2017-08-16 Thomas Koenig <tkoenig@gcc.gnu.org>
1184 * frontend-passes.c (realloc_string_callback): If expression is a
1185 concatenation, also check for dependency.
1186 (constant_string_length): Check for presence of symtree.
1188 2017-08-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1190 * gfortran.texi: Document format of unformatted sequential files.
1192 2017-08-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1194 * invoke.texi: Actually commit change about -Ofast.
1196 2017-08-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1199 * resolve.c (resolve_symbol): Adjust (and reformat)
1200 comment. Perform check if a BIND(C) is declared
1201 at module level regardless of whether it is typed
1204 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
1206 * options.c (set_dec_flags): Only set legacy standards when value
1209 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
1211 * options.c (set_dec_flags, gfc_post_options): Only set flag_d_lines
1212 with -fdec when not set by user.
1214 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
1216 * decl.c (attr_seen): New static variable.
1217 * decl.c (variable_decl): Match %FILL in STRUCTURE body.
1218 * gfortran.texi: Update documentation.
1220 2017-08-08 Martin Liska <mliska@suse.cz>
1222 * trans-types.c: Include header files.
1224 2017-08-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1228 * options.c: Make -Ofast honor -fmax-stack-var-size.
1229 * invoke.texi: Document change.
1231 2017-08-01 Thomas König <tkoenig@gcc.gnu.org>
1234 * intrisic.c (gfc_convert_type_warn): Only set typespec for
1235 empty array constructors which don't have it already.
1237 2017-08-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1240 * lang.opt (fc-prototypes): Add option.
1241 * gfortran.h (gfc_typespec): Add interop_kind to struct.
1242 (gfc_dump_c_prototypes): Add prototype.
1243 * decl.c (gfc_match_kind_spec): Copy symbol used for kind to typespec.
1244 * parse.c (gfc_parse_file): Call gfc_dump_prototypes.
1245 * dump-parse-tree.c (gfc_dump_c_prototypes): New function.
1246 (type_return): New enum.
1247 (get_c_type_name): New function.
1248 (write_decl): New function.
1249 (write_type): New function.
1250 (write_variable): New function.
1251 (write_proc): New function.
1252 (write_interop_decl): New function.
1253 * invoke.texi: Document -fc-prototypes.
1255 2017-08-01 Dominique d'Humieres <dominiq@lps.ens.fr>
1258 * expr.c (gfc_check_init_expr): Use the renamed name.
1260 2017-07-31 Jakub Jelinek <jakub@redhat.com>
1262 * check.c (gfc_check_num_images): Fix a pasto.
1264 2017-07-29 Jakub Jelinek <jakub@redhat.com>
1266 * trans-decl.c (gfc_trans_use_stmts): Pass false as new argument to
1267 the imported_module_or_decl debug hook.
1269 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1271 * resolve.c (find_reachable_labels): Adjust.
1273 2017-07-25 Jakub Jelinek <jakub@redhat.com>
1275 * ioparm.def: Use 1U << 31 instead of 1 << 31 as flags2 mask.
1277 2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1279 * dump-parse-tree.c (show_symbol): Show binding label if present.
1281 2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1282 Mikael Morin <mikael@gcc.gnu.org>
1285 * fortran/trans-array.c (gfc_conv_resolve_dependencies):
1286 Break if dependency has been found.
1288 2017-07-23 Alexander Monakov <amonakov@ispras.ru>
1290 * interface.c (pair_cmp): Fix gfc_symbol comparison. Adjust comment.
1292 2017-07-18 Nathan Sidwell <nathan@acm.org>
1294 * trans.c (gfc_build_array_ref): Use TYPE_MAX_VALUE.
1296 2017-07-09 Dominique d'Humieres <dominiq@lps.ens.fr>
1299 * class.c (class_array_ref_detected): Remove a redundant
1302 2017-07-06 Harald Anlauf <anlauf@gmx.de>
1305 * array.c (gfc_ref_dimen_size): Handle bad subscript triplets.
1307 2017-07-03 Dominique d'Humieres <dominiq@lps.ens.fr>
1310 * resolve.c (resolve_symbol): Fix typo.
1312 2017-07-03 Dominique d'Humieres <dominiq@lps.ens.fr>
1315 * symbol.c (check_conflict): Add missing "conflicts".
1317 2017-06-29 Cesar Philippidis <cesar@codesourcery.com>
1320 * openmp.c (gfc_match_oacc_routine): Check if proc_name exist before
1321 comparing the routine name against it.
1323 2017-06-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1326 * trans-stmt.c (gfc_trans_call): If no code expr, use code->loc
1327 as warning/error locus.
1329 2017-06-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1332 * arith.c (wprecision_int_real): Set return value before
1333 mpz_clear and then return after it.
1335 2017-06-15 Janus Weil <janus@gcc.gnu.org>
1338 * trans-expr.c (gfc_conv_procedure_call): Deallocate the result of
1339 scalar allocatable procedure-pointer components.
1341 2017-06-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1344 * frontend-passes.c (traverse_io_block): Also
1345 check for variables occurring as indices multiple
1346 time in a single implied DO loop.
1348 2017-06-05 Janus Weil <janus@gcc.gnu.org>
1351 * trans-expr.c (gfc_conv_procedure_call): Fix detection of allocatable
1354 2017-06-05 Nicolas Koenig <koenigni@student.ethz.ch>
1357 * frontend-passes.c (traverse_io_block): New function.
1358 (simplify_io_impl_do): New function.
1359 (optimize_namespace): Invoke gfc_code_walker with
1360 simplify_io_impl_do.
1362 2017-06-02 Jakub Jelinek <jakub@redhat.com>
1365 * openmp.c (resolve_omp_clauses): Fix a typo.
1367 2017-05-30 David Malcolm <dmalcolm@redhat.com>
1369 * error.c (gfc_format_decoder): Update for new bool and
1370 const char ** params.
1372 2017-05-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1375 * frontend-passes.c (check_conjg_transpose_variable):
1377 (has_dimen_vector_ref): Likewise
1378 (matmul_temp_args): New function. Add prototype.
1379 (optimize_namespace): Call matmul_temp_args.
1381 2017-05-28 Thomas Koenig <tkoenig@gcc.gnu.org>
1383 * frontend-passes.c (matmul_lhs_realloc): Correct
1384 allocation size for case A1B2.
1386 2017-05-25 Thomas Koenig <tkoenig@gcc.gnu.org>
1388 * dump-parse-tree.c (show_expr): Also replace
1389 with dumpfile for showing values for forgotten
1392 2017-05-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1394 * dump-parse-tree.c (show_expr): Replace stdout
1395 with dumpfile for showing values.
1397 2017-05-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1400 * frontend-passes.c (matrix_case): Add A2TB2.
1401 (inline_limit_check): Handle MATMUL(TRANSPOSE(A),B)
1402 (inline_matmul_assign): Likewise.
1404 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1406 * openmp.c (OACC_KERNELS_CLAUSES): Add "OMP_CLAUSE_NUM_GANGS",
1407 "OMP_CLAUSE_NUM_WORKERS", "OMP_CLAUSE_VECTOR_LENGTH".
1409 2017-05-22 Janus Weil <janus@gcc.gnu.org>
1412 * resolve.c (resolve_fl_derived): Make sure that vtype symbols are
1415 2017-05-19 Paul Thomas <pault@gcc.gnu.org>
1418 * trans-io.c (nml_get_addr_expr): If we are dealing with class
1419 type data set tmp tree to get that address.
1420 (transfer_namelist_element): Set the array spec to point to the
1423 2017-05-19 David Malcolm <dmalcolm@redhat.com>
1426 * bbt.c (insert): Remove trailing exclamation mark from message.
1427 * decl.c (gfc_match_final_decl): Likewise.
1428 * dump-parse-tree.c (show_expr): Likewise.
1429 * module.c (gfc_use_module): Likewise.
1430 * primary.c (build_actual_constructor): Likewise.
1431 (gfc_convert_to_structure_constructor): Likewise.
1433 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1435 * gfortran.h (enum gfc_omp_default_sharing): Add
1436 "OMP_DEFAULT_PRESENT".
1437 * dump-parse-tree.c (show_omp_clauses): Handle it.
1438 * openmp.c (gfc_match_omp_clauses): Likewise.
1439 * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
1441 2017-05-18 Fritz Reese <fritzoreese@gmail.com>
1444 * decl.c (match_attr_spec, gfc_match_automatic,
1445 gfc_match_static, gfc_match_structure_decl): Unify diagnostic
1446 errors regarding -fdec options.
1447 * io.c (match_dec_etag, match_dec_vtag, match_dec_ftag): Ditto.
1449 2017-05-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1452 * trans-io.c (transfer_namelist_element): Change check from
1453 NULL_TREE to null_pointer_node.
1455 2017-05-17 Fritz Reese <fritzoreese@gmail.com>
1458 * expr.c (component_initializer): Don't generate initializers for
1460 * invoke.texi (-finit-derived): Document.
1462 2017-05-16 Paul Thomas <pault@gcc.gnu.org>
1465 * decl.c (build_sym): In a submodule allow overriding of host
1466 associated symbols from the ancestor module with a new
1469 2017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>
1472 * trans-stmt.c (gfc_trans_integer_select): Remove redundant condition.
1474 2017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>
1477 * expr.c (gfc_generate_initializer): If type conversion fails,
1478 check for error and return NULL.
1480 2017-05-14 Nicolas Koenig <koenigni@student.ethz.ch>
1483 * array.c (gfc_ref_dimen_size): Simplify stride
1485 * data.c (gfc_advance_section): Simplify start,
1486 end and stride expressions
1487 (gfc_advance_section): Simplify start and end
1489 (gfc_get_section_index): Simplify start expression
1491 2017-05-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1493 * io.c (gfc_resolve_dt): Fix returns to bool type.
1495 2017-05-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1498 * io.c (dtio_procs_present): Add new function to check for DTIO
1499 procedures relative to I/O statement READ or WRITE.
1500 (gfc_resolve_dt): Add namelist checks using the new function.
1501 * resolve.c (dtio_procs_present): Remove function and related
1502 namelist checks. (resolve_fl_namelist): Add check specific to
1503 Fortran 95 restriction on namelist objects.
1505 2017-05-11 Nathan Sidwell <nathan@acm.org>
1507 * trans-decl.c: Include dumpfile.h not tree-dump.h,
1509 2017-05-09 Janus Weil <janus@gcc.gnu.org>
1512 * resolve.c (gfc_resolve_finalizers): Ensure that derived-type
1513 components have a their finalizers resolved, also if the superordinate
1514 type itself has a finalizer.
1516 2017-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
1519 * frontend-passes.c (matmul_to_var_expr): New function,
1521 (matmul_to_var_code): Likewise.
1522 (optimize_namespace): Use them from gfc_code_walker.
1524 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1526 * cpp.c (cb_cpp_error): Replace report_diagnostic
1527 with diagnostic_report_diagnostic.
1528 * error.c (gfc_warning): Likewise.
1529 (gfc_warning_now_at): Likewise.
1530 (gfc_warning_now): Likewise.
1531 (gfc_warning_internal): Likewise.
1532 (gfc_error_now): Likewise.
1533 (gfc_fatal_error): Likewise.
1534 (gfc_error_opt): Likewise.
1535 (gfc_internal_error): Likewise.
1537 2017-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1540 * frontend-passes.c (inline_matmul_assign): Also check bounds
1541 for allocatable lhs and matrix-vector-multiplication.
1543 2017-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1546 * io.c (format_lex): Check for '/' and set token to FMT_SLASH.
1547 (check_format): Move FMT_DT checking code to data_desc section.
1548 * module.c (gfc_match_use): Include the case of INTERFACE_DTIO.
1550 2017-04-22 Janus Weil <janus@gcc.gnu.org>
1553 * trans-types.c (gfc_conv_procedure_call): Deallocate the components
1554 of allocatable intent(out) arguments.
1556 2017-04-21 Janus Weil <janus@gcc.gnu.org>
1559 * trans-types.c (gfc_get_derived_type): Prevent an infinite loop when
1560 building a derived type that includes a procedure pointer component
1561 with a polymorphic result.
1563 2017-04-17 Paul Thomas <pault@gcc.gnu.org>
1566 * module.c (find_symtree_for_symbol): Delete.
1567 (read_module): Remove the call to the above.
1569 2017-04-14 Janus Weil <janus@gcc.gnu.org>
1572 * class.c (generate_finalization_wrapper): Give the finalization wrapper
1573 the recursive attribute.
1575 2017-04-10 Nicolas Koenig <koenigni@student.ethz.ch>
1576 Paul Thomas <pault@gcc.gnu.org>
1579 * module.c (gfc_match_submodule): Add error
1580 if function is called in the wrong state.
1582 2017-04-10 Janus Weil <janus@gcc.gnu.org>
1585 * expr.c (gfc_check_pointer_assign): Check if procedure pointer
1586 components in a pointer assignment need an explicit interface.
1588 2017-03-18 Nicolas Koenig <koenigni@student.ethz.ch>
1591 * symbol.c (gfc_delete_symtree): If there is a period in the name, ignore
1592 everything before it.
1594 2017-03-28 Janus Weil <janus@gcc.gnu.org>
1597 * trans-io.c (transfer_namelist_element): Perform a polymorphic call
1598 to a DTIO procedure if necessary.
1600 2017-03-25 Paul Thomas <pault@gcc.gnu.org>
1604 * decl.c (access_attr_decl): Remove the error for an absent
1605 generic DTIO interface and ensure that symbol has the flavor
1608 2017-03-22 Dominique d'Humieres <dominiq@lps.ens.fr>
1611 * module.c: Remove trailing period.
1613 2017-03-22 Dominique d'Humieres <dominiq@lps.ens.fr>
1616 * decl.c: Replace '%s' with %qs.
1618 * interface.c: Likewise.
1619 * match.c: Likewise.
1620 * primary.c: Likewise.
1621 * resolve.c: Likewise.
1625 * io.c: Remove trailing spaces.
1626 * match.c: Likewise.
1627 * openmp.c: Likewise.
1628 * resolve.c: Likewise.
1629 * trans-intrinsic.c: Likewise.
1632 * expr.c: Remove a double spaces.
1635 * primary.c: Remove spurious quotes around %qs.
1637 2017-03-22 Thomas Koenig <tkoenig@gcc.gnu.org>
1640 * frontend-passes.c (combine_array_constructor): Take
1641 location of new expression from constructor expression instead
1644 2017-03-20 Nicolas Koenig <koenigni@student.ethz.ch>
1647 * symbol.c (check_conflict): Report an error if an EQUIVALENCE
1650 2017-03-18 Nicolas Koenig <koenigni@student.ethz.ch>
1653 * decl.c (add_hidden_procptr_result): Fixed Refs count of the
1654 created "ppr@" symbol.
1656 2017-03-18 Paul Thomas <pault@gcc.gnu.org>
1659 * module.c (mio_symbol_attribute): Remove reset of the flag
1660 'no_module_procedures'.
1661 (check_for_module_procedures): New function. Move declaration
1662 of 'no_module_procedures' to above it.
1663 (gfc_dump_module): Traverse namespace calling new function.
1665 2017-03-18 Paul Thomas <pault@gcc.gnu.org>
1668 * symbol.c (check_conflict): A dummy procedure in a submodule,
1669 module procedure is not an error.
1670 (gfc_add_flavor): Ditto.
1672 2017-03-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1675 * openmp.c (check_symbol_not_pointer): Adjust diagnostics.
1677 2017-03-16 Jakub Jelinek <jakub@redhat.com>
1680 * parse.c (gfc_ascii_statement): Use !$ACC for ST_OACC_ATOMIC
1681 and ST_OACC_END_ATOMIC, instead of !ACC.
1682 * trans-decl.c (finish_oacc_declare): Use !$ACC instead of $!ACC.
1683 * openmp.c (gfc_match_oacc_declare, gfc_match_oacc_wait,
1684 gfc_resolve_oacc_declare): Likewise.
1687 * error.c (gfc_format_decoder): Rename plus argument to set_locus,
1688 remove ATTRIBUTE_UNUSED from all arguments, call default_tree_printer
1689 if not a Fortran specific spec.
1690 * trans-io.c: Include options.h.
1691 (gfc_build_st_parameter): Temporarily disable -Wpadded around layout
1692 of artificial IO data structures.
1694 2017-03-15 David Malcolm <dmalcolm@redhat.com>
1697 * resolve.c (resolve_contained_fntype): Make error messages more
1698 amenable to translation.
1700 2017-03-06 Richard Biener <rguenther@suse.de>
1703 * trans.c (gfc_add_modify_loc): Weaken assert.
1705 2017-03-05 Andre Vehreschild <vehre@gcc.gnu.org>,
1706 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
1708 * check.c (positive_check): Add new function checking constant for
1709 being greater then zero.
1710 (gfc_check_image_status): Add checking of image_status arguments.
1711 (gfc_check_failed_or_stopped_images): Same but for failed_- and
1712 stopped_images function.
1713 * dump-parse-tree.c (show_code_node): Added output of FAIL IMAGE.
1714 * gfortran.h (enum gfc_statement): Added FAIL_IMAGE_ST.
1715 (enum gfc_isym_id): Added new intrinsic symbols.
1716 (enum gfc_exec_op): Added EXEC_FAIL_IMAGE.
1717 * gfortran.texi: Added description for the new API functions. Updated
1718 coverage of gfortran of TS18508.
1719 * intrinsic.c (add_functions): Added symbols to resolve new intrinsic
1721 * intrinsic.h: Added prototypes.
1722 * iresolve.c (gfc_resolve_failed_images): Resolve the failed_images
1724 (gfc_resolve_image_status): Same for image_status.
1725 (gfc_resolve_stopped_images): Same for stopped_images.
1726 * libgfortran.h: Added prototypes.
1727 * match.c (gfc_match_if): Added matching of FAIL IMAGE statement.
1728 (gfc_match_fail_image): Match a FAIL IMAGE statement.
1729 * match.h: Added prototype.
1730 * parse.c (decode_statement): Added matching for FAIL IMAGE.
1731 (next_statement): Same.
1732 (gfc_ascii_statement): Same.
1734 * simplify.c (gfc_simplify_failed_or_stopped_images): For COARRAY=
1735 single a constant result can be returne.d
1736 (gfc_simplify_image_status): For COARRAY=single the result is constant.
1737 * st.c (gfc_free_statement): Added FAIL_IMAGE handling.
1738 * trans-decl.c (gfc_build_builtin_function_decls): Added decls of the
1740 * trans-expr.c (gfc_conv_procedure_call): This is first time all
1741 arguments of a function are optional, which is now handled here
1743 * trans-intrinsic.c (conv_intrinsic_image_status): Translate
1745 (gfc_conv_intrinsic_function): Add support for image_status.
1746 (gfc_is_intrinsic_libcall): Add support for the remaining new
1748 * trans-stmt.c (gfc_trans_fail_image): Trans a fail image.
1749 * trans-stmt.h: Add the prototype for the above.
1750 * trans.c (trans_code): Dispatch for fail_image.
1751 * trans.h: Add the trees for the new intrinsics.
1753 2017-03-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1756 * openmp.c (check_symbol_not_pointer): Adjust diagnostic.
1758 2017-02-28 Paul Thomas <pault@gcc.gnu.org>
1761 * resolve.c (resolve_fl_procedure): Deal with the case where
1762 'submodule_name' is NULL so that gfc_error does not ICE.
1763 Reformat the error message to make it more consistent.
1765 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1767 * parse.c (parse_critical_block): Use cond ? G_("...") : G_("...")
1768 instead of just cond ? "..." : "...".
1769 * scanner.c (gfc_next_char_literal): Likewise.
1770 * match.c (match_exit_cycle): Likewise.
1772 2017-02-26 Thomas Koenig <tkoenig@gcc.gnu.org>
1775 * options.c (gfc_post_options): Set default limit for matmul
1777 * invoke.texi: Document change.
1779 2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
1782 * interface.c (check_dtio_arg_TKR_intent): Change 'intent'
1785 2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
1788 * interface.c (gfc_match_end_interface): Remove spurious comma
1789 and space, replace 'got %s' with 'got %qs'.
1791 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1794 * interface.c (check_dtio_arg_TKR_intent): Supply 'must'
1795 missing from error message.
1797 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1800 * interface.c (gfc_find_typebound_dtio_proc): Guard test for
1801 flavor attribute by checking that symbol is resolved.
1803 2017-02-16 Paul Thomas <pault@gcc.gnu.org>
1806 * decl.c (access_attr_decl): Test for presence of generic DTIO
1807 interface and emit error if not present.
1809 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1812 * parse.c (check_component, parse_union): Whitespace.
1813 (set_syms_host_assoc): For a derived type, check if the module
1814 in which it was declared is one of the submodule ancestors. If
1815 it is, make the components public. Otherwise, reset attribute
1816 'host_assoc' and set 'use-assoc' so that encapsulation is
1819 2017-02-19 Paul Thomas <pault@gcc.gnu.org>
1822 * decl.c (gfc_set_constant_character_len): Whitespace.
1823 (gfc_match_end): Catch case where a procedure is contained in
1824 a module procedure and ensure that 'end procedure' is the
1825 correct termination.
1827 2017-02-19 Paul Thomas <pault@gcc.gnu.org>
1830 * resolve.c (fixup_unique_dummy): New function.
1831 (gfc_resolve_expr): Call it for dummy variables with a unique
1834 2017-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
1837 * trans-expr.c (gfc_trans_assignment_1): Deref indirect refs when
1838 compiling with -fcheck=mem to check the pointer and not the data.
1840 2017-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
1843 * trans-array.c (duplicate_allocatable_coarray): Ensure attributes
1844 passed are properly initialized.
1845 (structure_alloc_comps): Same.
1846 * trans-expr.c (gfc_trans_structure_assign): Same.
1848 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1850 * trans-expr.c (gfc_conv_substring): Add missing space in diagnostics.
1852 2017-02-12 Thomas Koenig <tkoenig@gcc.gnu.org>
1855 * intrinsic.c (gfc_intrinsic_func_interface): Return an error
1856 for -std=f95 for disallowed transformational functions in
1857 initialization expressions.
1859 2017-02-09 Cesar Philippidis <cesar@codesourcery.com>
1860 Joseph Myers <joseph@codesourcery.com>
1862 * openmp.c (resolve_omp_clauses): Error on directives
1863 containing both tile and collapse clauses.
1864 (resolve_oacc_loop_blocks): Represent '*' tile arguments as zero.
1865 * trans-openmp.c (gfc_trans_omp_do): Lower tiled loops like
1868 2017-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
1870 * trans-types.c (gfc_get_int_kind_from_width_isofortranen): Choose
1871 REAL type with the widest precision if two (or more) have the same
1874 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1877 * trans-stmt.c (gfc_trans_allocate): Only deallocate the components of
1878 the temporary, when a new object was created for the temporary. Not
1879 when it is just an alias to an existing object.
1881 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1884 * trans-decl.c (generate_coarray_sym_init): Retrieve the symbol's
1885 attributes before using them.
1887 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1890 * trans-stmt.c (gfc_trans_allocate): Add the multiplying the _len
1891 component of unlimited polymorphic objects when source-allocating.
1893 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1896 * trans-array.c (structure_alloc_comps): Ignore pointer components when
1899 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1902 * f95-lang.c (gfc_create_decls): Include stringpool.h.
1903 Pass main_input_filename to build_translation_unit_decl.
1905 2017-01-23 Thomas Koenig <tkoenig@netcologne.de>
1907 * arith.c (arith_power): If simplifying integer power expression
1908 to zero, warn if -Winteger-division is given.
1910 2017-01-22 Jakub Jelinek <jakub@redhat.com>
1913 * parse.c (matchs, matcho, matchds, matchdo): Replace return st;
1914 with { ret = st; goto finish; }.
1915 (decode_omp_directive): Allow declare simd, declare target and
1916 simd directives in PURE/ELEMENTAL procedures. Only call
1917 gfc_unset_implicit_pure on successful match of other procedures.
1919 2017-01-21 Gerald Pfeifer <gerald@pfeifer.com>
1921 * gfc-internals.texi (Symbol Versioning): Change references
1922 to www.akkadia.org to https.
1924 2017-01-21 Jakub Jelinek <jakub@redhat.com>
1926 * gfortran.h (gfc_extract_int): Change return type to bool. Add
1927 int argument with = 0.
1928 * decl.c (gfc_match_kind_spec): Adjust gfc_extract_int caller, pass
1929 1 as new last argument to it, don't emit gfc_error.
1930 (match_char_kind): Likewise.
1931 (gfc_match_decl_type_spec): Use gfc_get_string ("%s", x) instead of
1933 (gfc_match_derived_decl, match_binding_attributes): Likewise.
1934 (gfc_match_structure_decl): Don't sprintf back to name, call
1935 get_struct_decl directly with gfc_dt_upper_string (name) result.
1936 * trans-stmt.c (gfc_trans_allocate): Use gfc_get_string ("%s", x)
1937 instead of gfc_get_string (x).
1938 * module.c (gfc_dt_lower_string, gfc_dt_upper_string,
1939 gfc_match_use, gfc_match_submodule, find_true_name, mio_pool_string,
1940 mio_symtree_ref, mio_expr, mio_omp_udr_expr, load_generic_interfaces,
1941 load_omp_udrs, load_needed, read_module, dump_module,
1942 create_intrinsic_function, import_iso_c_binding_module,
1943 create_int_parameter, create_int_parameter_array, create_derived_type,
1944 use_iso_fortran_env_module): Likewise.
1945 * error.c (gfc_diagnostic_starter, gfc_diagnostic_start_span): Use
1946 pp_verbatim (context->printer, "%s", x) instead of
1947 pp_verbatim (context->printer, x).
1948 * match.c (gfc_match_small_int): Adjust gfc_extract_int caller, pass
1949 1 as new last argument to it, don't emit gfc_error.
1950 (gfc_match_small_int_expr): Likewise.
1951 * iresolve.c (gfc_get_string): Optimize format "%s" case.
1952 (resolve_bound): Use gfc_get_string ("%s", x) instead of
1954 (resolve_transformational): Formatting fix.
1955 (gfc_resolve_char_achar): Change name argument to bool is_achar,
1956 use a single format string and if is_achar add "a" before "char".
1957 (gfc_resolve_achar, gfc_resolve_char): Adjust callers.
1958 * expr.c (gfc_extract_int): Change return type to bool, return true
1959 if some error occurred. Add REPORT_ERROR argument, if non-zero
1960 call either gfc_error or gfc_error_now depending on its sign.
1961 * arith.c (arith_power): Adjust gfc_extract_int caller.
1962 * symbol.c (gfc_add_component): Use gfc_get_string ("%s", x) instead
1963 of gfc_get_string (x).
1964 (gfc_new_symtree, gfc_delete_symtree, gfc_get_uop, gfc_new_symbol,
1965 gfc_get_gsymbol, generate_isocbinding_symbol): Likewise.
1966 * openmp.c (gfc_match_omp_clauses): Adjust gfc_extract_int caller, pass
1967 -1 as new last argument to it, don't emit gfc_error_now.
1968 (gfc_match_omp_declare_reduction): Use gfc_get_string ("%s", x)
1969 instead of gfc_get_string (x).
1970 * check.c (kind_check): Adjust gfc_extract_int caller.
1971 * intrinsic.c (add_sym, find_sym, make_alias): Use
1972 gfc_get_string ("%s", x) instead of gfc_get_string (x).
1973 * simplify.c (get_kind, gfc_simplify_btest, gfc_simplify_maskr,
1974 gfc_simplify_maskl, gfc_simplify_poppar, gfc_simplify_repeat,
1975 gfc_simplify_selected_int_kind, gfc_simplify_selected_real_kind):
1976 Adjust gfc_extract_int callers.
1977 * trans-decl.c (gfc_find_module): Use gfc_get_string ("%s", x)
1978 instead of gfc_get_string (x).
1979 * matchexp.c (expression_syntax): Add const.
1980 * primary.c (match_kind_param, match_hollerith_constant,
1981 match_string_constant): Adjust gfc_extract_int callers.
1982 (match_keyword_arg): Use gfc_get_string ("%s", x) instead of
1984 * frontend-passes.c (optimize_minmaxloc): Likewise.
1986 2017-01-19 Andre Vehreschild <vehre@gcc.gnu.org>
1989 * trans-decl.c (gfc_build_qualified_array): Add static decl to parent
1990 function only, when the decl-context is not the translation unit.
1992 2017-01-18 Louis Krupp <louis.krupp@zoho.com>
1996 * trans-expr.c (gfc_conv_variable): Don't treat temporary variables
1997 as function arguments.
1998 * trans-stmt.c (forall_make_variable_temp,
1999 generate_loop_for_temp_to_lhs, gfc_trans_assign_need_temp,
2000 gfc_trans_forall_1): Don't adjust offset of forall temporary
2001 for array sections, make forall temporaries work for substring
2002 expressions, improve test coverage by adding -ftest-forall-temp
2003 option to request usage of temporary array in forall code.
2004 * lang.opt: Add -ftest-forall-temp option.
2005 * invoke.texi: Add -ftest-forall-temp option.
2007 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
2009 * primary.c (caf_variable_attr): Improve figuring whether the current
2010 component is the last one refed.
2011 * trans-stmt.c (gfc_trans_allocate): Do not generate sync_all calls
2012 when allocating pointer or allocatable components.
2014 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
2016 * gfortran.texi: Add missing parameters to caf-API functions. Correct
2017 typos and clarify some descriptions.
2019 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
2022 Missed some cases, here they are:
2023 * trans-decl.c (gfc_build_qualified_array): Add static tokens to the
2024 parent function's scope.
2025 * trans-expr.c (gfc_get_tree_for_caf_expr): Shorten code. Remove
2028 2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org>
2031 * resolve.c (resolve_lock_unlock_event): Resolve the expression for
2032 event's until_count.
2034 2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org>
2037 * trans-expr.c (gfc_get_tree_for_caf_expr): Ensure the backend_decl
2038 is valid before accessing it.
2040 2017-01-09 Jakub Jelinek <jakub@redhat.com>
2042 PR translation/79019
2043 PR translation/79020
2044 * decl.c (attr_decl1): Fix spelling in translatable string.
2045 * intrinsic.texi: Fix spelling - invokation -> invocation.
2046 * lang.opt (faggressive-function-elimination, gfc_convert): Fix
2047 typos in descriptions.
2048 * openmp.c (resolve_omp_clauses): Add missing whitespace to
2049 translatable strings.
2051 2017-01-08 Martin Sebor <msebor@redhat.com>
2053 PR tree-optimization/78913
2055 * trans-common.c (build_equiv_decl): Increase buffer size to avoid
2056 truncation for any argument.
2057 * trans-types.c (gfc_build_logical_type): Same.
2059 2017-01-07 Andre Vehreschild <vehre@gcc.gnu.org>
2063 * expr.c (gfc_check_pointer_assign): Return the same error message for
2064 rewritten coarray pointer assignments like for plain ones.
2065 * gfortran.h: Change prototype.
2066 * primary.c (caf_variable_attr): Set attributes used ones only only
2067 ones. Add setting of pointer_comp attribute.
2068 (gfc_caf_attr): Add setting of pointer_comp attribute.
2069 * trans-array.c (gfc_array_allocate): Add flag that the component to
2070 allocate is not an ultimate coarray component. Add allocation of
2072 (structure_alloc_comps): Extend nullify to treat pointer components in
2073 coarrays correctly. Restructure nullify to remove redundant code.
2074 (gfc_nullify_alloc_comp): Allow setting caf_mode flags.
2075 * trans-array.h: Change prototype of gfc_nullify_alloc_comp ().
2076 * trans-decl.c (generate_coarray_sym_init): Call nullify_alloc_comp for
2077 derived type coarrays with pointer components.
2078 * trans-expr.c (gfc_trans_structure_assign): Also treat pointer
2080 (trans_caf_token_assign): Handle assignment of token of scalar pointer
2082 (gfc_trans_pointer_assignment): Call above routine.
2083 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Add treating pointer
2085 (gfc_conv_intrinsic_caf_get): Likewise.
2086 (conv_caf_send): Likewise.
2087 * trans-stmt.c (gfc_trans_allocate): After allocating a derived type in
2088 a coarray pre-register the tokens.
2089 (gfc_trans_deallocate): Simply determining the coarray type (scalar or
2090 array) and deregistering it correctly.
2091 * trans-types.c (gfc_typenode_for_spec): Replace in_coarray flag by the
2092 actual codim to allow lookup of array types in the cache.
2093 (gfc_build_array_type): Likewise.
2094 (gfc_get_array_descriptor_base): Likewise.
2095 (gfc_get_array_type_bounds): Likewise.
2096 (gfc_get_derived_type): Likewise.
2097 * trans-types.h: Likewise.
2098 * trans.c (gfc_deallocate_with_status): Enable deregistering of all kind
2099 of coarray components.
2100 (gfc_deallocate_scalar_with_status): Use free() in fcoarray_single mode
2101 instead of caf_deregister.
2103 2017-01-06 Jakub Jelinek <jakub@redhat.com>
2105 * simplify.c (simplify_transformation_to_array): Use
2106 GCC_DIAGNOSTIC_PUSH_IGNORED and GCC_DIAGNOSTIC_POP instead of
2107 #pragma GCC diagnostic {push,ignored,pop}.
2109 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
2111 * simplify.c (simplify_transformation_to_array): Silence
2112 array bounds warning. Fix whitespace.
2114 2017-01-04 Alexandre Oliva <aoliva@redhat.com>
2116 * module.c (load_omp_udrs): Initialize name.
2118 2017-01-02 Janne Blomqvist <jb@gcc.gnu.org>
2121 * trans-expr.c (gfc_trans_string_copy): Rework string copy
2122 algorithm to avoid -Wstringop-overflow warning.
2124 2017-01-01 Jakub Jelinek <jakub@redhat.com>
2126 Update copyright years.
2128 * gfortranspec.c (lang_specific_driver): Update copyright notice
2130 * gfc-internals.texi: Bump @copying's copyright year.
2131 * gfortran.texi: Ditto.
2132 * intrinsic.texi: Ditto.
2133 * invoke.texi: Ditto.
2135 Copyright (C) 2017 Free Software Foundation, Inc.
2137 Copying and distribution of this file, with or without modification,
2138 are permitted in any medium without royalty provided the copyright
2139 notice and this notice are preserved.