1 2017-10-13 Paul Thomas <pault@gcc.gnu.org>
4 * resolve.c (resolve_symbol): Ensure that derived type array
5 results get default initialization.
7 2017-10-11 Nathan Sidwell <nathan@acm.org>
9 * cpp.c (gfc_cpp_add_include_path): Update incpath_e names.
10 (gfc_cpp_add_include_path_after): Likewise.
12 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
14 * target-memory.c (gfc_interpret_logical): Use wi::to_wide when
15 operating on trees as wide_ints.
16 * trans-const.c (gfc_conv_tree_to_mpz): Likewise.
17 * trans-expr.c (gfc_conv_cst_int_power): Likewise.
18 * trans-intrinsic.c (trans_this_image): Likewise.
19 (gfc_conv_intrinsic_bound): Likewise.
20 (conv_intrinsic_cobound): Likewise.
22 2017-10-08 Steven G. Kargl <kargl@gcc.gnu.org>
24 * check.c (gfc_check_x): Remove function.
25 * intrinsic.c (add_functions): Use gfc_check_fn_r.
27 2017-10-08 Paul Thomas <pault@gcc.gnu.org>
30 * module.c : Bump up MOD_VERSION to 15.
31 (mio_component): Edit comment about PDT specification list.
32 (mio_expr, mio_symbol): Include the expression and symbol PDT
33 specification lists in the same way as in mio_component.
35 2017-10-08 Thomas Koenig <tkoenig@gcc.gnu.org>
37 * dump_prase_tree (show_symbol): Output list of variables in
39 (show_code_node): Add new line for ELSE and END DO for DO
41 * invoke.texi: Document that the output of
42 -fdump-fortran-original, -fdump-fortran-optimized and
43 -fdump-parse-tree is unsable and may lead to ICEs.
45 2017-10-07 Paul Thomas <pault@gcc.gnu.org>
48 * class.c (gfc_find_derived_vtab): Return NULL for a passed
49 pdt template to prevent bad procedures from being written.
50 * decl.c (gfc_get_pdt_instance): Do not use the default
51 initializer for pointer and allocatable pdt type components. If
52 the component is allocatbale, set the 'alloc_comp' attribute of
54 * module.c : Add a prototype for 'mio_actual_arglist'. Add a
55 boolean argument 'pdt'.
56 (mio_component): Call it for the parameter list of pdt type
57 components with 'pdt' set to true.
58 (mio_actual_arg): Add the boolean 'pdt' and, if it is set, call
59 mio_integer for the 'spec_type'.
60 (mio_actual_arglist): Add the boolean 'pdt' and use it in the
61 call to mio_actual_arg.
62 (mio_expr, mio_omp_udr_expr): Call mio_actual_arglist with
64 * resolve.c (get_pdt_spec_expr): Add the parameter name to the
66 (get_pdt_constructor): Check that cons->expr is non-null.
67 * trans-array.c (structure_alloc_comps): For deallocation of
68 allocatable components, ensure that parameterized components
69 are deallocated first. Likewise, when parameterized components
70 are allocated, nullify allocatable components first. Do not
71 recurse into pointer or allocatable pdt components while
72 allocating or deallocating parameterized components. Test that
73 parameterized arrays or strings are allocated before freeing
75 (gfc_trans_pointer_assignment): Call the new function. Tidy up
76 a minor whitespace issue.
77 trans-decl.c (gfc_trans_deferred_vars): Set 'tmp' to NULL_TREE
78 to prevent the expression from being used a second time.
80 2017-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
83 * expr.c (gfc_check_pointer_assign): Error
84 for non-contiguous rhs.
86 2017-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
88 * gfortran.h (async_io_dt): Add external reference.
89 * io.c (async_io_dt): Add variable.
90 (compare_to_allowed_values): Add prototyte. Add optional argument
91 num. If present, set it to the number of the entry that was
93 (check_io_constraints): If this is for an asynchronous I/O
94 statement, set async_io_dt and set the asynchronous flag for
96 * resolve.c (resolve_transfer): If async_io_dt is set, set
97 the asynchronous flag on the variable.
98 (resolve_fl_namelist): If async_io_dt is set, set the asynchronous
99 flag on all elements of the namelist.
101 2017-10-04 Paul Thomas <pault@gcc.gnu.org>
105 * resolve.c (resolve_assoc_var): Deferred character type
106 associate names must not receive an integer conatant length.
107 * symbol.c (gfc_is_associate_pointer): Deferred character
108 length functions also require an associate pointer.
109 * trans-decl.c (gfc_get_symbol_decl): Deferred character
110 length functions or derived type components require the assoc
111 name to have variable string length.
112 * trans-stmt.c (trans_associate_var): Set the string length of
113 deferred string length associate names. The address expression
114 is not needed for allocatable, pointer or dummy targets. Change
115 the comment about defered string length targets.
117 2017-10-03 Thomas Koenig <tkoenig@gcc.gnu.org>
119 * io.c (match_wait_element): Correctly match END and EOR tags.
120 * dump-parse-tree.c (show_code_node): Handle EXEC_WAIT.
122 2017-10-02 Paul Thomas <pault@gcc.gnu.org>
125 * resolve.c (gfc_resolve_code): Simplify condition for class
126 pointer assignments becoming regular assignments by asserting
127 that only class valued targets are permitted.
128 * trans-expr.c (trans_class_pointer_fcn): New function using a
129 block of code from gfc_trans_pointer_assignment.
130 (gfc_trans_pointer_assignment): Call the new function. Tidy up
131 a minor whitespace issue.
133 2017-10-01 Dominique d'Humieres <dominiq@lps.ens.fr>
136 * parse.c (gfc_global_used): Replace the gfc_internal_error
139 2017-09-29 Dominique d'Humieres <dominiq@lps.ens.fr>
142 * interface.c (compare_actual_formal): Change warnings to errors
143 when "Actual argument contains too few elements for dummy
144 argument", unless -std=legacy is used.
146 2017-09-27 Thomas Schwinge <thomas@codesourcery.com>
148 * lang.opt <Wdo-subscript>: End help text with a period.
150 2017-09-26 Thomas Koenig <tkoenig@gcc.gnu.org>
152 * frontend-passes.c (do_subscript): Don't do anything
153 if inside an associate list.
155 2017-09-25 Thomas Koenig <tkoenig@gcc.gnu.org>
157 * lang.opt: Add -Wdo-subscript.
158 * frontend-passes.c (do_t): New type.
159 (doloop_list): Use variable of do_type.
160 (if_level): Variable to track if levels.
161 (select_level): Variable to track select levels.
162 (gfc_run_passes): Initialize i_level and select_level.
163 (doloop_code): Record current level of if + select
164 level in doloop_list. Add seen_goto if there could
165 be a branch outside the loop. Use different type for
167 (doloop_function): Call do_intent and do_subscript; move
168 functionality of checking INTENT to do_intent.
169 (insert_index_t): New type, for callback_insert_index.
170 (callback_insert_index): New function.
171 (insert_index): New function.
172 (do_subscript): New function.
173 (do_intent): New function.
174 (gfc_code_walker): Keep track of if_level and select_level.
175 * invoke.texi: Document -Wdo-subscript.
177 2017-09-25 Janne Blomqvist <jb@gcc.gnu.org>
179 * trans.c (gfc_unlikely): Remove unnecessary fold_convert.
180 (gfc_likely): Likewise.
182 2017-09-24 Thomas Koenig <tkoenig@gcc.gnu.org>
183 Steven G. Kargl <kargl@gcc.gnu.org>
186 * expr.c (gfc_get_full_arrayspec_from_expr): If there is
187 no symtree, set array spec to NULL.
189 2017-09-23 Janus Weil <janus@gcc.gnu.org>
192 * lang.opt: Add the options -fdefault-real-10 and -fdefault-real-16.
193 Rename flag_default_real to flag_default_real_8.
194 * invoke.texi: Add documentation.
195 * module.c (use_iso_fortran_env_module): flag_default_real is renamed.
196 * trans-types.c (gfc_init_kinds): Implement the flags
197 -fdefault-real-10 and -fdefault-real-16. Make -fdefault-double-8 work
198 without -fdefault-real-8.
200 2017-09-21 Paul Thomas <pault@gcc.gnu.org>
203 * match.c (gfc_match_associate): Before failing the association
204 try again, allowing a proc pointer selector.
209 * primary.c (gfc_match_varspec): Introduce 'tgt_expr', which
210 points to the associate selector, if any. Go through selector
211 references, after resolution for variables, to catch any full
212 or section array references. If a class associate name does
213 not have the same declared type as the selector, resolve the
214 selector and copy the declared type to the associate name.
215 Before throwing a no implicit type error, resolve all allowed
216 selector expressions, and copy the resulting typespec.
219 * resolve.c (resolve_assoc_var): Selector must cannot be the
220 NULL expression and it must have a type.
223 * resolve.c (resolve_symbol): Allow associate names to be
226 2017-09-21 Cesar Philippidis <cesar@codesourcery.com>
228 * openmp.c (gfc_match_oacc_wait): Don't restrict wait directive
229 arguments to constant integers.
231 2017-09-17 Paul Thomas <pault@gcc.gnu.org>
234 * decl.c (gfc_get_pdt_instance): Use the component initializer
235 expression for the default, rather than the parameter value.
236 * resolve.c (resolve_pdt): New function.
237 (resolve_symbol): Call it. Remove false error, prohibiting
238 deferred type parameters for dummy arguments.
241 * primary.c (gfc_match_varspec): If the type of an associate
242 name is unknown and yet there is a match, try resolving the
243 target expression and using its type.
245 2017-09-15 Paul Thomas <pault@gcc.gnu.org>
248 trans-decl.c (gfc_trans_deferred_vars): Do not null the 'span'
249 field if the symbol is either implicitly or explicitly saved.
251 2017-09-13 Paul Thomas <pault@gcc.gnu.org>
254 * decl.c (match_char_kind): If the kind expression is
255 parameterized, save it in saved_kind_expr and set kind = 0.
256 (gfc_get_pdt_instance): Resolve and simplify before emitting
257 error on expression kind. Insert a missing simplification after
258 insertion of kind expressions.
260 2017-09-12 Paul Thomas <pault@gcc.gnu.org>
264 * decl.c (variable_decl): Check pdt template components for
265 appearance of KIND/LEN components in the type parameter name
266 list, that components corresponding to type parameters have
267 either KIND or LEN attributes and that KIND or LEN components
268 are scalar. Copy the initializer to the parameter value.
269 (gfc_get_pdt_instance): Add a label 'error_return' and follow
270 it with repeated code, while replacing this code with a jump.
271 Check if a parameter appears as a component in the template.
272 Make sure that the parameter expressions are integer. Validate
274 (gfc_match_decl_type_spec): Search for pdt_types in the parent
275 namespace since they are instantiated in the template ns.
276 * expr.c (gfc_extract_int): Use a KIND parameter if it
277 appears as a component expression.
278 (gfc_check_init_expr): Allow expressions with the pdt_kind
280 *primary.c (gfc_match_actual_arglist): Make sure that the first
281 keyword argument is recognised when 'pdt' is set.
283 2017-09-10 Paul Thomas <pault@gcc.gnu.org>
291 * expr.c (is_subref_array): Add class pointer array dummies
292 to the list of expressions that return true.
293 * trans-array.c: Add SPAN_FIELD and update indices for
295 (gfc_conv_descriptor_span, gfc_conv_descriptor_span_get,
296 gfc_conv_descriptor_span_set, is_pointer_array,
297 get_array_span): New functions.
298 (gfc_get_descriptor_offsets_for_info): New function to preserve
299 API for access to descriptor fields for trans-types.c.
300 (gfc_conv_scalarized_array_ref): If the expression is a subref
301 array, make sure that info->descriptor is a descriptor type.
302 Otherwise, if info->descriptor is a pointer array, set 'decl'
303 and fix it if it is a component reference.
304 (build_array_ref): Simplify handling of class array refs by
305 passing the vptr to gfc_build_array_ref rather than generating
306 the pointer arithmetic in this function.
307 (gfc_conv_array_ref): As in gfc_conv_scalarized_array_ref, set
309 (gfc_array_allocate): Set the span field if this is a pointer
310 array. Use the expr3 element size if it is available, so that
311 the dynamic type element size is used.
312 (gfc_conv_expr_descriptor): Set the span field for pointer
314 * trans-array.h: Prototypes for gfc_conv_descriptor_span_get
315 gfc_conv_descriptor_span_set and
316 gfc_get_descriptor_offsets_for_info added.
317 trans-decl.c (gfc_get_symbol_decl): If a non-class pointer
318 array, mark the declaration as a GFC_DECL_PTR_ARRAY_P. Remove
319 the setting of GFC_DECL_SPAN.
320 (gfc_trans_deferred_vars): Set the span field to zero in thge
322 * trans-expr.c (gfc_conv_procedure_call): Do not use copy-in/
323 copy-out to pass subref expressions to a pointer dummy.
324 (gfc_trans_pointer_assignment): Remove code for setting of
325 GFC_DECL_SPAN. Set the 'span' field for non-class pointers to
326 class function results. Likewise for rank remap. In the case
327 that the target is not a whole array, use the target array ref
328 for remap and, since the 'start' indices are missing, set the
329 lbounds to one, as required by the standard.
330 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Pick up the
331 'token' offset from the field decl in the descriptor.
332 (conv_isocbinding_subroutine): Set the 'span' field.
333 * trans-io.c (gfc_trans_transfer): Always scalarize pointer
335 * trans-stmt.c (trans_associate_var): Set the 'span' field.
336 * trans-types.c (gfc_get_array_descriptor_base): Add the 'span'
337 field to the array descriptor.
338 (gfc_get_derived_type): Pointer array components are marked as
339 GFC_DECL_PTR_ARRAY_P.
340 (gfc_get_array_descr_info): Replaced API breaking code for
341 descriptor offset calling gfc_get_descriptor_offsets_for_info.
342 * trans.c (get_array_span): New function.
343 (gfc_build_array_ref): Simplify by calling get_array_span and
344 obtain 'span' if 'decl' or 'vptr' present.
345 * trans.h : Rename DECL_LANG_FLAG_6, GFC_DECL_SUBREF_ARRAY_P,
346 as GFC_DECL_PTR_ARRAY_P.
348 2017-09-09 Paul Thomas <pault@gcc.gnu.org>
350 * decl.c : Add decl_type_param_list, type_param_spec_list as
351 static variables to hold PDT spec lists.
352 (build_sym): Copy 'type_param_spec_list' to symbol spec_list.
353 (build_struct): Copy the 'saved_kind_expr' to the component
354 'kind_expr'. Check that KIND or LEN components appear in the
355 decl_type_param_list. These should appear as symbols in the
356 f2k_derived namespace. If the component is itself a PDT type,
357 copy the decl_type_param_list to the component param_list.
358 (gfc_match_kind_spec): If the KIND expression is parameterized
359 set KIND to zero and store the expression in 'saved_kind_expr'.
360 (insert_parameter_exprs): New function.
361 (gfc_insert_kind_parameter_exprs): New function.
362 (gfc_insert_parameter_exprs): New function.
363 (gfc_get_pdt_instance): New function.
364 (gfc_match_decl_type_spec): Match the decl_type_spec_list if it
365 is present. If it is, call 'gfc_get_pdt_instance' to obtain the
366 specific instance of the PDT.
367 (match_attr_spec): Match KIND and LEN attributes. Check for the
368 standard and for type/kind of the parameter. They are also not
369 allowed outside a derived type definition.
370 (gfc_match_data_decl): Null the decl_type_param_list and the
371 type_param_spec_list on entry and free them on exit.
372 (gfc_match_formal_arglist): If 'typeparam' is true, add the
373 formal symbol to the f2k_derived namespace.
374 (gfc_match_derived_decl): Register the decl_type_param_list
375 if this is a PDT. If this is a type extension, gather up all
376 the type parameters and put them in the right order.
377 *dump-parse-tree.c (show_attr): Signal PDT templates and the
378 parameter attributes.
379 (show_components): Output parameter atrributes and component
381 (show_symbol): Show variable parameter lists.
382 * expr.c (expr.c): Copy the expression parameter list.
383 (gfc_is_constant_expr): Pass on symbols representing PDT
385 (gfc_check_init_expr): Break on PDT KIND parameters and
386 PDT parameter expressions.
387 (gfc_check_assign): Assigning to KIND or LEN components is an
389 (derived_parameter_expr): New function.
390 (gfc_derived_parameter_expr): New function.
391 (gfc_spec_list_type): New function.
392 * gfortran.h : Add enum gfc_param_spec_type. Add the PDT attrs
393 to the structure symbol_attr. Add the 'kind_expr' and
394 'param_list' field to the gfc_component structure. Comment on
395 the reuse of the gfc_actual_arglist structure as storage for
396 type parameter spec lists. Add the new field 'spec_type' to
397 this structure. Add 'param_list' fields to gfc_symbol and
398 gfc_expr. Add prototypes for gfc_insert_kind_parameter_exprs,
399 gfc_insert_parameter_exprs, gfc_add_kind, gfc_add_len,
400 gfc_derived_parameter_expr and gfc_spec_list_type.
401 * interface.c (gfc_compare_derived_types): Treat PDTs in the
402 same way as sequence types.
403 * match.c : Add variable 'type_param_spec_list'.
404 (gfc_op2string, gfc_match_member_sep, gfc_match_label): Remove
406 (match_derived_type_spec): Match PDTs and find specific
408 (gfc_match_type_spec): Remove more trailing whitespace.
409 (gfc_match_allocate): Assumed or deferred parameters cannot
410 appear here. Copy the type parameter spec list to the expr for
411 the allocatable entity. Free 'type_param_spec_list'.
412 (gfc_match_common, gfc_match_namelist, gfc_match_module): Still
413 more trailing whitespace to remove.
414 (gfc_match_type_is): Allow PDT typespecs.
415 * match.h : Modify prototypes for gfc_match_formal_arglist and
416 gfc_match_actual_arglist.
417 * module.c (ab_attribute, mstring attr_bits): PDT attributes
419 (mio_symbol_attribute): PDT attributes handled.
420 (mio_component): Deal with 'kind_expr' field.
421 (mio_full_f2k_derived): For PDT templates, transfer the formal
422 namespace symroot to the f2k_derived namespace.
423 *primary.c (match_keyword_arg, gfc_match_actual_arglist): Add
424 modifications to handle PDT spec lists. These are flagged in
425 both cases by new boolean arguments, whose prototype defaults
427 (gfc_match_structure_constructor, match_variable): Remove yet
428 more trailing whitespace.
429 * resolve.c (get_pdt_spec_expr, get_pdt_constructor): New
431 (resolve_structure_cons): If the constructor is a PDT template,
432 call get_pdt_constructor to build it using the parameter lists
433 and then get the specific instance of the PDT.
434 (resolve_component): PDT strings need a hidden string length
435 component like deferred characters.
436 (resolve_symbol): Dummy PDTs cannot have deferred parameters.
437 * symbol.c (gfc_add_kind, gfc_add_len): New functions.
438 (free_components): Free 'kind_expr' and 'param_list' fields.
439 (gfc_free_symbol): Free the 'param_list' field.
440 (gfc_find_sym_tree): If the current state is a PDT template,
441 look for the symtree in the f2k_derived namspaces.
442 trans-array.c (structure_alloc_comps): Allocate and deallocate
443 PDTs. Check dummy arguments for compliance of LEN parameters.
444 Add the new functions to the preceeding enum.
445 (gfc_allocate_pdt_comp, gfc_deallocate_pdt_comp and
446 gfc_check_pdt_dummy): New functions calling above.
447 * trans-array.h : Add prototypes for these functions.
448 trans-decl.c (gfc_get_symbol_decl): Call gfc_defer_symbol_init
449 as appropriate for PDT symbols.
450 (gfc_trans_deferred_vars): Allocate/deallocate PDT entities as
451 they come into and out of scope. Exclude pdt_types from being
453 (gfc_trans_subcomponent_assign): PDT array components must be
454 handles as if they are allocatable.
455 * trans-stmt.c (gfc_trans_allocate): Handle initialization of
457 (gfc_trans_deallocate): Likewise.
458 * trans-types.c (gfc_get_derived_type): PDT templates must not
459 arrive here. PDT string components are handles as if deferred.
460 Similarly, PDT arrays are treated as if allocatable. PDT
461 strings are pointer types.
462 * trans.c (gfc_deferred_strlen): Handle PDT strings in the same
463 way as deferred characters.
465 2017-09-01 Jakub Jelinek <jakub@redhat.com>
468 * parse.c (decode_omp_directive): Use matchs instead of matcho for
469 end ordered and ordered directives, except for ordered depend. For
470 -fopenmp-simd and ordered depend, reject the stmt.
471 * trans-openmp.c (gfc_trans_omp_ordered): For -fopenmp-simd ignore
472 threads clause and if simd clause isn't present, just translate the
475 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
476 Alan Hayward <alan.hayward@arm.com>
477 David Sherwood <david.sherwood@arm.com>
479 * trans-types.c (gfc_init_kinds): Use opt_scalar_int_mode for
482 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
483 Alan Hayward <alan.hayward@arm.com>
484 David Sherwood <david.sherwood@arm.com>
486 * target-memory.c (size_integer): Use SCALAR_INT_TYPE_MODE.
487 (size_logical): Likewise.
489 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
490 Alan Hayward <alan.hayward@arm.com>
491 David Sherwood <david.sherwood@arm.com>
493 * trans-types.c (gfc_type_for_mode): Use is_a <scalar_int_mode>.
495 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
496 Alan Hayward <alan.hayward@arm.com>
497 David Sherwood <david.sherwood@arm.com>
499 * trans-types.c (gfc_init_kinds): Use opt_scalar_float_mode
500 and FOR_EACH_MODE_IN_CLASS.
502 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
503 Alan Hayward <alan.hayward@arm.com>
504 David Sherwood <david.sherwood@arm.com>
506 * target-memory.c (size_float): Use SCALAR_FLOAT_TYPE_MODE
507 instead of TYPE_MODE.
509 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
510 Alan Hayward <alan.hayward@arm.com>
511 David Sherwood <david.sherwood@arm.com>
513 * trans-types.c (gfc_init_kinds): Use machine_mode instead of int
516 2017-08-28 Janus Weil <janus@gcc.gnu.org>
519 * expr.c (gfc_check_pointer_assign): Improve the check whether pointer
520 may outlive pointer target.
522 2017-08-27 Thomas Koenig <tkoenig@gcc.gnu.org>
525 * frontend-passes (inline_matumul_assign): Explicity
526 set typespec for call to CONJG.
528 2017-08-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
531 * trans-io.c (get_dtio_proc): Add check for format label and set
532 formatted flag accordingly. Reorganize the code a little.
534 2017-08-16 Thomas Koenig <tkoenig@gcc.gnu.org>
537 * frontend-passes.c (realloc_string_callback): If expression is a
538 concatenation, also check for dependency.
539 (constant_string_length): Check for presence of symtree.
541 2017-08-13 Thomas Koenig <tkoenig@gcc.gnu.org>
543 * gfortran.texi: Document format of unformatted sequential files.
545 2017-08-11 Thomas Koenig <tkoenig@gcc.gnu.org>
547 * invoke.texi: Actually commit change about -Ofast.
549 2017-08-11 Thomas Koenig <tkoenig@gcc.gnu.org>
552 * resolve.c (resolve_symbol): Adjust (and reformat)
553 comment. Perform check if a BIND(C) is declared
554 at module level regardless of whether it is typed
557 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
559 * options.c (set_dec_flags): Only set legacy standards when value
562 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
564 * options.c (set_dec_flags, gfc_post_options): Only set flag_d_lines
565 with -fdec when not set by user.
567 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
569 * decl.c (attr_seen): New static variable.
570 * decl.c (variable_decl): Match %FILL in STRUCTURE body.
571 * gfortran.texi: Update documentation.
573 2017-08-08 Martin Liska <mliska@suse.cz>
575 * trans-types.c: Include header files.
577 2017-08-07 Thomas Koenig <tkoenig@gcc.gnu.org>
581 * options.c: Make -Ofast honor -fmax-stack-var-size.
582 * invoke.texi: Document change.
584 2017-08-01 Thomas König <tkoenig@gcc.gnu.org>
587 * intrisic.c (gfc_convert_type_warn): Only set typespec for
588 empty array constructors which don't have it already.
590 2017-08-01 Thomas Koenig <tkoenig@gcc.gnu.org>
593 * lang.opt (fc-prototypes): Add option.
594 * gfortran.h (gfc_typespec): Add interop_kind to struct.
595 (gfc_dump_c_prototypes): Add prototype.
596 * decl.c (gfc_match_kind_spec): Copy symbol used for kind to typespec.
597 * parse.c (gfc_parse_file): Call gfc_dump_prototypes.
598 * dump-parse-tree.c (gfc_dump_c_prototypes): New function.
599 (type_return): New enum.
600 (get_c_type_name): New function.
601 (write_decl): New function.
602 (write_type): New function.
603 (write_variable): New function.
604 (write_proc): New function.
605 (write_interop_decl): New function.
606 * invoke.texi: Document -fc-prototypes.
608 2017-08-01 Dominique d'Humieres <dominiq@lps.ens.fr>
611 * expr.c (gfc_check_init_expr): Use the renamed name.
613 2017-07-31 Jakub Jelinek <jakub@redhat.com>
615 * check.c (gfc_check_num_images): Fix a pasto.
617 2017-07-29 Jakub Jelinek <jakub@redhat.com>
619 * trans-decl.c (gfc_trans_use_stmts): Pass false as new argument to
620 the imported_module_or_decl debug hook.
622 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
624 * resolve.c (find_reachable_labels): Adjust.
626 2017-07-25 Jakub Jelinek <jakub@redhat.com>
628 * ioparm.def: Use 1U << 31 instead of 1 << 31 as flags2 mask.
630 2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
632 * dump-parse-tree.c (show_symbol): Show binding label if present.
634 2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
635 Mikael Morin <mikael@gcc.gnu.org>
638 * fortran/trans-array.c (gfc_conv_resolve_dependencies):
639 Break if dependency has been found.
641 2017-07-23 Alexander Monakov <amonakov@ispras.ru>
643 * interface.c (pair_cmp): Fix gfc_symbol comparison. Adjust comment.
645 2017-07-18 Nathan Sidwell <nathan@acm.org>
647 * trans.c (gfc_build_array_ref): Use TYPE_MAX_VALUE.
649 2017-07-09 Dominique d'Humieres <dominiq@lps.ens.fr>
652 * class.c (class_array_ref_detected): Remove a redundant
655 2017-07-06 Harald Anlauf <anlauf@gmx.de>
658 * array.c (gfc_ref_dimen_size): Handle bad subscript triplets.
660 2017-07-03 Dominique d'Humieres <dominiq@lps.ens.fr>
663 * resolve.c (resolve_symbol): Fix typo.
665 2017-07-03 Dominique d'Humieres <dominiq@lps.ens.fr>
668 * symbol.c (check_conflict): Add missing "conflicts".
670 2017-06-29 Cesar Philippidis <cesar@codesourcery.com>
673 * openmp.c (gfc_match_oacc_routine): Check if proc_name exist before
674 comparing the routine name against it.
676 2017-06-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
679 * trans-stmt.c (gfc_trans_call): If no code expr, use code->loc
680 as warning/error locus.
682 2017-06-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
685 * arith.c (wprecision_int_real): Set return value before
686 mpz_clear and then return after it.
688 2017-06-15 Janus Weil <janus@gcc.gnu.org>
691 * trans-expr.c (gfc_conv_procedure_call): Deallocate the result of
692 scalar allocatable procedure-pointer components.
694 2017-06-10 Thomas Koenig <tkoenig@gcc.gnu.org>
697 * frontend-passes.c (traverse_io_block): Also
698 check for variables occurring as indices multiple
699 time in a single implied DO loop.
701 2017-06-05 Janus Weil <janus@gcc.gnu.org>
704 * trans-expr.c (gfc_conv_procedure_call): Fix detection of allocatable
707 2017-06-05 Nicolas Koenig <koenigni@student.ethz.ch>
710 * frontend-passes.c (traverse_io_block): New function.
711 (simplify_io_impl_do): New function.
712 (optimize_namespace): Invoke gfc_code_walker with
715 2017-06-02 Jakub Jelinek <jakub@redhat.com>
718 * openmp.c (resolve_omp_clauses): Fix a typo.
720 2017-05-30 David Malcolm <dmalcolm@redhat.com>
722 * error.c (gfc_format_decoder): Update for new bool and
723 const char ** params.
725 2017-05-29 Thomas Koenig <tkoenig@gcc.gnu.org>
728 * frontend-passes.c (check_conjg_transpose_variable):
730 (has_dimen_vector_ref): Likewise
731 (matmul_temp_args): New function. Add prototype.
732 (optimize_namespace): Call matmul_temp_args.
734 2017-05-28 Thomas Koenig <tkoenig@gcc.gnu.org>
736 * frontend-passes.c (matmul_lhs_realloc): Correct
737 allocation size for case A1B2.
739 2017-05-25 Thomas Koenig <tkoenig@gcc.gnu.org>
741 * dump-parse-tree.c (show_expr): Also replace
742 with dumpfile for showing values for forgotten
745 2017-05-24 Thomas Koenig <tkoenig@gcc.gnu.org>
747 * dump-parse-tree.c (show_expr): Replace stdout
748 with dumpfile for showing values.
750 2017-05-24 Thomas Koenig <tkoenig@gcc.gnu.org>
753 * frontend-passes.c (matrix_case): Add A2TB2.
754 (inline_limit_check): Handle MATMUL(TRANSPOSE(A),B)
755 (inline_matmul_assign): Likewise.
757 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
759 * openmp.c (OACC_KERNELS_CLAUSES): Add "OMP_CLAUSE_NUM_GANGS",
760 "OMP_CLAUSE_NUM_WORKERS", "OMP_CLAUSE_VECTOR_LENGTH".
762 2017-05-22 Janus Weil <janus@gcc.gnu.org>
765 * resolve.c (resolve_fl_derived): Make sure that vtype symbols are
768 2017-05-19 Paul Thomas <pault@gcc.gnu.org>
771 * trans-io.c (nml_get_addr_expr): If we are dealing with class
772 type data set tmp tree to get that address.
773 (transfer_namelist_element): Set the array spec to point to the
776 2017-05-19 David Malcolm <dmalcolm@redhat.com>
779 * bbt.c (insert): Remove trailing exclamation mark from message.
780 * decl.c (gfc_match_final_decl): Likewise.
781 * dump-parse-tree.c (show_expr): Likewise.
782 * module.c (gfc_use_module): Likewise.
783 * primary.c (build_actual_constructor): Likewise.
784 (gfc_convert_to_structure_constructor): Likewise.
786 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
788 * gfortran.h (enum gfc_omp_default_sharing): Add
789 "OMP_DEFAULT_PRESENT".
790 * dump-parse-tree.c (show_omp_clauses): Handle it.
791 * openmp.c (gfc_match_omp_clauses): Likewise.
792 * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
794 2017-05-18 Fritz Reese <fritzoreese@gmail.com>
797 * decl.c (match_attr_spec, gfc_match_automatic,
798 gfc_match_static, gfc_match_structure_decl): Unify diagnostic
799 errors regarding -fdec options.
800 * io.c (match_dec_etag, match_dec_vtag, match_dec_ftag): Ditto.
802 2017-05-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
805 * trans-io.c (transfer_namelist_element): Change check from
806 NULL_TREE to null_pointer_node.
808 2017-05-17 Fritz Reese <fritzoreese@gmail.com>
811 * expr.c (component_initializer): Don't generate initializers for
813 * invoke.texi (-finit-derived): Document.
815 2017-05-16 Paul Thomas <pault@gcc.gnu.org>
818 * decl.c (build_sym): In a submodule allow overriding of host
819 associated symbols from the ancestor module with a new
822 2017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>
825 * trans-stmt.c (gfc_trans_integer_select): Remove redundant condition.
827 2017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>
830 * expr.c (gfc_generate_initializer): If type conversion fails,
831 check for error and return NULL.
833 2017-05-14 Nicolas Koenig <koenigni@student.ethz.ch>
836 * array.c (gfc_ref_dimen_size): Simplify stride
838 * data.c (gfc_advance_section): Simplify start,
839 end and stride expressions
840 (gfc_advance_section): Simplify start and end
842 (gfc_get_section_index): Simplify start expression
844 2017-05-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
846 * io.c (gfc_resolve_dt): Fix returns to bool type.
848 2017-05-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
851 * io.c (dtio_procs_present): Add new function to check for DTIO
852 procedures relative to I/O statement READ or WRITE.
853 (gfc_resolve_dt): Add namelist checks using the new function.
854 * resolve.c (dtio_procs_present): Remove function and related
855 namelist checks. (resolve_fl_namelist): Add check specific to
856 Fortran 95 restriction on namelist objects.
858 2017-05-11 Nathan Sidwell <nathan@acm.org>
860 * trans-decl.c: Include dumpfile.h not tree-dump.h,
862 2017-05-09 Janus Weil <janus@gcc.gnu.org>
865 * resolve.c (gfc_resolve_finalizers): Ensure that derived-type
866 components have a their finalizers resolved, also if the superordinate
867 type itself has a finalizer.
869 2017-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
872 * frontend-passes.c (matmul_to_var_expr): New function,
874 (matmul_to_var_code): Likewise.
875 (optimize_namespace): Use them from gfc_code_walker.
877 2017-05-05 David Malcolm <dmalcolm@redhat.com>
879 * cpp.c (cb_cpp_error): Replace report_diagnostic
880 with diagnostic_report_diagnostic.
881 * error.c (gfc_warning): Likewise.
882 (gfc_warning_now_at): Likewise.
883 (gfc_warning_now): Likewise.
884 (gfc_warning_internal): Likewise.
885 (gfc_error_now): Likewise.
886 (gfc_fatal_error): Likewise.
887 (gfc_error_opt): Likewise.
888 (gfc_internal_error): Likewise.
890 2017-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
893 * frontend-passes.c (inline_matmul_assign): Also check bounds
894 for allocatable lhs and matrix-vector-multiplication.
896 2017-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
899 * io.c (format_lex): Check for '/' and set token to FMT_SLASH.
900 (check_format): Move FMT_DT checking code to data_desc section.
901 * module.c (gfc_match_use): Include the case of INTERFACE_DTIO.
903 2017-04-22 Janus Weil <janus@gcc.gnu.org>
906 * trans-types.c (gfc_conv_procedure_call): Deallocate the components
907 of allocatable intent(out) arguments.
909 2017-04-21 Janus Weil <janus@gcc.gnu.org>
912 * trans-types.c (gfc_get_derived_type): Prevent an infinite loop when
913 building a derived type that includes a procedure pointer component
914 with a polymorphic result.
916 2017-04-17 Paul Thomas <pault@gcc.gnu.org>
919 * module.c (find_symtree_for_symbol): Delete.
920 (read_module): Remove the call to the above.
922 2017-04-14 Janus Weil <janus@gcc.gnu.org>
925 * class.c (generate_finalization_wrapper): Give the finalization wrapper
926 the recursive attribute.
928 2017-04-10 Nicolas Koenig <koenigni@student.ethz.ch>
929 Paul Thomas <pault@gcc.gnu.org>
932 * module.c (gfc_match_submodule): Add error
933 if function is called in the wrong state.
935 2017-04-10 Janus Weil <janus@gcc.gnu.org>
938 * expr.c (gfc_check_pointer_assign): Check if procedure pointer
939 components in a pointer assignment need an explicit interface.
941 2017-03-18 Nicolas Koenig <koenigni@student.ethz.ch>
944 * symbol.c (gfc_delete_symtree): If there is a period in the name, ignore
945 everything before it.
947 2017-03-28 Janus Weil <janus@gcc.gnu.org>
950 * trans-io.c (transfer_namelist_element): Perform a polymorphic call
951 to a DTIO procedure if necessary.
953 2017-03-25 Paul Thomas <pault@gcc.gnu.org>
957 * decl.c (access_attr_decl): Remove the error for an absent
958 generic DTIO interface and ensure that symbol has the flavor
961 2017-03-22 Dominique d'Humieres <dominiq@lps.ens.fr>
964 * module.c: Remove trailing period.
966 2017-03-22 Dominique d'Humieres <dominiq@lps.ens.fr>
969 * decl.c: Replace '%s' with %qs.
971 * interface.c: Likewise.
973 * primary.c: Likewise.
974 * resolve.c: Likewise.
978 * io.c: Remove trailing spaces.
980 * openmp.c: Likewise.
981 * resolve.c: Likewise.
982 * trans-intrinsic.c: Likewise.
985 * expr.c: Remove a double spaces.
988 * primary.c: Remove spurious quotes around %qs.
990 2017-03-22 Thomas Koenig <tkoenig@gcc.gnu.org>
993 * frontend-passes.c (combine_array_constructor): Take
994 location of new expression from constructor expression instead
997 2017-03-20 Nicolas Koenig <koenigni@student.ethz.ch>
1000 * symbol.c (check_conflict): Report an error if an EQUIVALENCE
1003 2017-03-18 Nicolas Koenig <koenigni@student.ethz.ch>
1006 * decl.c (add_hidden_procptr_result): Fixed Refs count of the
1007 created "ppr@" symbol.
1009 2017-03-18 Paul Thomas <pault@gcc.gnu.org>
1012 * module.c (mio_symbol_attribute): Remove reset of the flag
1013 'no_module_procedures'.
1014 (check_for_module_procedures): New function. Move declaration
1015 of 'no_module_procedures' to above it.
1016 (gfc_dump_module): Traverse namespace calling new function.
1018 2017-03-18 Paul Thomas <pault@gcc.gnu.org>
1021 * symbol.c (check_conflict): A dummy procedure in a submodule,
1022 module procedure is not an error.
1023 (gfc_add_flavor): Ditto.
1025 2017-03-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1028 * openmp.c (check_symbol_not_pointer): Adjust diagnostics.
1030 2017-03-16 Jakub Jelinek <jakub@redhat.com>
1033 * parse.c (gfc_ascii_statement): Use !$ACC for ST_OACC_ATOMIC
1034 and ST_OACC_END_ATOMIC, instead of !ACC.
1035 * trans-decl.c (finish_oacc_declare): Use !$ACC instead of $!ACC.
1036 * openmp.c (gfc_match_oacc_declare, gfc_match_oacc_wait,
1037 gfc_resolve_oacc_declare): Likewise.
1040 * error.c (gfc_format_decoder): Rename plus argument to set_locus,
1041 remove ATTRIBUTE_UNUSED from all arguments, call default_tree_printer
1042 if not a Fortran specific spec.
1043 * trans-io.c: Include options.h.
1044 (gfc_build_st_parameter): Temporarily disable -Wpadded around layout
1045 of artificial IO data structures.
1047 2017-03-15 David Malcolm <dmalcolm@redhat.com>
1050 * resolve.c (resolve_contained_fntype): Make error messages more
1051 amenable to translation.
1053 2017-03-06 Richard Biener <rguenther@suse.de>
1056 * trans.c (gfc_add_modify_loc): Weaken assert.
1058 2017-03-05 Andre Vehreschild <vehre@gcc.gnu.org>,
1059 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
1061 * check.c (positive_check): Add new function checking constant for
1062 being greater then zero.
1063 (gfc_check_image_status): Add checking of image_status arguments.
1064 (gfc_check_failed_or_stopped_images): Same but for failed_- and
1065 stopped_images function.
1066 * dump-parse-tree.c (show_code_node): Added output of FAIL IMAGE.
1067 * gfortran.h (enum gfc_statement): Added FAIL_IMAGE_ST.
1068 (enum gfc_isym_id): Added new intrinsic symbols.
1069 (enum gfc_exec_op): Added EXEC_FAIL_IMAGE.
1070 * gfortran.texi: Added description for the new API functions. Updated
1071 coverage of gfortran of TS18508.
1072 * intrinsic.c (add_functions): Added symbols to resolve new intrinsic
1074 * intrinsic.h: Added prototypes.
1075 * iresolve.c (gfc_resolve_failed_images): Resolve the failed_images
1077 (gfc_resolve_image_status): Same for image_status.
1078 (gfc_resolve_stopped_images): Same for stopped_images.
1079 * libgfortran.h: Added prototypes.
1080 * match.c (gfc_match_if): Added matching of FAIL IMAGE statement.
1081 (gfc_match_fail_image): Match a FAIL IMAGE statement.
1082 * match.h: Added prototype.
1083 * parse.c (decode_statement): Added matching for FAIL IMAGE.
1084 (next_statement): Same.
1085 (gfc_ascii_statement): Same.
1087 * simplify.c (gfc_simplify_failed_or_stopped_images): For COARRAY=
1088 single a constant result can be returne.d
1089 (gfc_simplify_image_status): For COARRAY=single the result is constant.
1090 * st.c (gfc_free_statement): Added FAIL_IMAGE handling.
1091 * trans-decl.c (gfc_build_builtin_function_decls): Added decls of the
1093 * trans-expr.c (gfc_conv_procedure_call): This is first time all
1094 arguments of a function are optional, which is now handled here
1096 * trans-intrinsic.c (conv_intrinsic_image_status): Translate
1098 (gfc_conv_intrinsic_function): Add support for image_status.
1099 (gfc_is_intrinsic_libcall): Add support for the remaining new
1101 * trans-stmt.c (gfc_trans_fail_image): Trans a fail image.
1102 * trans-stmt.h: Add the prototype for the above.
1103 * trans.c (trans_code): Dispatch for fail_image.
1104 * trans.h: Add the trees for the new intrinsics.
1106 2017-03-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1109 * openmp.c (check_symbol_not_pointer): Adjust diagnostic.
1111 2017-02-28 Paul Thomas <pault@gcc.gnu.org>
1114 * resolve.c (resolve_fl_procedure): Deal with the case where
1115 'submodule_name' is NULL so that gfc_error does not ICE.
1116 Reformat the error message to make it more consistent.
1118 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1120 * parse.c (parse_critical_block): Use cond ? G_("...") : G_("...")
1121 instead of just cond ? "..." : "...".
1122 * scanner.c (gfc_next_char_literal): Likewise.
1123 * match.c (match_exit_cycle): Likewise.
1125 2017-02-26 Thomas Koenig <tkoenig@gcc.gnu.org>
1128 * options.c (gfc_post_options): Set default limit for matmul
1130 * invoke.texi: Document change.
1132 2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
1135 * interface.c (check_dtio_arg_TKR_intent): Change 'intent'
1138 2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
1141 * interface.c (gfc_match_end_interface): Remove spurious comma
1142 and space, replace 'got %s' with 'got %qs'.
1144 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1147 * interface.c (check_dtio_arg_TKR_intent): Supply 'must'
1148 missing from error message.
1150 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1153 * interface.c (gfc_find_typebound_dtio_proc): Guard test for
1154 flavor attribute by checking that symbol is resolved.
1156 2017-02-16 Paul Thomas <pault@gcc.gnu.org>
1159 * decl.c (access_attr_decl): Test for presence of generic DTIO
1160 interface and emit error if not present.
1162 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1165 * parse.c (check_component, parse_union): Whitespace.
1166 (set_syms_host_assoc): For a derived type, check if the module
1167 in which it was declared is one of the submodule ancestors. If
1168 it is, make the components public. Otherwise, reset attribute
1169 'host_assoc' and set 'use-assoc' so that encapsulation is
1172 2017-02-19 Paul Thomas <pault@gcc.gnu.org>
1175 * decl.c (gfc_set_constant_character_len): Whitespace.
1176 (gfc_match_end): Catch case where a procedure is contained in
1177 a module procedure and ensure that 'end procedure' is the
1178 correct termination.
1180 2017-02-19 Paul Thomas <pault@gcc.gnu.org>
1183 * resolve.c (fixup_unique_dummy): New function.
1184 (gfc_resolve_expr): Call it for dummy variables with a unique
1187 2017-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
1190 * trans-expr.c (gfc_trans_assignment_1): Deref indirect refs when
1191 compiling with -fcheck=mem to check the pointer and not the data.
1193 2017-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
1196 * trans-array.c (duplicate_allocatable_coarray): Ensure attributes
1197 passed are properly initialized.
1198 (structure_alloc_comps): Same.
1199 * trans-expr.c (gfc_trans_structure_assign): Same.
1201 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1203 * trans-expr.c (gfc_conv_substring): Add missing space in diagnostics.
1205 2017-02-12 Thomas Koenig <tkoenig@gcc.gnu.org>
1208 * intrinsic.c (gfc_intrinsic_func_interface): Return an error
1209 for -std=f95 for disallowed transformational functions in
1210 initialization expressions.
1212 2017-02-09 Cesar Philippidis <cesar@codesourcery.com>
1213 Joseph Myers <joseph@codesourcery.com>
1215 * openmp.c (resolve_omp_clauses): Error on directives
1216 containing both tile and collapse clauses.
1217 (resolve_oacc_loop_blocks): Represent '*' tile arguments as zero.
1218 * trans-openmp.c (gfc_trans_omp_do): Lower tiled loops like
1221 2017-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
1223 * trans-types.c (gfc_get_int_kind_from_width_isofortranen): Choose
1224 REAL type with the widest precision if two (or more) have the same
1227 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1230 * trans-stmt.c (gfc_trans_allocate): Only deallocate the components of
1231 the temporary, when a new object was created for the temporary. Not
1232 when it is just an alias to an existing object.
1234 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1237 * trans-decl.c (generate_coarray_sym_init): Retrieve the symbol's
1238 attributes before using them.
1240 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1243 * trans-stmt.c (gfc_trans_allocate): Add the multiplying the _len
1244 component of unlimited polymorphic objects when source-allocating.
1246 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1249 * trans-array.c (structure_alloc_comps): Ignore pointer components when
1252 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1255 * f95-lang.c (gfc_create_decls): Include stringpool.h.
1256 Pass main_input_filename to build_translation_unit_decl.
1258 2017-01-23 Thomas Koenig <tkoenig@netcologne.de>
1260 * arith.c (arith_power): If simplifying integer power expression
1261 to zero, warn if -Winteger-division is given.
1263 2017-01-22 Jakub Jelinek <jakub@redhat.com>
1266 * parse.c (matchs, matcho, matchds, matchdo): Replace return st;
1267 with { ret = st; goto finish; }.
1268 (decode_omp_directive): Allow declare simd, declare target and
1269 simd directives in PURE/ELEMENTAL procedures. Only call
1270 gfc_unset_implicit_pure on successful match of other procedures.
1272 2017-01-21 Gerald Pfeifer <gerald@pfeifer.com>
1274 * gfc-internals.texi (Symbol Versioning): Change references
1275 to www.akkadia.org to https.
1277 2017-01-21 Jakub Jelinek <jakub@redhat.com>
1279 * gfortran.h (gfc_extract_int): Change return type to bool. Add
1280 int argument with = 0.
1281 * decl.c (gfc_match_kind_spec): Adjust gfc_extract_int caller, pass
1282 1 as new last argument to it, don't emit gfc_error.
1283 (match_char_kind): Likewise.
1284 (gfc_match_decl_type_spec): Use gfc_get_string ("%s", x) instead of
1286 (gfc_match_derived_decl, match_binding_attributes): Likewise.
1287 (gfc_match_structure_decl): Don't sprintf back to name, call
1288 get_struct_decl directly with gfc_dt_upper_string (name) result.
1289 * trans-stmt.c (gfc_trans_allocate): Use gfc_get_string ("%s", x)
1290 instead of gfc_get_string (x).
1291 * module.c (gfc_dt_lower_string, gfc_dt_upper_string,
1292 gfc_match_use, gfc_match_submodule, find_true_name, mio_pool_string,
1293 mio_symtree_ref, mio_expr, mio_omp_udr_expr, load_generic_interfaces,
1294 load_omp_udrs, load_needed, read_module, dump_module,
1295 create_intrinsic_function, import_iso_c_binding_module,
1296 create_int_parameter, create_int_parameter_array, create_derived_type,
1297 use_iso_fortran_env_module): Likewise.
1298 * error.c (gfc_diagnostic_starter, gfc_diagnostic_start_span): Use
1299 pp_verbatim (context->printer, "%s", x) instead of
1300 pp_verbatim (context->printer, x).
1301 * match.c (gfc_match_small_int): Adjust gfc_extract_int caller, pass
1302 1 as new last argument to it, don't emit gfc_error.
1303 (gfc_match_small_int_expr): Likewise.
1304 * iresolve.c (gfc_get_string): Optimize format "%s" case.
1305 (resolve_bound): Use gfc_get_string ("%s", x) instead of
1307 (resolve_transformational): Formatting fix.
1308 (gfc_resolve_char_achar): Change name argument to bool is_achar,
1309 use a single format string and if is_achar add "a" before "char".
1310 (gfc_resolve_achar, gfc_resolve_char): Adjust callers.
1311 * expr.c (gfc_extract_int): Change return type to bool, return true
1312 if some error occurred. Add REPORT_ERROR argument, if non-zero
1313 call either gfc_error or gfc_error_now depending on its sign.
1314 * arith.c (arith_power): Adjust gfc_extract_int caller.
1315 * symbol.c (gfc_add_component): Use gfc_get_string ("%s", x) instead
1316 of gfc_get_string (x).
1317 (gfc_new_symtree, gfc_delete_symtree, gfc_get_uop, gfc_new_symbol,
1318 gfc_get_gsymbol, generate_isocbinding_symbol): Likewise.
1319 * openmp.c (gfc_match_omp_clauses): Adjust gfc_extract_int caller, pass
1320 -1 as new last argument to it, don't emit gfc_error_now.
1321 (gfc_match_omp_declare_reduction): Use gfc_get_string ("%s", x)
1322 instead of gfc_get_string (x).
1323 * check.c (kind_check): Adjust gfc_extract_int caller.
1324 * intrinsic.c (add_sym, find_sym, make_alias): Use
1325 gfc_get_string ("%s", x) instead of gfc_get_string (x).
1326 * simplify.c (get_kind, gfc_simplify_btest, gfc_simplify_maskr,
1327 gfc_simplify_maskl, gfc_simplify_poppar, gfc_simplify_repeat,
1328 gfc_simplify_selected_int_kind, gfc_simplify_selected_real_kind):
1329 Adjust gfc_extract_int callers.
1330 * trans-decl.c (gfc_find_module): Use gfc_get_string ("%s", x)
1331 instead of gfc_get_string (x).
1332 * matchexp.c (expression_syntax): Add const.
1333 * primary.c (match_kind_param, match_hollerith_constant,
1334 match_string_constant): Adjust gfc_extract_int callers.
1335 (match_keyword_arg): Use gfc_get_string ("%s", x) instead of
1337 * frontend-passes.c (optimize_minmaxloc): Likewise.
1339 2017-01-19 Andre Vehreschild <vehre@gcc.gnu.org>
1342 * trans-decl.c (gfc_build_qualified_array): Add static decl to parent
1343 function only, when the decl-context is not the translation unit.
1345 2017-01-18 Louis Krupp <louis.krupp@zoho.com>
1349 * trans-expr.c (gfc_conv_variable): Don't treat temporary variables
1350 as function arguments.
1351 * trans-stmt.c (forall_make_variable_temp,
1352 generate_loop_for_temp_to_lhs, gfc_trans_assign_need_temp,
1353 gfc_trans_forall_1): Don't adjust offset of forall temporary
1354 for array sections, make forall temporaries work for substring
1355 expressions, improve test coverage by adding -ftest-forall-temp
1356 option to request usage of temporary array in forall code.
1357 * lang.opt: Add -ftest-forall-temp option.
1358 * invoke.texi: Add -ftest-forall-temp option.
1360 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
1362 * primary.c (caf_variable_attr): Improve figuring whether the current
1363 component is the last one refed.
1364 * trans-stmt.c (gfc_trans_allocate): Do not generate sync_all calls
1365 when allocating pointer or allocatable components.
1367 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
1369 * gfortran.texi: Add missing parameters to caf-API functions. Correct
1370 typos and clarify some descriptions.
1372 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
1375 Missed some cases, here they are:
1376 * trans-decl.c (gfc_build_qualified_array): Add static tokens to the
1377 parent function's scope.
1378 * trans-expr.c (gfc_get_tree_for_caf_expr): Shorten code. Remove
1381 2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org>
1384 * resolve.c (resolve_lock_unlock_event): Resolve the expression for
1385 event's until_count.
1387 2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org>
1390 * trans-expr.c (gfc_get_tree_for_caf_expr): Ensure the backend_decl
1391 is valid before accessing it.
1393 2017-01-09 Jakub Jelinek <jakub@redhat.com>
1395 PR translation/79019
1396 PR translation/79020
1397 * decl.c (attr_decl1): Fix spelling in translatable string.
1398 * intrinsic.texi: Fix spelling - invokation -> invocation.
1399 * lang.opt (faggressive-function-elimination, gfc_convert): Fix
1400 typos in descriptions.
1401 * openmp.c (resolve_omp_clauses): Add missing whitespace to
1402 translatable strings.
1404 2017-01-08 Martin Sebor <msebor@redhat.com>
1406 PR tree-optimization/78913
1408 * trans-common.c (build_equiv_decl): Increase buffer size to avoid
1409 truncation for any argument.
1410 * trans-types.c (gfc_build_logical_type): Same.
1412 2017-01-07 Andre Vehreschild <vehre@gcc.gnu.org>
1416 * expr.c (gfc_check_pointer_assign): Return the same error message for
1417 rewritten coarray pointer assignments like for plain ones.
1418 * gfortran.h: Change prototype.
1419 * primary.c (caf_variable_attr): Set attributes used ones only only
1420 ones. Add setting of pointer_comp attribute.
1421 (gfc_caf_attr): Add setting of pointer_comp attribute.
1422 * trans-array.c (gfc_array_allocate): Add flag that the component to
1423 allocate is not an ultimate coarray component. Add allocation of
1425 (structure_alloc_comps): Extend nullify to treat pointer components in
1426 coarrays correctly. Restructure nullify to remove redundant code.
1427 (gfc_nullify_alloc_comp): Allow setting caf_mode flags.
1428 * trans-array.h: Change prototype of gfc_nullify_alloc_comp ().
1429 * trans-decl.c (generate_coarray_sym_init): Call nullify_alloc_comp for
1430 derived type coarrays with pointer components.
1431 * trans-expr.c (gfc_trans_structure_assign): Also treat pointer
1433 (trans_caf_token_assign): Handle assignment of token of scalar pointer
1435 (gfc_trans_pointer_assignment): Call above routine.
1436 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Add treating pointer
1438 (gfc_conv_intrinsic_caf_get): Likewise.
1439 (conv_caf_send): Likewise.
1440 * trans-stmt.c (gfc_trans_allocate): After allocating a derived type in
1441 a coarray pre-register the tokens.
1442 (gfc_trans_deallocate): Simply determining the coarray type (scalar or
1443 array) and deregistering it correctly.
1444 * trans-types.c (gfc_typenode_for_spec): Replace in_coarray flag by the
1445 actual codim to allow lookup of array types in the cache.
1446 (gfc_build_array_type): Likewise.
1447 (gfc_get_array_descriptor_base): Likewise.
1448 (gfc_get_array_type_bounds): Likewise.
1449 (gfc_get_derived_type): Likewise.
1450 * trans-types.h: Likewise.
1451 * trans.c (gfc_deallocate_with_status): Enable deregistering of all kind
1452 of coarray components.
1453 (gfc_deallocate_scalar_with_status): Use free() in fcoarray_single mode
1454 instead of caf_deregister.
1456 2017-01-06 Jakub Jelinek <jakub@redhat.com>
1458 * simplify.c (simplify_transformation_to_array): Use
1459 GCC_DIAGNOSTIC_PUSH_IGNORED and GCC_DIAGNOSTIC_POP instead of
1460 #pragma GCC diagnostic {push,ignored,pop}.
1462 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
1464 * simplify.c (simplify_transformation_to_array): Silence
1465 array bounds warning. Fix whitespace.
1467 2017-01-04 Alexandre Oliva <aoliva@redhat.com>
1469 * module.c (load_omp_udrs): Initialize name.
1471 2017-01-02 Janne Blomqvist <jb@gcc.gnu.org>
1474 * trans-expr.c (gfc_trans_string_copy): Rework string copy
1475 algorithm to avoid -Wstringop-overflow warning.
1477 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1479 Update copyright years.
1481 * gfortranspec.c (lang_specific_driver): Update copyright notice
1483 * gfc-internals.texi: Bump @copying's copyright year.
1484 * gfortran.texi: Ditto.
1485 * intrinsic.texi: Ditto.
1486 * invoke.texi: Ditto.
1488 Copyright (C) 2017 Free Software Foundation, Inc.
1490 Copying and distribution of this file, with or without modification,
1491 are permitted in any medium without royalty provided the copyright
1492 notice and this notice are preserved.