1 2017-11-15 Martin Liska <mliska@suse.cz>
3 * options.c (gfc_post_options):
4 Do not set default value of warn_return_type.
5 * trans-decl.c (gfc_trans_deferred_vars):
6 Compare warn_return_type for greater than zero.
7 (generate_local_decl): Likewise
8 (gfc_generate_function_code): Likewise.
10 2017-11-13 Fritz Reese <fritzoreese@gmail.com>
13 * decl.c (match_clist_expr): Replace gcc_assert with proper
14 handling of bad result from spec_size().
15 * resolve.c (check_data_variable): Avoid NULL dereference when passing
18 2017-11-11 Janus Weil <janus@gcc.gnu.org>
21 * resolve.c (update_compcall_arglist): Improve error recovery,
24 2017-11-10 Fritz Reese <fritzoreese@gmail.com>
27 * gfortran.h (gfc_build_init_expr): New prototype.
28 * invoke.texi (finit-derived): Update documentation.
29 * expr.c (gfc_build_init_expr): New, from gfc_build_default_init_expr.
30 (gfc_build_default_init_expr): Redirect to gfc_build_init_expr(,,false)
31 (component_initializer): Force building initializers using
32 gfc_build_init_expr(,,true).
34 2017-11-10 Martin Sebor <msebor@redhat.com>
37 * gcc/fortran/decl.c (build_sym): Use strcpy instead of strncpy.
39 2017-11-10 Paul Thomas <pault@gcc.gnu.org>
42 * trans-stmt.c (gfc_trans_allocate): Remove the gcc_assert on
43 null string length for assumed length typespec and set
44 expr3_esize to NULL_TREE;
46 2017-11-09 Paul Thomas <pault@gcc.gnu.org>
49 * check.c (same_type_check): Introduce a new argument 'assoc'
50 with default value false. If this is true, use the symbol type
51 spec of BT_PROCEDURE expressions.
52 (gfc_check_associated): Set 'assoc' true in the call to
55 2017-11-09 Steven G. Kargl <kargl@gcc.gnu.org>
58 * interface.c (symbol_rank): Check for NULL pointer.
60 2017-11-08 Steven G. Kargl <kargl@kgcc.gnu.org>
63 * simplify.c(gfc_simplify_transfer): Do not dereference a NULL pointer.
66 2017-11-08 Steven G. Kargl <kargl@gcc.gnu.org>
69 * arith.c (gfc_hollerith2character): Clear pad.
71 2017-11-08 Janne Blomqvist <jb@gcc.gnu.org>
74 * convert.c (truthvalue_conversion): Use logical_type_node.
75 * trans-array.c (gfc_trans_allocate_array_storage): Likewise.
76 (gfc_trans_create_temp_array): Likewise.
77 (gfc_trans_array_ctor_element): Likewise.
78 (gfc_trans_array_constructor_value): Likewise.
79 (trans_array_constructor): Likewise.
80 (trans_array_bound_check): Likewise.
81 (gfc_conv_array_ref): Likewise.
82 (gfc_trans_scalarized_loop_end): Likewise.
83 (gfc_conv_array_extent_dim): Likewise.
84 (gfc_array_init_size): Likewise.
85 (gfc_array_allocate): Likewise.
86 (gfc_trans_array_bounds): Likewise.
87 (gfc_trans_dummy_array_bias): Likewise.
88 (gfc_conv_array_parameter): Likewise.
89 (duplicate_allocatable): Likewise.
90 (duplicate_allocatable_coarray): Likewise.
91 (structure_alloc_comps): Likewise
92 (get_std_lbound): Likewise
93 (gfc_alloc_allocatable_for_assignment): Likewise
94 * trans-decl.c (add_argument_checking): Likewise
95 (gfc_generate_function_code): Likewise
96 * trans-expr.c (gfc_copy_class_to_class): Likewise
97 (gfc_trans_class_array_init_assign): Likewise
98 (gfc_trans_class_init_assign): Likewise
99 (gfc_conv_expr_present): Likewise
100 (gfc_conv_substring): Likewise
101 (gfc_conv_cst_int_power): Likewise
102 (gfc_conv_expr_op): Likewise
103 (gfc_conv_procedure_call): Likewise
104 (fill_with_spaces): Likewise
105 (gfc_trans_string_copy): Likewise
106 (gfc_trans_alloc_subarray_assign): Likewise
107 (gfc_trans_pointer_assignment): Likewise
108 (gfc_trans_scalar_assign): Likewise
109 (fcncall_realloc_result): Likewise
110 (alloc_scalar_allocatable_for_assignment): Likewise
111 (trans_class_assignment): Likewise
112 (gfc_trans_assignment_1): Likewise
113 * trans-intrinsic.c (build_fixbound_expr): Likewise
114 (gfc_conv_intrinsic_aint): Likewise
115 (gfc_trans_same_strlen_check): Likewise
116 (conv_caf_send): Likewise
117 (trans_this_image): Likewise
118 (conv_intrinsic_image_status): Likewise
119 (trans_image_index): Likewise
120 (gfc_conv_intrinsic_bound): Likewise
121 (conv_intrinsic_cobound): Likewise
122 (gfc_conv_intrinsic_mod): Likewise
123 (gfc_conv_intrinsic_dshift): Likewise
124 (gfc_conv_intrinsic_dim): Likewise
125 (gfc_conv_intrinsic_sign): Likewise
126 (gfc_conv_intrinsic_ctime): Likewise
127 (gfc_conv_intrinsic_fdate): Likewise
128 (gfc_conv_intrinsic_ttynam): Likewise
129 (gfc_conv_intrinsic_minmax): Likewise
130 (gfc_conv_intrinsic_minmax_char): Likewise
131 (gfc_conv_intrinsic_anyall): Likewise
132 (gfc_conv_intrinsic_arith): Likewise
133 (gfc_conv_intrinsic_minmaxloc): Likewise
134 (gfc_conv_intrinsic_minmaxval): Likewise
135 (gfc_conv_intrinsic_btest): Likewise
136 (gfc_conv_intrinsic_bitcomp): Likewise
137 (gfc_conv_intrinsic_shift): Likewise
138 (gfc_conv_intrinsic_ishft): Likewise
139 (gfc_conv_intrinsic_ishftc): Likewise
140 (gfc_conv_intrinsic_leadz): Likewise
141 (gfc_conv_intrinsic_trailz): Likewise
142 (gfc_conv_intrinsic_mask): Likewise
143 (gfc_conv_intrinsic_spacing): Likewise
144 (gfc_conv_intrinsic_rrspacing): Likewise
145 (gfc_conv_intrinsic_size): Likewise
146 (gfc_conv_intrinsic_sizeof): Likewise
147 (gfc_conv_intrinsic_transfer): Likewise
148 (gfc_conv_allocated): Likewise
149 (gfc_conv_associated): Likewise
150 (gfc_conv_same_type_as): Likewise
151 (gfc_conv_intrinsic_trim): Likewise
152 (gfc_conv_intrinsic_repeat): Likewise
153 (conv_isocbinding_function): Likewise
154 (conv_intrinsic_ieee_is_normal): Likewise
155 (conv_intrinsic_ieee_is_negative): Likewise
156 (conv_intrinsic_ieee_copy_sign): Likewise
157 (conv_intrinsic_move_alloc): Likewise
158 * trans-io.c (set_parameter_value_chk): Likewise
159 (set_parameter_value_inquire): Likewise
160 (set_string): Likewise
161 * trans-openmp.c (gfc_walk_alloc_comps): Likewise
162 (gfc_omp_clause_default_ctor): Likewise
163 (gfc_omp_clause_copy_ctor): Likewise
164 (gfc_omp_clause_assign_op): Likewise
165 (gfc_omp_clause_dtor): Likewise
166 (gfc_omp_finish_clause): Likewise
167 (gfc_trans_omp_clauses): Likewise
168 (gfc_trans_omp_do): Likewise
169 * trans-stmt.c (gfc_trans_goto): Likewise
170 (gfc_trans_sync): Likewise
171 (gfc_trans_arithmetic_if): Likewise
172 (gfc_trans_simple_do): Likewise
173 (gfc_trans_do): Likewise
174 (gfc_trans_forall_loop): Likewise
175 (gfc_trans_where_2): Likewise
176 (gfc_trans_allocate): Likewise
177 (gfc_trans_deallocate): Likewise
178 * trans-types.c (gfc_init_types): Initialize logical_type_node and
179 their true/false trees.
180 (gfc_get_array_descr_info): Use logical_type_node.
181 * trans-types.h (logical_type_node): New tree.
182 (logical_true_node): Likewise.
183 (logical_false_node): Likewise.
184 * trans.c (gfc_trans_runtime_check): Use logical_type_node.
185 (gfc_call_malloc): Likewise
186 (gfc_allocate_using_malloc): Likewise
187 (gfc_allocate_allocatable): Likewise
188 (gfc_add_comp_finalizer_call): Likewise
189 (gfc_add_finalizer_call): Likewise
190 (gfc_deallocate_with_status): Likewise
191 (gfc_deallocate_scalar_with_status): Likewise
192 (gfc_call_realloc): Likewise
194 2017-11-06 Paul Thomas <pault@gcc.gnu.org>
197 * trans-expr.c (gfc_map_intrinsic_function): Return false for
198 bounds without the DIM argument instead of ICEing.
200 2017-11-06 Martin Liska <mliska@suse.cz>
203 * options.c (gfc_post_options): Set default value of
204 -Wreturn-type to false.
206 2017-11-05 Thomas Koenig <tkoenig@gcc.gnu.org>
209 * lang.opt (ffrontend-loop-interchange): New option.
210 (Wfrontend-loop-interchange): New option.
211 * options.c (gfc_post_options): Handle ffrontend-loop-interchange.
212 * frontend-passes.c (gfc_run_passes): Run
213 optimize_namespace if flag_frontend_optimize or
214 flag_frontend_loop_interchange are set.
215 (optimize_namespace): Run functions according to flags set;
216 also call index_interchange.
217 (ind_type): New function.
218 (has_var): New function.
219 (index_cost): New function.
220 (loop_comp): New function.
222 2017-11-05 Paul Thomas <pault@gcc.gnu.org>
225 * resolve.c (resolve_ordinary_assign): Do not add the _data
226 component for class valued array constructors being assigned
227 to derived type arrays.
228 * trans-array.c (gfc_trans_array_ctor_element): Take the _data
229 of class valued elements for assignment to derived type arrays.
231 2017-11-05 Paul Thomas <pault@gcc.gnu.org>
235 * resolve.c (resolve_component): There is no need to resolve
236 the components of a use associated vtype.
237 (resolve_fl_derived): Unconditionally generate a vtable for any
238 module derived type, as long as the standard is F2003 or later
239 and it is not a vtype or a PDT template.
241 2017-11-05 Tom de Vries <tom@codesourcery.com>
244 * parse.c (match, matcha, matchs, matcho, matchds, matchdo): Remove
245 semicolon after "do {} while (0)".
247 2017-11-04 Andre Vehreschild <vehre@gcc.gnu.org>
249 * trans-expr.c (gfc_trans_assignment_1): Character kind conversion may
250 create a loop variant temporary, too.
251 * trans-intrinsic.c (conv_caf_send): Treat char arrays as arrays and
253 * trans.c (get_array_span): Take the character kind into account when
254 doing pointer arithmetic.
256 2017-11-04 Thomas Koenig <tkoenig@gcc.gnu.org>
259 * gfortran.h (gfc_check_f): Replace fm3l with fm4l.
260 * intrinsic.h (gfc_resolve_maxloc): Add gfc_expr * to argument
262 (gfc_resolve_minloc): Likewise.
263 * check.c (gfc_check_minloc_maxloc): Handle kind argument.
264 * intrinsic.c (add_sym_3_ml): Rename to
265 (add_sym_4_ml): and handle kind argument.
266 (add_function): Replace add_sym_3ml with add_sym_4ml and add
267 extra arguments for maxloc and minloc.
268 (check_specific): Change use of check.f3ml with check.f4ml.
269 * iresolve.c (gfc_resolve_maxloc): Handle kind argument. If
270 the kind is smaller than the smallest library version available,
271 use gfc_default_integer_kind and convert afterwards.
272 (gfc_resolve_minloc): Likewise.
274 2017-11-04 Paul Thomas <pault@gcc.gnu.org>
277 * trans-decl.c (gfc_trans_deferred_vars): Do a better job of a
278 case where 'tmp' was used unititialized and remove TODO.
280 2017-11-03 Steven G. Kargl <kargl@gcc.gnu.org>
283 * resolve.c (resolve_equivalence): An entity in a common block within
284 a module cannot appear in an equivalence statement if the entity is
285 with a pure procedure.
287 2017-10-31 Jim Wilson <wilson@tuliptree.org>
289 * parse.c (unexpected_eof): Call gcc_unreachable before return.
291 2017-10-30 Paul Thomas <pault@gcc.gnu.org>
294 * trans_expr.c (gfc_conv_procedure_call): When passing a class
295 argument to an unlimited polymorphic dummy, it is wrong to cast
296 the passed expression as unlimited, unless it is unlimited. The
297 correct way is to assign to each of the fields and set the _len
300 2017-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
302 * resolve.c (resolve_transfer): Set derived to correct symbol for
305 2017-10-29 Jim Wilson <wilson@tuliptree.org>
307 * invoke.texi: Delete adb and sdb references.
309 2017-10-28 Andre Vehreschild <vehre@gcc.gnu.org>
311 * check.c (gfc_check_co_reduce): Clarify error message.
313 2017-10-28 Paul Thomas <pault@gcc.gnu.org>
316 * trans-expr.c (trans_class_vptr_len_assignment): 'vptr_expr'
317 must only be set if the right hand side expression is of type
320 2017-10-27 Steven G. Kargl <kargl@gcc.gnu.org>
323 * match.c (gfc_match_allocate): Exit early on syntax error.
325 2017-10-27 Thomas Koenig <tkoenig@gcc.gnu.org>
328 * simplify.c (is_constant_array_expr): If the expression is
329 a parameter array, call gfc_simplify_expr.
331 2017-10-25 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
333 * match.c (gfc_match_type_is): Fix typo in error message.
335 2017-10-21 Paul Thomas <pault@gcc.gnu.org>
338 * decl.c (gfc_get_pdt_instance): Remove the error message that
339 the parameter does not have a corresponding component since
340 this is now taken care of when the derived type is resolved. Go
341 straight to error return instead.
342 (gfc_match_formal_arglist): Make the PDT relevant errors
343 immediate so that parsing of the derived type can continue.
344 (gfc_match_derived_decl): Do not check the match status on
345 return from gfc_match_formal_arglist for the same reason.
346 * resolve.c (resolve_fl_derived0): Check that each type
347 parameter has a corresponding component.
350 * resolve.c (resolve_generic_f): Check that the derived type
351 can be used before resolving the struture constructor.
354 * symbol.c (check_conflict): Add the conflicts involving PDT
355 KIND and LEN attributes.
357 2017-10-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
359 * interface.c (check_sym_interfaces, check_uop_interfaces,
360 gfc_check_interfaces): Base interface_name buffer off
363 2017-10-19 Jakub Jelinek <jakub@redhat.com>
366 * gfortran.h (gfc_resolve_do_iterator): Add a bool arg.
367 (gfc_resolve_omp_local_vars): New declaration.
368 * openmp.c (omp_current_ctx): Make static.
369 (gfc_resolve_omp_parallel_blocks): Handle EXEC_OMP_TASKLOOP
370 and EXEC_OMP_TASKLOOP_SIMD.
371 (gfc_resolve_do_iterator): Add ADD_CLAUSE argument, if false,
372 don't actually add any clause. Move omp_current_ctx test
374 (handle_local_var, gfc_resolve_omp_local_vars): New functions.
375 * resolve.c (gfc_resolve_code): Call gfc_resolve_omp_parallel_blocks
376 instead of just gfc_resolve_omp_do_blocks for EXEC_OMP_TASKLOOP
377 and EXEC_OMP_TASKLOOP_SIMD.
378 (gfc_resolve_code): Adjust gfc_resolve_do_iterator caller.
379 (resolve_codes): Call gfc_resolve_omp_local_vars.
381 2017-10-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
383 * gfortran.h (gfc_lookup_function_fuzzy): New declaration.
384 (gfc_closest_fuzzy_match): New declaration.
385 (vec_push): New definition.
386 * misc.c (gfc_closest_fuzzy_match): New definition.
387 * resolve.c: Include spellcheck.h.
388 (lookup_function_fuzzy_find_candidates): New static function.
389 (lookup_uop_fuzzy_find_candidates): Likewise.
390 (lookup_uop_fuzzy): Likewise.
391 (resolve_operator) <INTRINSIC_USER>: Call lookup_uop_fuzzy.
392 (gfc_lookup_function_fuzzy): New definition.
393 (resolve_unknown_f): Call gfc_lookup_function_fuzzy.
394 * interface.c (check_interface0): Likewise.
395 (lookup_arg_fuzzy_find_candidates): New static function.
396 (lookup_arg_fuzzy ): Likewise.
397 (compare_actual_formal): Call lookup_arg_fuzzy.
398 * symbol.c: Include spellcheck.h.
399 (lookup_symbol_fuzzy_find_candidates): New static function.
400 (lookup_symbol_fuzzy): Likewise.
401 (gfc_set_default_type): Call lookup_symbol_fuzzy.
402 (lookup_component_fuzzy_find_candidates): New static function.
403 (lookup_component_fuzzy): Likewise.
404 (gfc_find_component): Call lookup_component_fuzzy.
406 2017-10-18 Thomas Koenig <tkoenig@gcc.gnu.org>
409 * frontend-passes.c (combine_array_constructor): If an array
410 constructor is all constants and has more elements than a small
411 constant, don't convert a*[b,c] to [a*b,a*c] to reduce compilation
414 2017-10-18 Thomas Koenig <tkoenig@gcc.gnu.org>
417 * resolve.c (resovle_symbol): Change gcc_assert to
418 sensible error message.
420 2017-10-18 Paul Thomas <pault@gcc.gnu.org>
423 * trans_decl.c (gfc_get_symbol_decl): Procedure symbols that
424 have the 'used_in_submodule' attribute should be processed by
425 'gfc_get_extern_function_decl'.
427 2017-10-16 Fritz Reese <fritzoreese@gmail.com>
430 * trans-io.c (transfer_expr): Treat BT_UNION as BT_DERIVED.
432 2017-10-15 Thomas Koenig <tkoenig@gcc.gnu.org>
435 * fortran/scanner.c (last_error_char): New global variable.
436 (gfc_scanner_init_1): Set last_error_char to NULL.
437 (gfc_gobble_whitespace): If a character not printable or
438 not newline, issue an error.
440 2017-10-13 Paul Thomas <pault@gcc.gnu.org>
443 * resolve.c (resolve_symbol): Ensure that derived type array
444 results get default initialization.
446 2017-10-11 Nathan Sidwell <nathan@acm.org>
448 * cpp.c (gfc_cpp_add_include_path): Update incpath_e names.
449 (gfc_cpp_add_include_path_after): Likewise.
451 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
453 * target-memory.c (gfc_interpret_logical): Use wi::to_wide when
454 operating on trees as wide_ints.
455 * trans-const.c (gfc_conv_tree_to_mpz): Likewise.
456 * trans-expr.c (gfc_conv_cst_int_power): Likewise.
457 * trans-intrinsic.c (trans_this_image): Likewise.
458 (gfc_conv_intrinsic_bound): Likewise.
459 (conv_intrinsic_cobound): Likewise.
461 2017-10-08 Steven G. Kargl <kargl@gcc.gnu.org>
463 * check.c (gfc_check_x): Remove function.
464 * intrinsic.c (add_functions): Use gfc_check_fn_r.
466 2017-10-08 Paul Thomas <pault@gcc.gnu.org>
469 * module.c : Bump up MOD_VERSION to 15.
470 (mio_component): Edit comment about PDT specification list.
471 (mio_expr, mio_symbol): Include the expression and symbol PDT
472 specification lists in the same way as in mio_component.
474 2017-10-08 Thomas Koenig <tkoenig@gcc.gnu.org>
476 * dump_prase_tree (show_symbol): Output list of variables in
478 (show_code_node): Add new line for ELSE and END DO for DO
480 * invoke.texi: Document that the output of
481 -fdump-fortran-original, -fdump-fortran-optimized and
482 -fdump-parse-tree is unsable and may lead to ICEs.
484 2017-10-07 Paul Thomas <pault@gcc.gnu.org>
487 * class.c (gfc_find_derived_vtab): Return NULL for a passed
488 pdt template to prevent bad procedures from being written.
489 * decl.c (gfc_get_pdt_instance): Do not use the default
490 initializer for pointer and allocatable pdt type components. If
491 the component is allocatbale, set the 'alloc_comp' attribute of
493 * module.c : Add a prototype for 'mio_actual_arglist'. Add a
494 boolean argument 'pdt'.
495 (mio_component): Call it for the parameter list of pdt type
496 components with 'pdt' set to true.
497 (mio_actual_arg): Add the boolean 'pdt' and, if it is set, call
498 mio_integer for the 'spec_type'.
499 (mio_actual_arglist): Add the boolean 'pdt' and use it in the
500 call to mio_actual_arg.
501 (mio_expr, mio_omp_udr_expr): Call mio_actual_arglist with
503 * resolve.c (get_pdt_spec_expr): Add the parameter name to the
504 KIND parameter error.
505 (get_pdt_constructor): Check that cons->expr is non-null.
506 * trans-array.c (structure_alloc_comps): For deallocation of
507 allocatable components, ensure that parameterized components
508 are deallocated first. Likewise, when parameterized components
509 are allocated, nullify allocatable components first. Do not
510 recurse into pointer or allocatable pdt components while
511 allocating or deallocating parameterized components. Test that
512 parameterized arrays or strings are allocated before freeing
514 (gfc_trans_pointer_assignment): Call the new function. Tidy up
515 a minor whitespace issue.
516 trans-decl.c (gfc_trans_deferred_vars): Set 'tmp' to NULL_TREE
517 to prevent the expression from being used a second time.
519 2017-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
522 * expr.c (gfc_check_pointer_assign): Error
523 for non-contiguous rhs.
525 2017-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
527 * gfortran.h (async_io_dt): Add external reference.
528 * io.c (async_io_dt): Add variable.
529 (compare_to_allowed_values): Add prototyte. Add optional argument
530 num. If present, set it to the number of the entry that was
532 (check_io_constraints): If this is for an asynchronous I/O
533 statement, set async_io_dt and set the asynchronous flag for
535 * resolve.c (resolve_transfer): If async_io_dt is set, set
536 the asynchronous flag on the variable.
537 (resolve_fl_namelist): If async_io_dt is set, set the asynchronous
538 flag on all elements of the namelist.
540 2017-10-04 Paul Thomas <pault@gcc.gnu.org>
544 * resolve.c (resolve_assoc_var): Deferred character type
545 associate names must not receive an integer conatant length.
546 * symbol.c (gfc_is_associate_pointer): Deferred character
547 length functions also require an associate pointer.
548 * trans-decl.c (gfc_get_symbol_decl): Deferred character
549 length functions or derived type components require the assoc
550 name to have variable string length.
551 * trans-stmt.c (trans_associate_var): Set the string length of
552 deferred string length associate names. The address expression
553 is not needed for allocatable, pointer or dummy targets. Change
554 the comment about defered string length targets.
556 2017-10-03 Thomas Koenig <tkoenig@gcc.gnu.org>
558 * io.c (match_wait_element): Correctly match END and EOR tags.
559 * dump-parse-tree.c (show_code_node): Handle EXEC_WAIT.
561 2017-10-02 Paul Thomas <pault@gcc.gnu.org>
564 * resolve.c (gfc_resolve_code): Simplify condition for class
565 pointer assignments becoming regular assignments by asserting
566 that only class valued targets are permitted.
567 * trans-expr.c (trans_class_pointer_fcn): New function using a
568 block of code from gfc_trans_pointer_assignment.
569 (gfc_trans_pointer_assignment): Call the new function. Tidy up
570 a minor whitespace issue.
572 2017-10-01 Dominique d'Humieres <dominiq@lps.ens.fr>
575 * parse.c (gfc_global_used): Replace the gfc_internal_error
578 2017-09-29 Dominique d'Humieres <dominiq@lps.ens.fr>
581 * interface.c (compare_actual_formal): Change warnings to errors
582 when "Actual argument contains too few elements for dummy
583 argument", unless -std=legacy is used.
585 2017-09-27 Thomas Schwinge <thomas@codesourcery.com>
587 * lang.opt <Wdo-subscript>: End help text with a period.
589 2017-09-26 Thomas Koenig <tkoenig@gcc.gnu.org>
591 * frontend-passes.c (do_subscript): Don't do anything
592 if inside an associate list.
594 2017-09-25 Thomas Koenig <tkoenig@gcc.gnu.org>
596 * lang.opt: Add -Wdo-subscript.
597 * frontend-passes.c (do_t): New type.
598 (doloop_list): Use variable of do_type.
599 (if_level): Variable to track if levels.
600 (select_level): Variable to track select levels.
601 (gfc_run_passes): Initialize i_level and select_level.
602 (doloop_code): Record current level of if + select
603 level in doloop_list. Add seen_goto if there could
604 be a branch outside the loop. Use different type for
606 (doloop_function): Call do_intent and do_subscript; move
607 functionality of checking INTENT to do_intent.
608 (insert_index_t): New type, for callback_insert_index.
609 (callback_insert_index): New function.
610 (insert_index): New function.
611 (do_subscript): New function.
612 (do_intent): New function.
613 (gfc_code_walker): Keep track of if_level and select_level.
614 * invoke.texi: Document -Wdo-subscript.
616 2017-09-25 Janne Blomqvist <jb@gcc.gnu.org>
618 * trans.c (gfc_unlikely): Remove unnecessary fold_convert.
619 (gfc_likely): Likewise.
621 2017-09-24 Thomas Koenig <tkoenig@gcc.gnu.org>
622 Steven G. Kargl <kargl@gcc.gnu.org>
625 * expr.c (gfc_get_full_arrayspec_from_expr): If there is
626 no symtree, set array spec to NULL.
628 2017-09-23 Janus Weil <janus@gcc.gnu.org>
631 * lang.opt: Add the options -fdefault-real-10 and -fdefault-real-16.
632 Rename flag_default_real to flag_default_real_8.
633 * invoke.texi: Add documentation.
634 * module.c (use_iso_fortran_env_module): flag_default_real is renamed.
635 * trans-types.c (gfc_init_kinds): Implement the flags
636 -fdefault-real-10 and -fdefault-real-16. Make -fdefault-double-8 work
637 without -fdefault-real-8.
639 2017-09-21 Paul Thomas <pault@gcc.gnu.org>
642 * match.c (gfc_match_associate): Before failing the association
643 try again, allowing a proc pointer selector.
648 * primary.c (gfc_match_varspec): Introduce 'tgt_expr', which
649 points to the associate selector, if any. Go through selector
650 references, after resolution for variables, to catch any full
651 or section array references. If a class associate name does
652 not have the same declared type as the selector, resolve the
653 selector and copy the declared type to the associate name.
654 Before throwing a no implicit type error, resolve all allowed
655 selector expressions, and copy the resulting typespec.
658 * resolve.c (resolve_assoc_var): Selector must cannot be the
659 NULL expression and it must have a type.
662 * resolve.c (resolve_symbol): Allow associate names to be
665 2017-09-21 Cesar Philippidis <cesar@codesourcery.com>
667 * openmp.c (gfc_match_oacc_wait): Don't restrict wait directive
668 arguments to constant integers.
670 2017-09-17 Paul Thomas <pault@gcc.gnu.org>
673 * decl.c (gfc_get_pdt_instance): Use the component initializer
674 expression for the default, rather than the parameter value.
675 * resolve.c (resolve_pdt): New function.
676 (resolve_symbol): Call it. Remove false error, prohibiting
677 deferred type parameters for dummy arguments.
680 * primary.c (gfc_match_varspec): If the type of an associate
681 name is unknown and yet there is a match, try resolving the
682 target expression and using its type.
684 2017-09-15 Paul Thomas <pault@gcc.gnu.org>
687 trans-decl.c (gfc_trans_deferred_vars): Do not null the 'span'
688 field if the symbol is either implicitly or explicitly saved.
690 2017-09-13 Paul Thomas <pault@gcc.gnu.org>
693 * decl.c (match_char_kind): If the kind expression is
694 parameterized, save it in saved_kind_expr and set kind = 0.
695 (gfc_get_pdt_instance): Resolve and simplify before emitting
696 error on expression kind. Insert a missing simplification after
697 insertion of kind expressions.
699 2017-09-12 Paul Thomas <pault@gcc.gnu.org>
703 * decl.c (variable_decl): Check pdt template components for
704 appearance of KIND/LEN components in the type parameter name
705 list, that components corresponding to type parameters have
706 either KIND or LEN attributes and that KIND or LEN components
707 are scalar. Copy the initializer to the parameter value.
708 (gfc_get_pdt_instance): Add a label 'error_return' and follow
709 it with repeated code, while replacing this code with a jump.
710 Check if a parameter appears as a component in the template.
711 Make sure that the parameter expressions are integer. Validate
713 (gfc_match_decl_type_spec): Search for pdt_types in the parent
714 namespace since they are instantiated in the template ns.
715 * expr.c (gfc_extract_int): Use a KIND parameter if it
716 appears as a component expression.
717 (gfc_check_init_expr): Allow expressions with the pdt_kind
719 *primary.c (gfc_match_actual_arglist): Make sure that the first
720 keyword argument is recognised when 'pdt' is set.
722 2017-09-10 Paul Thomas <pault@gcc.gnu.org>
730 * expr.c (is_subref_array): Add class pointer array dummies
731 to the list of expressions that return true.
732 * trans-array.c: Add SPAN_FIELD and update indices for
734 (gfc_conv_descriptor_span, gfc_conv_descriptor_span_get,
735 gfc_conv_descriptor_span_set, is_pointer_array,
736 get_array_span): New functions.
737 (gfc_get_descriptor_offsets_for_info): New function to preserve
738 API for access to descriptor fields for trans-types.c.
739 (gfc_conv_scalarized_array_ref): If the expression is a subref
740 array, make sure that info->descriptor is a descriptor type.
741 Otherwise, if info->descriptor is a pointer array, set 'decl'
742 and fix it if it is a component reference.
743 (build_array_ref): Simplify handling of class array refs by
744 passing the vptr to gfc_build_array_ref rather than generating
745 the pointer arithmetic in this function.
746 (gfc_conv_array_ref): As in gfc_conv_scalarized_array_ref, set
748 (gfc_array_allocate): Set the span field if this is a pointer
749 array. Use the expr3 element size if it is available, so that
750 the dynamic type element size is used.
751 (gfc_conv_expr_descriptor): Set the span field for pointer
753 * trans-array.h: Prototypes for gfc_conv_descriptor_span_get
754 gfc_conv_descriptor_span_set and
755 gfc_get_descriptor_offsets_for_info added.
756 trans-decl.c (gfc_get_symbol_decl): If a non-class pointer
757 array, mark the declaration as a GFC_DECL_PTR_ARRAY_P. Remove
758 the setting of GFC_DECL_SPAN.
759 (gfc_trans_deferred_vars): Set the span field to zero in thge
761 * trans-expr.c (gfc_conv_procedure_call): Do not use copy-in/
762 copy-out to pass subref expressions to a pointer dummy.
763 (gfc_trans_pointer_assignment): Remove code for setting of
764 GFC_DECL_SPAN. Set the 'span' field for non-class pointers to
765 class function results. Likewise for rank remap. In the case
766 that the target is not a whole array, use the target array ref
767 for remap and, since the 'start' indices are missing, set the
768 lbounds to one, as required by the standard.
769 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Pick up the
770 'token' offset from the field decl in the descriptor.
771 (conv_isocbinding_subroutine): Set the 'span' field.
772 * trans-io.c (gfc_trans_transfer): Always scalarize pointer
774 * trans-stmt.c (trans_associate_var): Set the 'span' field.
775 * trans-types.c (gfc_get_array_descriptor_base): Add the 'span'
776 field to the array descriptor.
777 (gfc_get_derived_type): Pointer array components are marked as
778 GFC_DECL_PTR_ARRAY_P.
779 (gfc_get_array_descr_info): Replaced API breaking code for
780 descriptor offset calling gfc_get_descriptor_offsets_for_info.
781 * trans.c (get_array_span): New function.
782 (gfc_build_array_ref): Simplify by calling get_array_span and
783 obtain 'span' if 'decl' or 'vptr' present.
784 * trans.h : Rename DECL_LANG_FLAG_6, GFC_DECL_SUBREF_ARRAY_P,
785 as GFC_DECL_PTR_ARRAY_P.
787 2017-09-09 Paul Thomas <pault@gcc.gnu.org>
789 * decl.c : Add decl_type_param_list, type_param_spec_list as
790 static variables to hold PDT spec lists.
791 (build_sym): Copy 'type_param_spec_list' to symbol spec_list.
792 (build_struct): Copy the 'saved_kind_expr' to the component
793 'kind_expr'. Check that KIND or LEN components appear in the
794 decl_type_param_list. These should appear as symbols in the
795 f2k_derived namespace. If the component is itself a PDT type,
796 copy the decl_type_param_list to the component param_list.
797 (gfc_match_kind_spec): If the KIND expression is parameterized
798 set KIND to zero and store the expression in 'saved_kind_expr'.
799 (insert_parameter_exprs): New function.
800 (gfc_insert_kind_parameter_exprs): New function.
801 (gfc_insert_parameter_exprs): New function.
802 (gfc_get_pdt_instance): New function.
803 (gfc_match_decl_type_spec): Match the decl_type_spec_list if it
804 is present. If it is, call 'gfc_get_pdt_instance' to obtain the
805 specific instance of the PDT.
806 (match_attr_spec): Match KIND and LEN attributes. Check for the
807 standard and for type/kind of the parameter. They are also not
808 allowed outside a derived type definition.
809 (gfc_match_data_decl): Null the decl_type_param_list and the
810 type_param_spec_list on entry and free them on exit.
811 (gfc_match_formal_arglist): If 'typeparam' is true, add the
812 formal symbol to the f2k_derived namespace.
813 (gfc_match_derived_decl): Register the decl_type_param_list
814 if this is a PDT. If this is a type extension, gather up all
815 the type parameters and put them in the right order.
816 *dump-parse-tree.c (show_attr): Signal PDT templates and the
817 parameter attributes.
818 (show_components): Output parameter atrributes and component
820 (show_symbol): Show variable parameter lists.
821 * expr.c (expr.c): Copy the expression parameter list.
822 (gfc_is_constant_expr): Pass on symbols representing PDT
824 (gfc_check_init_expr): Break on PDT KIND parameters and
825 PDT parameter expressions.
826 (gfc_check_assign): Assigning to KIND or LEN components is an
828 (derived_parameter_expr): New function.
829 (gfc_derived_parameter_expr): New function.
830 (gfc_spec_list_type): New function.
831 * gfortran.h : Add enum gfc_param_spec_type. Add the PDT attrs
832 to the structure symbol_attr. Add the 'kind_expr' and
833 'param_list' field to the gfc_component structure. Comment on
834 the reuse of the gfc_actual_arglist structure as storage for
835 type parameter spec lists. Add the new field 'spec_type' to
836 this structure. Add 'param_list' fields to gfc_symbol and
837 gfc_expr. Add prototypes for gfc_insert_kind_parameter_exprs,
838 gfc_insert_parameter_exprs, gfc_add_kind, gfc_add_len,
839 gfc_derived_parameter_expr and gfc_spec_list_type.
840 * interface.c (gfc_compare_derived_types): Treat PDTs in the
841 same way as sequence types.
842 * match.c : Add variable 'type_param_spec_list'.
843 (gfc_op2string, gfc_match_member_sep, gfc_match_label): Remove
845 (match_derived_type_spec): Match PDTs and find specific
847 (gfc_match_type_spec): Remove more trailing whitespace.
848 (gfc_match_allocate): Assumed or deferred parameters cannot
849 appear here. Copy the type parameter spec list to the expr for
850 the allocatable entity. Free 'type_param_spec_list'.
851 (gfc_match_common, gfc_match_namelist, gfc_match_module): Still
852 more trailing whitespace to remove.
853 (gfc_match_type_is): Allow PDT typespecs.
854 * match.h : Modify prototypes for gfc_match_formal_arglist and
855 gfc_match_actual_arglist.
856 * module.c (ab_attribute, mstring attr_bits): PDT attributes
858 (mio_symbol_attribute): PDT attributes handled.
859 (mio_component): Deal with 'kind_expr' field.
860 (mio_full_f2k_derived): For PDT templates, transfer the formal
861 namespace symroot to the f2k_derived namespace.
862 *primary.c (match_keyword_arg, gfc_match_actual_arglist): Add
863 modifications to handle PDT spec lists. These are flagged in
864 both cases by new boolean arguments, whose prototype defaults
866 (gfc_match_structure_constructor, match_variable): Remove yet
867 more trailing whitespace.
868 * resolve.c (get_pdt_spec_expr, get_pdt_constructor): New
870 (resolve_structure_cons): If the constructor is a PDT template,
871 call get_pdt_constructor to build it using the parameter lists
872 and then get the specific instance of the PDT.
873 (resolve_component): PDT strings need a hidden string length
874 component like deferred characters.
875 (resolve_symbol): Dummy PDTs cannot have deferred parameters.
876 * symbol.c (gfc_add_kind, gfc_add_len): New functions.
877 (free_components): Free 'kind_expr' and 'param_list' fields.
878 (gfc_free_symbol): Free the 'param_list' field.
879 (gfc_find_sym_tree): If the current state is a PDT template,
880 look for the symtree in the f2k_derived namspaces.
881 trans-array.c (structure_alloc_comps): Allocate and deallocate
882 PDTs. Check dummy arguments for compliance of LEN parameters.
883 Add the new functions to the preceeding enum.
884 (gfc_allocate_pdt_comp, gfc_deallocate_pdt_comp and
885 gfc_check_pdt_dummy): New functions calling above.
886 * trans-array.h : Add prototypes for these functions.
887 trans-decl.c (gfc_get_symbol_decl): Call gfc_defer_symbol_init
888 as appropriate for PDT symbols.
889 (gfc_trans_deferred_vars): Allocate/deallocate PDT entities as
890 they come into and out of scope. Exclude pdt_types from being
892 (gfc_trans_subcomponent_assign): PDT array components must be
893 handles as if they are allocatable.
894 * trans-stmt.c (gfc_trans_allocate): Handle initialization of
896 (gfc_trans_deallocate): Likewise.
897 * trans-types.c (gfc_get_derived_type): PDT templates must not
898 arrive here. PDT string components are handles as if deferred.
899 Similarly, PDT arrays are treated as if allocatable. PDT
900 strings are pointer types.
901 * trans.c (gfc_deferred_strlen): Handle PDT strings in the same
902 way as deferred characters.
904 2017-09-01 Jakub Jelinek <jakub@redhat.com>
907 * parse.c (decode_omp_directive): Use matchs instead of matcho for
908 end ordered and ordered directives, except for ordered depend. For
909 -fopenmp-simd and ordered depend, reject the stmt.
910 * trans-openmp.c (gfc_trans_omp_ordered): For -fopenmp-simd ignore
911 threads clause and if simd clause isn't present, just translate the
914 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
915 Alan Hayward <alan.hayward@arm.com>
916 David Sherwood <david.sherwood@arm.com>
918 * trans-types.c (gfc_init_kinds): Use opt_scalar_int_mode for
921 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
922 Alan Hayward <alan.hayward@arm.com>
923 David Sherwood <david.sherwood@arm.com>
925 * target-memory.c (size_integer): Use SCALAR_INT_TYPE_MODE.
926 (size_logical): Likewise.
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_type_for_mode): Use is_a <scalar_int_mode>.
934 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
935 Alan Hayward <alan.hayward@arm.com>
936 David Sherwood <david.sherwood@arm.com>
938 * trans-types.c (gfc_init_kinds): Use opt_scalar_float_mode
939 and FOR_EACH_MODE_IN_CLASS.
941 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
942 Alan Hayward <alan.hayward@arm.com>
943 David Sherwood <david.sherwood@arm.com>
945 * target-memory.c (size_float): Use SCALAR_FLOAT_TYPE_MODE
946 instead of TYPE_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 machine_mode instead of int
955 2017-08-28 Janus Weil <janus@gcc.gnu.org>
958 * expr.c (gfc_check_pointer_assign): Improve the check whether pointer
959 may outlive pointer target.
961 2017-08-27 Thomas Koenig <tkoenig@gcc.gnu.org>
964 * frontend-passes (inline_matumul_assign): Explicity
965 set typespec for call to CONJG.
967 2017-08-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
970 * trans-io.c (get_dtio_proc): Add check for format label and set
971 formatted flag accordingly. Reorganize the code a little.
973 2017-08-16 Thomas Koenig <tkoenig@gcc.gnu.org>
976 * frontend-passes.c (realloc_string_callback): If expression is a
977 concatenation, also check for dependency.
978 (constant_string_length): Check for presence of symtree.
980 2017-08-13 Thomas Koenig <tkoenig@gcc.gnu.org>
982 * gfortran.texi: Document format of unformatted sequential files.
984 2017-08-11 Thomas Koenig <tkoenig@gcc.gnu.org>
986 * invoke.texi: Actually commit change about -Ofast.
988 2017-08-11 Thomas Koenig <tkoenig@gcc.gnu.org>
991 * resolve.c (resolve_symbol): Adjust (and reformat)
992 comment. Perform check if a BIND(C) is declared
993 at module level regardless of whether it is typed
996 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
998 * options.c (set_dec_flags): Only set legacy standards when value
1001 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
1003 * options.c (set_dec_flags, gfc_post_options): Only set flag_d_lines
1004 with -fdec when not set by user.
1006 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
1008 * decl.c (attr_seen): New static variable.
1009 * decl.c (variable_decl): Match %FILL in STRUCTURE body.
1010 * gfortran.texi: Update documentation.
1012 2017-08-08 Martin Liska <mliska@suse.cz>
1014 * trans-types.c: Include header files.
1016 2017-08-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1020 * options.c: Make -Ofast honor -fmax-stack-var-size.
1021 * invoke.texi: Document change.
1023 2017-08-01 Thomas König <tkoenig@gcc.gnu.org>
1026 * intrisic.c (gfc_convert_type_warn): Only set typespec for
1027 empty array constructors which don't have it already.
1029 2017-08-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1032 * lang.opt (fc-prototypes): Add option.
1033 * gfortran.h (gfc_typespec): Add interop_kind to struct.
1034 (gfc_dump_c_prototypes): Add prototype.
1035 * decl.c (gfc_match_kind_spec): Copy symbol used for kind to typespec.
1036 * parse.c (gfc_parse_file): Call gfc_dump_prototypes.
1037 * dump-parse-tree.c (gfc_dump_c_prototypes): New function.
1038 (type_return): New enum.
1039 (get_c_type_name): New function.
1040 (write_decl): New function.
1041 (write_type): New function.
1042 (write_variable): New function.
1043 (write_proc): New function.
1044 (write_interop_decl): New function.
1045 * invoke.texi: Document -fc-prototypes.
1047 2017-08-01 Dominique d'Humieres <dominiq@lps.ens.fr>
1050 * expr.c (gfc_check_init_expr): Use the renamed name.
1052 2017-07-31 Jakub Jelinek <jakub@redhat.com>
1054 * check.c (gfc_check_num_images): Fix a pasto.
1056 2017-07-29 Jakub Jelinek <jakub@redhat.com>
1058 * trans-decl.c (gfc_trans_use_stmts): Pass false as new argument to
1059 the imported_module_or_decl debug hook.
1061 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1063 * resolve.c (find_reachable_labels): Adjust.
1065 2017-07-25 Jakub Jelinek <jakub@redhat.com>
1067 * ioparm.def: Use 1U << 31 instead of 1 << 31 as flags2 mask.
1069 2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1071 * dump-parse-tree.c (show_symbol): Show binding label if present.
1073 2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1074 Mikael Morin <mikael@gcc.gnu.org>
1077 * fortran/trans-array.c (gfc_conv_resolve_dependencies):
1078 Break if dependency has been found.
1080 2017-07-23 Alexander Monakov <amonakov@ispras.ru>
1082 * interface.c (pair_cmp): Fix gfc_symbol comparison. Adjust comment.
1084 2017-07-18 Nathan Sidwell <nathan@acm.org>
1086 * trans.c (gfc_build_array_ref): Use TYPE_MAX_VALUE.
1088 2017-07-09 Dominique d'Humieres <dominiq@lps.ens.fr>
1091 * class.c (class_array_ref_detected): Remove a redundant
1094 2017-07-06 Harald Anlauf <anlauf@gmx.de>
1097 * array.c (gfc_ref_dimen_size): Handle bad subscript triplets.
1099 2017-07-03 Dominique d'Humieres <dominiq@lps.ens.fr>
1102 * resolve.c (resolve_symbol): Fix typo.
1104 2017-07-03 Dominique d'Humieres <dominiq@lps.ens.fr>
1107 * symbol.c (check_conflict): Add missing "conflicts".
1109 2017-06-29 Cesar Philippidis <cesar@codesourcery.com>
1112 * openmp.c (gfc_match_oacc_routine): Check if proc_name exist before
1113 comparing the routine name against it.
1115 2017-06-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1118 * trans-stmt.c (gfc_trans_call): If no code expr, use code->loc
1119 as warning/error locus.
1121 2017-06-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1124 * arith.c (wprecision_int_real): Set return value before
1125 mpz_clear and then return after it.
1127 2017-06-15 Janus Weil <janus@gcc.gnu.org>
1130 * trans-expr.c (gfc_conv_procedure_call): Deallocate the result of
1131 scalar allocatable procedure-pointer components.
1133 2017-06-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1136 * frontend-passes.c (traverse_io_block): Also
1137 check for variables occurring as indices multiple
1138 time in a single implied DO loop.
1140 2017-06-05 Janus Weil <janus@gcc.gnu.org>
1143 * trans-expr.c (gfc_conv_procedure_call): Fix detection of allocatable
1146 2017-06-05 Nicolas Koenig <koenigni@student.ethz.ch>
1149 * frontend-passes.c (traverse_io_block): New function.
1150 (simplify_io_impl_do): New function.
1151 (optimize_namespace): Invoke gfc_code_walker with
1152 simplify_io_impl_do.
1154 2017-06-02 Jakub Jelinek <jakub@redhat.com>
1157 * openmp.c (resolve_omp_clauses): Fix a typo.
1159 2017-05-30 David Malcolm <dmalcolm@redhat.com>
1161 * error.c (gfc_format_decoder): Update for new bool and
1162 const char ** params.
1164 2017-05-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1167 * frontend-passes.c (check_conjg_transpose_variable):
1169 (has_dimen_vector_ref): Likewise
1170 (matmul_temp_args): New function. Add prototype.
1171 (optimize_namespace): Call matmul_temp_args.
1173 2017-05-28 Thomas Koenig <tkoenig@gcc.gnu.org>
1175 * frontend-passes.c (matmul_lhs_realloc): Correct
1176 allocation size for case A1B2.
1178 2017-05-25 Thomas Koenig <tkoenig@gcc.gnu.org>
1180 * dump-parse-tree.c (show_expr): Also replace
1181 with dumpfile for showing values for forgotten
1184 2017-05-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1186 * dump-parse-tree.c (show_expr): Replace stdout
1187 with dumpfile for showing values.
1189 2017-05-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1192 * frontend-passes.c (matrix_case): Add A2TB2.
1193 (inline_limit_check): Handle MATMUL(TRANSPOSE(A),B)
1194 (inline_matmul_assign): Likewise.
1196 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1198 * openmp.c (OACC_KERNELS_CLAUSES): Add "OMP_CLAUSE_NUM_GANGS",
1199 "OMP_CLAUSE_NUM_WORKERS", "OMP_CLAUSE_VECTOR_LENGTH".
1201 2017-05-22 Janus Weil <janus@gcc.gnu.org>
1204 * resolve.c (resolve_fl_derived): Make sure that vtype symbols are
1207 2017-05-19 Paul Thomas <pault@gcc.gnu.org>
1210 * trans-io.c (nml_get_addr_expr): If we are dealing with class
1211 type data set tmp tree to get that address.
1212 (transfer_namelist_element): Set the array spec to point to the
1215 2017-05-19 David Malcolm <dmalcolm@redhat.com>
1218 * bbt.c (insert): Remove trailing exclamation mark from message.
1219 * decl.c (gfc_match_final_decl): Likewise.
1220 * dump-parse-tree.c (show_expr): Likewise.
1221 * module.c (gfc_use_module): Likewise.
1222 * primary.c (build_actual_constructor): Likewise.
1223 (gfc_convert_to_structure_constructor): Likewise.
1225 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1227 * gfortran.h (enum gfc_omp_default_sharing): Add
1228 "OMP_DEFAULT_PRESENT".
1229 * dump-parse-tree.c (show_omp_clauses): Handle it.
1230 * openmp.c (gfc_match_omp_clauses): Likewise.
1231 * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
1233 2017-05-18 Fritz Reese <fritzoreese@gmail.com>
1236 * decl.c (match_attr_spec, gfc_match_automatic,
1237 gfc_match_static, gfc_match_structure_decl): Unify diagnostic
1238 errors regarding -fdec options.
1239 * io.c (match_dec_etag, match_dec_vtag, match_dec_ftag): Ditto.
1241 2017-05-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1244 * trans-io.c (transfer_namelist_element): Change check from
1245 NULL_TREE to null_pointer_node.
1247 2017-05-17 Fritz Reese <fritzoreese@gmail.com>
1250 * expr.c (component_initializer): Don't generate initializers for
1252 * invoke.texi (-finit-derived): Document.
1254 2017-05-16 Paul Thomas <pault@gcc.gnu.org>
1257 * decl.c (build_sym): In a submodule allow overriding of host
1258 associated symbols from the ancestor module with a new
1261 2017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>
1264 * trans-stmt.c (gfc_trans_integer_select): Remove redundant condition.
1266 2017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>
1269 * expr.c (gfc_generate_initializer): If type conversion fails,
1270 check for error and return NULL.
1272 2017-05-14 Nicolas Koenig <koenigni@student.ethz.ch>
1275 * array.c (gfc_ref_dimen_size): Simplify stride
1277 * data.c (gfc_advance_section): Simplify start,
1278 end and stride expressions
1279 (gfc_advance_section): Simplify start and end
1281 (gfc_get_section_index): Simplify start expression
1283 2017-05-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1285 * io.c (gfc_resolve_dt): Fix returns to bool type.
1287 2017-05-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1290 * io.c (dtio_procs_present): Add new function to check for DTIO
1291 procedures relative to I/O statement READ or WRITE.
1292 (gfc_resolve_dt): Add namelist checks using the new function.
1293 * resolve.c (dtio_procs_present): Remove function and related
1294 namelist checks. (resolve_fl_namelist): Add check specific to
1295 Fortran 95 restriction on namelist objects.
1297 2017-05-11 Nathan Sidwell <nathan@acm.org>
1299 * trans-decl.c: Include dumpfile.h not tree-dump.h,
1301 2017-05-09 Janus Weil <janus@gcc.gnu.org>
1304 * resolve.c (gfc_resolve_finalizers): Ensure that derived-type
1305 components have a their finalizers resolved, also if the superordinate
1306 type itself has a finalizer.
1308 2017-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
1311 * frontend-passes.c (matmul_to_var_expr): New function,
1313 (matmul_to_var_code): Likewise.
1314 (optimize_namespace): Use them from gfc_code_walker.
1316 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1318 * cpp.c (cb_cpp_error): Replace report_diagnostic
1319 with diagnostic_report_diagnostic.
1320 * error.c (gfc_warning): Likewise.
1321 (gfc_warning_now_at): Likewise.
1322 (gfc_warning_now): Likewise.
1323 (gfc_warning_internal): Likewise.
1324 (gfc_error_now): Likewise.
1325 (gfc_fatal_error): Likewise.
1326 (gfc_error_opt): Likewise.
1327 (gfc_internal_error): Likewise.
1329 2017-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1332 * frontend-passes.c (inline_matmul_assign): Also check bounds
1333 for allocatable lhs and matrix-vector-multiplication.
1335 2017-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1338 * io.c (format_lex): Check for '/' and set token to FMT_SLASH.
1339 (check_format): Move FMT_DT checking code to data_desc section.
1340 * module.c (gfc_match_use): Include the case of INTERFACE_DTIO.
1342 2017-04-22 Janus Weil <janus@gcc.gnu.org>
1345 * trans-types.c (gfc_conv_procedure_call): Deallocate the components
1346 of allocatable intent(out) arguments.
1348 2017-04-21 Janus Weil <janus@gcc.gnu.org>
1351 * trans-types.c (gfc_get_derived_type): Prevent an infinite loop when
1352 building a derived type that includes a procedure pointer component
1353 with a polymorphic result.
1355 2017-04-17 Paul Thomas <pault@gcc.gnu.org>
1358 * module.c (find_symtree_for_symbol): Delete.
1359 (read_module): Remove the call to the above.
1361 2017-04-14 Janus Weil <janus@gcc.gnu.org>
1364 * class.c (generate_finalization_wrapper): Give the finalization wrapper
1365 the recursive attribute.
1367 2017-04-10 Nicolas Koenig <koenigni@student.ethz.ch>
1368 Paul Thomas <pault@gcc.gnu.org>
1371 * module.c (gfc_match_submodule): Add error
1372 if function is called in the wrong state.
1374 2017-04-10 Janus Weil <janus@gcc.gnu.org>
1377 * expr.c (gfc_check_pointer_assign): Check if procedure pointer
1378 components in a pointer assignment need an explicit interface.
1380 2017-03-18 Nicolas Koenig <koenigni@student.ethz.ch>
1383 * symbol.c (gfc_delete_symtree): If there is a period in the name, ignore
1384 everything before it.
1386 2017-03-28 Janus Weil <janus@gcc.gnu.org>
1389 * trans-io.c (transfer_namelist_element): Perform a polymorphic call
1390 to a DTIO procedure if necessary.
1392 2017-03-25 Paul Thomas <pault@gcc.gnu.org>
1396 * decl.c (access_attr_decl): Remove the error for an absent
1397 generic DTIO interface and ensure that symbol has the flavor
1400 2017-03-22 Dominique d'Humieres <dominiq@lps.ens.fr>
1403 * module.c: Remove trailing period.
1405 2017-03-22 Dominique d'Humieres <dominiq@lps.ens.fr>
1408 * decl.c: Replace '%s' with %qs.
1410 * interface.c: Likewise.
1411 * match.c: Likewise.
1412 * primary.c: Likewise.
1413 * resolve.c: Likewise.
1417 * io.c: Remove trailing spaces.
1418 * match.c: Likewise.
1419 * openmp.c: Likewise.
1420 * resolve.c: Likewise.
1421 * trans-intrinsic.c: Likewise.
1424 * expr.c: Remove a double spaces.
1427 * primary.c: Remove spurious quotes around %qs.
1429 2017-03-22 Thomas Koenig <tkoenig@gcc.gnu.org>
1432 * frontend-passes.c (combine_array_constructor): Take
1433 location of new expression from constructor expression instead
1436 2017-03-20 Nicolas Koenig <koenigni@student.ethz.ch>
1439 * symbol.c (check_conflict): Report an error if an EQUIVALENCE
1442 2017-03-18 Nicolas Koenig <koenigni@student.ethz.ch>
1445 * decl.c (add_hidden_procptr_result): Fixed Refs count of the
1446 created "ppr@" symbol.
1448 2017-03-18 Paul Thomas <pault@gcc.gnu.org>
1451 * module.c (mio_symbol_attribute): Remove reset of the flag
1452 'no_module_procedures'.
1453 (check_for_module_procedures): New function. Move declaration
1454 of 'no_module_procedures' to above it.
1455 (gfc_dump_module): Traverse namespace calling new function.
1457 2017-03-18 Paul Thomas <pault@gcc.gnu.org>
1460 * symbol.c (check_conflict): A dummy procedure in a submodule,
1461 module procedure is not an error.
1462 (gfc_add_flavor): Ditto.
1464 2017-03-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1467 * openmp.c (check_symbol_not_pointer): Adjust diagnostics.
1469 2017-03-16 Jakub Jelinek <jakub@redhat.com>
1472 * parse.c (gfc_ascii_statement): Use !$ACC for ST_OACC_ATOMIC
1473 and ST_OACC_END_ATOMIC, instead of !ACC.
1474 * trans-decl.c (finish_oacc_declare): Use !$ACC instead of $!ACC.
1475 * openmp.c (gfc_match_oacc_declare, gfc_match_oacc_wait,
1476 gfc_resolve_oacc_declare): Likewise.
1479 * error.c (gfc_format_decoder): Rename plus argument to set_locus,
1480 remove ATTRIBUTE_UNUSED from all arguments, call default_tree_printer
1481 if not a Fortran specific spec.
1482 * trans-io.c: Include options.h.
1483 (gfc_build_st_parameter): Temporarily disable -Wpadded around layout
1484 of artificial IO data structures.
1486 2017-03-15 David Malcolm <dmalcolm@redhat.com>
1489 * resolve.c (resolve_contained_fntype): Make error messages more
1490 amenable to translation.
1492 2017-03-06 Richard Biener <rguenther@suse.de>
1495 * trans.c (gfc_add_modify_loc): Weaken assert.
1497 2017-03-05 Andre Vehreschild <vehre@gcc.gnu.org>,
1498 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
1500 * check.c (positive_check): Add new function checking constant for
1501 being greater then zero.
1502 (gfc_check_image_status): Add checking of image_status arguments.
1503 (gfc_check_failed_or_stopped_images): Same but for failed_- and
1504 stopped_images function.
1505 * dump-parse-tree.c (show_code_node): Added output of FAIL IMAGE.
1506 * gfortran.h (enum gfc_statement): Added FAIL_IMAGE_ST.
1507 (enum gfc_isym_id): Added new intrinsic symbols.
1508 (enum gfc_exec_op): Added EXEC_FAIL_IMAGE.
1509 * gfortran.texi: Added description for the new API functions. Updated
1510 coverage of gfortran of TS18508.
1511 * intrinsic.c (add_functions): Added symbols to resolve new intrinsic
1513 * intrinsic.h: Added prototypes.
1514 * iresolve.c (gfc_resolve_failed_images): Resolve the failed_images
1516 (gfc_resolve_image_status): Same for image_status.
1517 (gfc_resolve_stopped_images): Same for stopped_images.
1518 * libgfortran.h: Added prototypes.
1519 * match.c (gfc_match_if): Added matching of FAIL IMAGE statement.
1520 (gfc_match_fail_image): Match a FAIL IMAGE statement.
1521 * match.h: Added prototype.
1522 * parse.c (decode_statement): Added matching for FAIL IMAGE.
1523 (next_statement): Same.
1524 (gfc_ascii_statement): Same.
1526 * simplify.c (gfc_simplify_failed_or_stopped_images): For COARRAY=
1527 single a constant result can be returne.d
1528 (gfc_simplify_image_status): For COARRAY=single the result is constant.
1529 * st.c (gfc_free_statement): Added FAIL_IMAGE handling.
1530 * trans-decl.c (gfc_build_builtin_function_decls): Added decls of the
1532 * trans-expr.c (gfc_conv_procedure_call): This is first time all
1533 arguments of a function are optional, which is now handled here
1535 * trans-intrinsic.c (conv_intrinsic_image_status): Translate
1537 (gfc_conv_intrinsic_function): Add support for image_status.
1538 (gfc_is_intrinsic_libcall): Add support for the remaining new
1540 * trans-stmt.c (gfc_trans_fail_image): Trans a fail image.
1541 * trans-stmt.h: Add the prototype for the above.
1542 * trans.c (trans_code): Dispatch for fail_image.
1543 * trans.h: Add the trees for the new intrinsics.
1545 2017-03-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1548 * openmp.c (check_symbol_not_pointer): Adjust diagnostic.
1550 2017-02-28 Paul Thomas <pault@gcc.gnu.org>
1553 * resolve.c (resolve_fl_procedure): Deal with the case where
1554 'submodule_name' is NULL so that gfc_error does not ICE.
1555 Reformat the error message to make it more consistent.
1557 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1559 * parse.c (parse_critical_block): Use cond ? G_("...") : G_("...")
1560 instead of just cond ? "..." : "...".
1561 * scanner.c (gfc_next_char_literal): Likewise.
1562 * match.c (match_exit_cycle): Likewise.
1564 2017-02-26 Thomas Koenig <tkoenig@gcc.gnu.org>
1567 * options.c (gfc_post_options): Set default limit for matmul
1569 * invoke.texi: Document change.
1571 2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
1574 * interface.c (check_dtio_arg_TKR_intent): Change 'intent'
1577 2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
1580 * interface.c (gfc_match_end_interface): Remove spurious comma
1581 and space, replace 'got %s' with 'got %qs'.
1583 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1586 * interface.c (check_dtio_arg_TKR_intent): Supply 'must'
1587 missing from error message.
1589 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1592 * interface.c (gfc_find_typebound_dtio_proc): Guard test for
1593 flavor attribute by checking that symbol is resolved.
1595 2017-02-16 Paul Thomas <pault@gcc.gnu.org>
1598 * decl.c (access_attr_decl): Test for presence of generic DTIO
1599 interface and emit error if not present.
1601 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1604 * parse.c (check_component, parse_union): Whitespace.
1605 (set_syms_host_assoc): For a derived type, check if the module
1606 in which it was declared is one of the submodule ancestors. If
1607 it is, make the components public. Otherwise, reset attribute
1608 'host_assoc' and set 'use-assoc' so that encapsulation is
1611 2017-02-19 Paul Thomas <pault@gcc.gnu.org>
1614 * decl.c (gfc_set_constant_character_len): Whitespace.
1615 (gfc_match_end): Catch case where a procedure is contained in
1616 a module procedure and ensure that 'end procedure' is the
1617 correct termination.
1619 2017-02-19 Paul Thomas <pault@gcc.gnu.org>
1622 * resolve.c (fixup_unique_dummy): New function.
1623 (gfc_resolve_expr): Call it for dummy variables with a unique
1626 2017-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
1629 * trans-expr.c (gfc_trans_assignment_1): Deref indirect refs when
1630 compiling with -fcheck=mem to check the pointer and not the data.
1632 2017-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
1635 * trans-array.c (duplicate_allocatable_coarray): Ensure attributes
1636 passed are properly initialized.
1637 (structure_alloc_comps): Same.
1638 * trans-expr.c (gfc_trans_structure_assign): Same.
1640 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1642 * trans-expr.c (gfc_conv_substring): Add missing space in diagnostics.
1644 2017-02-12 Thomas Koenig <tkoenig@gcc.gnu.org>
1647 * intrinsic.c (gfc_intrinsic_func_interface): Return an error
1648 for -std=f95 for disallowed transformational functions in
1649 initialization expressions.
1651 2017-02-09 Cesar Philippidis <cesar@codesourcery.com>
1652 Joseph Myers <joseph@codesourcery.com>
1654 * openmp.c (resolve_omp_clauses): Error on directives
1655 containing both tile and collapse clauses.
1656 (resolve_oacc_loop_blocks): Represent '*' tile arguments as zero.
1657 * trans-openmp.c (gfc_trans_omp_do): Lower tiled loops like
1660 2017-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
1662 * trans-types.c (gfc_get_int_kind_from_width_isofortranen): Choose
1663 REAL type with the widest precision if two (or more) have the same
1666 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1669 * trans-stmt.c (gfc_trans_allocate): Only deallocate the components of
1670 the temporary, when a new object was created for the temporary. Not
1671 when it is just an alias to an existing object.
1673 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1676 * trans-decl.c (generate_coarray_sym_init): Retrieve the symbol's
1677 attributes before using them.
1679 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1682 * trans-stmt.c (gfc_trans_allocate): Add the multiplying the _len
1683 component of unlimited polymorphic objects when source-allocating.
1685 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1688 * trans-array.c (structure_alloc_comps): Ignore pointer components when
1691 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1694 * f95-lang.c (gfc_create_decls): Include stringpool.h.
1695 Pass main_input_filename to build_translation_unit_decl.
1697 2017-01-23 Thomas Koenig <tkoenig@netcologne.de>
1699 * arith.c (arith_power): If simplifying integer power expression
1700 to zero, warn if -Winteger-division is given.
1702 2017-01-22 Jakub Jelinek <jakub@redhat.com>
1705 * parse.c (matchs, matcho, matchds, matchdo): Replace return st;
1706 with { ret = st; goto finish; }.
1707 (decode_omp_directive): Allow declare simd, declare target and
1708 simd directives in PURE/ELEMENTAL procedures. Only call
1709 gfc_unset_implicit_pure on successful match of other procedures.
1711 2017-01-21 Gerald Pfeifer <gerald@pfeifer.com>
1713 * gfc-internals.texi (Symbol Versioning): Change references
1714 to www.akkadia.org to https.
1716 2017-01-21 Jakub Jelinek <jakub@redhat.com>
1718 * gfortran.h (gfc_extract_int): Change return type to bool. Add
1719 int argument with = 0.
1720 * decl.c (gfc_match_kind_spec): Adjust gfc_extract_int caller, pass
1721 1 as new last argument to it, don't emit gfc_error.
1722 (match_char_kind): Likewise.
1723 (gfc_match_decl_type_spec): Use gfc_get_string ("%s", x) instead of
1725 (gfc_match_derived_decl, match_binding_attributes): Likewise.
1726 (gfc_match_structure_decl): Don't sprintf back to name, call
1727 get_struct_decl directly with gfc_dt_upper_string (name) result.
1728 * trans-stmt.c (gfc_trans_allocate): Use gfc_get_string ("%s", x)
1729 instead of gfc_get_string (x).
1730 * module.c (gfc_dt_lower_string, gfc_dt_upper_string,
1731 gfc_match_use, gfc_match_submodule, find_true_name, mio_pool_string,
1732 mio_symtree_ref, mio_expr, mio_omp_udr_expr, load_generic_interfaces,
1733 load_omp_udrs, load_needed, read_module, dump_module,
1734 create_intrinsic_function, import_iso_c_binding_module,
1735 create_int_parameter, create_int_parameter_array, create_derived_type,
1736 use_iso_fortran_env_module): Likewise.
1737 * error.c (gfc_diagnostic_starter, gfc_diagnostic_start_span): Use
1738 pp_verbatim (context->printer, "%s", x) instead of
1739 pp_verbatim (context->printer, x).
1740 * match.c (gfc_match_small_int): Adjust gfc_extract_int caller, pass
1741 1 as new last argument to it, don't emit gfc_error.
1742 (gfc_match_small_int_expr): Likewise.
1743 * iresolve.c (gfc_get_string): Optimize format "%s" case.
1744 (resolve_bound): Use gfc_get_string ("%s", x) instead of
1746 (resolve_transformational): Formatting fix.
1747 (gfc_resolve_char_achar): Change name argument to bool is_achar,
1748 use a single format string and if is_achar add "a" before "char".
1749 (gfc_resolve_achar, gfc_resolve_char): Adjust callers.
1750 * expr.c (gfc_extract_int): Change return type to bool, return true
1751 if some error occurred. Add REPORT_ERROR argument, if non-zero
1752 call either gfc_error or gfc_error_now depending on its sign.
1753 * arith.c (arith_power): Adjust gfc_extract_int caller.
1754 * symbol.c (gfc_add_component): Use gfc_get_string ("%s", x) instead
1755 of gfc_get_string (x).
1756 (gfc_new_symtree, gfc_delete_symtree, gfc_get_uop, gfc_new_symbol,
1757 gfc_get_gsymbol, generate_isocbinding_symbol): Likewise.
1758 * openmp.c (gfc_match_omp_clauses): Adjust gfc_extract_int caller, pass
1759 -1 as new last argument to it, don't emit gfc_error_now.
1760 (gfc_match_omp_declare_reduction): Use gfc_get_string ("%s", x)
1761 instead of gfc_get_string (x).
1762 * check.c (kind_check): Adjust gfc_extract_int caller.
1763 * intrinsic.c (add_sym, find_sym, make_alias): Use
1764 gfc_get_string ("%s", x) instead of gfc_get_string (x).
1765 * simplify.c (get_kind, gfc_simplify_btest, gfc_simplify_maskr,
1766 gfc_simplify_maskl, gfc_simplify_poppar, gfc_simplify_repeat,
1767 gfc_simplify_selected_int_kind, gfc_simplify_selected_real_kind):
1768 Adjust gfc_extract_int callers.
1769 * trans-decl.c (gfc_find_module): Use gfc_get_string ("%s", x)
1770 instead of gfc_get_string (x).
1771 * matchexp.c (expression_syntax): Add const.
1772 * primary.c (match_kind_param, match_hollerith_constant,
1773 match_string_constant): Adjust gfc_extract_int callers.
1774 (match_keyword_arg): Use gfc_get_string ("%s", x) instead of
1776 * frontend-passes.c (optimize_minmaxloc): Likewise.
1778 2017-01-19 Andre Vehreschild <vehre@gcc.gnu.org>
1781 * trans-decl.c (gfc_build_qualified_array): Add static decl to parent
1782 function only, when the decl-context is not the translation unit.
1784 2017-01-18 Louis Krupp <louis.krupp@zoho.com>
1788 * trans-expr.c (gfc_conv_variable): Don't treat temporary variables
1789 as function arguments.
1790 * trans-stmt.c (forall_make_variable_temp,
1791 generate_loop_for_temp_to_lhs, gfc_trans_assign_need_temp,
1792 gfc_trans_forall_1): Don't adjust offset of forall temporary
1793 for array sections, make forall temporaries work for substring
1794 expressions, improve test coverage by adding -ftest-forall-temp
1795 option to request usage of temporary array in forall code.
1796 * lang.opt: Add -ftest-forall-temp option.
1797 * invoke.texi: Add -ftest-forall-temp option.
1799 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
1801 * primary.c (caf_variable_attr): Improve figuring whether the current
1802 component is the last one refed.
1803 * trans-stmt.c (gfc_trans_allocate): Do not generate sync_all calls
1804 when allocating pointer or allocatable components.
1806 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
1808 * gfortran.texi: Add missing parameters to caf-API functions. Correct
1809 typos and clarify some descriptions.
1811 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
1814 Missed some cases, here they are:
1815 * trans-decl.c (gfc_build_qualified_array): Add static tokens to the
1816 parent function's scope.
1817 * trans-expr.c (gfc_get_tree_for_caf_expr): Shorten code. Remove
1820 2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org>
1823 * resolve.c (resolve_lock_unlock_event): Resolve the expression for
1824 event's until_count.
1826 2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org>
1829 * trans-expr.c (gfc_get_tree_for_caf_expr): Ensure the backend_decl
1830 is valid before accessing it.
1832 2017-01-09 Jakub Jelinek <jakub@redhat.com>
1834 PR translation/79019
1835 PR translation/79020
1836 * decl.c (attr_decl1): Fix spelling in translatable string.
1837 * intrinsic.texi: Fix spelling - invokation -> invocation.
1838 * lang.opt (faggressive-function-elimination, gfc_convert): Fix
1839 typos in descriptions.
1840 * openmp.c (resolve_omp_clauses): Add missing whitespace to
1841 translatable strings.
1843 2017-01-08 Martin Sebor <msebor@redhat.com>
1845 PR tree-optimization/78913
1847 * trans-common.c (build_equiv_decl): Increase buffer size to avoid
1848 truncation for any argument.
1849 * trans-types.c (gfc_build_logical_type): Same.
1851 2017-01-07 Andre Vehreschild <vehre@gcc.gnu.org>
1855 * expr.c (gfc_check_pointer_assign): Return the same error message for
1856 rewritten coarray pointer assignments like for plain ones.
1857 * gfortran.h: Change prototype.
1858 * primary.c (caf_variable_attr): Set attributes used ones only only
1859 ones. Add setting of pointer_comp attribute.
1860 (gfc_caf_attr): Add setting of pointer_comp attribute.
1861 * trans-array.c (gfc_array_allocate): Add flag that the component to
1862 allocate is not an ultimate coarray component. Add allocation of
1864 (structure_alloc_comps): Extend nullify to treat pointer components in
1865 coarrays correctly. Restructure nullify to remove redundant code.
1866 (gfc_nullify_alloc_comp): Allow setting caf_mode flags.
1867 * trans-array.h: Change prototype of gfc_nullify_alloc_comp ().
1868 * trans-decl.c (generate_coarray_sym_init): Call nullify_alloc_comp for
1869 derived type coarrays with pointer components.
1870 * trans-expr.c (gfc_trans_structure_assign): Also treat pointer
1872 (trans_caf_token_assign): Handle assignment of token of scalar pointer
1874 (gfc_trans_pointer_assignment): Call above routine.
1875 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Add treating pointer
1877 (gfc_conv_intrinsic_caf_get): Likewise.
1878 (conv_caf_send): Likewise.
1879 * trans-stmt.c (gfc_trans_allocate): After allocating a derived type in
1880 a coarray pre-register the tokens.
1881 (gfc_trans_deallocate): Simply determining the coarray type (scalar or
1882 array) and deregistering it correctly.
1883 * trans-types.c (gfc_typenode_for_spec): Replace in_coarray flag by the
1884 actual codim to allow lookup of array types in the cache.
1885 (gfc_build_array_type): Likewise.
1886 (gfc_get_array_descriptor_base): Likewise.
1887 (gfc_get_array_type_bounds): Likewise.
1888 (gfc_get_derived_type): Likewise.
1889 * trans-types.h: Likewise.
1890 * trans.c (gfc_deallocate_with_status): Enable deregistering of all kind
1891 of coarray components.
1892 (gfc_deallocate_scalar_with_status): Use free() in fcoarray_single mode
1893 instead of caf_deregister.
1895 2017-01-06 Jakub Jelinek <jakub@redhat.com>
1897 * simplify.c (simplify_transformation_to_array): Use
1898 GCC_DIAGNOSTIC_PUSH_IGNORED and GCC_DIAGNOSTIC_POP instead of
1899 #pragma GCC diagnostic {push,ignored,pop}.
1901 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
1903 * simplify.c (simplify_transformation_to_array): Silence
1904 array bounds warning. Fix whitespace.
1906 2017-01-04 Alexandre Oliva <aoliva@redhat.com>
1908 * module.c (load_omp_udrs): Initialize name.
1910 2017-01-02 Janne Blomqvist <jb@gcc.gnu.org>
1913 * trans-expr.c (gfc_trans_string_copy): Rework string copy
1914 algorithm to avoid -Wstringop-overflow warning.
1916 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1918 Update copyright years.
1920 * gfortranspec.c (lang_specific_driver): Update copyright notice
1922 * gfc-internals.texi: Bump @copying's copyright year.
1923 * gfortran.texi: Ditto.
1924 * intrinsic.texi: Ditto.
1925 * invoke.texi: Ditto.
1927 Copyright (C) 2017 Free Software Foundation, Inc.
1929 Copying and distribution of this file, with or without modification,
1930 are permitted in any medium without royalty provided the copyright
1931 notice and this notice are preserved.