1 2017-11-18 Thomas Koenig <tkoenig@gcc.gnu.org>
4 * expr.c (gfc_is_simply_contiguous): If a function call through a
5 class variable is done through a reference, check the function's
8 2017-11-17 Richard Biener <rguenther@suse.de>
11 * trans-stmt.c (gfc_trans_forall_loop): Annotate DO CONCURRENT
12 loops with annot_expr_parallel_kind instead of just
13 annot_expr_ivdep_kind.
15 2017-11-15 Martin Liska <mliska@suse.cz>
17 * options.c (gfc_post_options):
18 Do not set default value of warn_return_type.
19 * trans-decl.c (gfc_trans_deferred_vars):
20 Compare warn_return_type for greater than zero.
21 (generate_local_decl): Likewise
22 (gfc_generate_function_code): Likewise.
24 2017-11-13 Fritz Reese <fritzoreese@gmail.com>
27 * decl.c (match_clist_expr): Replace gcc_assert with proper
28 handling of bad result from spec_size().
29 * resolve.c (check_data_variable): Avoid NULL dereference when passing
32 2017-11-11 Janus Weil <janus@gcc.gnu.org>
35 * resolve.c (update_compcall_arglist): Improve error recovery,
38 2017-11-10 Fritz Reese <fritzoreese@gmail.com>
41 * gfortran.h (gfc_build_init_expr): New prototype.
42 * invoke.texi (finit-derived): Update documentation.
43 * expr.c (gfc_build_init_expr): New, from gfc_build_default_init_expr.
44 (gfc_build_default_init_expr): Redirect to gfc_build_init_expr(,,false)
45 (component_initializer): Force building initializers using
46 gfc_build_init_expr(,,true).
48 2017-11-10 Martin Sebor <msebor@redhat.com>
51 * gcc/fortran/decl.c (build_sym): Use strcpy instead of strncpy.
53 2017-11-10 Paul Thomas <pault@gcc.gnu.org>
56 * trans-stmt.c (gfc_trans_allocate): Remove the gcc_assert on
57 null string length for assumed length typespec and set
58 expr3_esize to NULL_TREE;
60 2017-11-09 Paul Thomas <pault@gcc.gnu.org>
63 * check.c (same_type_check): Introduce a new argument 'assoc'
64 with default value false. If this is true, use the symbol type
65 spec of BT_PROCEDURE expressions.
66 (gfc_check_associated): Set 'assoc' true in the call to
69 2017-11-09 Steven G. Kargl <kargl@gcc.gnu.org>
72 * interface.c (symbol_rank): Check for NULL pointer.
74 2017-11-08 Steven G. Kargl <kargl@kgcc.gnu.org>
77 * simplify.c(gfc_simplify_transfer): Do not dereference a NULL pointer.
80 2017-11-08 Steven G. Kargl <kargl@gcc.gnu.org>
83 * arith.c (gfc_hollerith2character): Clear pad.
85 2017-11-08 Janne Blomqvist <jb@gcc.gnu.org>
88 * convert.c (truthvalue_conversion): Use logical_type_node.
89 * trans-array.c (gfc_trans_allocate_array_storage): Likewise.
90 (gfc_trans_create_temp_array): Likewise.
91 (gfc_trans_array_ctor_element): Likewise.
92 (gfc_trans_array_constructor_value): Likewise.
93 (trans_array_constructor): Likewise.
94 (trans_array_bound_check): Likewise.
95 (gfc_conv_array_ref): Likewise.
96 (gfc_trans_scalarized_loop_end): Likewise.
97 (gfc_conv_array_extent_dim): Likewise.
98 (gfc_array_init_size): Likewise.
99 (gfc_array_allocate): Likewise.
100 (gfc_trans_array_bounds): Likewise.
101 (gfc_trans_dummy_array_bias): Likewise.
102 (gfc_conv_array_parameter): Likewise.
103 (duplicate_allocatable): Likewise.
104 (duplicate_allocatable_coarray): Likewise.
105 (structure_alloc_comps): Likewise
106 (get_std_lbound): Likewise
107 (gfc_alloc_allocatable_for_assignment): Likewise
108 * trans-decl.c (add_argument_checking): Likewise
109 (gfc_generate_function_code): Likewise
110 * trans-expr.c (gfc_copy_class_to_class): Likewise
111 (gfc_trans_class_array_init_assign): Likewise
112 (gfc_trans_class_init_assign): Likewise
113 (gfc_conv_expr_present): Likewise
114 (gfc_conv_substring): Likewise
115 (gfc_conv_cst_int_power): Likewise
116 (gfc_conv_expr_op): Likewise
117 (gfc_conv_procedure_call): Likewise
118 (fill_with_spaces): Likewise
119 (gfc_trans_string_copy): Likewise
120 (gfc_trans_alloc_subarray_assign): Likewise
121 (gfc_trans_pointer_assignment): Likewise
122 (gfc_trans_scalar_assign): Likewise
123 (fcncall_realloc_result): Likewise
124 (alloc_scalar_allocatable_for_assignment): Likewise
125 (trans_class_assignment): Likewise
126 (gfc_trans_assignment_1): Likewise
127 * trans-intrinsic.c (build_fixbound_expr): Likewise
128 (gfc_conv_intrinsic_aint): Likewise
129 (gfc_trans_same_strlen_check): Likewise
130 (conv_caf_send): Likewise
131 (trans_this_image): Likewise
132 (conv_intrinsic_image_status): Likewise
133 (trans_image_index): Likewise
134 (gfc_conv_intrinsic_bound): Likewise
135 (conv_intrinsic_cobound): Likewise
136 (gfc_conv_intrinsic_mod): Likewise
137 (gfc_conv_intrinsic_dshift): Likewise
138 (gfc_conv_intrinsic_dim): Likewise
139 (gfc_conv_intrinsic_sign): Likewise
140 (gfc_conv_intrinsic_ctime): Likewise
141 (gfc_conv_intrinsic_fdate): Likewise
142 (gfc_conv_intrinsic_ttynam): Likewise
143 (gfc_conv_intrinsic_minmax): Likewise
144 (gfc_conv_intrinsic_minmax_char): Likewise
145 (gfc_conv_intrinsic_anyall): Likewise
146 (gfc_conv_intrinsic_arith): Likewise
147 (gfc_conv_intrinsic_minmaxloc): Likewise
148 (gfc_conv_intrinsic_minmaxval): Likewise
149 (gfc_conv_intrinsic_btest): Likewise
150 (gfc_conv_intrinsic_bitcomp): Likewise
151 (gfc_conv_intrinsic_shift): Likewise
152 (gfc_conv_intrinsic_ishft): Likewise
153 (gfc_conv_intrinsic_ishftc): Likewise
154 (gfc_conv_intrinsic_leadz): Likewise
155 (gfc_conv_intrinsic_trailz): Likewise
156 (gfc_conv_intrinsic_mask): Likewise
157 (gfc_conv_intrinsic_spacing): Likewise
158 (gfc_conv_intrinsic_rrspacing): Likewise
159 (gfc_conv_intrinsic_size): Likewise
160 (gfc_conv_intrinsic_sizeof): Likewise
161 (gfc_conv_intrinsic_transfer): Likewise
162 (gfc_conv_allocated): Likewise
163 (gfc_conv_associated): Likewise
164 (gfc_conv_same_type_as): Likewise
165 (gfc_conv_intrinsic_trim): Likewise
166 (gfc_conv_intrinsic_repeat): Likewise
167 (conv_isocbinding_function): Likewise
168 (conv_intrinsic_ieee_is_normal): Likewise
169 (conv_intrinsic_ieee_is_negative): Likewise
170 (conv_intrinsic_ieee_copy_sign): Likewise
171 (conv_intrinsic_move_alloc): Likewise
172 * trans-io.c (set_parameter_value_chk): Likewise
173 (set_parameter_value_inquire): Likewise
174 (set_string): Likewise
175 * trans-openmp.c (gfc_walk_alloc_comps): Likewise
176 (gfc_omp_clause_default_ctor): Likewise
177 (gfc_omp_clause_copy_ctor): Likewise
178 (gfc_omp_clause_assign_op): Likewise
179 (gfc_omp_clause_dtor): Likewise
180 (gfc_omp_finish_clause): Likewise
181 (gfc_trans_omp_clauses): Likewise
182 (gfc_trans_omp_do): Likewise
183 * trans-stmt.c (gfc_trans_goto): Likewise
184 (gfc_trans_sync): Likewise
185 (gfc_trans_arithmetic_if): Likewise
186 (gfc_trans_simple_do): Likewise
187 (gfc_trans_do): Likewise
188 (gfc_trans_forall_loop): Likewise
189 (gfc_trans_where_2): Likewise
190 (gfc_trans_allocate): Likewise
191 (gfc_trans_deallocate): Likewise
192 * trans-types.c (gfc_init_types): Initialize logical_type_node and
193 their true/false trees.
194 (gfc_get_array_descr_info): Use logical_type_node.
195 * trans-types.h (logical_type_node): New tree.
196 (logical_true_node): Likewise.
197 (logical_false_node): Likewise.
198 * trans.c (gfc_trans_runtime_check): Use logical_type_node.
199 (gfc_call_malloc): Likewise
200 (gfc_allocate_using_malloc): Likewise
201 (gfc_allocate_allocatable): Likewise
202 (gfc_add_comp_finalizer_call): Likewise
203 (gfc_add_finalizer_call): Likewise
204 (gfc_deallocate_with_status): Likewise
205 (gfc_deallocate_scalar_with_status): Likewise
206 (gfc_call_realloc): Likewise
208 2017-11-06 Paul Thomas <pault@gcc.gnu.org>
211 * trans-expr.c (gfc_map_intrinsic_function): Return false for
212 bounds without the DIM argument instead of ICEing.
214 2017-11-06 Martin Liska <mliska@suse.cz>
217 * options.c (gfc_post_options): Set default value of
218 -Wreturn-type to false.
220 2017-11-05 Thomas Koenig <tkoenig@gcc.gnu.org>
223 * lang.opt (ffrontend-loop-interchange): New option.
224 (Wfrontend-loop-interchange): New option.
225 * options.c (gfc_post_options): Handle ffrontend-loop-interchange.
226 * frontend-passes.c (gfc_run_passes): Run
227 optimize_namespace if flag_frontend_optimize or
228 flag_frontend_loop_interchange are set.
229 (optimize_namespace): Run functions according to flags set;
230 also call index_interchange.
231 (ind_type): New function.
232 (has_var): New function.
233 (index_cost): New function.
234 (loop_comp): New function.
236 2017-11-05 Paul Thomas <pault@gcc.gnu.org>
239 * resolve.c (resolve_ordinary_assign): Do not add the _data
240 component for class valued array constructors being assigned
241 to derived type arrays.
242 * trans-array.c (gfc_trans_array_ctor_element): Take the _data
243 of class valued elements for assignment to derived type arrays.
245 2017-11-05 Paul Thomas <pault@gcc.gnu.org>
249 * resolve.c (resolve_component): There is no need to resolve
250 the components of a use associated vtype.
251 (resolve_fl_derived): Unconditionally generate a vtable for any
252 module derived type, as long as the standard is F2003 or later
253 and it is not a vtype or a PDT template.
255 2017-11-05 Tom de Vries <tom@codesourcery.com>
258 * parse.c (match, matcha, matchs, matcho, matchds, matchdo): Remove
259 semicolon after "do {} while (0)".
261 2017-11-04 Andre Vehreschild <vehre@gcc.gnu.org>
263 * trans-expr.c (gfc_trans_assignment_1): Character kind conversion may
264 create a loop variant temporary, too.
265 * trans-intrinsic.c (conv_caf_send): Treat char arrays as arrays and
267 * trans.c (get_array_span): Take the character kind into account when
268 doing pointer arithmetic.
270 2017-11-04 Thomas Koenig <tkoenig@gcc.gnu.org>
273 * gfortran.h (gfc_check_f): Replace fm3l with fm4l.
274 * intrinsic.h (gfc_resolve_maxloc): Add gfc_expr * to argument
276 (gfc_resolve_minloc): Likewise.
277 * check.c (gfc_check_minloc_maxloc): Handle kind argument.
278 * intrinsic.c (add_sym_3_ml): Rename to
279 (add_sym_4_ml): and handle kind argument.
280 (add_function): Replace add_sym_3ml with add_sym_4ml and add
281 extra arguments for maxloc and minloc.
282 (check_specific): Change use of check.f3ml with check.f4ml.
283 * iresolve.c (gfc_resolve_maxloc): Handle kind argument. If
284 the kind is smaller than the smallest library version available,
285 use gfc_default_integer_kind and convert afterwards.
286 (gfc_resolve_minloc): Likewise.
288 2017-11-04 Paul Thomas <pault@gcc.gnu.org>
291 * trans-decl.c (gfc_trans_deferred_vars): Do a better job of a
292 case where 'tmp' was used unititialized and remove TODO.
294 2017-11-03 Steven G. Kargl <kargl@gcc.gnu.org>
297 * resolve.c (resolve_equivalence): An entity in a common block within
298 a module cannot appear in an equivalence statement if the entity is
299 with a pure procedure.
301 2017-10-31 Jim Wilson <wilson@tuliptree.org>
303 * parse.c (unexpected_eof): Call gcc_unreachable before return.
305 2017-10-30 Paul Thomas <pault@gcc.gnu.org>
308 * trans_expr.c (gfc_conv_procedure_call): When passing a class
309 argument to an unlimited polymorphic dummy, it is wrong to cast
310 the passed expression as unlimited, unless it is unlimited. The
311 correct way is to assign to each of the fields and set the _len
314 2017-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
316 * resolve.c (resolve_transfer): Set derived to correct symbol for
319 2017-10-29 Jim Wilson <wilson@tuliptree.org>
321 * invoke.texi: Delete adb and sdb references.
323 2017-10-28 Andre Vehreschild <vehre@gcc.gnu.org>
325 * check.c (gfc_check_co_reduce): Clarify error message.
327 2017-10-28 Paul Thomas <pault@gcc.gnu.org>
330 * trans-expr.c (trans_class_vptr_len_assignment): 'vptr_expr'
331 must only be set if the right hand side expression is of type
334 2017-10-27 Steven G. Kargl <kargl@gcc.gnu.org>
337 * match.c (gfc_match_allocate): Exit early on syntax error.
339 2017-10-27 Thomas Koenig <tkoenig@gcc.gnu.org>
342 * simplify.c (is_constant_array_expr): If the expression is
343 a parameter array, call gfc_simplify_expr.
345 2017-10-25 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
347 * match.c (gfc_match_type_is): Fix typo in error message.
349 2017-10-21 Paul Thomas <pault@gcc.gnu.org>
352 * decl.c (gfc_get_pdt_instance): Remove the error message that
353 the parameter does not have a corresponding component since
354 this is now taken care of when the derived type is resolved. Go
355 straight to error return instead.
356 (gfc_match_formal_arglist): Make the PDT relevant errors
357 immediate so that parsing of the derived type can continue.
358 (gfc_match_derived_decl): Do not check the match status on
359 return from gfc_match_formal_arglist for the same reason.
360 * resolve.c (resolve_fl_derived0): Check that each type
361 parameter has a corresponding component.
364 * resolve.c (resolve_generic_f): Check that the derived type
365 can be used before resolving the struture constructor.
368 * symbol.c (check_conflict): Add the conflicts involving PDT
369 KIND and LEN attributes.
371 2017-10-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
373 * interface.c (check_sym_interfaces, check_uop_interfaces,
374 gfc_check_interfaces): Base interface_name buffer off
377 2017-10-19 Jakub Jelinek <jakub@redhat.com>
380 * gfortran.h (gfc_resolve_do_iterator): Add a bool arg.
381 (gfc_resolve_omp_local_vars): New declaration.
382 * openmp.c (omp_current_ctx): Make static.
383 (gfc_resolve_omp_parallel_blocks): Handle EXEC_OMP_TASKLOOP
384 and EXEC_OMP_TASKLOOP_SIMD.
385 (gfc_resolve_do_iterator): Add ADD_CLAUSE argument, if false,
386 don't actually add any clause. Move omp_current_ctx test
388 (handle_local_var, gfc_resolve_omp_local_vars): New functions.
389 * resolve.c (gfc_resolve_code): Call gfc_resolve_omp_parallel_blocks
390 instead of just gfc_resolve_omp_do_blocks for EXEC_OMP_TASKLOOP
391 and EXEC_OMP_TASKLOOP_SIMD.
392 (gfc_resolve_code): Adjust gfc_resolve_do_iterator caller.
393 (resolve_codes): Call gfc_resolve_omp_local_vars.
395 2017-10-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
397 * gfortran.h (gfc_lookup_function_fuzzy): New declaration.
398 (gfc_closest_fuzzy_match): New declaration.
399 (vec_push): New definition.
400 * misc.c (gfc_closest_fuzzy_match): New definition.
401 * resolve.c: Include spellcheck.h.
402 (lookup_function_fuzzy_find_candidates): New static function.
403 (lookup_uop_fuzzy_find_candidates): Likewise.
404 (lookup_uop_fuzzy): Likewise.
405 (resolve_operator) <INTRINSIC_USER>: Call lookup_uop_fuzzy.
406 (gfc_lookup_function_fuzzy): New definition.
407 (resolve_unknown_f): Call gfc_lookup_function_fuzzy.
408 * interface.c (check_interface0): Likewise.
409 (lookup_arg_fuzzy_find_candidates): New static function.
410 (lookup_arg_fuzzy ): Likewise.
411 (compare_actual_formal): Call lookup_arg_fuzzy.
412 * symbol.c: Include spellcheck.h.
413 (lookup_symbol_fuzzy_find_candidates): New static function.
414 (lookup_symbol_fuzzy): Likewise.
415 (gfc_set_default_type): Call lookup_symbol_fuzzy.
416 (lookup_component_fuzzy_find_candidates): New static function.
417 (lookup_component_fuzzy): Likewise.
418 (gfc_find_component): Call lookup_component_fuzzy.
420 2017-10-18 Thomas Koenig <tkoenig@gcc.gnu.org>
423 * frontend-passes.c (combine_array_constructor): If an array
424 constructor is all constants and has more elements than a small
425 constant, don't convert a*[b,c] to [a*b,a*c] to reduce compilation
428 2017-10-18 Thomas Koenig <tkoenig@gcc.gnu.org>
431 * resolve.c (resovle_symbol): Change gcc_assert to
432 sensible error message.
434 2017-10-18 Paul Thomas <pault@gcc.gnu.org>
437 * trans_decl.c (gfc_get_symbol_decl): Procedure symbols that
438 have the 'used_in_submodule' attribute should be processed by
439 'gfc_get_extern_function_decl'.
441 2017-10-16 Fritz Reese <fritzoreese@gmail.com>
444 * trans-io.c (transfer_expr): Treat BT_UNION as BT_DERIVED.
446 2017-10-15 Thomas Koenig <tkoenig@gcc.gnu.org>
449 * fortran/scanner.c (last_error_char): New global variable.
450 (gfc_scanner_init_1): Set last_error_char to NULL.
451 (gfc_gobble_whitespace): If a character not printable or
452 not newline, issue an error.
454 2017-10-13 Paul Thomas <pault@gcc.gnu.org>
457 * resolve.c (resolve_symbol): Ensure that derived type array
458 results get default initialization.
460 2017-10-11 Nathan Sidwell <nathan@acm.org>
462 * cpp.c (gfc_cpp_add_include_path): Update incpath_e names.
463 (gfc_cpp_add_include_path_after): Likewise.
465 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
467 * target-memory.c (gfc_interpret_logical): Use wi::to_wide when
468 operating on trees as wide_ints.
469 * trans-const.c (gfc_conv_tree_to_mpz): Likewise.
470 * trans-expr.c (gfc_conv_cst_int_power): Likewise.
471 * trans-intrinsic.c (trans_this_image): Likewise.
472 (gfc_conv_intrinsic_bound): Likewise.
473 (conv_intrinsic_cobound): Likewise.
475 2017-10-08 Steven G. Kargl <kargl@gcc.gnu.org>
477 * check.c (gfc_check_x): Remove function.
478 * intrinsic.c (add_functions): Use gfc_check_fn_r.
480 2017-10-08 Paul Thomas <pault@gcc.gnu.org>
483 * module.c : Bump up MOD_VERSION to 15.
484 (mio_component): Edit comment about PDT specification list.
485 (mio_expr, mio_symbol): Include the expression and symbol PDT
486 specification lists in the same way as in mio_component.
488 2017-10-08 Thomas Koenig <tkoenig@gcc.gnu.org>
490 * dump_prase_tree (show_symbol): Output list of variables in
492 (show_code_node): Add new line for ELSE and END DO for DO
494 * invoke.texi: Document that the output of
495 -fdump-fortran-original, -fdump-fortran-optimized and
496 -fdump-parse-tree is unsable and may lead to ICEs.
498 2017-10-07 Paul Thomas <pault@gcc.gnu.org>
501 * class.c (gfc_find_derived_vtab): Return NULL for a passed
502 pdt template to prevent bad procedures from being written.
503 * decl.c (gfc_get_pdt_instance): Do not use the default
504 initializer for pointer and allocatable pdt type components. If
505 the component is allocatbale, set the 'alloc_comp' attribute of
507 * module.c : Add a prototype for 'mio_actual_arglist'. Add a
508 boolean argument 'pdt'.
509 (mio_component): Call it for the parameter list of pdt type
510 components with 'pdt' set to true.
511 (mio_actual_arg): Add the boolean 'pdt' and, if it is set, call
512 mio_integer for the 'spec_type'.
513 (mio_actual_arglist): Add the boolean 'pdt' and use it in the
514 call to mio_actual_arg.
515 (mio_expr, mio_omp_udr_expr): Call mio_actual_arglist with
517 * resolve.c (get_pdt_spec_expr): Add the parameter name to the
518 KIND parameter error.
519 (get_pdt_constructor): Check that cons->expr is non-null.
520 * trans-array.c (structure_alloc_comps): For deallocation of
521 allocatable components, ensure that parameterized components
522 are deallocated first. Likewise, when parameterized components
523 are allocated, nullify allocatable components first. Do not
524 recurse into pointer or allocatable pdt components while
525 allocating or deallocating parameterized components. Test that
526 parameterized arrays or strings are allocated before freeing
528 (gfc_trans_pointer_assignment): Call the new function. Tidy up
529 a minor whitespace issue.
530 trans-decl.c (gfc_trans_deferred_vars): Set 'tmp' to NULL_TREE
531 to prevent the expression from being used a second time.
533 2017-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
536 * expr.c (gfc_check_pointer_assign): Error
537 for non-contiguous rhs.
539 2017-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
541 * gfortran.h (async_io_dt): Add external reference.
542 * io.c (async_io_dt): Add variable.
543 (compare_to_allowed_values): Add prototyte. Add optional argument
544 num. If present, set it to the number of the entry that was
546 (check_io_constraints): If this is for an asynchronous I/O
547 statement, set async_io_dt and set the asynchronous flag for
549 * resolve.c (resolve_transfer): If async_io_dt is set, set
550 the asynchronous flag on the variable.
551 (resolve_fl_namelist): If async_io_dt is set, set the asynchronous
552 flag on all elements of the namelist.
554 2017-10-04 Paul Thomas <pault@gcc.gnu.org>
558 * resolve.c (resolve_assoc_var): Deferred character type
559 associate names must not receive an integer conatant length.
560 * symbol.c (gfc_is_associate_pointer): Deferred character
561 length functions also require an associate pointer.
562 * trans-decl.c (gfc_get_symbol_decl): Deferred character
563 length functions or derived type components require the assoc
564 name to have variable string length.
565 * trans-stmt.c (trans_associate_var): Set the string length of
566 deferred string length associate names. The address expression
567 is not needed for allocatable, pointer or dummy targets. Change
568 the comment about defered string length targets.
570 2017-10-03 Thomas Koenig <tkoenig@gcc.gnu.org>
572 * io.c (match_wait_element): Correctly match END and EOR tags.
573 * dump-parse-tree.c (show_code_node): Handle EXEC_WAIT.
575 2017-10-02 Paul Thomas <pault@gcc.gnu.org>
578 * resolve.c (gfc_resolve_code): Simplify condition for class
579 pointer assignments becoming regular assignments by asserting
580 that only class valued targets are permitted.
581 * trans-expr.c (trans_class_pointer_fcn): New function using a
582 block of code from gfc_trans_pointer_assignment.
583 (gfc_trans_pointer_assignment): Call the new function. Tidy up
584 a minor whitespace issue.
586 2017-10-01 Dominique d'Humieres <dominiq@lps.ens.fr>
589 * parse.c (gfc_global_used): Replace the gfc_internal_error
592 2017-09-29 Dominique d'Humieres <dominiq@lps.ens.fr>
595 * interface.c (compare_actual_formal): Change warnings to errors
596 when "Actual argument contains too few elements for dummy
597 argument", unless -std=legacy is used.
599 2017-09-27 Thomas Schwinge <thomas@codesourcery.com>
601 * lang.opt <Wdo-subscript>: End help text with a period.
603 2017-09-26 Thomas Koenig <tkoenig@gcc.gnu.org>
605 * frontend-passes.c (do_subscript): Don't do anything
606 if inside an associate list.
608 2017-09-25 Thomas Koenig <tkoenig@gcc.gnu.org>
610 * lang.opt: Add -Wdo-subscript.
611 * frontend-passes.c (do_t): New type.
612 (doloop_list): Use variable of do_type.
613 (if_level): Variable to track if levels.
614 (select_level): Variable to track select levels.
615 (gfc_run_passes): Initialize i_level and select_level.
616 (doloop_code): Record current level of if + select
617 level in doloop_list. Add seen_goto if there could
618 be a branch outside the loop. Use different type for
620 (doloop_function): Call do_intent and do_subscript; move
621 functionality of checking INTENT to do_intent.
622 (insert_index_t): New type, for callback_insert_index.
623 (callback_insert_index): New function.
624 (insert_index): New function.
625 (do_subscript): New function.
626 (do_intent): New function.
627 (gfc_code_walker): Keep track of if_level and select_level.
628 * invoke.texi: Document -Wdo-subscript.
630 2017-09-25 Janne Blomqvist <jb@gcc.gnu.org>
632 * trans.c (gfc_unlikely): Remove unnecessary fold_convert.
633 (gfc_likely): Likewise.
635 2017-09-24 Thomas Koenig <tkoenig@gcc.gnu.org>
636 Steven G. Kargl <kargl@gcc.gnu.org>
639 * expr.c (gfc_get_full_arrayspec_from_expr): If there is
640 no symtree, set array spec to NULL.
642 2017-09-23 Janus Weil <janus@gcc.gnu.org>
645 * lang.opt: Add the options -fdefault-real-10 and -fdefault-real-16.
646 Rename flag_default_real to flag_default_real_8.
647 * invoke.texi: Add documentation.
648 * module.c (use_iso_fortran_env_module): flag_default_real is renamed.
649 * trans-types.c (gfc_init_kinds): Implement the flags
650 -fdefault-real-10 and -fdefault-real-16. Make -fdefault-double-8 work
651 without -fdefault-real-8.
653 2017-09-21 Paul Thomas <pault@gcc.gnu.org>
656 * match.c (gfc_match_associate): Before failing the association
657 try again, allowing a proc pointer selector.
662 * primary.c (gfc_match_varspec): Introduce 'tgt_expr', which
663 points to the associate selector, if any. Go through selector
664 references, after resolution for variables, to catch any full
665 or section array references. If a class associate name does
666 not have the same declared type as the selector, resolve the
667 selector and copy the declared type to the associate name.
668 Before throwing a no implicit type error, resolve all allowed
669 selector expressions, and copy the resulting typespec.
672 * resolve.c (resolve_assoc_var): Selector must cannot be the
673 NULL expression and it must have a type.
676 * resolve.c (resolve_symbol): Allow associate names to be
679 2017-09-21 Cesar Philippidis <cesar@codesourcery.com>
681 * openmp.c (gfc_match_oacc_wait): Don't restrict wait directive
682 arguments to constant integers.
684 2017-09-17 Paul Thomas <pault@gcc.gnu.org>
687 * decl.c (gfc_get_pdt_instance): Use the component initializer
688 expression for the default, rather than the parameter value.
689 * resolve.c (resolve_pdt): New function.
690 (resolve_symbol): Call it. Remove false error, prohibiting
691 deferred type parameters for dummy arguments.
694 * primary.c (gfc_match_varspec): If the type of an associate
695 name is unknown and yet there is a match, try resolving the
696 target expression and using its type.
698 2017-09-15 Paul Thomas <pault@gcc.gnu.org>
701 trans-decl.c (gfc_trans_deferred_vars): Do not null the 'span'
702 field if the symbol is either implicitly or explicitly saved.
704 2017-09-13 Paul Thomas <pault@gcc.gnu.org>
707 * decl.c (match_char_kind): If the kind expression is
708 parameterized, save it in saved_kind_expr and set kind = 0.
709 (gfc_get_pdt_instance): Resolve and simplify before emitting
710 error on expression kind. Insert a missing simplification after
711 insertion of kind expressions.
713 2017-09-12 Paul Thomas <pault@gcc.gnu.org>
717 * decl.c (variable_decl): Check pdt template components for
718 appearance of KIND/LEN components in the type parameter name
719 list, that components corresponding to type parameters have
720 either KIND or LEN attributes and that KIND or LEN components
721 are scalar. Copy the initializer to the parameter value.
722 (gfc_get_pdt_instance): Add a label 'error_return' and follow
723 it with repeated code, while replacing this code with a jump.
724 Check if a parameter appears as a component in the template.
725 Make sure that the parameter expressions are integer. Validate
727 (gfc_match_decl_type_spec): Search for pdt_types in the parent
728 namespace since they are instantiated in the template ns.
729 * expr.c (gfc_extract_int): Use a KIND parameter if it
730 appears as a component expression.
731 (gfc_check_init_expr): Allow expressions with the pdt_kind
733 *primary.c (gfc_match_actual_arglist): Make sure that the first
734 keyword argument is recognised when 'pdt' is set.
736 2017-09-10 Paul Thomas <pault@gcc.gnu.org>
744 * expr.c (is_subref_array): Add class pointer array dummies
745 to the list of expressions that return true.
746 * trans-array.c: Add SPAN_FIELD and update indices for
748 (gfc_conv_descriptor_span, gfc_conv_descriptor_span_get,
749 gfc_conv_descriptor_span_set, is_pointer_array,
750 get_array_span): New functions.
751 (gfc_get_descriptor_offsets_for_info): New function to preserve
752 API for access to descriptor fields for trans-types.c.
753 (gfc_conv_scalarized_array_ref): If the expression is a subref
754 array, make sure that info->descriptor is a descriptor type.
755 Otherwise, if info->descriptor is a pointer array, set 'decl'
756 and fix it if it is a component reference.
757 (build_array_ref): Simplify handling of class array refs by
758 passing the vptr to gfc_build_array_ref rather than generating
759 the pointer arithmetic in this function.
760 (gfc_conv_array_ref): As in gfc_conv_scalarized_array_ref, set
762 (gfc_array_allocate): Set the span field if this is a pointer
763 array. Use the expr3 element size if it is available, so that
764 the dynamic type element size is used.
765 (gfc_conv_expr_descriptor): Set the span field for pointer
767 * trans-array.h: Prototypes for gfc_conv_descriptor_span_get
768 gfc_conv_descriptor_span_set and
769 gfc_get_descriptor_offsets_for_info added.
770 trans-decl.c (gfc_get_symbol_decl): If a non-class pointer
771 array, mark the declaration as a GFC_DECL_PTR_ARRAY_P. Remove
772 the setting of GFC_DECL_SPAN.
773 (gfc_trans_deferred_vars): Set the span field to zero in thge
775 * trans-expr.c (gfc_conv_procedure_call): Do not use copy-in/
776 copy-out to pass subref expressions to a pointer dummy.
777 (gfc_trans_pointer_assignment): Remove code for setting of
778 GFC_DECL_SPAN. Set the 'span' field for non-class pointers to
779 class function results. Likewise for rank remap. In the case
780 that the target is not a whole array, use the target array ref
781 for remap and, since the 'start' indices are missing, set the
782 lbounds to one, as required by the standard.
783 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Pick up the
784 'token' offset from the field decl in the descriptor.
785 (conv_isocbinding_subroutine): Set the 'span' field.
786 * trans-io.c (gfc_trans_transfer): Always scalarize pointer
788 * trans-stmt.c (trans_associate_var): Set the 'span' field.
789 * trans-types.c (gfc_get_array_descriptor_base): Add the 'span'
790 field to the array descriptor.
791 (gfc_get_derived_type): Pointer array components are marked as
792 GFC_DECL_PTR_ARRAY_P.
793 (gfc_get_array_descr_info): Replaced API breaking code for
794 descriptor offset calling gfc_get_descriptor_offsets_for_info.
795 * trans.c (get_array_span): New function.
796 (gfc_build_array_ref): Simplify by calling get_array_span and
797 obtain 'span' if 'decl' or 'vptr' present.
798 * trans.h : Rename DECL_LANG_FLAG_6, GFC_DECL_SUBREF_ARRAY_P,
799 as GFC_DECL_PTR_ARRAY_P.
801 2017-09-09 Paul Thomas <pault@gcc.gnu.org>
803 * decl.c : Add decl_type_param_list, type_param_spec_list as
804 static variables to hold PDT spec lists.
805 (build_sym): Copy 'type_param_spec_list' to symbol spec_list.
806 (build_struct): Copy the 'saved_kind_expr' to the component
807 'kind_expr'. Check that KIND or LEN components appear in the
808 decl_type_param_list. These should appear as symbols in the
809 f2k_derived namespace. If the component is itself a PDT type,
810 copy the decl_type_param_list to the component param_list.
811 (gfc_match_kind_spec): If the KIND expression is parameterized
812 set KIND to zero and store the expression in 'saved_kind_expr'.
813 (insert_parameter_exprs): New function.
814 (gfc_insert_kind_parameter_exprs): New function.
815 (gfc_insert_parameter_exprs): New function.
816 (gfc_get_pdt_instance): New function.
817 (gfc_match_decl_type_spec): Match the decl_type_spec_list if it
818 is present. If it is, call 'gfc_get_pdt_instance' to obtain the
819 specific instance of the PDT.
820 (match_attr_spec): Match KIND and LEN attributes. Check for the
821 standard and for type/kind of the parameter. They are also not
822 allowed outside a derived type definition.
823 (gfc_match_data_decl): Null the decl_type_param_list and the
824 type_param_spec_list on entry and free them on exit.
825 (gfc_match_formal_arglist): If 'typeparam' is true, add the
826 formal symbol to the f2k_derived namespace.
827 (gfc_match_derived_decl): Register the decl_type_param_list
828 if this is a PDT. If this is a type extension, gather up all
829 the type parameters and put them in the right order.
830 *dump-parse-tree.c (show_attr): Signal PDT templates and the
831 parameter attributes.
832 (show_components): Output parameter atrributes and component
834 (show_symbol): Show variable parameter lists.
835 * expr.c (expr.c): Copy the expression parameter list.
836 (gfc_is_constant_expr): Pass on symbols representing PDT
838 (gfc_check_init_expr): Break on PDT KIND parameters and
839 PDT parameter expressions.
840 (gfc_check_assign): Assigning to KIND or LEN components is an
842 (derived_parameter_expr): New function.
843 (gfc_derived_parameter_expr): New function.
844 (gfc_spec_list_type): New function.
845 * gfortran.h : Add enum gfc_param_spec_type. Add the PDT attrs
846 to the structure symbol_attr. Add the 'kind_expr' and
847 'param_list' field to the gfc_component structure. Comment on
848 the reuse of the gfc_actual_arglist structure as storage for
849 type parameter spec lists. Add the new field 'spec_type' to
850 this structure. Add 'param_list' fields to gfc_symbol and
851 gfc_expr. Add prototypes for gfc_insert_kind_parameter_exprs,
852 gfc_insert_parameter_exprs, gfc_add_kind, gfc_add_len,
853 gfc_derived_parameter_expr and gfc_spec_list_type.
854 * interface.c (gfc_compare_derived_types): Treat PDTs in the
855 same way as sequence types.
856 * match.c : Add variable 'type_param_spec_list'.
857 (gfc_op2string, gfc_match_member_sep, gfc_match_label): Remove
859 (match_derived_type_spec): Match PDTs and find specific
861 (gfc_match_type_spec): Remove more trailing whitespace.
862 (gfc_match_allocate): Assumed or deferred parameters cannot
863 appear here. Copy the type parameter spec list to the expr for
864 the allocatable entity. Free 'type_param_spec_list'.
865 (gfc_match_common, gfc_match_namelist, gfc_match_module): Still
866 more trailing whitespace to remove.
867 (gfc_match_type_is): Allow PDT typespecs.
868 * match.h : Modify prototypes for gfc_match_formal_arglist and
869 gfc_match_actual_arglist.
870 * module.c (ab_attribute, mstring attr_bits): PDT attributes
872 (mio_symbol_attribute): PDT attributes handled.
873 (mio_component): Deal with 'kind_expr' field.
874 (mio_full_f2k_derived): For PDT templates, transfer the formal
875 namespace symroot to the f2k_derived namespace.
876 *primary.c (match_keyword_arg, gfc_match_actual_arglist): Add
877 modifications to handle PDT spec lists. These are flagged in
878 both cases by new boolean arguments, whose prototype defaults
880 (gfc_match_structure_constructor, match_variable): Remove yet
881 more trailing whitespace.
882 * resolve.c (get_pdt_spec_expr, get_pdt_constructor): New
884 (resolve_structure_cons): If the constructor is a PDT template,
885 call get_pdt_constructor to build it using the parameter lists
886 and then get the specific instance of the PDT.
887 (resolve_component): PDT strings need a hidden string length
888 component like deferred characters.
889 (resolve_symbol): Dummy PDTs cannot have deferred parameters.
890 * symbol.c (gfc_add_kind, gfc_add_len): New functions.
891 (free_components): Free 'kind_expr' and 'param_list' fields.
892 (gfc_free_symbol): Free the 'param_list' field.
893 (gfc_find_sym_tree): If the current state is a PDT template,
894 look for the symtree in the f2k_derived namspaces.
895 trans-array.c (structure_alloc_comps): Allocate and deallocate
896 PDTs. Check dummy arguments for compliance of LEN parameters.
897 Add the new functions to the preceeding enum.
898 (gfc_allocate_pdt_comp, gfc_deallocate_pdt_comp and
899 gfc_check_pdt_dummy): New functions calling above.
900 * trans-array.h : Add prototypes for these functions.
901 trans-decl.c (gfc_get_symbol_decl): Call gfc_defer_symbol_init
902 as appropriate for PDT symbols.
903 (gfc_trans_deferred_vars): Allocate/deallocate PDT entities as
904 they come into and out of scope. Exclude pdt_types from being
906 (gfc_trans_subcomponent_assign): PDT array components must be
907 handles as if they are allocatable.
908 * trans-stmt.c (gfc_trans_allocate): Handle initialization of
910 (gfc_trans_deallocate): Likewise.
911 * trans-types.c (gfc_get_derived_type): PDT templates must not
912 arrive here. PDT string components are handles as if deferred.
913 Similarly, PDT arrays are treated as if allocatable. PDT
914 strings are pointer types.
915 * trans.c (gfc_deferred_strlen): Handle PDT strings in the same
916 way as deferred characters.
918 2017-09-01 Jakub Jelinek <jakub@redhat.com>
921 * parse.c (decode_omp_directive): Use matchs instead of matcho for
922 end ordered and ordered directives, except for ordered depend. For
923 -fopenmp-simd and ordered depend, reject the stmt.
924 * trans-openmp.c (gfc_trans_omp_ordered): For -fopenmp-simd ignore
925 threads clause and if simd clause isn't present, just translate the
928 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
929 Alan Hayward <alan.hayward@arm.com>
930 David Sherwood <david.sherwood@arm.com>
932 * trans-types.c (gfc_init_kinds): Use opt_scalar_int_mode for
935 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
936 Alan Hayward <alan.hayward@arm.com>
937 David Sherwood <david.sherwood@arm.com>
939 * target-memory.c (size_integer): Use SCALAR_INT_TYPE_MODE.
940 (size_logical): Likewise.
942 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
943 Alan Hayward <alan.hayward@arm.com>
944 David Sherwood <david.sherwood@arm.com>
946 * trans-types.c (gfc_type_for_mode): Use is_a <scalar_int_mode>.
948 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
949 Alan Hayward <alan.hayward@arm.com>
950 David Sherwood <david.sherwood@arm.com>
952 * trans-types.c (gfc_init_kinds): Use opt_scalar_float_mode
953 and FOR_EACH_MODE_IN_CLASS.
955 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
956 Alan Hayward <alan.hayward@arm.com>
957 David Sherwood <david.sherwood@arm.com>
959 * target-memory.c (size_float): Use SCALAR_FLOAT_TYPE_MODE
960 instead of TYPE_MODE.
962 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
963 Alan Hayward <alan.hayward@arm.com>
964 David Sherwood <david.sherwood@arm.com>
966 * trans-types.c (gfc_init_kinds): Use machine_mode instead of int
969 2017-08-28 Janus Weil <janus@gcc.gnu.org>
972 * expr.c (gfc_check_pointer_assign): Improve the check whether pointer
973 may outlive pointer target.
975 2017-08-27 Thomas Koenig <tkoenig@gcc.gnu.org>
978 * frontend-passes (inline_matumul_assign): Explicity
979 set typespec for call to CONJG.
981 2017-08-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
984 * trans-io.c (get_dtio_proc): Add check for format label and set
985 formatted flag accordingly. Reorganize the code a little.
987 2017-08-16 Thomas Koenig <tkoenig@gcc.gnu.org>
990 * frontend-passes.c (realloc_string_callback): If expression is a
991 concatenation, also check for dependency.
992 (constant_string_length): Check for presence of symtree.
994 2017-08-13 Thomas Koenig <tkoenig@gcc.gnu.org>
996 * gfortran.texi: Document format of unformatted sequential files.
998 2017-08-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1000 * invoke.texi: Actually commit change about -Ofast.
1002 2017-08-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1005 * resolve.c (resolve_symbol): Adjust (and reformat)
1006 comment. Perform check if a BIND(C) is declared
1007 at module level regardless of whether it is typed
1010 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
1012 * options.c (set_dec_flags): Only set legacy standards when value
1015 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
1017 * options.c (set_dec_flags, gfc_post_options): Only set flag_d_lines
1018 with -fdec when not set by user.
1020 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
1022 * decl.c (attr_seen): New static variable.
1023 * decl.c (variable_decl): Match %FILL in STRUCTURE body.
1024 * gfortran.texi: Update documentation.
1026 2017-08-08 Martin Liska <mliska@suse.cz>
1028 * trans-types.c: Include header files.
1030 2017-08-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1034 * options.c: Make -Ofast honor -fmax-stack-var-size.
1035 * invoke.texi: Document change.
1037 2017-08-01 Thomas König <tkoenig@gcc.gnu.org>
1040 * intrisic.c (gfc_convert_type_warn): Only set typespec for
1041 empty array constructors which don't have it already.
1043 2017-08-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1046 * lang.opt (fc-prototypes): Add option.
1047 * gfortran.h (gfc_typespec): Add interop_kind to struct.
1048 (gfc_dump_c_prototypes): Add prototype.
1049 * decl.c (gfc_match_kind_spec): Copy symbol used for kind to typespec.
1050 * parse.c (gfc_parse_file): Call gfc_dump_prototypes.
1051 * dump-parse-tree.c (gfc_dump_c_prototypes): New function.
1052 (type_return): New enum.
1053 (get_c_type_name): New function.
1054 (write_decl): New function.
1055 (write_type): New function.
1056 (write_variable): New function.
1057 (write_proc): New function.
1058 (write_interop_decl): New function.
1059 * invoke.texi: Document -fc-prototypes.
1061 2017-08-01 Dominique d'Humieres <dominiq@lps.ens.fr>
1064 * expr.c (gfc_check_init_expr): Use the renamed name.
1066 2017-07-31 Jakub Jelinek <jakub@redhat.com>
1068 * check.c (gfc_check_num_images): Fix a pasto.
1070 2017-07-29 Jakub Jelinek <jakub@redhat.com>
1072 * trans-decl.c (gfc_trans_use_stmts): Pass false as new argument to
1073 the imported_module_or_decl debug hook.
1075 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1077 * resolve.c (find_reachable_labels): Adjust.
1079 2017-07-25 Jakub Jelinek <jakub@redhat.com>
1081 * ioparm.def: Use 1U << 31 instead of 1 << 31 as flags2 mask.
1083 2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1085 * dump-parse-tree.c (show_symbol): Show binding label if present.
1087 2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1088 Mikael Morin <mikael@gcc.gnu.org>
1091 * fortran/trans-array.c (gfc_conv_resolve_dependencies):
1092 Break if dependency has been found.
1094 2017-07-23 Alexander Monakov <amonakov@ispras.ru>
1096 * interface.c (pair_cmp): Fix gfc_symbol comparison. Adjust comment.
1098 2017-07-18 Nathan Sidwell <nathan@acm.org>
1100 * trans.c (gfc_build_array_ref): Use TYPE_MAX_VALUE.
1102 2017-07-09 Dominique d'Humieres <dominiq@lps.ens.fr>
1105 * class.c (class_array_ref_detected): Remove a redundant
1108 2017-07-06 Harald Anlauf <anlauf@gmx.de>
1111 * array.c (gfc_ref_dimen_size): Handle bad subscript triplets.
1113 2017-07-03 Dominique d'Humieres <dominiq@lps.ens.fr>
1116 * resolve.c (resolve_symbol): Fix typo.
1118 2017-07-03 Dominique d'Humieres <dominiq@lps.ens.fr>
1121 * symbol.c (check_conflict): Add missing "conflicts".
1123 2017-06-29 Cesar Philippidis <cesar@codesourcery.com>
1126 * openmp.c (gfc_match_oacc_routine): Check if proc_name exist before
1127 comparing the routine name against it.
1129 2017-06-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1132 * trans-stmt.c (gfc_trans_call): If no code expr, use code->loc
1133 as warning/error locus.
1135 2017-06-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1138 * arith.c (wprecision_int_real): Set return value before
1139 mpz_clear and then return after it.
1141 2017-06-15 Janus Weil <janus@gcc.gnu.org>
1144 * trans-expr.c (gfc_conv_procedure_call): Deallocate the result of
1145 scalar allocatable procedure-pointer components.
1147 2017-06-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1150 * frontend-passes.c (traverse_io_block): Also
1151 check for variables occurring as indices multiple
1152 time in a single implied DO loop.
1154 2017-06-05 Janus Weil <janus@gcc.gnu.org>
1157 * trans-expr.c (gfc_conv_procedure_call): Fix detection of allocatable
1160 2017-06-05 Nicolas Koenig <koenigni@student.ethz.ch>
1163 * frontend-passes.c (traverse_io_block): New function.
1164 (simplify_io_impl_do): New function.
1165 (optimize_namespace): Invoke gfc_code_walker with
1166 simplify_io_impl_do.
1168 2017-06-02 Jakub Jelinek <jakub@redhat.com>
1171 * openmp.c (resolve_omp_clauses): Fix a typo.
1173 2017-05-30 David Malcolm <dmalcolm@redhat.com>
1175 * error.c (gfc_format_decoder): Update for new bool and
1176 const char ** params.
1178 2017-05-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1181 * frontend-passes.c (check_conjg_transpose_variable):
1183 (has_dimen_vector_ref): Likewise
1184 (matmul_temp_args): New function. Add prototype.
1185 (optimize_namespace): Call matmul_temp_args.
1187 2017-05-28 Thomas Koenig <tkoenig@gcc.gnu.org>
1189 * frontend-passes.c (matmul_lhs_realloc): Correct
1190 allocation size for case A1B2.
1192 2017-05-25 Thomas Koenig <tkoenig@gcc.gnu.org>
1194 * dump-parse-tree.c (show_expr): Also replace
1195 with dumpfile for showing values for forgotten
1198 2017-05-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1200 * dump-parse-tree.c (show_expr): Replace stdout
1201 with dumpfile for showing values.
1203 2017-05-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1206 * frontend-passes.c (matrix_case): Add A2TB2.
1207 (inline_limit_check): Handle MATMUL(TRANSPOSE(A),B)
1208 (inline_matmul_assign): Likewise.
1210 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1212 * openmp.c (OACC_KERNELS_CLAUSES): Add "OMP_CLAUSE_NUM_GANGS",
1213 "OMP_CLAUSE_NUM_WORKERS", "OMP_CLAUSE_VECTOR_LENGTH".
1215 2017-05-22 Janus Weil <janus@gcc.gnu.org>
1218 * resolve.c (resolve_fl_derived): Make sure that vtype symbols are
1221 2017-05-19 Paul Thomas <pault@gcc.gnu.org>
1224 * trans-io.c (nml_get_addr_expr): If we are dealing with class
1225 type data set tmp tree to get that address.
1226 (transfer_namelist_element): Set the array spec to point to the
1229 2017-05-19 David Malcolm <dmalcolm@redhat.com>
1232 * bbt.c (insert): Remove trailing exclamation mark from message.
1233 * decl.c (gfc_match_final_decl): Likewise.
1234 * dump-parse-tree.c (show_expr): Likewise.
1235 * module.c (gfc_use_module): Likewise.
1236 * primary.c (build_actual_constructor): Likewise.
1237 (gfc_convert_to_structure_constructor): Likewise.
1239 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1241 * gfortran.h (enum gfc_omp_default_sharing): Add
1242 "OMP_DEFAULT_PRESENT".
1243 * dump-parse-tree.c (show_omp_clauses): Handle it.
1244 * openmp.c (gfc_match_omp_clauses): Likewise.
1245 * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
1247 2017-05-18 Fritz Reese <fritzoreese@gmail.com>
1250 * decl.c (match_attr_spec, gfc_match_automatic,
1251 gfc_match_static, gfc_match_structure_decl): Unify diagnostic
1252 errors regarding -fdec options.
1253 * io.c (match_dec_etag, match_dec_vtag, match_dec_ftag): Ditto.
1255 2017-05-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1258 * trans-io.c (transfer_namelist_element): Change check from
1259 NULL_TREE to null_pointer_node.
1261 2017-05-17 Fritz Reese <fritzoreese@gmail.com>
1264 * expr.c (component_initializer): Don't generate initializers for
1266 * invoke.texi (-finit-derived): Document.
1268 2017-05-16 Paul Thomas <pault@gcc.gnu.org>
1271 * decl.c (build_sym): In a submodule allow overriding of host
1272 associated symbols from the ancestor module with a new
1275 2017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>
1278 * trans-stmt.c (gfc_trans_integer_select): Remove redundant condition.
1280 2017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>
1283 * expr.c (gfc_generate_initializer): If type conversion fails,
1284 check for error and return NULL.
1286 2017-05-14 Nicolas Koenig <koenigni@student.ethz.ch>
1289 * array.c (gfc_ref_dimen_size): Simplify stride
1291 * data.c (gfc_advance_section): Simplify start,
1292 end and stride expressions
1293 (gfc_advance_section): Simplify start and end
1295 (gfc_get_section_index): Simplify start expression
1297 2017-05-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1299 * io.c (gfc_resolve_dt): Fix returns to bool type.
1301 2017-05-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1304 * io.c (dtio_procs_present): Add new function to check for DTIO
1305 procedures relative to I/O statement READ or WRITE.
1306 (gfc_resolve_dt): Add namelist checks using the new function.
1307 * resolve.c (dtio_procs_present): Remove function and related
1308 namelist checks. (resolve_fl_namelist): Add check specific to
1309 Fortran 95 restriction on namelist objects.
1311 2017-05-11 Nathan Sidwell <nathan@acm.org>
1313 * trans-decl.c: Include dumpfile.h not tree-dump.h,
1315 2017-05-09 Janus Weil <janus@gcc.gnu.org>
1318 * resolve.c (gfc_resolve_finalizers): Ensure that derived-type
1319 components have a their finalizers resolved, also if the superordinate
1320 type itself has a finalizer.
1322 2017-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
1325 * frontend-passes.c (matmul_to_var_expr): New function,
1327 (matmul_to_var_code): Likewise.
1328 (optimize_namespace): Use them from gfc_code_walker.
1330 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1332 * cpp.c (cb_cpp_error): Replace report_diagnostic
1333 with diagnostic_report_diagnostic.
1334 * error.c (gfc_warning): Likewise.
1335 (gfc_warning_now_at): Likewise.
1336 (gfc_warning_now): Likewise.
1337 (gfc_warning_internal): Likewise.
1338 (gfc_error_now): Likewise.
1339 (gfc_fatal_error): Likewise.
1340 (gfc_error_opt): Likewise.
1341 (gfc_internal_error): Likewise.
1343 2017-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1346 * frontend-passes.c (inline_matmul_assign): Also check bounds
1347 for allocatable lhs and matrix-vector-multiplication.
1349 2017-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1352 * io.c (format_lex): Check for '/' and set token to FMT_SLASH.
1353 (check_format): Move FMT_DT checking code to data_desc section.
1354 * module.c (gfc_match_use): Include the case of INTERFACE_DTIO.
1356 2017-04-22 Janus Weil <janus@gcc.gnu.org>
1359 * trans-types.c (gfc_conv_procedure_call): Deallocate the components
1360 of allocatable intent(out) arguments.
1362 2017-04-21 Janus Weil <janus@gcc.gnu.org>
1365 * trans-types.c (gfc_get_derived_type): Prevent an infinite loop when
1366 building a derived type that includes a procedure pointer component
1367 with a polymorphic result.
1369 2017-04-17 Paul Thomas <pault@gcc.gnu.org>
1372 * module.c (find_symtree_for_symbol): Delete.
1373 (read_module): Remove the call to the above.
1375 2017-04-14 Janus Weil <janus@gcc.gnu.org>
1378 * class.c (generate_finalization_wrapper): Give the finalization wrapper
1379 the recursive attribute.
1381 2017-04-10 Nicolas Koenig <koenigni@student.ethz.ch>
1382 Paul Thomas <pault@gcc.gnu.org>
1385 * module.c (gfc_match_submodule): Add error
1386 if function is called in the wrong state.
1388 2017-04-10 Janus Weil <janus@gcc.gnu.org>
1391 * expr.c (gfc_check_pointer_assign): Check if procedure pointer
1392 components in a pointer assignment need an explicit interface.
1394 2017-03-18 Nicolas Koenig <koenigni@student.ethz.ch>
1397 * symbol.c (gfc_delete_symtree): If there is a period in the name, ignore
1398 everything before it.
1400 2017-03-28 Janus Weil <janus@gcc.gnu.org>
1403 * trans-io.c (transfer_namelist_element): Perform a polymorphic call
1404 to a DTIO procedure if necessary.
1406 2017-03-25 Paul Thomas <pault@gcc.gnu.org>
1410 * decl.c (access_attr_decl): Remove the error for an absent
1411 generic DTIO interface and ensure that symbol has the flavor
1414 2017-03-22 Dominique d'Humieres <dominiq@lps.ens.fr>
1417 * module.c: Remove trailing period.
1419 2017-03-22 Dominique d'Humieres <dominiq@lps.ens.fr>
1422 * decl.c: Replace '%s' with %qs.
1424 * interface.c: Likewise.
1425 * match.c: Likewise.
1426 * primary.c: Likewise.
1427 * resolve.c: Likewise.
1431 * io.c: Remove trailing spaces.
1432 * match.c: Likewise.
1433 * openmp.c: Likewise.
1434 * resolve.c: Likewise.
1435 * trans-intrinsic.c: Likewise.
1438 * expr.c: Remove a double spaces.
1441 * primary.c: Remove spurious quotes around %qs.
1443 2017-03-22 Thomas Koenig <tkoenig@gcc.gnu.org>
1446 * frontend-passes.c (combine_array_constructor): Take
1447 location of new expression from constructor expression instead
1450 2017-03-20 Nicolas Koenig <koenigni@student.ethz.ch>
1453 * symbol.c (check_conflict): Report an error if an EQUIVALENCE
1456 2017-03-18 Nicolas Koenig <koenigni@student.ethz.ch>
1459 * decl.c (add_hidden_procptr_result): Fixed Refs count of the
1460 created "ppr@" symbol.
1462 2017-03-18 Paul Thomas <pault@gcc.gnu.org>
1465 * module.c (mio_symbol_attribute): Remove reset of the flag
1466 'no_module_procedures'.
1467 (check_for_module_procedures): New function. Move declaration
1468 of 'no_module_procedures' to above it.
1469 (gfc_dump_module): Traverse namespace calling new function.
1471 2017-03-18 Paul Thomas <pault@gcc.gnu.org>
1474 * symbol.c (check_conflict): A dummy procedure in a submodule,
1475 module procedure is not an error.
1476 (gfc_add_flavor): Ditto.
1478 2017-03-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1481 * openmp.c (check_symbol_not_pointer): Adjust diagnostics.
1483 2017-03-16 Jakub Jelinek <jakub@redhat.com>
1486 * parse.c (gfc_ascii_statement): Use !$ACC for ST_OACC_ATOMIC
1487 and ST_OACC_END_ATOMIC, instead of !ACC.
1488 * trans-decl.c (finish_oacc_declare): Use !$ACC instead of $!ACC.
1489 * openmp.c (gfc_match_oacc_declare, gfc_match_oacc_wait,
1490 gfc_resolve_oacc_declare): Likewise.
1493 * error.c (gfc_format_decoder): Rename plus argument to set_locus,
1494 remove ATTRIBUTE_UNUSED from all arguments, call default_tree_printer
1495 if not a Fortran specific spec.
1496 * trans-io.c: Include options.h.
1497 (gfc_build_st_parameter): Temporarily disable -Wpadded around layout
1498 of artificial IO data structures.
1500 2017-03-15 David Malcolm <dmalcolm@redhat.com>
1503 * resolve.c (resolve_contained_fntype): Make error messages more
1504 amenable to translation.
1506 2017-03-06 Richard Biener <rguenther@suse.de>
1509 * trans.c (gfc_add_modify_loc): Weaken assert.
1511 2017-03-05 Andre Vehreschild <vehre@gcc.gnu.org>,
1512 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
1514 * check.c (positive_check): Add new function checking constant for
1515 being greater then zero.
1516 (gfc_check_image_status): Add checking of image_status arguments.
1517 (gfc_check_failed_or_stopped_images): Same but for failed_- and
1518 stopped_images function.
1519 * dump-parse-tree.c (show_code_node): Added output of FAIL IMAGE.
1520 * gfortran.h (enum gfc_statement): Added FAIL_IMAGE_ST.
1521 (enum gfc_isym_id): Added new intrinsic symbols.
1522 (enum gfc_exec_op): Added EXEC_FAIL_IMAGE.
1523 * gfortran.texi: Added description for the new API functions. Updated
1524 coverage of gfortran of TS18508.
1525 * intrinsic.c (add_functions): Added symbols to resolve new intrinsic
1527 * intrinsic.h: Added prototypes.
1528 * iresolve.c (gfc_resolve_failed_images): Resolve the failed_images
1530 (gfc_resolve_image_status): Same for image_status.
1531 (gfc_resolve_stopped_images): Same for stopped_images.
1532 * libgfortran.h: Added prototypes.
1533 * match.c (gfc_match_if): Added matching of FAIL IMAGE statement.
1534 (gfc_match_fail_image): Match a FAIL IMAGE statement.
1535 * match.h: Added prototype.
1536 * parse.c (decode_statement): Added matching for FAIL IMAGE.
1537 (next_statement): Same.
1538 (gfc_ascii_statement): Same.
1540 * simplify.c (gfc_simplify_failed_or_stopped_images): For COARRAY=
1541 single a constant result can be returne.d
1542 (gfc_simplify_image_status): For COARRAY=single the result is constant.
1543 * st.c (gfc_free_statement): Added FAIL_IMAGE handling.
1544 * trans-decl.c (gfc_build_builtin_function_decls): Added decls of the
1546 * trans-expr.c (gfc_conv_procedure_call): This is first time all
1547 arguments of a function are optional, which is now handled here
1549 * trans-intrinsic.c (conv_intrinsic_image_status): Translate
1551 (gfc_conv_intrinsic_function): Add support for image_status.
1552 (gfc_is_intrinsic_libcall): Add support for the remaining new
1554 * trans-stmt.c (gfc_trans_fail_image): Trans a fail image.
1555 * trans-stmt.h: Add the prototype for the above.
1556 * trans.c (trans_code): Dispatch for fail_image.
1557 * trans.h: Add the trees for the new intrinsics.
1559 2017-03-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1562 * openmp.c (check_symbol_not_pointer): Adjust diagnostic.
1564 2017-02-28 Paul Thomas <pault@gcc.gnu.org>
1567 * resolve.c (resolve_fl_procedure): Deal with the case where
1568 'submodule_name' is NULL so that gfc_error does not ICE.
1569 Reformat the error message to make it more consistent.
1571 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1573 * parse.c (parse_critical_block): Use cond ? G_("...") : G_("...")
1574 instead of just cond ? "..." : "...".
1575 * scanner.c (gfc_next_char_literal): Likewise.
1576 * match.c (match_exit_cycle): Likewise.
1578 2017-02-26 Thomas Koenig <tkoenig@gcc.gnu.org>
1581 * options.c (gfc_post_options): Set default limit for matmul
1583 * invoke.texi: Document change.
1585 2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
1588 * interface.c (check_dtio_arg_TKR_intent): Change 'intent'
1591 2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
1594 * interface.c (gfc_match_end_interface): Remove spurious comma
1595 and space, replace 'got %s' with 'got %qs'.
1597 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1600 * interface.c (check_dtio_arg_TKR_intent): Supply 'must'
1601 missing from error message.
1603 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1606 * interface.c (gfc_find_typebound_dtio_proc): Guard test for
1607 flavor attribute by checking that symbol is resolved.
1609 2017-02-16 Paul Thomas <pault@gcc.gnu.org>
1612 * decl.c (access_attr_decl): Test for presence of generic DTIO
1613 interface and emit error if not present.
1615 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1618 * parse.c (check_component, parse_union): Whitespace.
1619 (set_syms_host_assoc): For a derived type, check if the module
1620 in which it was declared is one of the submodule ancestors. If
1621 it is, make the components public. Otherwise, reset attribute
1622 'host_assoc' and set 'use-assoc' so that encapsulation is
1625 2017-02-19 Paul Thomas <pault@gcc.gnu.org>
1628 * decl.c (gfc_set_constant_character_len): Whitespace.
1629 (gfc_match_end): Catch case where a procedure is contained in
1630 a module procedure and ensure that 'end procedure' is the
1631 correct termination.
1633 2017-02-19 Paul Thomas <pault@gcc.gnu.org>
1636 * resolve.c (fixup_unique_dummy): New function.
1637 (gfc_resolve_expr): Call it for dummy variables with a unique
1640 2017-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
1643 * trans-expr.c (gfc_trans_assignment_1): Deref indirect refs when
1644 compiling with -fcheck=mem to check the pointer and not the data.
1646 2017-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
1649 * trans-array.c (duplicate_allocatable_coarray): Ensure attributes
1650 passed are properly initialized.
1651 (structure_alloc_comps): Same.
1652 * trans-expr.c (gfc_trans_structure_assign): Same.
1654 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1656 * trans-expr.c (gfc_conv_substring): Add missing space in diagnostics.
1658 2017-02-12 Thomas Koenig <tkoenig@gcc.gnu.org>
1661 * intrinsic.c (gfc_intrinsic_func_interface): Return an error
1662 for -std=f95 for disallowed transformational functions in
1663 initialization expressions.
1665 2017-02-09 Cesar Philippidis <cesar@codesourcery.com>
1666 Joseph Myers <joseph@codesourcery.com>
1668 * openmp.c (resolve_omp_clauses): Error on directives
1669 containing both tile and collapse clauses.
1670 (resolve_oacc_loop_blocks): Represent '*' tile arguments as zero.
1671 * trans-openmp.c (gfc_trans_omp_do): Lower tiled loops like
1674 2017-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
1676 * trans-types.c (gfc_get_int_kind_from_width_isofortranen): Choose
1677 REAL type with the widest precision if two (or more) have the same
1680 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1683 * trans-stmt.c (gfc_trans_allocate): Only deallocate the components of
1684 the temporary, when a new object was created for the temporary. Not
1685 when it is just an alias to an existing object.
1687 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1690 * trans-decl.c (generate_coarray_sym_init): Retrieve the symbol's
1691 attributes before using them.
1693 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1696 * trans-stmt.c (gfc_trans_allocate): Add the multiplying the _len
1697 component of unlimited polymorphic objects when source-allocating.
1699 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1702 * trans-array.c (structure_alloc_comps): Ignore pointer components when
1705 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1708 * f95-lang.c (gfc_create_decls): Include stringpool.h.
1709 Pass main_input_filename to build_translation_unit_decl.
1711 2017-01-23 Thomas Koenig <tkoenig@netcologne.de>
1713 * arith.c (arith_power): If simplifying integer power expression
1714 to zero, warn if -Winteger-division is given.
1716 2017-01-22 Jakub Jelinek <jakub@redhat.com>
1719 * parse.c (matchs, matcho, matchds, matchdo): Replace return st;
1720 with { ret = st; goto finish; }.
1721 (decode_omp_directive): Allow declare simd, declare target and
1722 simd directives in PURE/ELEMENTAL procedures. Only call
1723 gfc_unset_implicit_pure on successful match of other procedures.
1725 2017-01-21 Gerald Pfeifer <gerald@pfeifer.com>
1727 * gfc-internals.texi (Symbol Versioning): Change references
1728 to www.akkadia.org to https.
1730 2017-01-21 Jakub Jelinek <jakub@redhat.com>
1732 * gfortran.h (gfc_extract_int): Change return type to bool. Add
1733 int argument with = 0.
1734 * decl.c (gfc_match_kind_spec): Adjust gfc_extract_int caller, pass
1735 1 as new last argument to it, don't emit gfc_error.
1736 (match_char_kind): Likewise.
1737 (gfc_match_decl_type_spec): Use gfc_get_string ("%s", x) instead of
1739 (gfc_match_derived_decl, match_binding_attributes): Likewise.
1740 (gfc_match_structure_decl): Don't sprintf back to name, call
1741 get_struct_decl directly with gfc_dt_upper_string (name) result.
1742 * trans-stmt.c (gfc_trans_allocate): Use gfc_get_string ("%s", x)
1743 instead of gfc_get_string (x).
1744 * module.c (gfc_dt_lower_string, gfc_dt_upper_string,
1745 gfc_match_use, gfc_match_submodule, find_true_name, mio_pool_string,
1746 mio_symtree_ref, mio_expr, mio_omp_udr_expr, load_generic_interfaces,
1747 load_omp_udrs, load_needed, read_module, dump_module,
1748 create_intrinsic_function, import_iso_c_binding_module,
1749 create_int_parameter, create_int_parameter_array, create_derived_type,
1750 use_iso_fortran_env_module): Likewise.
1751 * error.c (gfc_diagnostic_starter, gfc_diagnostic_start_span): Use
1752 pp_verbatim (context->printer, "%s", x) instead of
1753 pp_verbatim (context->printer, x).
1754 * match.c (gfc_match_small_int): Adjust gfc_extract_int caller, pass
1755 1 as new last argument to it, don't emit gfc_error.
1756 (gfc_match_small_int_expr): Likewise.
1757 * iresolve.c (gfc_get_string): Optimize format "%s" case.
1758 (resolve_bound): Use gfc_get_string ("%s", x) instead of
1760 (resolve_transformational): Formatting fix.
1761 (gfc_resolve_char_achar): Change name argument to bool is_achar,
1762 use a single format string and if is_achar add "a" before "char".
1763 (gfc_resolve_achar, gfc_resolve_char): Adjust callers.
1764 * expr.c (gfc_extract_int): Change return type to bool, return true
1765 if some error occurred. Add REPORT_ERROR argument, if non-zero
1766 call either gfc_error or gfc_error_now depending on its sign.
1767 * arith.c (arith_power): Adjust gfc_extract_int caller.
1768 * symbol.c (gfc_add_component): Use gfc_get_string ("%s", x) instead
1769 of gfc_get_string (x).
1770 (gfc_new_symtree, gfc_delete_symtree, gfc_get_uop, gfc_new_symbol,
1771 gfc_get_gsymbol, generate_isocbinding_symbol): Likewise.
1772 * openmp.c (gfc_match_omp_clauses): Adjust gfc_extract_int caller, pass
1773 -1 as new last argument to it, don't emit gfc_error_now.
1774 (gfc_match_omp_declare_reduction): Use gfc_get_string ("%s", x)
1775 instead of gfc_get_string (x).
1776 * check.c (kind_check): Adjust gfc_extract_int caller.
1777 * intrinsic.c (add_sym, find_sym, make_alias): Use
1778 gfc_get_string ("%s", x) instead of gfc_get_string (x).
1779 * simplify.c (get_kind, gfc_simplify_btest, gfc_simplify_maskr,
1780 gfc_simplify_maskl, gfc_simplify_poppar, gfc_simplify_repeat,
1781 gfc_simplify_selected_int_kind, gfc_simplify_selected_real_kind):
1782 Adjust gfc_extract_int callers.
1783 * trans-decl.c (gfc_find_module): Use gfc_get_string ("%s", x)
1784 instead of gfc_get_string (x).
1785 * matchexp.c (expression_syntax): Add const.
1786 * primary.c (match_kind_param, match_hollerith_constant,
1787 match_string_constant): Adjust gfc_extract_int callers.
1788 (match_keyword_arg): Use gfc_get_string ("%s", x) instead of
1790 * frontend-passes.c (optimize_minmaxloc): Likewise.
1792 2017-01-19 Andre Vehreschild <vehre@gcc.gnu.org>
1795 * trans-decl.c (gfc_build_qualified_array): Add static decl to parent
1796 function only, when the decl-context is not the translation unit.
1798 2017-01-18 Louis Krupp <louis.krupp@zoho.com>
1802 * trans-expr.c (gfc_conv_variable): Don't treat temporary variables
1803 as function arguments.
1804 * trans-stmt.c (forall_make_variable_temp,
1805 generate_loop_for_temp_to_lhs, gfc_trans_assign_need_temp,
1806 gfc_trans_forall_1): Don't adjust offset of forall temporary
1807 for array sections, make forall temporaries work for substring
1808 expressions, improve test coverage by adding -ftest-forall-temp
1809 option to request usage of temporary array in forall code.
1810 * lang.opt: Add -ftest-forall-temp option.
1811 * invoke.texi: Add -ftest-forall-temp option.
1813 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
1815 * primary.c (caf_variable_attr): Improve figuring whether the current
1816 component is the last one refed.
1817 * trans-stmt.c (gfc_trans_allocate): Do not generate sync_all calls
1818 when allocating pointer or allocatable components.
1820 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
1822 * gfortran.texi: Add missing parameters to caf-API functions. Correct
1823 typos and clarify some descriptions.
1825 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
1828 Missed some cases, here they are:
1829 * trans-decl.c (gfc_build_qualified_array): Add static tokens to the
1830 parent function's scope.
1831 * trans-expr.c (gfc_get_tree_for_caf_expr): Shorten code. Remove
1834 2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org>
1837 * resolve.c (resolve_lock_unlock_event): Resolve the expression for
1838 event's until_count.
1840 2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org>
1843 * trans-expr.c (gfc_get_tree_for_caf_expr): Ensure the backend_decl
1844 is valid before accessing it.
1846 2017-01-09 Jakub Jelinek <jakub@redhat.com>
1848 PR translation/79019
1849 PR translation/79020
1850 * decl.c (attr_decl1): Fix spelling in translatable string.
1851 * intrinsic.texi: Fix spelling - invokation -> invocation.
1852 * lang.opt (faggressive-function-elimination, gfc_convert): Fix
1853 typos in descriptions.
1854 * openmp.c (resolve_omp_clauses): Add missing whitespace to
1855 translatable strings.
1857 2017-01-08 Martin Sebor <msebor@redhat.com>
1859 PR tree-optimization/78913
1861 * trans-common.c (build_equiv_decl): Increase buffer size to avoid
1862 truncation for any argument.
1863 * trans-types.c (gfc_build_logical_type): Same.
1865 2017-01-07 Andre Vehreschild <vehre@gcc.gnu.org>
1869 * expr.c (gfc_check_pointer_assign): Return the same error message for
1870 rewritten coarray pointer assignments like for plain ones.
1871 * gfortran.h: Change prototype.
1872 * primary.c (caf_variable_attr): Set attributes used ones only only
1873 ones. Add setting of pointer_comp attribute.
1874 (gfc_caf_attr): Add setting of pointer_comp attribute.
1875 * trans-array.c (gfc_array_allocate): Add flag that the component to
1876 allocate is not an ultimate coarray component. Add allocation of
1878 (structure_alloc_comps): Extend nullify to treat pointer components in
1879 coarrays correctly. Restructure nullify to remove redundant code.
1880 (gfc_nullify_alloc_comp): Allow setting caf_mode flags.
1881 * trans-array.h: Change prototype of gfc_nullify_alloc_comp ().
1882 * trans-decl.c (generate_coarray_sym_init): Call nullify_alloc_comp for
1883 derived type coarrays with pointer components.
1884 * trans-expr.c (gfc_trans_structure_assign): Also treat pointer
1886 (trans_caf_token_assign): Handle assignment of token of scalar pointer
1888 (gfc_trans_pointer_assignment): Call above routine.
1889 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Add treating pointer
1891 (gfc_conv_intrinsic_caf_get): Likewise.
1892 (conv_caf_send): Likewise.
1893 * trans-stmt.c (gfc_trans_allocate): After allocating a derived type in
1894 a coarray pre-register the tokens.
1895 (gfc_trans_deallocate): Simply determining the coarray type (scalar or
1896 array) and deregistering it correctly.
1897 * trans-types.c (gfc_typenode_for_spec): Replace in_coarray flag by the
1898 actual codim to allow lookup of array types in the cache.
1899 (gfc_build_array_type): Likewise.
1900 (gfc_get_array_descriptor_base): Likewise.
1901 (gfc_get_array_type_bounds): Likewise.
1902 (gfc_get_derived_type): Likewise.
1903 * trans-types.h: Likewise.
1904 * trans.c (gfc_deallocate_with_status): Enable deregistering of all kind
1905 of coarray components.
1906 (gfc_deallocate_scalar_with_status): Use free() in fcoarray_single mode
1907 instead of caf_deregister.
1909 2017-01-06 Jakub Jelinek <jakub@redhat.com>
1911 * simplify.c (simplify_transformation_to_array): Use
1912 GCC_DIAGNOSTIC_PUSH_IGNORED and GCC_DIAGNOSTIC_POP instead of
1913 #pragma GCC diagnostic {push,ignored,pop}.
1915 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
1917 * simplify.c (simplify_transformation_to_array): Silence
1918 array bounds warning. Fix whitespace.
1920 2017-01-04 Alexandre Oliva <aoliva@redhat.com>
1922 * module.c (load_omp_udrs): Initialize name.
1924 2017-01-02 Janne Blomqvist <jb@gcc.gnu.org>
1927 * trans-expr.c (gfc_trans_string_copy): Rework string copy
1928 algorithm to avoid -Wstringop-overflow warning.
1930 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1932 Update copyright years.
1934 * gfortranspec.c (lang_specific_driver): Update copyright notice
1936 * gfc-internals.texi: Bump @copying's copyright year.
1937 * gfortran.texi: Ditto.
1938 * intrinsic.texi: Ditto.
1939 * invoke.texi: Ditto.
1941 Copyright (C) 2017 Free Software Foundation, Inc.
1943 Copying and distribution of this file, with or without modification,
1944 are permitted in any medium without royalty provided the copyright
1945 notice and this notice are preserved.