1 2017-10-07 Paul Thomas <pault@gcc.gnu.org>
4 * class.c (gfc_find_derived_vtab): Return NULL for a passed
5 pdt template to prevent bad procedures from being written.
6 * decl.c (gfc_get_pdt_instance): Do not use the default
7 initializer for pointer and allocatable pdt type components. If
8 the component is allocatbale, set the 'alloc_comp' attribute of
10 * module.c : Add a prototype for 'mio_actual_arglist'. Add a
11 boolean argument 'pdt'.
12 (mio_component): Call it for the parameter list of pdt type
13 components with 'pdt' set to true.
14 (mio_actual_arg): Add the boolean 'pdt' and, if it is set, call
15 mio_integer for the 'spec_type'.
16 (mio_actual_arglist): Add the boolean 'pdt' and use it in the
17 call to mio_actual_arg.
18 (mio_expr, mio_omp_udr_expr): Call mio_actual_arglist with
20 * resolve.c (get_pdt_spec_expr): Add the parameter name to the
22 (get_pdt_constructor): Check that cons->expr is non-null.
23 * trans-array.c (structure_alloc_comps): For deallocation of
24 allocatable components, ensure that parameterized components
25 are deallocated first. Likewise, when parameterized components
26 are allocated, nullify allocatable components first. Do not
27 recurse into pointer or allocatable pdt components while
28 allocating or deallocating parameterized components. Test that
29 parameterized arrays or strings are allocated before freeing
31 (gfc_trans_pointer_assignment): Call the new function. Tidy up
32 a minor whitespace issue.
33 trans-decl.c (gfc_trans_deferred_vars): Set 'tmp' to NULL_TREE
34 to prevent the expression from being used a second time.
36 2017-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
39 * expr.c (gfc_check_pointer_assign): Error
40 for non-contiguous rhs.
42 2017-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
44 * gfortran.h (async_io_dt): Add external reference.
45 * io.c (async_io_dt): Add variable.
46 (compare_to_allowed_values): Add prototyte. Add optional argument
47 num. If present, set it to the number of the entry that was
49 (check_io_constraints): If this is for an asynchronous I/O
50 statement, set async_io_dt and set the asynchronous flag for
52 * resolve.c (resolve_transfer): If async_io_dt is set, set
53 the asynchronous flag on the variable.
54 (resolve_fl_namelist): If async_io_dt is set, set the asynchronous
55 flag on all elements of the namelist.
57 2017-10-04 Paul Thomas <pault@gcc.gnu.org>
61 * resolve.c (resolve_assoc_var): Deferred character type
62 associate names must not receive an integer conatant length.
63 * symbol.c (gfc_is_associate_pointer): Deferred character
64 length functions also require an associate pointer.
65 * trans-decl.c (gfc_get_symbol_decl): Deferred character
66 length functions or derived type components require the assoc
67 name to have variable string length.
68 * trans-stmt.c (trans_associate_var): Set the string length of
69 deferred string length associate names. The address expression
70 is not needed for allocatable, pointer or dummy targets. Change
71 the comment about defered string length targets.
73 2017-10-03 Thomas Koenig <tkoenig@gcc.gnu.org>
75 * io.c (match_wait_element): Correctly match END and EOR tags.
76 * dump-parse-tree.c (show_code_node): Handle EXEC_WAIT.
78 2017-10-02 Paul Thomas <pault@gcc.gnu.org>
81 * resolve.c (gfc_resolve_code): Simplify condition for class
82 pointer assignments becoming regular assignments by asserting
83 that only class valued targets are permitted.
84 * trans-expr.c (trans_class_pointer_fcn): New function using a
85 block of code from gfc_trans_pointer_assignment.
86 (gfc_trans_pointer_assignment): Call the new function. Tidy up
87 a minor whitespace issue.
89 2017-10-01 Dominique d'Humieres <dominiq@lps.ens.fr>
92 * parse.c (gfc_global_used): Replace the gfc_internal_error
95 2017-09-29 Dominique d'Humieres <dominiq@lps.ens.fr>
98 * interface.c (compare_actual_formal): Change warnings to errors
99 when "Actual argument contains too few elements for dummy
100 argument", unless -std=legacy is used.
102 2017-09-27 Thomas Schwinge <thomas@codesourcery.com>
104 * lang.opt <Wdo-subscript>: End help text with a period.
106 2017-09-26 Thomas Koenig <tkoenig@gcc.gnu.org>
108 * frontend-passes.c (do_subscript): Don't do anything
109 if inside an associate list.
111 2017-09-25 Thomas Koenig <tkoenig@gcc.gnu.org>
113 * lang.opt: Add -Wdo-subscript.
114 * frontend-passes.c (do_t): New type.
115 (doloop_list): Use variable of do_type.
116 (if_level): Variable to track if levels.
117 (select_level): Variable to track select levels.
118 (gfc_run_passes): Initialize i_level and select_level.
119 (doloop_code): Record current level of if + select
120 level in doloop_list. Add seen_goto if there could
121 be a branch outside the loop. Use different type for
123 (doloop_function): Call do_intent and do_subscript; move
124 functionality of checking INTENT to do_intent.
125 (insert_index_t): New type, for callback_insert_index.
126 (callback_insert_index): New function.
127 (insert_index): New function.
128 (do_subscript): New function.
129 (do_intent): New function.
130 (gfc_code_walker): Keep track of if_level and select_level.
131 * invoke.texi: Document -Wdo-subscript.
133 2017-09-25 Janne Blomqvist <jb@gcc.gnu.org>
135 * trans.c (gfc_unlikely): Remove unnecessary fold_convert.
136 (gfc_likely): Likewise.
138 2017-09-24 Thomas Koenig <tkoenig@gcc.gnu.org>
139 Steven G. Kargl <kargl@gcc.gnu.org>
142 * expr.c (gfc_get_full_arrayspec_from_expr): If there is
143 no symtree, set array spec to NULL.
145 2017-09-23 Janus Weil <janus@gcc.gnu.org>
148 * lang.opt: Add the options -fdefault-real-10 and -fdefault-real-16.
149 Rename flag_default_real to flag_default_real_8.
150 * invoke.texi: Add documentation.
151 * module.c (use_iso_fortran_env_module): flag_default_real is renamed.
152 * trans-types.c (gfc_init_kinds): Implement the flags
153 -fdefault-real-10 and -fdefault-real-16. Make -fdefault-double-8 work
154 without -fdefault-real-8.
156 2017-09-21 Paul Thomas <pault@gcc.gnu.org>
159 * match.c (gfc_match_associate): Before failing the association
160 try again, allowing a proc pointer selector.
165 * primary.c (gfc_match_varspec): Introduce 'tgt_expr', which
166 points to the associate selector, if any. Go through selector
167 references, after resolution for variables, to catch any full
168 or section array references. If a class associate name does
169 not have the same declared type as the selector, resolve the
170 selector and copy the declared type to the associate name.
171 Before throwing a no implicit type error, resolve all allowed
172 selector expressions, and copy the resulting typespec.
175 * resolve.c (resolve_assoc_var): Selector must cannot be the
176 NULL expression and it must have a type.
179 * resolve.c (resolve_symbol): Allow associate names to be
182 2017-09-21 Cesar Philippidis <cesar@codesourcery.com>
184 * openmp.c (gfc_match_oacc_wait): Don't restrict wait directive
185 arguments to constant integers.
187 2017-09-17 Paul Thomas <pault@gcc.gnu.org>
190 * decl.c (gfc_get_pdt_instance): Use the component initializer
191 expression for the default, rather than the parameter value.
192 * resolve.c (resolve_pdt): New function.
193 (resolve_symbol): Call it. Remove false error, prohibiting
194 deferred type parameters for dummy arguments.
197 * primary.c (gfc_match_varspec): If the type of an associate
198 name is unknown and yet there is a match, try resolving the
199 target expression and using its type.
201 2017-09-15 Paul Thomas <pault@gcc.gnu.org>
204 trans-decl.c (gfc_trans_deferred_vars): Do not null the 'span'
205 field if the symbol is either implicitly or explicitly saved.
207 2017-09-13 Paul Thomas <pault@gcc.gnu.org>
210 * decl.c (match_char_kind): If the kind expression is
211 parameterized, save it in saved_kind_expr and set kind = 0.
212 (gfc_get_pdt_instance): Resolve and simplify before emitting
213 error on expression kind. Insert a missing simplification after
214 insertion of kind expressions.
216 2017-09-12 Paul Thomas <pault@gcc.gnu.org>
220 * decl.c (variable_decl): Check pdt template components for
221 appearance of KIND/LEN components in the type parameter name
222 list, that components corresponding to type parameters have
223 either KIND or LEN attributes and that KIND or LEN components
224 are scalar. Copy the initializer to the parameter value.
225 (gfc_get_pdt_instance): Add a label 'error_return' and follow
226 it with repeated code, while replacing this code with a jump.
227 Check if a parameter appears as a component in the template.
228 Make sure that the parameter expressions are integer. Validate
230 (gfc_match_decl_type_spec): Search for pdt_types in the parent
231 namespace since they are instantiated in the template ns.
232 * expr.c (gfc_extract_int): Use a KIND parameter if it
233 appears as a component expression.
234 (gfc_check_init_expr): Allow expressions with the pdt_kind
236 *primary.c (gfc_match_actual_arglist): Make sure that the first
237 keyword argument is recognised when 'pdt' is set.
239 2017-09-10 Paul Thomas <pault@gcc.gnu.org>
247 * expr.c (is_subref_array): Add class pointer array dummies
248 to the list of expressions that return true.
249 * trans-array.c: Add SPAN_FIELD and update indices for
251 (gfc_conv_descriptor_span, gfc_conv_descriptor_span_get,
252 gfc_conv_descriptor_span_set, is_pointer_array,
253 get_array_span): New functions.
254 (gfc_get_descriptor_offsets_for_info): New function to preserve
255 API for access to descriptor fields for trans-types.c.
256 (gfc_conv_scalarized_array_ref): If the expression is a subref
257 array, make sure that info->descriptor is a descriptor type.
258 Otherwise, if info->descriptor is a pointer array, set 'decl'
259 and fix it if it is a component reference.
260 (build_array_ref): Simplify handling of class array refs by
261 passing the vptr to gfc_build_array_ref rather than generating
262 the pointer arithmetic in this function.
263 (gfc_conv_array_ref): As in gfc_conv_scalarized_array_ref, set
265 (gfc_array_allocate): Set the span field if this is a pointer
266 array. Use the expr3 element size if it is available, so that
267 the dynamic type element size is used.
268 (gfc_conv_expr_descriptor): Set the span field for pointer
270 * trans-array.h: Prototypes for gfc_conv_descriptor_span_get
271 gfc_conv_descriptor_span_set and
272 gfc_get_descriptor_offsets_for_info added.
273 trans-decl.c (gfc_get_symbol_decl): If a non-class pointer
274 array, mark the declaration as a GFC_DECL_PTR_ARRAY_P. Remove
275 the setting of GFC_DECL_SPAN.
276 (gfc_trans_deferred_vars): Set the span field to zero in thge
278 * trans-expr.c (gfc_conv_procedure_call): Do not use copy-in/
279 copy-out to pass subref expressions to a pointer dummy.
280 (gfc_trans_pointer_assignment): Remove code for setting of
281 GFC_DECL_SPAN. Set the 'span' field for non-class pointers to
282 class function results. Likewise for rank remap. In the case
283 that the target is not a whole array, use the target array ref
284 for remap and, since the 'start' indices are missing, set the
285 lbounds to one, as required by the standard.
286 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Pick up the
287 'token' offset from the field decl in the descriptor.
288 (conv_isocbinding_subroutine): Set the 'span' field.
289 * trans-io.c (gfc_trans_transfer): Always scalarize pointer
291 * trans-stmt.c (trans_associate_var): Set the 'span' field.
292 * trans-types.c (gfc_get_array_descriptor_base): Add the 'span'
293 field to the array descriptor.
294 (gfc_get_derived_type): Pointer array components are marked as
295 GFC_DECL_PTR_ARRAY_P.
296 (gfc_get_array_descr_info): Replaced API breaking code for
297 descriptor offset calling gfc_get_descriptor_offsets_for_info.
298 * trans.c (get_array_span): New function.
299 (gfc_build_array_ref): Simplify by calling get_array_span and
300 obtain 'span' if 'decl' or 'vptr' present.
301 * trans.h : Rename DECL_LANG_FLAG_6, GFC_DECL_SUBREF_ARRAY_P,
302 as GFC_DECL_PTR_ARRAY_P.
304 2017-09-09 Paul Thomas <pault@gcc.gnu.org>
306 * decl.c : Add decl_type_param_list, type_param_spec_list as
307 static variables to hold PDT spec lists.
308 (build_sym): Copy 'type_param_spec_list' to symbol spec_list.
309 (build_struct): Copy the 'saved_kind_expr' to the component
310 'kind_expr'. Check that KIND or LEN components appear in the
311 decl_type_param_list. These should appear as symbols in the
312 f2k_derived namespace. If the component is itself a PDT type,
313 copy the decl_type_param_list to the component param_list.
314 (gfc_match_kind_spec): If the KIND expression is parameterized
315 set KIND to zero and store the expression in 'saved_kind_expr'.
316 (insert_parameter_exprs): New function.
317 (gfc_insert_kind_parameter_exprs): New function.
318 (gfc_insert_parameter_exprs): New function.
319 (gfc_get_pdt_instance): New function.
320 (gfc_match_decl_type_spec): Match the decl_type_spec_list if it
321 is present. If it is, call 'gfc_get_pdt_instance' to obtain the
322 specific instance of the PDT.
323 (match_attr_spec): Match KIND and LEN attributes. Check for the
324 standard and for type/kind of the parameter. They are also not
325 allowed outside a derived type definition.
326 (gfc_match_data_decl): Null the decl_type_param_list and the
327 type_param_spec_list on entry and free them on exit.
328 (gfc_match_formal_arglist): If 'typeparam' is true, add the
329 formal symbol to the f2k_derived namespace.
330 (gfc_match_derived_decl): Register the decl_type_param_list
331 if this is a PDT. If this is a type extension, gather up all
332 the type parameters and put them in the right order.
333 *dump-parse-tree.c (show_attr): Signal PDT templates and the
334 parameter attributes.
335 (show_components): Output parameter atrributes and component
337 (show_symbol): Show variable parameter lists.
338 * expr.c (expr.c): Copy the expression parameter list.
339 (gfc_is_constant_expr): Pass on symbols representing PDT
341 (gfc_check_init_expr): Break on PDT KIND parameters and
342 PDT parameter expressions.
343 (gfc_check_assign): Assigning to KIND or LEN components is an
345 (derived_parameter_expr): New function.
346 (gfc_derived_parameter_expr): New function.
347 (gfc_spec_list_type): New function.
348 * gfortran.h : Add enum gfc_param_spec_type. Add the PDT attrs
349 to the structure symbol_attr. Add the 'kind_expr' and
350 'param_list' field to the gfc_component structure. Comment on
351 the reuse of the gfc_actual_arglist structure as storage for
352 type parameter spec lists. Add the new field 'spec_type' to
353 this structure. Add 'param_list' fields to gfc_symbol and
354 gfc_expr. Add prototypes for gfc_insert_kind_parameter_exprs,
355 gfc_insert_parameter_exprs, gfc_add_kind, gfc_add_len,
356 gfc_derived_parameter_expr and gfc_spec_list_type.
357 * interface.c (gfc_compare_derived_types): Treat PDTs in the
358 same way as sequence types.
359 * match.c : Add variable 'type_param_spec_list'.
360 (gfc_op2string, gfc_match_member_sep, gfc_match_label): Remove
362 (match_derived_type_spec): Match PDTs and find specific
364 (gfc_match_type_spec): Remove more trailing whitespace.
365 (gfc_match_allocate): Assumed or deferred parameters cannot
366 appear here. Copy the type parameter spec list to the expr for
367 the allocatable entity. Free 'type_param_spec_list'.
368 (gfc_match_common, gfc_match_namelist, gfc_match_module): Still
369 more trailing whitespace to remove.
370 (gfc_match_type_is): Allow PDT typespecs.
371 * match.h : Modify prototypes for gfc_match_formal_arglist and
372 gfc_match_actual_arglist.
373 * module.c (ab_attribute, mstring attr_bits): PDT attributes
375 (mio_symbol_attribute): PDT attributes handled.
376 (mio_component): Deal with 'kind_expr' field.
377 (mio_full_f2k_derived): For PDT templates, transfer the formal
378 namespace symroot to the f2k_derived namespace.
379 *primary.c (match_keyword_arg, gfc_match_actual_arglist): Add
380 modifications to handle PDT spec lists. These are flagged in
381 both cases by new boolean arguments, whose prototype defaults
383 (gfc_match_structure_constructor, match_variable): Remove yet
384 more trailing whitespace.
385 * resolve.c (get_pdt_spec_expr, get_pdt_constructor): New
387 (resolve_structure_cons): If the constructor is a PDT template,
388 call get_pdt_constructor to build it using the parameter lists
389 and then get the specific instance of the PDT.
390 (resolve_component): PDT strings need a hidden string length
391 component like deferred characters.
392 (resolve_symbol): Dummy PDTs cannot have deferred parameters.
393 * symbol.c (gfc_add_kind, gfc_add_len): New functions.
394 (free_components): Free 'kind_expr' and 'param_list' fields.
395 (gfc_free_symbol): Free the 'param_list' field.
396 (gfc_find_sym_tree): If the current state is a PDT template,
397 look for the symtree in the f2k_derived namspaces.
398 trans-array.c (structure_alloc_comps): Allocate and deallocate
399 PDTs. Check dummy arguments for compliance of LEN parameters.
400 Add the new functions to the preceeding enum.
401 (gfc_allocate_pdt_comp, gfc_deallocate_pdt_comp and
402 gfc_check_pdt_dummy): New functions calling above.
403 * trans-array.h : Add prototypes for these functions.
404 trans-decl.c (gfc_get_symbol_decl): Call gfc_defer_symbol_init
405 as appropriate for PDT symbols.
406 (gfc_trans_deferred_vars): Allocate/deallocate PDT entities as
407 they come into and out of scope. Exclude pdt_types from being
409 (gfc_trans_subcomponent_assign): PDT array components must be
410 handles as if they are allocatable.
411 * trans-stmt.c (gfc_trans_allocate): Handle initialization of
413 (gfc_trans_deallocate): Likewise.
414 * trans-types.c (gfc_get_derived_type): PDT templates must not
415 arrive here. PDT string components are handles as if deferred.
416 Similarly, PDT arrays are treated as if allocatable. PDT
417 strings are pointer types.
418 * trans.c (gfc_deferred_strlen): Handle PDT strings in the same
419 way as deferred characters.
421 2017-09-01 Jakub Jelinek <jakub@redhat.com>
424 * parse.c (decode_omp_directive): Use matchs instead of matcho for
425 end ordered and ordered directives, except for ordered depend. For
426 -fopenmp-simd and ordered depend, reject the stmt.
427 * trans-openmp.c (gfc_trans_omp_ordered): For -fopenmp-simd ignore
428 threads clause and if simd clause isn't present, just translate the
431 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
432 Alan Hayward <alan.hayward@arm.com>
433 David Sherwood <david.sherwood@arm.com>
435 * trans-types.c (gfc_init_kinds): Use opt_scalar_int_mode for
438 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
439 Alan Hayward <alan.hayward@arm.com>
440 David Sherwood <david.sherwood@arm.com>
442 * target-memory.c (size_integer): Use SCALAR_INT_TYPE_MODE.
443 (size_logical): Likewise.
445 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
446 Alan Hayward <alan.hayward@arm.com>
447 David Sherwood <david.sherwood@arm.com>
449 * trans-types.c (gfc_type_for_mode): Use is_a <scalar_int_mode>.
451 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
452 Alan Hayward <alan.hayward@arm.com>
453 David Sherwood <david.sherwood@arm.com>
455 * trans-types.c (gfc_init_kinds): Use opt_scalar_float_mode
456 and FOR_EACH_MODE_IN_CLASS.
458 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
459 Alan Hayward <alan.hayward@arm.com>
460 David Sherwood <david.sherwood@arm.com>
462 * target-memory.c (size_float): Use SCALAR_FLOAT_TYPE_MODE
463 instead of TYPE_MODE.
465 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
466 Alan Hayward <alan.hayward@arm.com>
467 David Sherwood <david.sherwood@arm.com>
469 * trans-types.c (gfc_init_kinds): Use machine_mode instead of int
472 2017-08-28 Janus Weil <janus@gcc.gnu.org>
475 * expr.c (gfc_check_pointer_assign): Improve the check whether pointer
476 may outlive pointer target.
478 2017-08-27 Thomas Koenig <tkoenig@gcc.gnu.org>
481 * frontend-passes (inline_matumul_assign): Explicity
482 set typespec for call to CONJG.
484 2017-08-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
487 * trans-io.c (get_dtio_proc): Add check for format label and set
488 formatted flag accordingly. Reorganize the code a little.
490 2017-08-16 Thomas Koenig <tkoenig@gcc.gnu.org>
493 * frontend-passes.c (realloc_string_callback): If expression is a
494 concatenation, also check for dependency.
495 (constant_string_length): Check for presence of symtree.
497 2017-08-13 Thomas Koenig <tkoenig@gcc.gnu.org>
499 * gfortran.texi: Document format of unformatted sequential files.
501 2017-08-11 Thomas Koenig <tkoenig@gcc.gnu.org>
503 * invoke.texi: Actually commit change about -Ofast.
505 2017-08-11 Thomas Koenig <tkoenig@gcc.gnu.org>
508 * resolve.c (resolve_symbol): Adjust (and reformat)
509 comment. Perform check if a BIND(C) is declared
510 at module level regardless of whether it is typed
513 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
515 * options.c (set_dec_flags): Only set legacy standards when value
518 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
520 * options.c (set_dec_flags, gfc_post_options): Only set flag_d_lines
521 with -fdec when not set by user.
523 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
525 * decl.c (attr_seen): New static variable.
526 * decl.c (variable_decl): Match %FILL in STRUCTURE body.
527 * gfortran.texi: Update documentation.
529 2017-08-08 Martin Liska <mliska@suse.cz>
531 * trans-types.c: Include header files.
533 2017-08-07 Thomas Koenig <tkoenig@gcc.gnu.org>
537 * options.c: Make -Ofast honor -fmax-stack-var-size.
538 * invoke.texi: Document change.
540 2017-08-01 Thomas König <tkoenig@gcc.gnu.org>
543 * intrisic.c (gfc_convert_type_warn): Only set typespec for
544 empty array constructors which don't have it already.
546 2017-08-01 Thomas Koenig <tkoenig@gcc.gnu.org>
549 * lang.opt (fc-prototypes): Add option.
550 * gfortran.h (gfc_typespec): Add interop_kind to struct.
551 (gfc_dump_c_prototypes): Add prototype.
552 * decl.c (gfc_match_kind_spec): Copy symbol used for kind to typespec.
553 * parse.c (gfc_parse_file): Call gfc_dump_prototypes.
554 * dump-parse-tree.c (gfc_dump_c_prototypes): New function.
555 (type_return): New enum.
556 (get_c_type_name): New function.
557 (write_decl): New function.
558 (write_type): New function.
559 (write_variable): New function.
560 (write_proc): New function.
561 (write_interop_decl): New function.
562 * invoke.texi: Document -fc-prototypes.
564 2017-08-01 Dominique d'Humieres <dominiq@lps.ens.fr>
567 * expr.c (gfc_check_init_expr): Use the renamed name.
569 2017-07-31 Jakub Jelinek <jakub@redhat.com>
571 * check.c (gfc_check_num_images): Fix a pasto.
573 2017-07-29 Jakub Jelinek <jakub@redhat.com>
575 * trans-decl.c (gfc_trans_use_stmts): Pass false as new argument to
576 the imported_module_or_decl debug hook.
578 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
580 * resolve.c (find_reachable_labels): Adjust.
582 2017-07-25 Jakub Jelinek <jakub@redhat.com>
584 * ioparm.def: Use 1U << 31 instead of 1 << 31 as flags2 mask.
586 2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
588 * dump-parse-tree.c (show_symbol): Show binding label if present.
590 2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
591 Mikael Morin <mikael@gcc.gnu.org>
594 * fortran/trans-array.c (gfc_conv_resolve_dependencies):
595 Break if dependency has been found.
597 2017-07-23 Alexander Monakov <amonakov@ispras.ru>
599 * interface.c (pair_cmp): Fix gfc_symbol comparison. Adjust comment.
601 2017-07-18 Nathan Sidwell <nathan@acm.org>
603 * trans.c (gfc_build_array_ref): Use TYPE_MAX_VALUE.
605 2017-07-09 Dominique d'Humieres <dominiq@lps.ens.fr>
608 * class.c (class_array_ref_detected): Remove a redundant
611 2017-07-06 Harald Anlauf <anlauf@gmx.de>
614 * array.c (gfc_ref_dimen_size): Handle bad subscript triplets.
616 2017-07-03 Dominique d'Humieres <dominiq@lps.ens.fr>
619 * resolve.c (resolve_symbol): Fix typo.
621 2017-07-03 Dominique d'Humieres <dominiq@lps.ens.fr>
624 * symbol.c (check_conflict): Add missing "conflicts".
626 2017-06-29 Cesar Philippidis <cesar@codesourcery.com>
629 * openmp.c (gfc_match_oacc_routine): Check if proc_name exist before
630 comparing the routine name against it.
632 2017-06-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
635 * trans-stmt.c (gfc_trans_call): If no code expr, use code->loc
636 as warning/error locus.
638 2017-06-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
641 * arith.c (wprecision_int_real): Set return value before
642 mpz_clear and then return after it.
644 2017-06-15 Janus Weil <janus@gcc.gnu.org>
647 * trans-expr.c (gfc_conv_procedure_call): Deallocate the result of
648 scalar allocatable procedure-pointer components.
650 2017-06-10 Thomas Koenig <tkoenig@gcc.gnu.org>
653 * frontend-passes.c (traverse_io_block): Also
654 check for variables occurring as indices multiple
655 time in a single implied DO loop.
657 2017-06-05 Janus Weil <janus@gcc.gnu.org>
660 * trans-expr.c (gfc_conv_procedure_call): Fix detection of allocatable
663 2017-06-05 Nicolas Koenig <koenigni@student.ethz.ch>
666 * frontend-passes.c (traverse_io_block): New function.
667 (simplify_io_impl_do): New function.
668 (optimize_namespace): Invoke gfc_code_walker with
671 2017-06-02 Jakub Jelinek <jakub@redhat.com>
674 * openmp.c (resolve_omp_clauses): Fix a typo.
676 2017-05-30 David Malcolm <dmalcolm@redhat.com>
678 * error.c (gfc_format_decoder): Update for new bool and
679 const char ** params.
681 2017-05-29 Thomas Koenig <tkoenig@gcc.gnu.org>
684 * frontend-passes.c (check_conjg_transpose_variable):
686 (has_dimen_vector_ref): Likewise
687 (matmul_temp_args): New function. Add prototype.
688 (optimize_namespace): Call matmul_temp_args.
690 2017-05-28 Thomas Koenig <tkoenig@gcc.gnu.org>
692 * frontend-passes.c (matmul_lhs_realloc): Correct
693 allocation size for case A1B2.
695 2017-05-25 Thomas Koenig <tkoenig@gcc.gnu.org>
697 * dump-parse-tree.c (show_expr): Also replace
698 with dumpfile for showing values for forgotten
701 2017-05-24 Thomas Koenig <tkoenig@gcc.gnu.org>
703 * dump-parse-tree.c (show_expr): Replace stdout
704 with dumpfile for showing values.
706 2017-05-24 Thomas Koenig <tkoenig@gcc.gnu.org>
709 * frontend-passes.c (matrix_case): Add A2TB2.
710 (inline_limit_check): Handle MATMUL(TRANSPOSE(A),B)
711 (inline_matmul_assign): Likewise.
713 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
715 * openmp.c (OACC_KERNELS_CLAUSES): Add "OMP_CLAUSE_NUM_GANGS",
716 "OMP_CLAUSE_NUM_WORKERS", "OMP_CLAUSE_VECTOR_LENGTH".
718 2017-05-22 Janus Weil <janus@gcc.gnu.org>
721 * resolve.c (resolve_fl_derived): Make sure that vtype symbols are
724 2017-05-19 Paul Thomas <pault@gcc.gnu.org>
727 * trans-io.c (nml_get_addr_expr): If we are dealing with class
728 type data set tmp tree to get that address.
729 (transfer_namelist_element): Set the array spec to point to the
732 2017-05-19 David Malcolm <dmalcolm@redhat.com>
735 * bbt.c (insert): Remove trailing exclamation mark from message.
736 * decl.c (gfc_match_final_decl): Likewise.
737 * dump-parse-tree.c (show_expr): Likewise.
738 * module.c (gfc_use_module): Likewise.
739 * primary.c (build_actual_constructor): Likewise.
740 (gfc_convert_to_structure_constructor): Likewise.
742 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
744 * gfortran.h (enum gfc_omp_default_sharing): Add
745 "OMP_DEFAULT_PRESENT".
746 * dump-parse-tree.c (show_omp_clauses): Handle it.
747 * openmp.c (gfc_match_omp_clauses): Likewise.
748 * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
750 2017-05-18 Fritz Reese <fritzoreese@gmail.com>
753 * decl.c (match_attr_spec, gfc_match_automatic,
754 gfc_match_static, gfc_match_structure_decl): Unify diagnostic
755 errors regarding -fdec options.
756 * io.c (match_dec_etag, match_dec_vtag, match_dec_ftag): Ditto.
758 2017-05-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
761 * trans-io.c (transfer_namelist_element): Change check from
762 NULL_TREE to null_pointer_node.
764 2017-05-17 Fritz Reese <fritzoreese@gmail.com>
767 * expr.c (component_initializer): Don't generate initializers for
769 * invoke.texi (-finit-derived): Document.
771 2017-05-16 Paul Thomas <pault@gcc.gnu.org>
774 * decl.c (build_sym): In a submodule allow overriding of host
775 associated symbols from the ancestor module with a new
778 2017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>
781 * trans-stmt.c (gfc_trans_integer_select): Remove redundant condition.
783 2017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>
786 * expr.c (gfc_generate_initializer): If type conversion fails,
787 check for error and return NULL.
789 2017-05-14 Nicolas Koenig <koenigni@student.ethz.ch>
792 * array.c (gfc_ref_dimen_size): Simplify stride
794 * data.c (gfc_advance_section): Simplify start,
795 end and stride expressions
796 (gfc_advance_section): Simplify start and end
798 (gfc_get_section_index): Simplify start expression
800 2017-05-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
802 * io.c (gfc_resolve_dt): Fix returns to bool type.
804 2017-05-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
807 * io.c (dtio_procs_present): Add new function to check for DTIO
808 procedures relative to I/O statement READ or WRITE.
809 (gfc_resolve_dt): Add namelist checks using the new function.
810 * resolve.c (dtio_procs_present): Remove function and related
811 namelist checks. (resolve_fl_namelist): Add check specific to
812 Fortran 95 restriction on namelist objects.
814 2017-05-11 Nathan Sidwell <nathan@acm.org>
816 * trans-decl.c: Include dumpfile.h not tree-dump.h,
818 2017-05-09 Janus Weil <janus@gcc.gnu.org>
821 * resolve.c (gfc_resolve_finalizers): Ensure that derived-type
822 components have a their finalizers resolved, also if the superordinate
823 type itself has a finalizer.
825 2017-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
828 * frontend-passes.c (matmul_to_var_expr): New function,
830 (matmul_to_var_code): Likewise.
831 (optimize_namespace): Use them from gfc_code_walker.
833 2017-05-05 David Malcolm <dmalcolm@redhat.com>
835 * cpp.c (cb_cpp_error): Replace report_diagnostic
836 with diagnostic_report_diagnostic.
837 * error.c (gfc_warning): Likewise.
838 (gfc_warning_now_at): Likewise.
839 (gfc_warning_now): Likewise.
840 (gfc_warning_internal): Likewise.
841 (gfc_error_now): Likewise.
842 (gfc_fatal_error): Likewise.
843 (gfc_error_opt): Likewise.
844 (gfc_internal_error): Likewise.
846 2017-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
849 * frontend-passes.c (inline_matmul_assign): Also check bounds
850 for allocatable lhs and matrix-vector-multiplication.
852 2017-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
855 * io.c (format_lex): Check for '/' and set token to FMT_SLASH.
856 (check_format): Move FMT_DT checking code to data_desc section.
857 * module.c (gfc_match_use): Include the case of INTERFACE_DTIO.
859 2017-04-22 Janus Weil <janus@gcc.gnu.org>
862 * trans-types.c (gfc_conv_procedure_call): Deallocate the components
863 of allocatable intent(out) arguments.
865 2017-04-21 Janus Weil <janus@gcc.gnu.org>
868 * trans-types.c (gfc_get_derived_type): Prevent an infinite loop when
869 building a derived type that includes a procedure pointer component
870 with a polymorphic result.
872 2017-04-17 Paul Thomas <pault@gcc.gnu.org>
875 * module.c (find_symtree_for_symbol): Delete.
876 (read_module): Remove the call to the above.
878 2017-04-14 Janus Weil <janus@gcc.gnu.org>
881 * class.c (generate_finalization_wrapper): Give the finalization wrapper
882 the recursive attribute.
884 2017-04-10 Nicolas Koenig <koenigni@student.ethz.ch>
885 Paul Thomas <pault@gcc.gnu.org>
888 * module.c (gfc_match_submodule): Add error
889 if function is called in the wrong state.
891 2017-04-10 Janus Weil <janus@gcc.gnu.org>
894 * expr.c (gfc_check_pointer_assign): Check if procedure pointer
895 components in a pointer assignment need an explicit interface.
897 2017-03-18 Nicolas Koenig <koenigni@student.ethz.ch>
900 * symbol.c (gfc_delete_symtree): If there is a period in the name, ignore
901 everything before it.
903 2017-03-28 Janus Weil <janus@gcc.gnu.org>
906 * trans-io.c (transfer_namelist_element): Perform a polymorphic call
907 to a DTIO procedure if necessary.
909 2017-03-25 Paul Thomas <pault@gcc.gnu.org>
913 * decl.c (access_attr_decl): Remove the error for an absent
914 generic DTIO interface and ensure that symbol has the flavor
917 2017-03-22 Dominique d'Humieres <dominiq@lps.ens.fr>
920 * module.c: Remove trailing period.
922 2017-03-22 Dominique d'Humieres <dominiq@lps.ens.fr>
925 * decl.c: Replace '%s' with %qs.
927 * interface.c: Likewise.
929 * primary.c: Likewise.
930 * resolve.c: Likewise.
934 * io.c: Remove trailing spaces.
936 * openmp.c: Likewise.
937 * resolve.c: Likewise.
938 * trans-intrinsic.c: Likewise.
941 * expr.c: Remove a double spaces.
944 * primary.c: Remove spurious quotes around %qs.
946 2017-03-22 Thomas Koenig <tkoenig@gcc.gnu.org>
949 * frontend-passes.c (combine_array_constructor): Take
950 location of new expression from constructor expression instead
953 2017-03-20 Nicolas Koenig <koenigni@student.ethz.ch>
956 * symbol.c (check_conflict): Report an error if an EQUIVALENCE
959 2017-03-18 Nicolas Koenig <koenigni@student.ethz.ch>
962 * decl.c (add_hidden_procptr_result): Fixed Refs count of the
963 created "ppr@" symbol.
965 2017-03-18 Paul Thomas <pault@gcc.gnu.org>
968 * module.c (mio_symbol_attribute): Remove reset of the flag
969 'no_module_procedures'.
970 (check_for_module_procedures): New function. Move declaration
971 of 'no_module_procedures' to above it.
972 (gfc_dump_module): Traverse namespace calling new function.
974 2017-03-18 Paul Thomas <pault@gcc.gnu.org>
977 * symbol.c (check_conflict): A dummy procedure in a submodule,
978 module procedure is not an error.
979 (gfc_add_flavor): Ditto.
981 2017-03-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
984 * openmp.c (check_symbol_not_pointer): Adjust diagnostics.
986 2017-03-16 Jakub Jelinek <jakub@redhat.com>
989 * parse.c (gfc_ascii_statement): Use !$ACC for ST_OACC_ATOMIC
990 and ST_OACC_END_ATOMIC, instead of !ACC.
991 * trans-decl.c (finish_oacc_declare): Use !$ACC instead of $!ACC.
992 * openmp.c (gfc_match_oacc_declare, gfc_match_oacc_wait,
993 gfc_resolve_oacc_declare): Likewise.
996 * error.c (gfc_format_decoder): Rename plus argument to set_locus,
997 remove ATTRIBUTE_UNUSED from all arguments, call default_tree_printer
998 if not a Fortran specific spec.
999 * trans-io.c: Include options.h.
1000 (gfc_build_st_parameter): Temporarily disable -Wpadded around layout
1001 of artificial IO data structures.
1003 2017-03-15 David Malcolm <dmalcolm@redhat.com>
1006 * resolve.c (resolve_contained_fntype): Make error messages more
1007 amenable to translation.
1009 2017-03-06 Richard Biener <rguenther@suse.de>
1012 * trans.c (gfc_add_modify_loc): Weaken assert.
1014 2017-03-05 Andre Vehreschild <vehre@gcc.gnu.org>,
1015 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
1017 * check.c (positive_check): Add new function checking constant for
1018 being greater then zero.
1019 (gfc_check_image_status): Add checking of image_status arguments.
1020 (gfc_check_failed_or_stopped_images): Same but for failed_- and
1021 stopped_images function.
1022 * dump-parse-tree.c (show_code_node): Added output of FAIL IMAGE.
1023 * gfortran.h (enum gfc_statement): Added FAIL_IMAGE_ST.
1024 (enum gfc_isym_id): Added new intrinsic symbols.
1025 (enum gfc_exec_op): Added EXEC_FAIL_IMAGE.
1026 * gfortran.texi: Added description for the new API functions. Updated
1027 coverage of gfortran of TS18508.
1028 * intrinsic.c (add_functions): Added symbols to resolve new intrinsic
1030 * intrinsic.h: Added prototypes.
1031 * iresolve.c (gfc_resolve_failed_images): Resolve the failed_images
1033 (gfc_resolve_image_status): Same for image_status.
1034 (gfc_resolve_stopped_images): Same for stopped_images.
1035 * libgfortran.h: Added prototypes.
1036 * match.c (gfc_match_if): Added matching of FAIL IMAGE statement.
1037 (gfc_match_fail_image): Match a FAIL IMAGE statement.
1038 * match.h: Added prototype.
1039 * parse.c (decode_statement): Added matching for FAIL IMAGE.
1040 (next_statement): Same.
1041 (gfc_ascii_statement): Same.
1043 * simplify.c (gfc_simplify_failed_or_stopped_images): For COARRAY=
1044 single a constant result can be returne.d
1045 (gfc_simplify_image_status): For COARRAY=single the result is constant.
1046 * st.c (gfc_free_statement): Added FAIL_IMAGE handling.
1047 * trans-decl.c (gfc_build_builtin_function_decls): Added decls of the
1049 * trans-expr.c (gfc_conv_procedure_call): This is first time all
1050 arguments of a function are optional, which is now handled here
1052 * trans-intrinsic.c (conv_intrinsic_image_status): Translate
1054 (gfc_conv_intrinsic_function): Add support for image_status.
1055 (gfc_is_intrinsic_libcall): Add support for the remaining new
1057 * trans-stmt.c (gfc_trans_fail_image): Trans a fail image.
1058 * trans-stmt.h: Add the prototype for the above.
1059 * trans.c (trans_code): Dispatch for fail_image.
1060 * trans.h: Add the trees for the new intrinsics.
1062 2017-03-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1065 * openmp.c (check_symbol_not_pointer): Adjust diagnostic.
1067 2017-02-28 Paul Thomas <pault@gcc.gnu.org>
1070 * resolve.c (resolve_fl_procedure): Deal with the case where
1071 'submodule_name' is NULL so that gfc_error does not ICE.
1072 Reformat the error message to make it more consistent.
1074 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1076 * parse.c (parse_critical_block): Use cond ? G_("...") : G_("...")
1077 instead of just cond ? "..." : "...".
1078 * scanner.c (gfc_next_char_literal): Likewise.
1079 * match.c (match_exit_cycle): Likewise.
1081 2017-02-26 Thomas Koenig <tkoenig@gcc.gnu.org>
1084 * options.c (gfc_post_options): Set default limit for matmul
1086 * invoke.texi: Document change.
1088 2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
1091 * interface.c (check_dtio_arg_TKR_intent): Change 'intent'
1094 2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
1097 * interface.c (gfc_match_end_interface): Remove spurious comma
1098 and space, replace 'got %s' with 'got %qs'.
1100 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1103 * interface.c (check_dtio_arg_TKR_intent): Supply 'must'
1104 missing from error message.
1106 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1109 * interface.c (gfc_find_typebound_dtio_proc): Guard test for
1110 flavor attribute by checking that symbol is resolved.
1112 2017-02-16 Paul Thomas <pault@gcc.gnu.org>
1115 * decl.c (access_attr_decl): Test for presence of generic DTIO
1116 interface and emit error if not present.
1118 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1121 * parse.c (check_component, parse_union): Whitespace.
1122 (set_syms_host_assoc): For a derived type, check if the module
1123 in which it was declared is one of the submodule ancestors. If
1124 it is, make the components public. Otherwise, reset attribute
1125 'host_assoc' and set 'use-assoc' so that encapsulation is
1128 2017-02-19 Paul Thomas <pault@gcc.gnu.org>
1131 * decl.c (gfc_set_constant_character_len): Whitespace.
1132 (gfc_match_end): Catch case where a procedure is contained in
1133 a module procedure and ensure that 'end procedure' is the
1134 correct termination.
1136 2017-02-19 Paul Thomas <pault@gcc.gnu.org>
1139 * resolve.c (fixup_unique_dummy): New function.
1140 (gfc_resolve_expr): Call it for dummy variables with a unique
1143 2017-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
1146 * trans-expr.c (gfc_trans_assignment_1): Deref indirect refs when
1147 compiling with -fcheck=mem to check the pointer and not the data.
1149 2017-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
1152 * trans-array.c (duplicate_allocatable_coarray): Ensure attributes
1153 passed are properly initialized.
1154 (structure_alloc_comps): Same.
1155 * trans-expr.c (gfc_trans_structure_assign): Same.
1157 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1159 * trans-expr.c (gfc_conv_substring): Add missing space in diagnostics.
1161 2017-02-12 Thomas Koenig <tkoenig@gcc.gnu.org>
1164 * intrinsic.c (gfc_intrinsic_func_interface): Return an error
1165 for -std=f95 for disallowed transformational functions in
1166 initialization expressions.
1168 2017-02-09 Cesar Philippidis <cesar@codesourcery.com>
1169 Joseph Myers <joseph@codesourcery.com>
1171 * openmp.c (resolve_omp_clauses): Error on directives
1172 containing both tile and collapse clauses.
1173 (resolve_oacc_loop_blocks): Represent '*' tile arguments as zero.
1174 * trans-openmp.c (gfc_trans_omp_do): Lower tiled loops like
1177 2017-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
1179 * trans-types.c (gfc_get_int_kind_from_width_isofortranen): Choose
1180 REAL type with the widest precision if two (or more) have the same
1183 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1186 * trans-stmt.c (gfc_trans_allocate): Only deallocate the components of
1187 the temporary, when a new object was created for the temporary. Not
1188 when it is just an alias to an existing object.
1190 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1193 * trans-decl.c (generate_coarray_sym_init): Retrieve the symbol's
1194 attributes before using them.
1196 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1199 * trans-stmt.c (gfc_trans_allocate): Add the multiplying the _len
1200 component of unlimited polymorphic objects when source-allocating.
1202 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1205 * trans-array.c (structure_alloc_comps): Ignore pointer components when
1208 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1211 * f95-lang.c (gfc_create_decls): Include stringpool.h.
1212 Pass main_input_filename to build_translation_unit_decl.
1214 2017-01-23 Thomas Koenig <tkoenig@netcologne.de>
1216 * arith.c (arith_power): If simplifying integer power expression
1217 to zero, warn if -Winteger-division is given.
1219 2017-01-22 Jakub Jelinek <jakub@redhat.com>
1222 * parse.c (matchs, matcho, matchds, matchdo): Replace return st;
1223 with { ret = st; goto finish; }.
1224 (decode_omp_directive): Allow declare simd, declare target and
1225 simd directives in PURE/ELEMENTAL procedures. Only call
1226 gfc_unset_implicit_pure on successful match of other procedures.
1228 2017-01-21 Gerald Pfeifer <gerald@pfeifer.com>
1230 * gfc-internals.texi (Symbol Versioning): Change references
1231 to www.akkadia.org to https.
1233 2017-01-21 Jakub Jelinek <jakub@redhat.com>
1235 * gfortran.h (gfc_extract_int): Change return type to bool. Add
1236 int argument with = 0.
1237 * decl.c (gfc_match_kind_spec): Adjust gfc_extract_int caller, pass
1238 1 as new last argument to it, don't emit gfc_error.
1239 (match_char_kind): Likewise.
1240 (gfc_match_decl_type_spec): Use gfc_get_string ("%s", x) instead of
1242 (gfc_match_derived_decl, match_binding_attributes): Likewise.
1243 (gfc_match_structure_decl): Don't sprintf back to name, call
1244 get_struct_decl directly with gfc_dt_upper_string (name) result.
1245 * trans-stmt.c (gfc_trans_allocate): Use gfc_get_string ("%s", x)
1246 instead of gfc_get_string (x).
1247 * module.c (gfc_dt_lower_string, gfc_dt_upper_string,
1248 gfc_match_use, gfc_match_submodule, find_true_name, mio_pool_string,
1249 mio_symtree_ref, mio_expr, mio_omp_udr_expr, load_generic_interfaces,
1250 load_omp_udrs, load_needed, read_module, dump_module,
1251 create_intrinsic_function, import_iso_c_binding_module,
1252 create_int_parameter, create_int_parameter_array, create_derived_type,
1253 use_iso_fortran_env_module): Likewise.
1254 * error.c (gfc_diagnostic_starter, gfc_diagnostic_start_span): Use
1255 pp_verbatim (context->printer, "%s", x) instead of
1256 pp_verbatim (context->printer, x).
1257 * match.c (gfc_match_small_int): Adjust gfc_extract_int caller, pass
1258 1 as new last argument to it, don't emit gfc_error.
1259 (gfc_match_small_int_expr): Likewise.
1260 * iresolve.c (gfc_get_string): Optimize format "%s" case.
1261 (resolve_bound): Use gfc_get_string ("%s", x) instead of
1263 (resolve_transformational): Formatting fix.
1264 (gfc_resolve_char_achar): Change name argument to bool is_achar,
1265 use a single format string and if is_achar add "a" before "char".
1266 (gfc_resolve_achar, gfc_resolve_char): Adjust callers.
1267 * expr.c (gfc_extract_int): Change return type to bool, return true
1268 if some error occurred. Add REPORT_ERROR argument, if non-zero
1269 call either gfc_error or gfc_error_now depending on its sign.
1270 * arith.c (arith_power): Adjust gfc_extract_int caller.
1271 * symbol.c (gfc_add_component): Use gfc_get_string ("%s", x) instead
1272 of gfc_get_string (x).
1273 (gfc_new_symtree, gfc_delete_symtree, gfc_get_uop, gfc_new_symbol,
1274 gfc_get_gsymbol, generate_isocbinding_symbol): Likewise.
1275 * openmp.c (gfc_match_omp_clauses): Adjust gfc_extract_int caller, pass
1276 -1 as new last argument to it, don't emit gfc_error_now.
1277 (gfc_match_omp_declare_reduction): Use gfc_get_string ("%s", x)
1278 instead of gfc_get_string (x).
1279 * check.c (kind_check): Adjust gfc_extract_int caller.
1280 * intrinsic.c (add_sym, find_sym, make_alias): Use
1281 gfc_get_string ("%s", x) instead of gfc_get_string (x).
1282 * simplify.c (get_kind, gfc_simplify_btest, gfc_simplify_maskr,
1283 gfc_simplify_maskl, gfc_simplify_poppar, gfc_simplify_repeat,
1284 gfc_simplify_selected_int_kind, gfc_simplify_selected_real_kind):
1285 Adjust gfc_extract_int callers.
1286 * trans-decl.c (gfc_find_module): Use gfc_get_string ("%s", x)
1287 instead of gfc_get_string (x).
1288 * matchexp.c (expression_syntax): Add const.
1289 * primary.c (match_kind_param, match_hollerith_constant,
1290 match_string_constant): Adjust gfc_extract_int callers.
1291 (match_keyword_arg): Use gfc_get_string ("%s", x) instead of
1293 * frontend-passes.c (optimize_minmaxloc): Likewise.
1295 2017-01-19 Andre Vehreschild <vehre@gcc.gnu.org>
1298 * trans-decl.c (gfc_build_qualified_array): Add static decl to parent
1299 function only, when the decl-context is not the translation unit.
1301 2017-01-18 Louis Krupp <louis.krupp@zoho.com>
1305 * trans-expr.c (gfc_conv_variable): Don't treat temporary variables
1306 as function arguments.
1307 * trans-stmt.c (forall_make_variable_temp,
1308 generate_loop_for_temp_to_lhs, gfc_trans_assign_need_temp,
1309 gfc_trans_forall_1): Don't adjust offset of forall temporary
1310 for array sections, make forall temporaries work for substring
1311 expressions, improve test coverage by adding -ftest-forall-temp
1312 option to request usage of temporary array in forall code.
1313 * lang.opt: Add -ftest-forall-temp option.
1314 * invoke.texi: Add -ftest-forall-temp option.
1316 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
1318 * primary.c (caf_variable_attr): Improve figuring whether the current
1319 component is the last one refed.
1320 * trans-stmt.c (gfc_trans_allocate): Do not generate sync_all calls
1321 when allocating pointer or allocatable components.
1323 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
1325 * gfortran.texi: Add missing parameters to caf-API functions. Correct
1326 typos and clarify some descriptions.
1328 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
1331 Missed some cases, here they are:
1332 * trans-decl.c (gfc_build_qualified_array): Add static tokens to the
1333 parent function's scope.
1334 * trans-expr.c (gfc_get_tree_for_caf_expr): Shorten code. Remove
1337 2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org>
1340 * resolve.c (resolve_lock_unlock_event): Resolve the expression for
1341 event's until_count.
1343 2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org>
1346 * trans-expr.c (gfc_get_tree_for_caf_expr): Ensure the backend_decl
1347 is valid before accessing it.
1349 2017-01-09 Jakub Jelinek <jakub@redhat.com>
1351 PR translation/79019
1352 PR translation/79020
1353 * decl.c (attr_decl1): Fix spelling in translatable string.
1354 * intrinsic.texi: Fix spelling - invokation -> invocation.
1355 * lang.opt (faggressive-function-elimination, gfc_convert): Fix
1356 typos in descriptions.
1357 * openmp.c (resolve_omp_clauses): Add missing whitespace to
1358 translatable strings.
1360 2017-01-08 Martin Sebor <msebor@redhat.com>
1362 PR tree-optimization/78913
1364 * trans-common.c (build_equiv_decl): Increase buffer size to avoid
1365 truncation for any argument.
1366 * trans-types.c (gfc_build_logical_type): Same.
1368 2017-01-07 Andre Vehreschild <vehre@gcc.gnu.org>
1372 * expr.c (gfc_check_pointer_assign): Return the same error message for
1373 rewritten coarray pointer assignments like for plain ones.
1374 * gfortran.h: Change prototype.
1375 * primary.c (caf_variable_attr): Set attributes used ones only only
1376 ones. Add setting of pointer_comp attribute.
1377 (gfc_caf_attr): Add setting of pointer_comp attribute.
1378 * trans-array.c (gfc_array_allocate): Add flag that the component to
1379 allocate is not an ultimate coarray component. Add allocation of
1381 (structure_alloc_comps): Extend nullify to treat pointer components in
1382 coarrays correctly. Restructure nullify to remove redundant code.
1383 (gfc_nullify_alloc_comp): Allow setting caf_mode flags.
1384 * trans-array.h: Change prototype of gfc_nullify_alloc_comp ().
1385 * trans-decl.c (generate_coarray_sym_init): Call nullify_alloc_comp for
1386 derived type coarrays with pointer components.
1387 * trans-expr.c (gfc_trans_structure_assign): Also treat pointer
1389 (trans_caf_token_assign): Handle assignment of token of scalar pointer
1391 (gfc_trans_pointer_assignment): Call above routine.
1392 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Add treating pointer
1394 (gfc_conv_intrinsic_caf_get): Likewise.
1395 (conv_caf_send): Likewise.
1396 * trans-stmt.c (gfc_trans_allocate): After allocating a derived type in
1397 a coarray pre-register the tokens.
1398 (gfc_trans_deallocate): Simply determining the coarray type (scalar or
1399 array) and deregistering it correctly.
1400 * trans-types.c (gfc_typenode_for_spec): Replace in_coarray flag by the
1401 actual codim to allow lookup of array types in the cache.
1402 (gfc_build_array_type): Likewise.
1403 (gfc_get_array_descriptor_base): Likewise.
1404 (gfc_get_array_type_bounds): Likewise.
1405 (gfc_get_derived_type): Likewise.
1406 * trans-types.h: Likewise.
1407 * trans.c (gfc_deallocate_with_status): Enable deregistering of all kind
1408 of coarray components.
1409 (gfc_deallocate_scalar_with_status): Use free() in fcoarray_single mode
1410 instead of caf_deregister.
1412 2017-01-06 Jakub Jelinek <jakub@redhat.com>
1414 * simplify.c (simplify_transformation_to_array): Use
1415 GCC_DIAGNOSTIC_PUSH_IGNORED and GCC_DIAGNOSTIC_POP instead of
1416 #pragma GCC diagnostic {push,ignored,pop}.
1418 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
1420 * simplify.c (simplify_transformation_to_array): Silence
1421 array bounds warning. Fix whitespace.
1423 2017-01-04 Alexandre Oliva <aoliva@redhat.com>
1425 * module.c (load_omp_udrs): Initialize name.
1427 2017-01-02 Janne Blomqvist <jb@gcc.gnu.org>
1430 * trans-expr.c (gfc_trans_string_copy): Rework string copy
1431 algorithm to avoid -Wstringop-overflow warning.
1433 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1435 Update copyright years.
1437 * gfortranspec.c (lang_specific_driver): Update copyright notice
1439 * gfc-internals.texi: Bump @copying's copyright year.
1440 * gfortran.texi: Ditto.
1441 * intrinsic.texi: Ditto.
1442 * invoke.texi: Ditto.
1444 Copyright (C) 2017 Free Software Foundation, Inc.
1446 Copying and distribution of this file, with or without modification,
1447 are permitted in any medium without royalty provided the copyright
1448 notice and this notice are preserved.