1 2017-11-23 Mike Stump <mikestump@comcast.net>
2 Eric Botcazou <ebotcazou@adacore.com>
4 * trans-stmt.c (gfc_trans_forall_loop): Pass 3rd operand to
7 2017-11-23 Paul Thomas <pault@gcc.gnu.org>
10 * trans-types.c (gfc_sym_type): If a character function result
11 is missing the charlen backend_decl, use the one from the name-
12 space procedure symbol, if present.
14 2017-11-22 David Malcolm <dmalcolm@redhat.com>
17 * error.c (gfc_notify_std): Convert "quoted" param from bool to
20 2017-11-22 Thomas Koenig <tkoenig@gcc.gnu.org>
23 * check.c (int_or_real_or_char_check_f2003): New function.
24 * iresolve.c (gfc_resolve_maxloc): Add number "2" for
25 character arguments and rank-zero return value.
26 (gfc_resolve_minloc): Likewise.
27 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Handle case of
28 character arguments and rank-zero return value by removing
29 unneeded arguments and calling the library function.
31 2017-11-22 Paul Thomas <pault@gcc.gnu.org>
34 * trans-stmt.c (trans_associate_var): Weaken the over strong
35 condition for using the fake result decl.
37 2017-11-20 Paul Thomas <pault@gcc.gnu.org>
40 * trans-expr.c (trans_class_vptr_len_assignment): Set from_len
41 if the temporary is unlimited polymorphic.
42 * trans-stmt.c (trans_associate_var): Use the fake result decl
43 to obtain the 'len' field from an explicit function result when
44 in that function scope.
46 2017-11-19 Paul Thomas <pault@gcc.gnu.org>
49 * expr.c (gfc_is_class_array_function): Renamed from
50 'gfc_is_alloc_class_array_function' and modified to return true
51 for pointers as well as allocatable results.
52 * gfortran.h : Change of name for prototype of above function.
53 * trans-array.c (gfc_add_loop_ss_code): Force finalization of
55 (build_class_array_ref): Change assertion into a condition.
56 (build_class_array_ref): Set the se class_vptr for class array
58 (gfc_walk_function_expr): Reference gfc_is_class_array_function
60 * trans-decl.c (get_proc_result): Move it up before
61 gfc_trans_deferred_vars.
62 (gfc_trans_deferred_vars): Nullify explicit return class arrays
64 * trans-expr.c (gfc_conv_class_to_class): Allow conversion of
65 class array functions that have an se class_vptr and use it
67 (gfc_conv_subref_array_arg): Rename reference to the above
69 (gfc_conv_procedure_call): Ditto. Add the se pre block to the
70 loop pre block before the function is evaluated. Do not
71 finalize class pointer results.
72 (arrayfunc_assign_needs_temporary, gfc_trans_assignment_1) More
74 * trans-intrinsic.c (gfc_conv_intrinsic_size): Ditto.
76 2017-11-18 Janne Blomqvist <jb@gcc.gnu.org>
79 * ioparm.def (IOPARM): Make nextrec a pintio.
81 2017-11-18 Janne Blomqvist <jb@gcc.gnu.org>
84 * ioparm.def (IOPARM): Make recl_in intio, and recl_out pintio.
86 2017-11-18 Thomas Koenig <tkoenig@gcc.gnu.org>
89 * expr.c (gfc_is_simply_contiguous): If a function call through a
90 class variable is done through a reference, check the function's
93 2017-11-17 Richard Biener <rguenther@suse.de>
96 * trans-stmt.c (gfc_trans_forall_loop): Annotate DO CONCURRENT
97 loops with annot_expr_parallel_kind instead of just
98 annot_expr_ivdep_kind.
100 2017-11-15 Martin Liska <mliska@suse.cz>
102 * options.c (gfc_post_options):
103 Do not set default value of warn_return_type.
104 * trans-decl.c (gfc_trans_deferred_vars):
105 Compare warn_return_type for greater than zero.
106 (generate_local_decl): Likewise
107 (gfc_generate_function_code): Likewise.
109 2017-11-13 Fritz Reese <fritzoreese@gmail.com>
112 * decl.c (match_clist_expr): Replace gcc_assert with proper
113 handling of bad result from spec_size().
114 * resolve.c (check_data_variable): Avoid NULL dereference when passing
117 2017-11-11 Janus Weil <janus@gcc.gnu.org>
120 * resolve.c (update_compcall_arglist): Improve error recovery,
123 2017-11-10 Fritz Reese <fritzoreese@gmail.com>
126 * gfortran.h (gfc_build_init_expr): New prototype.
127 * invoke.texi (finit-derived): Update documentation.
128 * expr.c (gfc_build_init_expr): New, from gfc_build_default_init_expr.
129 (gfc_build_default_init_expr): Redirect to gfc_build_init_expr(,,false)
130 (component_initializer): Force building initializers using
131 gfc_build_init_expr(,,true).
133 2017-11-10 Martin Sebor <msebor@redhat.com>
136 * gcc/fortran/decl.c (build_sym): Use strcpy instead of strncpy.
138 2017-11-10 Paul Thomas <pault@gcc.gnu.org>
141 * trans-stmt.c (gfc_trans_allocate): Remove the gcc_assert on
142 null string length for assumed length typespec and set
143 expr3_esize to NULL_TREE;
145 2017-11-09 Paul Thomas <pault@gcc.gnu.org>
148 * check.c (same_type_check): Introduce a new argument 'assoc'
149 with default value false. If this is true, use the symbol type
150 spec of BT_PROCEDURE expressions.
151 (gfc_check_associated): Set 'assoc' true in the call to
154 2017-11-09 Steven G. Kargl <kargl@gcc.gnu.org>
157 * interface.c (symbol_rank): Check for NULL pointer.
159 2017-11-08 Steven G. Kargl <kargl@kgcc.gnu.org>
162 * simplify.c(gfc_simplify_transfer): Do not dereference a NULL pointer.
165 2017-11-08 Steven G. Kargl <kargl@gcc.gnu.org>
168 * arith.c (gfc_hollerith2character): Clear pad.
170 2017-11-08 Janne Blomqvist <jb@gcc.gnu.org>
173 * convert.c (truthvalue_conversion): Use logical_type_node.
174 * trans-array.c (gfc_trans_allocate_array_storage): Likewise.
175 (gfc_trans_create_temp_array): Likewise.
176 (gfc_trans_array_ctor_element): Likewise.
177 (gfc_trans_array_constructor_value): Likewise.
178 (trans_array_constructor): Likewise.
179 (trans_array_bound_check): Likewise.
180 (gfc_conv_array_ref): Likewise.
181 (gfc_trans_scalarized_loop_end): Likewise.
182 (gfc_conv_array_extent_dim): Likewise.
183 (gfc_array_init_size): Likewise.
184 (gfc_array_allocate): Likewise.
185 (gfc_trans_array_bounds): Likewise.
186 (gfc_trans_dummy_array_bias): Likewise.
187 (gfc_conv_array_parameter): Likewise.
188 (duplicate_allocatable): Likewise.
189 (duplicate_allocatable_coarray): Likewise.
190 (structure_alloc_comps): Likewise
191 (get_std_lbound): Likewise
192 (gfc_alloc_allocatable_for_assignment): Likewise
193 * trans-decl.c (add_argument_checking): Likewise
194 (gfc_generate_function_code): Likewise
195 * trans-expr.c (gfc_copy_class_to_class): Likewise
196 (gfc_trans_class_array_init_assign): Likewise
197 (gfc_trans_class_init_assign): Likewise
198 (gfc_conv_expr_present): Likewise
199 (gfc_conv_substring): Likewise
200 (gfc_conv_cst_int_power): Likewise
201 (gfc_conv_expr_op): Likewise
202 (gfc_conv_procedure_call): Likewise
203 (fill_with_spaces): Likewise
204 (gfc_trans_string_copy): Likewise
205 (gfc_trans_alloc_subarray_assign): Likewise
206 (gfc_trans_pointer_assignment): Likewise
207 (gfc_trans_scalar_assign): Likewise
208 (fcncall_realloc_result): Likewise
209 (alloc_scalar_allocatable_for_assignment): Likewise
210 (trans_class_assignment): Likewise
211 (gfc_trans_assignment_1): Likewise
212 * trans-intrinsic.c (build_fixbound_expr): Likewise
213 (gfc_conv_intrinsic_aint): Likewise
214 (gfc_trans_same_strlen_check): Likewise
215 (conv_caf_send): Likewise
216 (trans_this_image): Likewise
217 (conv_intrinsic_image_status): Likewise
218 (trans_image_index): Likewise
219 (gfc_conv_intrinsic_bound): Likewise
220 (conv_intrinsic_cobound): Likewise
221 (gfc_conv_intrinsic_mod): Likewise
222 (gfc_conv_intrinsic_dshift): Likewise
223 (gfc_conv_intrinsic_dim): Likewise
224 (gfc_conv_intrinsic_sign): Likewise
225 (gfc_conv_intrinsic_ctime): Likewise
226 (gfc_conv_intrinsic_fdate): Likewise
227 (gfc_conv_intrinsic_ttynam): Likewise
228 (gfc_conv_intrinsic_minmax): Likewise
229 (gfc_conv_intrinsic_minmax_char): Likewise
230 (gfc_conv_intrinsic_anyall): Likewise
231 (gfc_conv_intrinsic_arith): Likewise
232 (gfc_conv_intrinsic_minmaxloc): Likewise
233 (gfc_conv_intrinsic_minmaxval): Likewise
234 (gfc_conv_intrinsic_btest): Likewise
235 (gfc_conv_intrinsic_bitcomp): Likewise
236 (gfc_conv_intrinsic_shift): Likewise
237 (gfc_conv_intrinsic_ishft): Likewise
238 (gfc_conv_intrinsic_ishftc): Likewise
239 (gfc_conv_intrinsic_leadz): Likewise
240 (gfc_conv_intrinsic_trailz): Likewise
241 (gfc_conv_intrinsic_mask): Likewise
242 (gfc_conv_intrinsic_spacing): Likewise
243 (gfc_conv_intrinsic_rrspacing): Likewise
244 (gfc_conv_intrinsic_size): Likewise
245 (gfc_conv_intrinsic_sizeof): Likewise
246 (gfc_conv_intrinsic_transfer): Likewise
247 (gfc_conv_allocated): Likewise
248 (gfc_conv_associated): Likewise
249 (gfc_conv_same_type_as): Likewise
250 (gfc_conv_intrinsic_trim): Likewise
251 (gfc_conv_intrinsic_repeat): Likewise
252 (conv_isocbinding_function): Likewise
253 (conv_intrinsic_ieee_is_normal): Likewise
254 (conv_intrinsic_ieee_is_negative): Likewise
255 (conv_intrinsic_ieee_copy_sign): Likewise
256 (conv_intrinsic_move_alloc): Likewise
257 * trans-io.c (set_parameter_value_chk): Likewise
258 (set_parameter_value_inquire): Likewise
259 (set_string): Likewise
260 * trans-openmp.c (gfc_walk_alloc_comps): Likewise
261 (gfc_omp_clause_default_ctor): Likewise
262 (gfc_omp_clause_copy_ctor): Likewise
263 (gfc_omp_clause_assign_op): Likewise
264 (gfc_omp_clause_dtor): Likewise
265 (gfc_omp_finish_clause): Likewise
266 (gfc_trans_omp_clauses): Likewise
267 (gfc_trans_omp_do): Likewise
268 * trans-stmt.c (gfc_trans_goto): Likewise
269 (gfc_trans_sync): Likewise
270 (gfc_trans_arithmetic_if): Likewise
271 (gfc_trans_simple_do): Likewise
272 (gfc_trans_do): Likewise
273 (gfc_trans_forall_loop): Likewise
274 (gfc_trans_where_2): Likewise
275 (gfc_trans_allocate): Likewise
276 (gfc_trans_deallocate): Likewise
277 * trans-types.c (gfc_init_types): Initialize logical_type_node and
278 their true/false trees.
279 (gfc_get_array_descr_info): Use logical_type_node.
280 * trans-types.h (logical_type_node): New tree.
281 (logical_true_node): Likewise.
282 (logical_false_node): Likewise.
283 * trans.c (gfc_trans_runtime_check): Use logical_type_node.
284 (gfc_call_malloc): Likewise
285 (gfc_allocate_using_malloc): Likewise
286 (gfc_allocate_allocatable): Likewise
287 (gfc_add_comp_finalizer_call): Likewise
288 (gfc_add_finalizer_call): Likewise
289 (gfc_deallocate_with_status): Likewise
290 (gfc_deallocate_scalar_with_status): Likewise
291 (gfc_call_realloc): Likewise
293 2017-11-06 Paul Thomas <pault@gcc.gnu.org>
296 * trans-expr.c (gfc_map_intrinsic_function): Return false for
297 bounds without the DIM argument instead of ICEing.
299 2017-11-06 Martin Liska <mliska@suse.cz>
302 * options.c (gfc_post_options): Set default value of
303 -Wreturn-type to false.
305 2017-11-05 Thomas Koenig <tkoenig@gcc.gnu.org>
308 * lang.opt (ffrontend-loop-interchange): New option.
309 (Wfrontend-loop-interchange): New option.
310 * options.c (gfc_post_options): Handle ffrontend-loop-interchange.
311 * frontend-passes.c (gfc_run_passes): Run
312 optimize_namespace if flag_frontend_optimize or
313 flag_frontend_loop_interchange are set.
314 (optimize_namespace): Run functions according to flags set;
315 also call index_interchange.
316 (ind_type): New function.
317 (has_var): New function.
318 (index_cost): New function.
319 (loop_comp): New function.
321 2017-11-05 Paul Thomas <pault@gcc.gnu.org>
324 * resolve.c (resolve_ordinary_assign): Do not add the _data
325 component for class valued array constructors being assigned
326 to derived type arrays.
327 * trans-array.c (gfc_trans_array_ctor_element): Take the _data
328 of class valued elements for assignment to derived type arrays.
330 2017-11-05 Paul Thomas <pault@gcc.gnu.org>
334 * resolve.c (resolve_component): There is no need to resolve
335 the components of a use associated vtype.
336 (resolve_fl_derived): Unconditionally generate a vtable for any
337 module derived type, as long as the standard is F2003 or later
338 and it is not a vtype or a PDT template.
340 2017-11-05 Tom de Vries <tom@codesourcery.com>
343 * parse.c (match, matcha, matchs, matcho, matchds, matchdo): Remove
344 semicolon after "do {} while (0)".
346 2017-11-04 Andre Vehreschild <vehre@gcc.gnu.org>
348 * trans-expr.c (gfc_trans_assignment_1): Character kind conversion may
349 create a loop variant temporary, too.
350 * trans-intrinsic.c (conv_caf_send): Treat char arrays as arrays and
352 * trans.c (get_array_span): Take the character kind into account when
353 doing pointer arithmetic.
355 2017-11-04 Thomas Koenig <tkoenig@gcc.gnu.org>
358 * gfortran.h (gfc_check_f): Replace fm3l with fm4l.
359 * intrinsic.h (gfc_resolve_maxloc): Add gfc_expr * to argument
361 (gfc_resolve_minloc): Likewise.
362 * check.c (gfc_check_minloc_maxloc): Handle kind argument.
363 * intrinsic.c (add_sym_3_ml): Rename to
364 (add_sym_4_ml): and handle kind argument.
365 (add_function): Replace add_sym_3ml with add_sym_4ml and add
366 extra arguments for maxloc and minloc.
367 (check_specific): Change use of check.f3ml with check.f4ml.
368 * iresolve.c (gfc_resolve_maxloc): Handle kind argument. If
369 the kind is smaller than the smallest library version available,
370 use gfc_default_integer_kind and convert afterwards.
371 (gfc_resolve_minloc): Likewise.
373 2017-11-04 Paul Thomas <pault@gcc.gnu.org>
376 * trans-decl.c (gfc_trans_deferred_vars): Do a better job of a
377 case where 'tmp' was used unititialized and remove TODO.
379 2017-11-03 Steven G. Kargl <kargl@gcc.gnu.org>
382 * resolve.c (resolve_equivalence): An entity in a common block within
383 a module cannot appear in an equivalence statement if the entity is
384 with a pure procedure.
386 2017-10-31 Jim Wilson <wilson@tuliptree.org>
388 * parse.c (unexpected_eof): Call gcc_unreachable before return.
390 2017-10-30 Paul Thomas <pault@gcc.gnu.org>
393 * trans_expr.c (gfc_conv_procedure_call): When passing a class
394 argument to an unlimited polymorphic dummy, it is wrong to cast
395 the passed expression as unlimited, unless it is unlimited. The
396 correct way is to assign to each of the fields and set the _len
399 2017-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
401 * resolve.c (resolve_transfer): Set derived to correct symbol for
404 2017-10-29 Jim Wilson <wilson@tuliptree.org>
406 * invoke.texi: Delete adb and sdb references.
408 2017-10-28 Andre Vehreschild <vehre@gcc.gnu.org>
410 * check.c (gfc_check_co_reduce): Clarify error message.
412 2017-10-28 Paul Thomas <pault@gcc.gnu.org>
415 * trans-expr.c (trans_class_vptr_len_assignment): 'vptr_expr'
416 must only be set if the right hand side expression is of type
419 2017-10-27 Steven G. Kargl <kargl@gcc.gnu.org>
422 * match.c (gfc_match_allocate): Exit early on syntax error.
424 2017-10-27 Thomas Koenig <tkoenig@gcc.gnu.org>
427 * simplify.c (is_constant_array_expr): If the expression is
428 a parameter array, call gfc_simplify_expr.
430 2017-10-25 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
432 * match.c (gfc_match_type_is): Fix typo in error message.
434 2017-10-21 Paul Thomas <pault@gcc.gnu.org>
437 * decl.c (gfc_get_pdt_instance): Remove the error message that
438 the parameter does not have a corresponding component since
439 this is now taken care of when the derived type is resolved. Go
440 straight to error return instead.
441 (gfc_match_formal_arglist): Make the PDT relevant errors
442 immediate so that parsing of the derived type can continue.
443 (gfc_match_derived_decl): Do not check the match status on
444 return from gfc_match_formal_arglist for the same reason.
445 * resolve.c (resolve_fl_derived0): Check that each type
446 parameter has a corresponding component.
449 * resolve.c (resolve_generic_f): Check that the derived type
450 can be used before resolving the struture constructor.
453 * symbol.c (check_conflict): Add the conflicts involving PDT
454 KIND and LEN attributes.
456 2017-10-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
458 * interface.c (check_sym_interfaces, check_uop_interfaces,
459 gfc_check_interfaces): Base interface_name buffer off
462 2017-10-19 Jakub Jelinek <jakub@redhat.com>
465 * gfortran.h (gfc_resolve_do_iterator): Add a bool arg.
466 (gfc_resolve_omp_local_vars): New declaration.
467 * openmp.c (omp_current_ctx): Make static.
468 (gfc_resolve_omp_parallel_blocks): Handle EXEC_OMP_TASKLOOP
469 and EXEC_OMP_TASKLOOP_SIMD.
470 (gfc_resolve_do_iterator): Add ADD_CLAUSE argument, if false,
471 don't actually add any clause. Move omp_current_ctx test
473 (handle_local_var, gfc_resolve_omp_local_vars): New functions.
474 * resolve.c (gfc_resolve_code): Call gfc_resolve_omp_parallel_blocks
475 instead of just gfc_resolve_omp_do_blocks for EXEC_OMP_TASKLOOP
476 and EXEC_OMP_TASKLOOP_SIMD.
477 (gfc_resolve_code): Adjust gfc_resolve_do_iterator caller.
478 (resolve_codes): Call gfc_resolve_omp_local_vars.
480 2017-10-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
482 * gfortran.h (gfc_lookup_function_fuzzy): New declaration.
483 (gfc_closest_fuzzy_match): New declaration.
484 (vec_push): New definition.
485 * misc.c (gfc_closest_fuzzy_match): New definition.
486 * resolve.c: Include spellcheck.h.
487 (lookup_function_fuzzy_find_candidates): New static function.
488 (lookup_uop_fuzzy_find_candidates): Likewise.
489 (lookup_uop_fuzzy): Likewise.
490 (resolve_operator) <INTRINSIC_USER>: Call lookup_uop_fuzzy.
491 (gfc_lookup_function_fuzzy): New definition.
492 (resolve_unknown_f): Call gfc_lookup_function_fuzzy.
493 * interface.c (check_interface0): Likewise.
494 (lookup_arg_fuzzy_find_candidates): New static function.
495 (lookup_arg_fuzzy ): Likewise.
496 (compare_actual_formal): Call lookup_arg_fuzzy.
497 * symbol.c: Include spellcheck.h.
498 (lookup_symbol_fuzzy_find_candidates): New static function.
499 (lookup_symbol_fuzzy): Likewise.
500 (gfc_set_default_type): Call lookup_symbol_fuzzy.
501 (lookup_component_fuzzy_find_candidates): New static function.
502 (lookup_component_fuzzy): Likewise.
503 (gfc_find_component): Call lookup_component_fuzzy.
505 2017-10-18 Thomas Koenig <tkoenig@gcc.gnu.org>
508 * frontend-passes.c (combine_array_constructor): If an array
509 constructor is all constants and has more elements than a small
510 constant, don't convert a*[b,c] to [a*b,a*c] to reduce compilation
513 2017-10-18 Thomas Koenig <tkoenig@gcc.gnu.org>
516 * resolve.c (resovle_symbol): Change gcc_assert to
517 sensible error message.
519 2017-10-18 Paul Thomas <pault@gcc.gnu.org>
522 * trans_decl.c (gfc_get_symbol_decl): Procedure symbols that
523 have the 'used_in_submodule' attribute should be processed by
524 'gfc_get_extern_function_decl'.
526 2017-10-16 Fritz Reese <fritzoreese@gmail.com>
529 * trans-io.c (transfer_expr): Treat BT_UNION as BT_DERIVED.
531 2017-10-15 Thomas Koenig <tkoenig@gcc.gnu.org>
534 * fortran/scanner.c (last_error_char): New global variable.
535 (gfc_scanner_init_1): Set last_error_char to NULL.
536 (gfc_gobble_whitespace): If a character not printable or
537 not newline, issue an error.
539 2017-10-13 Paul Thomas <pault@gcc.gnu.org>
542 * resolve.c (resolve_symbol): Ensure that derived type array
543 results get default initialization.
545 2017-10-11 Nathan Sidwell <nathan@acm.org>
547 * cpp.c (gfc_cpp_add_include_path): Update incpath_e names.
548 (gfc_cpp_add_include_path_after): Likewise.
550 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
552 * target-memory.c (gfc_interpret_logical): Use wi::to_wide when
553 operating on trees as wide_ints.
554 * trans-const.c (gfc_conv_tree_to_mpz): Likewise.
555 * trans-expr.c (gfc_conv_cst_int_power): Likewise.
556 * trans-intrinsic.c (trans_this_image): Likewise.
557 (gfc_conv_intrinsic_bound): Likewise.
558 (conv_intrinsic_cobound): Likewise.
560 2017-10-08 Steven G. Kargl <kargl@gcc.gnu.org>
562 * check.c (gfc_check_x): Remove function.
563 * intrinsic.c (add_functions): Use gfc_check_fn_r.
565 2017-10-08 Paul Thomas <pault@gcc.gnu.org>
568 * module.c : Bump up MOD_VERSION to 15.
569 (mio_component): Edit comment about PDT specification list.
570 (mio_expr, mio_symbol): Include the expression and symbol PDT
571 specification lists in the same way as in mio_component.
573 2017-10-08 Thomas Koenig <tkoenig@gcc.gnu.org>
575 * dump_prase_tree (show_symbol): Output list of variables in
577 (show_code_node): Add new line for ELSE and END DO for DO
579 * invoke.texi: Document that the output of
580 -fdump-fortran-original, -fdump-fortran-optimized and
581 -fdump-parse-tree is unsable and may lead to ICEs.
583 2017-10-07 Paul Thomas <pault@gcc.gnu.org>
586 * class.c (gfc_find_derived_vtab): Return NULL for a passed
587 pdt template to prevent bad procedures from being written.
588 * decl.c (gfc_get_pdt_instance): Do not use the default
589 initializer for pointer and allocatable pdt type components. If
590 the component is allocatbale, set the 'alloc_comp' attribute of
592 * module.c : Add a prototype for 'mio_actual_arglist'. Add a
593 boolean argument 'pdt'.
594 (mio_component): Call it for the parameter list of pdt type
595 components with 'pdt' set to true.
596 (mio_actual_arg): Add the boolean 'pdt' and, if it is set, call
597 mio_integer for the 'spec_type'.
598 (mio_actual_arglist): Add the boolean 'pdt' and use it in the
599 call to mio_actual_arg.
600 (mio_expr, mio_omp_udr_expr): Call mio_actual_arglist with
602 * resolve.c (get_pdt_spec_expr): Add the parameter name to the
603 KIND parameter error.
604 (get_pdt_constructor): Check that cons->expr is non-null.
605 * trans-array.c (structure_alloc_comps): For deallocation of
606 allocatable components, ensure that parameterized components
607 are deallocated first. Likewise, when parameterized components
608 are allocated, nullify allocatable components first. Do not
609 recurse into pointer or allocatable pdt components while
610 allocating or deallocating parameterized components. Test that
611 parameterized arrays or strings are allocated before freeing
613 (gfc_trans_pointer_assignment): Call the new function. Tidy up
614 a minor whitespace issue.
615 trans-decl.c (gfc_trans_deferred_vars): Set 'tmp' to NULL_TREE
616 to prevent the expression from being used a second time.
618 2017-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
621 * expr.c (gfc_check_pointer_assign): Error
622 for non-contiguous rhs.
624 2017-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
626 * gfortran.h (async_io_dt): Add external reference.
627 * io.c (async_io_dt): Add variable.
628 (compare_to_allowed_values): Add prototyte. Add optional argument
629 num. If present, set it to the number of the entry that was
631 (check_io_constraints): If this is for an asynchronous I/O
632 statement, set async_io_dt and set the asynchronous flag for
634 * resolve.c (resolve_transfer): If async_io_dt is set, set
635 the asynchronous flag on the variable.
636 (resolve_fl_namelist): If async_io_dt is set, set the asynchronous
637 flag on all elements of the namelist.
639 2017-10-04 Paul Thomas <pault@gcc.gnu.org>
643 * resolve.c (resolve_assoc_var): Deferred character type
644 associate names must not receive an integer conatant length.
645 * symbol.c (gfc_is_associate_pointer): Deferred character
646 length functions also require an associate pointer.
647 * trans-decl.c (gfc_get_symbol_decl): Deferred character
648 length functions or derived type components require the assoc
649 name to have variable string length.
650 * trans-stmt.c (trans_associate_var): Set the string length of
651 deferred string length associate names. The address expression
652 is not needed for allocatable, pointer or dummy targets. Change
653 the comment about defered string length targets.
655 2017-10-03 Thomas Koenig <tkoenig@gcc.gnu.org>
657 * io.c (match_wait_element): Correctly match END and EOR tags.
658 * dump-parse-tree.c (show_code_node): Handle EXEC_WAIT.
660 2017-10-02 Paul Thomas <pault@gcc.gnu.org>
663 * resolve.c (gfc_resolve_code): Simplify condition for class
664 pointer assignments becoming regular assignments by asserting
665 that only class valued targets are permitted.
666 * trans-expr.c (trans_class_pointer_fcn): New function using a
667 block of code from gfc_trans_pointer_assignment.
668 (gfc_trans_pointer_assignment): Call the new function. Tidy up
669 a minor whitespace issue.
671 2017-10-01 Dominique d'Humieres <dominiq@lps.ens.fr>
674 * parse.c (gfc_global_used): Replace the gfc_internal_error
677 2017-09-29 Dominique d'Humieres <dominiq@lps.ens.fr>
680 * interface.c (compare_actual_formal): Change warnings to errors
681 when "Actual argument contains too few elements for dummy
682 argument", unless -std=legacy is used.
684 2017-09-27 Thomas Schwinge <thomas@codesourcery.com>
686 * lang.opt <Wdo-subscript>: End help text with a period.
688 2017-09-26 Thomas Koenig <tkoenig@gcc.gnu.org>
690 * frontend-passes.c (do_subscript): Don't do anything
691 if inside an associate list.
693 2017-09-25 Thomas Koenig <tkoenig@gcc.gnu.org>
695 * lang.opt: Add -Wdo-subscript.
696 * frontend-passes.c (do_t): New type.
697 (doloop_list): Use variable of do_type.
698 (if_level): Variable to track if levels.
699 (select_level): Variable to track select levels.
700 (gfc_run_passes): Initialize i_level and select_level.
701 (doloop_code): Record current level of if + select
702 level in doloop_list. Add seen_goto if there could
703 be a branch outside the loop. Use different type for
705 (doloop_function): Call do_intent and do_subscript; move
706 functionality of checking INTENT to do_intent.
707 (insert_index_t): New type, for callback_insert_index.
708 (callback_insert_index): New function.
709 (insert_index): New function.
710 (do_subscript): New function.
711 (do_intent): New function.
712 (gfc_code_walker): Keep track of if_level and select_level.
713 * invoke.texi: Document -Wdo-subscript.
715 2017-09-25 Janne Blomqvist <jb@gcc.gnu.org>
717 * trans.c (gfc_unlikely): Remove unnecessary fold_convert.
718 (gfc_likely): Likewise.
720 2017-09-24 Thomas Koenig <tkoenig@gcc.gnu.org>
721 Steven G. Kargl <kargl@gcc.gnu.org>
724 * expr.c (gfc_get_full_arrayspec_from_expr): If there is
725 no symtree, set array spec to NULL.
727 2017-09-23 Janus Weil <janus@gcc.gnu.org>
730 * lang.opt: Add the options -fdefault-real-10 and -fdefault-real-16.
731 Rename flag_default_real to flag_default_real_8.
732 * invoke.texi: Add documentation.
733 * module.c (use_iso_fortran_env_module): flag_default_real is renamed.
734 * trans-types.c (gfc_init_kinds): Implement the flags
735 -fdefault-real-10 and -fdefault-real-16. Make -fdefault-double-8 work
736 without -fdefault-real-8.
738 2017-09-21 Paul Thomas <pault@gcc.gnu.org>
741 * match.c (gfc_match_associate): Before failing the association
742 try again, allowing a proc pointer selector.
747 * primary.c (gfc_match_varspec): Introduce 'tgt_expr', which
748 points to the associate selector, if any. Go through selector
749 references, after resolution for variables, to catch any full
750 or section array references. If a class associate name does
751 not have the same declared type as the selector, resolve the
752 selector and copy the declared type to the associate name.
753 Before throwing a no implicit type error, resolve all allowed
754 selector expressions, and copy the resulting typespec.
757 * resolve.c (resolve_assoc_var): Selector must cannot be the
758 NULL expression and it must have a type.
761 * resolve.c (resolve_symbol): Allow associate names to be
764 2017-09-21 Cesar Philippidis <cesar@codesourcery.com>
766 * openmp.c (gfc_match_oacc_wait): Don't restrict wait directive
767 arguments to constant integers.
769 2017-09-17 Paul Thomas <pault@gcc.gnu.org>
772 * decl.c (gfc_get_pdt_instance): Use the component initializer
773 expression for the default, rather than the parameter value.
774 * resolve.c (resolve_pdt): New function.
775 (resolve_symbol): Call it. Remove false error, prohibiting
776 deferred type parameters for dummy arguments.
779 * primary.c (gfc_match_varspec): If the type of an associate
780 name is unknown and yet there is a match, try resolving the
781 target expression and using its type.
783 2017-09-15 Paul Thomas <pault@gcc.gnu.org>
786 trans-decl.c (gfc_trans_deferred_vars): Do not null the 'span'
787 field if the symbol is either implicitly or explicitly saved.
789 2017-09-13 Paul Thomas <pault@gcc.gnu.org>
792 * decl.c (match_char_kind): If the kind expression is
793 parameterized, save it in saved_kind_expr and set kind = 0.
794 (gfc_get_pdt_instance): Resolve and simplify before emitting
795 error on expression kind. Insert a missing simplification after
796 insertion of kind expressions.
798 2017-09-12 Paul Thomas <pault@gcc.gnu.org>
802 * decl.c (variable_decl): Check pdt template components for
803 appearance of KIND/LEN components in the type parameter name
804 list, that components corresponding to type parameters have
805 either KIND or LEN attributes and that KIND or LEN components
806 are scalar. Copy the initializer to the parameter value.
807 (gfc_get_pdt_instance): Add a label 'error_return' and follow
808 it with repeated code, while replacing this code with a jump.
809 Check if a parameter appears as a component in the template.
810 Make sure that the parameter expressions are integer. Validate
812 (gfc_match_decl_type_spec): Search for pdt_types in the parent
813 namespace since they are instantiated in the template ns.
814 * expr.c (gfc_extract_int): Use a KIND parameter if it
815 appears as a component expression.
816 (gfc_check_init_expr): Allow expressions with the pdt_kind
818 *primary.c (gfc_match_actual_arglist): Make sure that the first
819 keyword argument is recognised when 'pdt' is set.
821 2017-09-10 Paul Thomas <pault@gcc.gnu.org>
829 * expr.c (is_subref_array): Add class pointer array dummies
830 to the list of expressions that return true.
831 * trans-array.c: Add SPAN_FIELD and update indices for
833 (gfc_conv_descriptor_span, gfc_conv_descriptor_span_get,
834 gfc_conv_descriptor_span_set, is_pointer_array,
835 get_array_span): New functions.
836 (gfc_get_descriptor_offsets_for_info): New function to preserve
837 API for access to descriptor fields for trans-types.c.
838 (gfc_conv_scalarized_array_ref): If the expression is a subref
839 array, make sure that info->descriptor is a descriptor type.
840 Otherwise, if info->descriptor is a pointer array, set 'decl'
841 and fix it if it is a component reference.
842 (build_array_ref): Simplify handling of class array refs by
843 passing the vptr to gfc_build_array_ref rather than generating
844 the pointer arithmetic in this function.
845 (gfc_conv_array_ref): As in gfc_conv_scalarized_array_ref, set
847 (gfc_array_allocate): Set the span field if this is a pointer
848 array. Use the expr3 element size if it is available, so that
849 the dynamic type element size is used.
850 (gfc_conv_expr_descriptor): Set the span field for pointer
852 * trans-array.h: Prototypes for gfc_conv_descriptor_span_get
853 gfc_conv_descriptor_span_set and
854 gfc_get_descriptor_offsets_for_info added.
855 trans-decl.c (gfc_get_symbol_decl): If a non-class pointer
856 array, mark the declaration as a GFC_DECL_PTR_ARRAY_P. Remove
857 the setting of GFC_DECL_SPAN.
858 (gfc_trans_deferred_vars): Set the span field to zero in thge
860 * trans-expr.c (gfc_conv_procedure_call): Do not use copy-in/
861 copy-out to pass subref expressions to a pointer dummy.
862 (gfc_trans_pointer_assignment): Remove code for setting of
863 GFC_DECL_SPAN. Set the 'span' field for non-class pointers to
864 class function results. Likewise for rank remap. In the case
865 that the target is not a whole array, use the target array ref
866 for remap and, since the 'start' indices are missing, set the
867 lbounds to one, as required by the standard.
868 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Pick up the
869 'token' offset from the field decl in the descriptor.
870 (conv_isocbinding_subroutine): Set the 'span' field.
871 * trans-io.c (gfc_trans_transfer): Always scalarize pointer
873 * trans-stmt.c (trans_associate_var): Set the 'span' field.
874 * trans-types.c (gfc_get_array_descriptor_base): Add the 'span'
875 field to the array descriptor.
876 (gfc_get_derived_type): Pointer array components are marked as
877 GFC_DECL_PTR_ARRAY_P.
878 (gfc_get_array_descr_info): Replaced API breaking code for
879 descriptor offset calling gfc_get_descriptor_offsets_for_info.
880 * trans.c (get_array_span): New function.
881 (gfc_build_array_ref): Simplify by calling get_array_span and
882 obtain 'span' if 'decl' or 'vptr' present.
883 * trans.h : Rename DECL_LANG_FLAG_6, GFC_DECL_SUBREF_ARRAY_P,
884 as GFC_DECL_PTR_ARRAY_P.
886 2017-09-09 Paul Thomas <pault@gcc.gnu.org>
888 * decl.c : Add decl_type_param_list, type_param_spec_list as
889 static variables to hold PDT spec lists.
890 (build_sym): Copy 'type_param_spec_list' to symbol spec_list.
891 (build_struct): Copy the 'saved_kind_expr' to the component
892 'kind_expr'. Check that KIND or LEN components appear in the
893 decl_type_param_list. These should appear as symbols in the
894 f2k_derived namespace. If the component is itself a PDT type,
895 copy the decl_type_param_list to the component param_list.
896 (gfc_match_kind_spec): If the KIND expression is parameterized
897 set KIND to zero and store the expression in 'saved_kind_expr'.
898 (insert_parameter_exprs): New function.
899 (gfc_insert_kind_parameter_exprs): New function.
900 (gfc_insert_parameter_exprs): New function.
901 (gfc_get_pdt_instance): New function.
902 (gfc_match_decl_type_spec): Match the decl_type_spec_list if it
903 is present. If it is, call 'gfc_get_pdt_instance' to obtain the
904 specific instance of the PDT.
905 (match_attr_spec): Match KIND and LEN attributes. Check for the
906 standard and for type/kind of the parameter. They are also not
907 allowed outside a derived type definition.
908 (gfc_match_data_decl): Null the decl_type_param_list and the
909 type_param_spec_list on entry and free them on exit.
910 (gfc_match_formal_arglist): If 'typeparam' is true, add the
911 formal symbol to the f2k_derived namespace.
912 (gfc_match_derived_decl): Register the decl_type_param_list
913 if this is a PDT. If this is a type extension, gather up all
914 the type parameters and put them in the right order.
915 *dump-parse-tree.c (show_attr): Signal PDT templates and the
916 parameter attributes.
917 (show_components): Output parameter atrributes and component
919 (show_symbol): Show variable parameter lists.
920 * expr.c (expr.c): Copy the expression parameter list.
921 (gfc_is_constant_expr): Pass on symbols representing PDT
923 (gfc_check_init_expr): Break on PDT KIND parameters and
924 PDT parameter expressions.
925 (gfc_check_assign): Assigning to KIND or LEN components is an
927 (derived_parameter_expr): New function.
928 (gfc_derived_parameter_expr): New function.
929 (gfc_spec_list_type): New function.
930 * gfortran.h : Add enum gfc_param_spec_type. Add the PDT attrs
931 to the structure symbol_attr. Add the 'kind_expr' and
932 'param_list' field to the gfc_component structure. Comment on
933 the reuse of the gfc_actual_arglist structure as storage for
934 type parameter spec lists. Add the new field 'spec_type' to
935 this structure. Add 'param_list' fields to gfc_symbol and
936 gfc_expr. Add prototypes for gfc_insert_kind_parameter_exprs,
937 gfc_insert_parameter_exprs, gfc_add_kind, gfc_add_len,
938 gfc_derived_parameter_expr and gfc_spec_list_type.
939 * interface.c (gfc_compare_derived_types): Treat PDTs in the
940 same way as sequence types.
941 * match.c : Add variable 'type_param_spec_list'.
942 (gfc_op2string, gfc_match_member_sep, gfc_match_label): Remove
944 (match_derived_type_spec): Match PDTs and find specific
946 (gfc_match_type_spec): Remove more trailing whitespace.
947 (gfc_match_allocate): Assumed or deferred parameters cannot
948 appear here. Copy the type parameter spec list to the expr for
949 the allocatable entity. Free 'type_param_spec_list'.
950 (gfc_match_common, gfc_match_namelist, gfc_match_module): Still
951 more trailing whitespace to remove.
952 (gfc_match_type_is): Allow PDT typespecs.
953 * match.h : Modify prototypes for gfc_match_formal_arglist and
954 gfc_match_actual_arglist.
955 * module.c (ab_attribute, mstring attr_bits): PDT attributes
957 (mio_symbol_attribute): PDT attributes handled.
958 (mio_component): Deal with 'kind_expr' field.
959 (mio_full_f2k_derived): For PDT templates, transfer the formal
960 namespace symroot to the f2k_derived namespace.
961 *primary.c (match_keyword_arg, gfc_match_actual_arglist): Add
962 modifications to handle PDT spec lists. These are flagged in
963 both cases by new boolean arguments, whose prototype defaults
965 (gfc_match_structure_constructor, match_variable): Remove yet
966 more trailing whitespace.
967 * resolve.c (get_pdt_spec_expr, get_pdt_constructor): New
969 (resolve_structure_cons): If the constructor is a PDT template,
970 call get_pdt_constructor to build it using the parameter lists
971 and then get the specific instance of the PDT.
972 (resolve_component): PDT strings need a hidden string length
973 component like deferred characters.
974 (resolve_symbol): Dummy PDTs cannot have deferred parameters.
975 * symbol.c (gfc_add_kind, gfc_add_len): New functions.
976 (free_components): Free 'kind_expr' and 'param_list' fields.
977 (gfc_free_symbol): Free the 'param_list' field.
978 (gfc_find_sym_tree): If the current state is a PDT template,
979 look for the symtree in the f2k_derived namspaces.
980 trans-array.c (structure_alloc_comps): Allocate and deallocate
981 PDTs. Check dummy arguments for compliance of LEN parameters.
982 Add the new functions to the preceeding enum.
983 (gfc_allocate_pdt_comp, gfc_deallocate_pdt_comp and
984 gfc_check_pdt_dummy): New functions calling above.
985 * trans-array.h : Add prototypes for these functions.
986 trans-decl.c (gfc_get_symbol_decl): Call gfc_defer_symbol_init
987 as appropriate for PDT symbols.
988 (gfc_trans_deferred_vars): Allocate/deallocate PDT entities as
989 they come into and out of scope. Exclude pdt_types from being
991 (gfc_trans_subcomponent_assign): PDT array components must be
992 handles as if they are allocatable.
993 * trans-stmt.c (gfc_trans_allocate): Handle initialization of
995 (gfc_trans_deallocate): Likewise.
996 * trans-types.c (gfc_get_derived_type): PDT templates must not
997 arrive here. PDT string components are handles as if deferred.
998 Similarly, PDT arrays are treated as if allocatable. PDT
999 strings are pointer types.
1000 * trans.c (gfc_deferred_strlen): Handle PDT strings in the same
1001 way as deferred characters.
1003 2017-09-01 Jakub Jelinek <jakub@redhat.com>
1006 * parse.c (decode_omp_directive): Use matchs instead of matcho for
1007 end ordered and ordered directives, except for ordered depend. For
1008 -fopenmp-simd and ordered depend, reject the stmt.
1009 * trans-openmp.c (gfc_trans_omp_ordered): For -fopenmp-simd ignore
1010 threads clause and if simd clause isn't present, just translate the
1013 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1014 Alan Hayward <alan.hayward@arm.com>
1015 David Sherwood <david.sherwood@arm.com>
1017 * trans-types.c (gfc_init_kinds): Use opt_scalar_int_mode for
1020 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1021 Alan Hayward <alan.hayward@arm.com>
1022 David Sherwood <david.sherwood@arm.com>
1024 * target-memory.c (size_integer): Use SCALAR_INT_TYPE_MODE.
1025 (size_logical): Likewise.
1027 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1028 Alan Hayward <alan.hayward@arm.com>
1029 David Sherwood <david.sherwood@arm.com>
1031 * trans-types.c (gfc_type_for_mode): Use is_a <scalar_int_mode>.
1033 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1034 Alan Hayward <alan.hayward@arm.com>
1035 David Sherwood <david.sherwood@arm.com>
1037 * trans-types.c (gfc_init_kinds): Use opt_scalar_float_mode
1038 and FOR_EACH_MODE_IN_CLASS.
1040 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1041 Alan Hayward <alan.hayward@arm.com>
1042 David Sherwood <david.sherwood@arm.com>
1044 * target-memory.c (size_float): Use SCALAR_FLOAT_TYPE_MODE
1045 instead of TYPE_MODE.
1047 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1048 Alan Hayward <alan.hayward@arm.com>
1049 David Sherwood <david.sherwood@arm.com>
1051 * trans-types.c (gfc_init_kinds): Use machine_mode instead of int
1054 2017-08-28 Janus Weil <janus@gcc.gnu.org>
1057 * expr.c (gfc_check_pointer_assign): Improve the check whether pointer
1058 may outlive pointer target.
1060 2017-08-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1063 * frontend-passes (inline_matumul_assign): Explicity
1064 set typespec for call to CONJG.
1066 2017-08-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1069 * trans-io.c (get_dtio_proc): Add check for format label and set
1070 formatted flag accordingly. Reorganize the code a little.
1072 2017-08-16 Thomas Koenig <tkoenig@gcc.gnu.org>
1075 * frontend-passes.c (realloc_string_callback): If expression is a
1076 concatenation, also check for dependency.
1077 (constant_string_length): Check for presence of symtree.
1079 2017-08-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1081 * gfortran.texi: Document format of unformatted sequential files.
1083 2017-08-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1085 * invoke.texi: Actually commit change about -Ofast.
1087 2017-08-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1090 * resolve.c (resolve_symbol): Adjust (and reformat)
1091 comment. Perform check if a BIND(C) is declared
1092 at module level regardless of whether it is typed
1095 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
1097 * options.c (set_dec_flags): Only set legacy standards when value
1100 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
1102 * options.c (set_dec_flags, gfc_post_options): Only set flag_d_lines
1103 with -fdec when not set by user.
1105 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
1107 * decl.c (attr_seen): New static variable.
1108 * decl.c (variable_decl): Match %FILL in STRUCTURE body.
1109 * gfortran.texi: Update documentation.
1111 2017-08-08 Martin Liska <mliska@suse.cz>
1113 * trans-types.c: Include header files.
1115 2017-08-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1119 * options.c: Make -Ofast honor -fmax-stack-var-size.
1120 * invoke.texi: Document change.
1122 2017-08-01 Thomas König <tkoenig@gcc.gnu.org>
1125 * intrisic.c (gfc_convert_type_warn): Only set typespec for
1126 empty array constructors which don't have it already.
1128 2017-08-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1131 * lang.opt (fc-prototypes): Add option.
1132 * gfortran.h (gfc_typespec): Add interop_kind to struct.
1133 (gfc_dump_c_prototypes): Add prototype.
1134 * decl.c (gfc_match_kind_spec): Copy symbol used for kind to typespec.
1135 * parse.c (gfc_parse_file): Call gfc_dump_prototypes.
1136 * dump-parse-tree.c (gfc_dump_c_prototypes): New function.
1137 (type_return): New enum.
1138 (get_c_type_name): New function.
1139 (write_decl): New function.
1140 (write_type): New function.
1141 (write_variable): New function.
1142 (write_proc): New function.
1143 (write_interop_decl): New function.
1144 * invoke.texi: Document -fc-prototypes.
1146 2017-08-01 Dominique d'Humieres <dominiq@lps.ens.fr>
1149 * expr.c (gfc_check_init_expr): Use the renamed name.
1151 2017-07-31 Jakub Jelinek <jakub@redhat.com>
1153 * check.c (gfc_check_num_images): Fix a pasto.
1155 2017-07-29 Jakub Jelinek <jakub@redhat.com>
1157 * trans-decl.c (gfc_trans_use_stmts): Pass false as new argument to
1158 the imported_module_or_decl debug hook.
1160 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1162 * resolve.c (find_reachable_labels): Adjust.
1164 2017-07-25 Jakub Jelinek <jakub@redhat.com>
1166 * ioparm.def: Use 1U << 31 instead of 1 << 31 as flags2 mask.
1168 2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1170 * dump-parse-tree.c (show_symbol): Show binding label if present.
1172 2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1173 Mikael Morin <mikael@gcc.gnu.org>
1176 * fortran/trans-array.c (gfc_conv_resolve_dependencies):
1177 Break if dependency has been found.
1179 2017-07-23 Alexander Monakov <amonakov@ispras.ru>
1181 * interface.c (pair_cmp): Fix gfc_symbol comparison. Adjust comment.
1183 2017-07-18 Nathan Sidwell <nathan@acm.org>
1185 * trans.c (gfc_build_array_ref): Use TYPE_MAX_VALUE.
1187 2017-07-09 Dominique d'Humieres <dominiq@lps.ens.fr>
1190 * class.c (class_array_ref_detected): Remove a redundant
1193 2017-07-06 Harald Anlauf <anlauf@gmx.de>
1196 * array.c (gfc_ref_dimen_size): Handle bad subscript triplets.
1198 2017-07-03 Dominique d'Humieres <dominiq@lps.ens.fr>
1201 * resolve.c (resolve_symbol): Fix typo.
1203 2017-07-03 Dominique d'Humieres <dominiq@lps.ens.fr>
1206 * symbol.c (check_conflict): Add missing "conflicts".
1208 2017-06-29 Cesar Philippidis <cesar@codesourcery.com>
1211 * openmp.c (gfc_match_oacc_routine): Check if proc_name exist before
1212 comparing the routine name against it.
1214 2017-06-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1217 * trans-stmt.c (gfc_trans_call): If no code expr, use code->loc
1218 as warning/error locus.
1220 2017-06-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1223 * arith.c (wprecision_int_real): Set return value before
1224 mpz_clear and then return after it.
1226 2017-06-15 Janus Weil <janus@gcc.gnu.org>
1229 * trans-expr.c (gfc_conv_procedure_call): Deallocate the result of
1230 scalar allocatable procedure-pointer components.
1232 2017-06-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1235 * frontend-passes.c (traverse_io_block): Also
1236 check for variables occurring as indices multiple
1237 time in a single implied DO loop.
1239 2017-06-05 Janus Weil <janus@gcc.gnu.org>
1242 * trans-expr.c (gfc_conv_procedure_call): Fix detection of allocatable
1245 2017-06-05 Nicolas Koenig <koenigni@student.ethz.ch>
1248 * frontend-passes.c (traverse_io_block): New function.
1249 (simplify_io_impl_do): New function.
1250 (optimize_namespace): Invoke gfc_code_walker with
1251 simplify_io_impl_do.
1253 2017-06-02 Jakub Jelinek <jakub@redhat.com>
1256 * openmp.c (resolve_omp_clauses): Fix a typo.
1258 2017-05-30 David Malcolm <dmalcolm@redhat.com>
1260 * error.c (gfc_format_decoder): Update for new bool and
1261 const char ** params.
1263 2017-05-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1266 * frontend-passes.c (check_conjg_transpose_variable):
1268 (has_dimen_vector_ref): Likewise
1269 (matmul_temp_args): New function. Add prototype.
1270 (optimize_namespace): Call matmul_temp_args.
1272 2017-05-28 Thomas Koenig <tkoenig@gcc.gnu.org>
1274 * frontend-passes.c (matmul_lhs_realloc): Correct
1275 allocation size for case A1B2.
1277 2017-05-25 Thomas Koenig <tkoenig@gcc.gnu.org>
1279 * dump-parse-tree.c (show_expr): Also replace
1280 with dumpfile for showing values for forgotten
1283 2017-05-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1285 * dump-parse-tree.c (show_expr): Replace stdout
1286 with dumpfile for showing values.
1288 2017-05-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1291 * frontend-passes.c (matrix_case): Add A2TB2.
1292 (inline_limit_check): Handle MATMUL(TRANSPOSE(A),B)
1293 (inline_matmul_assign): Likewise.
1295 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1297 * openmp.c (OACC_KERNELS_CLAUSES): Add "OMP_CLAUSE_NUM_GANGS",
1298 "OMP_CLAUSE_NUM_WORKERS", "OMP_CLAUSE_VECTOR_LENGTH".
1300 2017-05-22 Janus Weil <janus@gcc.gnu.org>
1303 * resolve.c (resolve_fl_derived): Make sure that vtype symbols are
1306 2017-05-19 Paul Thomas <pault@gcc.gnu.org>
1309 * trans-io.c (nml_get_addr_expr): If we are dealing with class
1310 type data set tmp tree to get that address.
1311 (transfer_namelist_element): Set the array spec to point to the
1314 2017-05-19 David Malcolm <dmalcolm@redhat.com>
1317 * bbt.c (insert): Remove trailing exclamation mark from message.
1318 * decl.c (gfc_match_final_decl): Likewise.
1319 * dump-parse-tree.c (show_expr): Likewise.
1320 * module.c (gfc_use_module): Likewise.
1321 * primary.c (build_actual_constructor): Likewise.
1322 (gfc_convert_to_structure_constructor): Likewise.
1324 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1326 * gfortran.h (enum gfc_omp_default_sharing): Add
1327 "OMP_DEFAULT_PRESENT".
1328 * dump-parse-tree.c (show_omp_clauses): Handle it.
1329 * openmp.c (gfc_match_omp_clauses): Likewise.
1330 * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
1332 2017-05-18 Fritz Reese <fritzoreese@gmail.com>
1335 * decl.c (match_attr_spec, gfc_match_automatic,
1336 gfc_match_static, gfc_match_structure_decl): Unify diagnostic
1337 errors regarding -fdec options.
1338 * io.c (match_dec_etag, match_dec_vtag, match_dec_ftag): Ditto.
1340 2017-05-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1343 * trans-io.c (transfer_namelist_element): Change check from
1344 NULL_TREE to null_pointer_node.
1346 2017-05-17 Fritz Reese <fritzoreese@gmail.com>
1349 * expr.c (component_initializer): Don't generate initializers for
1351 * invoke.texi (-finit-derived): Document.
1353 2017-05-16 Paul Thomas <pault@gcc.gnu.org>
1356 * decl.c (build_sym): In a submodule allow overriding of host
1357 associated symbols from the ancestor module with a new
1360 2017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>
1363 * trans-stmt.c (gfc_trans_integer_select): Remove redundant condition.
1365 2017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>
1368 * expr.c (gfc_generate_initializer): If type conversion fails,
1369 check for error and return NULL.
1371 2017-05-14 Nicolas Koenig <koenigni@student.ethz.ch>
1374 * array.c (gfc_ref_dimen_size): Simplify stride
1376 * data.c (gfc_advance_section): Simplify start,
1377 end and stride expressions
1378 (gfc_advance_section): Simplify start and end
1380 (gfc_get_section_index): Simplify start expression
1382 2017-05-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1384 * io.c (gfc_resolve_dt): Fix returns to bool type.
1386 2017-05-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1389 * io.c (dtio_procs_present): Add new function to check for DTIO
1390 procedures relative to I/O statement READ or WRITE.
1391 (gfc_resolve_dt): Add namelist checks using the new function.
1392 * resolve.c (dtio_procs_present): Remove function and related
1393 namelist checks. (resolve_fl_namelist): Add check specific to
1394 Fortran 95 restriction on namelist objects.
1396 2017-05-11 Nathan Sidwell <nathan@acm.org>
1398 * trans-decl.c: Include dumpfile.h not tree-dump.h,
1400 2017-05-09 Janus Weil <janus@gcc.gnu.org>
1403 * resolve.c (gfc_resolve_finalizers): Ensure that derived-type
1404 components have a their finalizers resolved, also if the superordinate
1405 type itself has a finalizer.
1407 2017-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
1410 * frontend-passes.c (matmul_to_var_expr): New function,
1412 (matmul_to_var_code): Likewise.
1413 (optimize_namespace): Use them from gfc_code_walker.
1415 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1417 * cpp.c (cb_cpp_error): Replace report_diagnostic
1418 with diagnostic_report_diagnostic.
1419 * error.c (gfc_warning): Likewise.
1420 (gfc_warning_now_at): Likewise.
1421 (gfc_warning_now): Likewise.
1422 (gfc_warning_internal): Likewise.
1423 (gfc_error_now): Likewise.
1424 (gfc_fatal_error): Likewise.
1425 (gfc_error_opt): Likewise.
1426 (gfc_internal_error): Likewise.
1428 2017-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1431 * frontend-passes.c (inline_matmul_assign): Also check bounds
1432 for allocatable lhs and matrix-vector-multiplication.
1434 2017-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1437 * io.c (format_lex): Check for '/' and set token to FMT_SLASH.
1438 (check_format): Move FMT_DT checking code to data_desc section.
1439 * module.c (gfc_match_use): Include the case of INTERFACE_DTIO.
1441 2017-04-22 Janus Weil <janus@gcc.gnu.org>
1444 * trans-types.c (gfc_conv_procedure_call): Deallocate the components
1445 of allocatable intent(out) arguments.
1447 2017-04-21 Janus Weil <janus@gcc.gnu.org>
1450 * trans-types.c (gfc_get_derived_type): Prevent an infinite loop when
1451 building a derived type that includes a procedure pointer component
1452 with a polymorphic result.
1454 2017-04-17 Paul Thomas <pault@gcc.gnu.org>
1457 * module.c (find_symtree_for_symbol): Delete.
1458 (read_module): Remove the call to the above.
1460 2017-04-14 Janus Weil <janus@gcc.gnu.org>
1463 * class.c (generate_finalization_wrapper): Give the finalization wrapper
1464 the recursive attribute.
1466 2017-04-10 Nicolas Koenig <koenigni@student.ethz.ch>
1467 Paul Thomas <pault@gcc.gnu.org>
1470 * module.c (gfc_match_submodule): Add error
1471 if function is called in the wrong state.
1473 2017-04-10 Janus Weil <janus@gcc.gnu.org>
1476 * expr.c (gfc_check_pointer_assign): Check if procedure pointer
1477 components in a pointer assignment need an explicit interface.
1479 2017-03-18 Nicolas Koenig <koenigni@student.ethz.ch>
1482 * symbol.c (gfc_delete_symtree): If there is a period in the name, ignore
1483 everything before it.
1485 2017-03-28 Janus Weil <janus@gcc.gnu.org>
1488 * trans-io.c (transfer_namelist_element): Perform a polymorphic call
1489 to a DTIO procedure if necessary.
1491 2017-03-25 Paul Thomas <pault@gcc.gnu.org>
1495 * decl.c (access_attr_decl): Remove the error for an absent
1496 generic DTIO interface and ensure that symbol has the flavor
1499 2017-03-22 Dominique d'Humieres <dominiq@lps.ens.fr>
1502 * module.c: Remove trailing period.
1504 2017-03-22 Dominique d'Humieres <dominiq@lps.ens.fr>
1507 * decl.c: Replace '%s' with %qs.
1509 * interface.c: Likewise.
1510 * match.c: Likewise.
1511 * primary.c: Likewise.
1512 * resolve.c: Likewise.
1516 * io.c: Remove trailing spaces.
1517 * match.c: Likewise.
1518 * openmp.c: Likewise.
1519 * resolve.c: Likewise.
1520 * trans-intrinsic.c: Likewise.
1523 * expr.c: Remove a double spaces.
1526 * primary.c: Remove spurious quotes around %qs.
1528 2017-03-22 Thomas Koenig <tkoenig@gcc.gnu.org>
1531 * frontend-passes.c (combine_array_constructor): Take
1532 location of new expression from constructor expression instead
1535 2017-03-20 Nicolas Koenig <koenigni@student.ethz.ch>
1538 * symbol.c (check_conflict): Report an error if an EQUIVALENCE
1541 2017-03-18 Nicolas Koenig <koenigni@student.ethz.ch>
1544 * decl.c (add_hidden_procptr_result): Fixed Refs count of the
1545 created "ppr@" symbol.
1547 2017-03-18 Paul Thomas <pault@gcc.gnu.org>
1550 * module.c (mio_symbol_attribute): Remove reset of the flag
1551 'no_module_procedures'.
1552 (check_for_module_procedures): New function. Move declaration
1553 of 'no_module_procedures' to above it.
1554 (gfc_dump_module): Traverse namespace calling new function.
1556 2017-03-18 Paul Thomas <pault@gcc.gnu.org>
1559 * symbol.c (check_conflict): A dummy procedure in a submodule,
1560 module procedure is not an error.
1561 (gfc_add_flavor): Ditto.
1563 2017-03-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1566 * openmp.c (check_symbol_not_pointer): Adjust diagnostics.
1568 2017-03-16 Jakub Jelinek <jakub@redhat.com>
1571 * parse.c (gfc_ascii_statement): Use !$ACC for ST_OACC_ATOMIC
1572 and ST_OACC_END_ATOMIC, instead of !ACC.
1573 * trans-decl.c (finish_oacc_declare): Use !$ACC instead of $!ACC.
1574 * openmp.c (gfc_match_oacc_declare, gfc_match_oacc_wait,
1575 gfc_resolve_oacc_declare): Likewise.
1578 * error.c (gfc_format_decoder): Rename plus argument to set_locus,
1579 remove ATTRIBUTE_UNUSED from all arguments, call default_tree_printer
1580 if not a Fortran specific spec.
1581 * trans-io.c: Include options.h.
1582 (gfc_build_st_parameter): Temporarily disable -Wpadded around layout
1583 of artificial IO data structures.
1585 2017-03-15 David Malcolm <dmalcolm@redhat.com>
1588 * resolve.c (resolve_contained_fntype): Make error messages more
1589 amenable to translation.
1591 2017-03-06 Richard Biener <rguenther@suse.de>
1594 * trans.c (gfc_add_modify_loc): Weaken assert.
1596 2017-03-05 Andre Vehreschild <vehre@gcc.gnu.org>,
1597 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
1599 * check.c (positive_check): Add new function checking constant for
1600 being greater then zero.
1601 (gfc_check_image_status): Add checking of image_status arguments.
1602 (gfc_check_failed_or_stopped_images): Same but for failed_- and
1603 stopped_images function.
1604 * dump-parse-tree.c (show_code_node): Added output of FAIL IMAGE.
1605 * gfortran.h (enum gfc_statement): Added FAIL_IMAGE_ST.
1606 (enum gfc_isym_id): Added new intrinsic symbols.
1607 (enum gfc_exec_op): Added EXEC_FAIL_IMAGE.
1608 * gfortran.texi: Added description for the new API functions. Updated
1609 coverage of gfortran of TS18508.
1610 * intrinsic.c (add_functions): Added symbols to resolve new intrinsic
1612 * intrinsic.h: Added prototypes.
1613 * iresolve.c (gfc_resolve_failed_images): Resolve the failed_images
1615 (gfc_resolve_image_status): Same for image_status.
1616 (gfc_resolve_stopped_images): Same for stopped_images.
1617 * libgfortran.h: Added prototypes.
1618 * match.c (gfc_match_if): Added matching of FAIL IMAGE statement.
1619 (gfc_match_fail_image): Match a FAIL IMAGE statement.
1620 * match.h: Added prototype.
1621 * parse.c (decode_statement): Added matching for FAIL IMAGE.
1622 (next_statement): Same.
1623 (gfc_ascii_statement): Same.
1625 * simplify.c (gfc_simplify_failed_or_stopped_images): For COARRAY=
1626 single a constant result can be returne.d
1627 (gfc_simplify_image_status): For COARRAY=single the result is constant.
1628 * st.c (gfc_free_statement): Added FAIL_IMAGE handling.
1629 * trans-decl.c (gfc_build_builtin_function_decls): Added decls of the
1631 * trans-expr.c (gfc_conv_procedure_call): This is first time all
1632 arguments of a function are optional, which is now handled here
1634 * trans-intrinsic.c (conv_intrinsic_image_status): Translate
1636 (gfc_conv_intrinsic_function): Add support for image_status.
1637 (gfc_is_intrinsic_libcall): Add support for the remaining new
1639 * trans-stmt.c (gfc_trans_fail_image): Trans a fail image.
1640 * trans-stmt.h: Add the prototype for the above.
1641 * trans.c (trans_code): Dispatch for fail_image.
1642 * trans.h: Add the trees for the new intrinsics.
1644 2017-03-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1647 * openmp.c (check_symbol_not_pointer): Adjust diagnostic.
1649 2017-02-28 Paul Thomas <pault@gcc.gnu.org>
1652 * resolve.c (resolve_fl_procedure): Deal with the case where
1653 'submodule_name' is NULL so that gfc_error does not ICE.
1654 Reformat the error message to make it more consistent.
1656 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1658 * parse.c (parse_critical_block): Use cond ? G_("...") : G_("...")
1659 instead of just cond ? "..." : "...".
1660 * scanner.c (gfc_next_char_literal): Likewise.
1661 * match.c (match_exit_cycle): Likewise.
1663 2017-02-26 Thomas Koenig <tkoenig@gcc.gnu.org>
1666 * options.c (gfc_post_options): Set default limit for matmul
1668 * invoke.texi: Document change.
1670 2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
1673 * interface.c (check_dtio_arg_TKR_intent): Change 'intent'
1676 2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
1679 * interface.c (gfc_match_end_interface): Remove spurious comma
1680 and space, replace 'got %s' with 'got %qs'.
1682 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1685 * interface.c (check_dtio_arg_TKR_intent): Supply 'must'
1686 missing from error message.
1688 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1691 * interface.c (gfc_find_typebound_dtio_proc): Guard test for
1692 flavor attribute by checking that symbol is resolved.
1694 2017-02-16 Paul Thomas <pault@gcc.gnu.org>
1697 * decl.c (access_attr_decl): Test for presence of generic DTIO
1698 interface and emit error if not present.
1700 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1703 * parse.c (check_component, parse_union): Whitespace.
1704 (set_syms_host_assoc): For a derived type, check if the module
1705 in which it was declared is one of the submodule ancestors. If
1706 it is, make the components public. Otherwise, reset attribute
1707 'host_assoc' and set 'use-assoc' so that encapsulation is
1710 2017-02-19 Paul Thomas <pault@gcc.gnu.org>
1713 * decl.c (gfc_set_constant_character_len): Whitespace.
1714 (gfc_match_end): Catch case where a procedure is contained in
1715 a module procedure and ensure that 'end procedure' is the
1716 correct termination.
1718 2017-02-19 Paul Thomas <pault@gcc.gnu.org>
1721 * resolve.c (fixup_unique_dummy): New function.
1722 (gfc_resolve_expr): Call it for dummy variables with a unique
1725 2017-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
1728 * trans-expr.c (gfc_trans_assignment_1): Deref indirect refs when
1729 compiling with -fcheck=mem to check the pointer and not the data.
1731 2017-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
1734 * trans-array.c (duplicate_allocatable_coarray): Ensure attributes
1735 passed are properly initialized.
1736 (structure_alloc_comps): Same.
1737 * trans-expr.c (gfc_trans_structure_assign): Same.
1739 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1741 * trans-expr.c (gfc_conv_substring): Add missing space in diagnostics.
1743 2017-02-12 Thomas Koenig <tkoenig@gcc.gnu.org>
1746 * intrinsic.c (gfc_intrinsic_func_interface): Return an error
1747 for -std=f95 for disallowed transformational functions in
1748 initialization expressions.
1750 2017-02-09 Cesar Philippidis <cesar@codesourcery.com>
1751 Joseph Myers <joseph@codesourcery.com>
1753 * openmp.c (resolve_omp_clauses): Error on directives
1754 containing both tile and collapse clauses.
1755 (resolve_oacc_loop_blocks): Represent '*' tile arguments as zero.
1756 * trans-openmp.c (gfc_trans_omp_do): Lower tiled loops like
1759 2017-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
1761 * trans-types.c (gfc_get_int_kind_from_width_isofortranen): Choose
1762 REAL type with the widest precision if two (or more) have the same
1765 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1768 * trans-stmt.c (gfc_trans_allocate): Only deallocate the components of
1769 the temporary, when a new object was created for the temporary. Not
1770 when it is just an alias to an existing object.
1772 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1775 * trans-decl.c (generate_coarray_sym_init): Retrieve the symbol's
1776 attributes before using them.
1778 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1781 * trans-stmt.c (gfc_trans_allocate): Add the multiplying the _len
1782 component of unlimited polymorphic objects when source-allocating.
1784 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1787 * trans-array.c (structure_alloc_comps): Ignore pointer components when
1790 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1793 * f95-lang.c (gfc_create_decls): Include stringpool.h.
1794 Pass main_input_filename to build_translation_unit_decl.
1796 2017-01-23 Thomas Koenig <tkoenig@netcologne.de>
1798 * arith.c (arith_power): If simplifying integer power expression
1799 to zero, warn if -Winteger-division is given.
1801 2017-01-22 Jakub Jelinek <jakub@redhat.com>
1804 * parse.c (matchs, matcho, matchds, matchdo): Replace return st;
1805 with { ret = st; goto finish; }.
1806 (decode_omp_directive): Allow declare simd, declare target and
1807 simd directives in PURE/ELEMENTAL procedures. Only call
1808 gfc_unset_implicit_pure on successful match of other procedures.
1810 2017-01-21 Gerald Pfeifer <gerald@pfeifer.com>
1812 * gfc-internals.texi (Symbol Versioning): Change references
1813 to www.akkadia.org to https.
1815 2017-01-21 Jakub Jelinek <jakub@redhat.com>
1817 * gfortran.h (gfc_extract_int): Change return type to bool. Add
1818 int argument with = 0.
1819 * decl.c (gfc_match_kind_spec): Adjust gfc_extract_int caller, pass
1820 1 as new last argument to it, don't emit gfc_error.
1821 (match_char_kind): Likewise.
1822 (gfc_match_decl_type_spec): Use gfc_get_string ("%s", x) instead of
1824 (gfc_match_derived_decl, match_binding_attributes): Likewise.
1825 (gfc_match_structure_decl): Don't sprintf back to name, call
1826 get_struct_decl directly with gfc_dt_upper_string (name) result.
1827 * trans-stmt.c (gfc_trans_allocate): Use gfc_get_string ("%s", x)
1828 instead of gfc_get_string (x).
1829 * module.c (gfc_dt_lower_string, gfc_dt_upper_string,
1830 gfc_match_use, gfc_match_submodule, find_true_name, mio_pool_string,
1831 mio_symtree_ref, mio_expr, mio_omp_udr_expr, load_generic_interfaces,
1832 load_omp_udrs, load_needed, read_module, dump_module,
1833 create_intrinsic_function, import_iso_c_binding_module,
1834 create_int_parameter, create_int_parameter_array, create_derived_type,
1835 use_iso_fortran_env_module): Likewise.
1836 * error.c (gfc_diagnostic_starter, gfc_diagnostic_start_span): Use
1837 pp_verbatim (context->printer, "%s", x) instead of
1838 pp_verbatim (context->printer, x).
1839 * match.c (gfc_match_small_int): Adjust gfc_extract_int caller, pass
1840 1 as new last argument to it, don't emit gfc_error.
1841 (gfc_match_small_int_expr): Likewise.
1842 * iresolve.c (gfc_get_string): Optimize format "%s" case.
1843 (resolve_bound): Use gfc_get_string ("%s", x) instead of
1845 (resolve_transformational): Formatting fix.
1846 (gfc_resolve_char_achar): Change name argument to bool is_achar,
1847 use a single format string and if is_achar add "a" before "char".
1848 (gfc_resolve_achar, gfc_resolve_char): Adjust callers.
1849 * expr.c (gfc_extract_int): Change return type to bool, return true
1850 if some error occurred. Add REPORT_ERROR argument, if non-zero
1851 call either gfc_error or gfc_error_now depending on its sign.
1852 * arith.c (arith_power): Adjust gfc_extract_int caller.
1853 * symbol.c (gfc_add_component): Use gfc_get_string ("%s", x) instead
1854 of gfc_get_string (x).
1855 (gfc_new_symtree, gfc_delete_symtree, gfc_get_uop, gfc_new_symbol,
1856 gfc_get_gsymbol, generate_isocbinding_symbol): Likewise.
1857 * openmp.c (gfc_match_omp_clauses): Adjust gfc_extract_int caller, pass
1858 -1 as new last argument to it, don't emit gfc_error_now.
1859 (gfc_match_omp_declare_reduction): Use gfc_get_string ("%s", x)
1860 instead of gfc_get_string (x).
1861 * check.c (kind_check): Adjust gfc_extract_int caller.
1862 * intrinsic.c (add_sym, find_sym, make_alias): Use
1863 gfc_get_string ("%s", x) instead of gfc_get_string (x).
1864 * simplify.c (get_kind, gfc_simplify_btest, gfc_simplify_maskr,
1865 gfc_simplify_maskl, gfc_simplify_poppar, gfc_simplify_repeat,
1866 gfc_simplify_selected_int_kind, gfc_simplify_selected_real_kind):
1867 Adjust gfc_extract_int callers.
1868 * trans-decl.c (gfc_find_module): Use gfc_get_string ("%s", x)
1869 instead of gfc_get_string (x).
1870 * matchexp.c (expression_syntax): Add const.
1871 * primary.c (match_kind_param, match_hollerith_constant,
1872 match_string_constant): Adjust gfc_extract_int callers.
1873 (match_keyword_arg): Use gfc_get_string ("%s", x) instead of
1875 * frontend-passes.c (optimize_minmaxloc): Likewise.
1877 2017-01-19 Andre Vehreschild <vehre@gcc.gnu.org>
1880 * trans-decl.c (gfc_build_qualified_array): Add static decl to parent
1881 function only, when the decl-context is not the translation unit.
1883 2017-01-18 Louis Krupp <louis.krupp@zoho.com>
1887 * trans-expr.c (gfc_conv_variable): Don't treat temporary variables
1888 as function arguments.
1889 * trans-stmt.c (forall_make_variable_temp,
1890 generate_loop_for_temp_to_lhs, gfc_trans_assign_need_temp,
1891 gfc_trans_forall_1): Don't adjust offset of forall temporary
1892 for array sections, make forall temporaries work for substring
1893 expressions, improve test coverage by adding -ftest-forall-temp
1894 option to request usage of temporary array in forall code.
1895 * lang.opt: Add -ftest-forall-temp option.
1896 * invoke.texi: Add -ftest-forall-temp option.
1898 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
1900 * primary.c (caf_variable_attr): Improve figuring whether the current
1901 component is the last one refed.
1902 * trans-stmt.c (gfc_trans_allocate): Do not generate sync_all calls
1903 when allocating pointer or allocatable components.
1905 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
1907 * gfortran.texi: Add missing parameters to caf-API functions. Correct
1908 typos and clarify some descriptions.
1910 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
1913 Missed some cases, here they are:
1914 * trans-decl.c (gfc_build_qualified_array): Add static tokens to the
1915 parent function's scope.
1916 * trans-expr.c (gfc_get_tree_for_caf_expr): Shorten code. Remove
1919 2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org>
1922 * resolve.c (resolve_lock_unlock_event): Resolve the expression for
1923 event's until_count.
1925 2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org>
1928 * trans-expr.c (gfc_get_tree_for_caf_expr): Ensure the backend_decl
1929 is valid before accessing it.
1931 2017-01-09 Jakub Jelinek <jakub@redhat.com>
1933 PR translation/79019
1934 PR translation/79020
1935 * decl.c (attr_decl1): Fix spelling in translatable string.
1936 * intrinsic.texi: Fix spelling - invokation -> invocation.
1937 * lang.opt (faggressive-function-elimination, gfc_convert): Fix
1938 typos in descriptions.
1939 * openmp.c (resolve_omp_clauses): Add missing whitespace to
1940 translatable strings.
1942 2017-01-08 Martin Sebor <msebor@redhat.com>
1944 PR tree-optimization/78913
1946 * trans-common.c (build_equiv_decl): Increase buffer size to avoid
1947 truncation for any argument.
1948 * trans-types.c (gfc_build_logical_type): Same.
1950 2017-01-07 Andre Vehreschild <vehre@gcc.gnu.org>
1954 * expr.c (gfc_check_pointer_assign): Return the same error message for
1955 rewritten coarray pointer assignments like for plain ones.
1956 * gfortran.h: Change prototype.
1957 * primary.c (caf_variable_attr): Set attributes used ones only only
1958 ones. Add setting of pointer_comp attribute.
1959 (gfc_caf_attr): Add setting of pointer_comp attribute.
1960 * trans-array.c (gfc_array_allocate): Add flag that the component to
1961 allocate is not an ultimate coarray component. Add allocation of
1963 (structure_alloc_comps): Extend nullify to treat pointer components in
1964 coarrays correctly. Restructure nullify to remove redundant code.
1965 (gfc_nullify_alloc_comp): Allow setting caf_mode flags.
1966 * trans-array.h: Change prototype of gfc_nullify_alloc_comp ().
1967 * trans-decl.c (generate_coarray_sym_init): Call nullify_alloc_comp for
1968 derived type coarrays with pointer components.
1969 * trans-expr.c (gfc_trans_structure_assign): Also treat pointer
1971 (trans_caf_token_assign): Handle assignment of token of scalar pointer
1973 (gfc_trans_pointer_assignment): Call above routine.
1974 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Add treating pointer
1976 (gfc_conv_intrinsic_caf_get): Likewise.
1977 (conv_caf_send): Likewise.
1978 * trans-stmt.c (gfc_trans_allocate): After allocating a derived type in
1979 a coarray pre-register the tokens.
1980 (gfc_trans_deallocate): Simply determining the coarray type (scalar or
1981 array) and deregistering it correctly.
1982 * trans-types.c (gfc_typenode_for_spec): Replace in_coarray flag by the
1983 actual codim to allow lookup of array types in the cache.
1984 (gfc_build_array_type): Likewise.
1985 (gfc_get_array_descriptor_base): Likewise.
1986 (gfc_get_array_type_bounds): Likewise.
1987 (gfc_get_derived_type): Likewise.
1988 * trans-types.h: Likewise.
1989 * trans.c (gfc_deallocate_with_status): Enable deregistering of all kind
1990 of coarray components.
1991 (gfc_deallocate_scalar_with_status): Use free() in fcoarray_single mode
1992 instead of caf_deregister.
1994 2017-01-06 Jakub Jelinek <jakub@redhat.com>
1996 * simplify.c (simplify_transformation_to_array): Use
1997 GCC_DIAGNOSTIC_PUSH_IGNORED and GCC_DIAGNOSTIC_POP instead of
1998 #pragma GCC diagnostic {push,ignored,pop}.
2000 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
2002 * simplify.c (simplify_transformation_to_array): Silence
2003 array bounds warning. Fix whitespace.
2005 2017-01-04 Alexandre Oliva <aoliva@redhat.com>
2007 * module.c (load_omp_udrs): Initialize name.
2009 2017-01-02 Janne Blomqvist <jb@gcc.gnu.org>
2012 * trans-expr.c (gfc_trans_string_copy): Rework string copy
2013 algorithm to avoid -Wstringop-overflow warning.
2015 2017-01-01 Jakub Jelinek <jakub@redhat.com>
2017 Update copyright years.
2019 * gfortranspec.c (lang_specific_driver): Update copyright notice
2021 * gfc-internals.texi: Bump @copying's copyright year.
2022 * gfortran.texi: Ditto.
2023 * intrinsic.texi: Ditto.
2024 * invoke.texi: Ditto.
2026 Copyright (C) 2017 Free Software Foundation, Inc.
2028 Copying and distribution of this file, with or without modification,
2029 are permitted in any medium without royalty provided the copyright
2030 notice and this notice are preserved.