1 2017-10-27 Steven G. Kargl <kargl@gcc.gnu.org>
4 * match.c (gfc_match_allocate): Exit early on syntax error.
6 2017-10-27 Thomas Koenig <tkoenig@gcc.gnu.org>
9 * simplify.c (is_constant_array_expr): If the expression is
10 a parameter array, call gfc_simplify_expr.
12 2017-10-25 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
14 * match.c (gfc_match_type_is): Fix typo in error message.
16 2017-10-21 Paul Thomas <pault@gcc.gnu.org>
19 * decl.c (gfc_get_pdt_instance): Remove the error message that
20 the parameter does not have a corresponding component since
21 this is now taken care of when the derived type is resolved. Go
22 straight to error return instead.
23 (gfc_match_formal_arglist): Make the PDT relevant errors
24 immediate so that parsing of the derived type can continue.
25 (gfc_match_derived_decl): Do not check the match status on
26 return from gfc_match_formal_arglist for the same reason.
27 * resolve.c (resolve_fl_derived0): Check that each type
28 parameter has a corresponding component.
31 * resolve.c (resolve_generic_f): Check that the derived type
32 can be used before resolving the struture constructor.
35 * symbol.c (check_conflict): Add the conflicts involving PDT
36 KIND and LEN attributes.
38 2017-10-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
40 * interface.c (check_sym_interfaces, check_uop_interfaces,
41 gfc_check_interfaces): Base interface_name buffer off
44 2017-10-19 Jakub Jelinek <jakub@redhat.com>
47 * gfortran.h (gfc_resolve_do_iterator): Add a bool arg.
48 (gfc_resolve_omp_local_vars): New declaration.
49 * openmp.c (omp_current_ctx): Make static.
50 (gfc_resolve_omp_parallel_blocks): Handle EXEC_OMP_TASKLOOP
51 and EXEC_OMP_TASKLOOP_SIMD.
52 (gfc_resolve_do_iterator): Add ADD_CLAUSE argument, if false,
53 don't actually add any clause. Move omp_current_ctx test
55 (handle_local_var, gfc_resolve_omp_local_vars): New functions.
56 * resolve.c (gfc_resolve_code): Call gfc_resolve_omp_parallel_blocks
57 instead of just gfc_resolve_omp_do_blocks for EXEC_OMP_TASKLOOP
58 and EXEC_OMP_TASKLOOP_SIMD.
59 (gfc_resolve_code): Adjust gfc_resolve_do_iterator caller.
60 (resolve_codes): Call gfc_resolve_omp_local_vars.
62 2017-10-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
64 * gfortran.h (gfc_lookup_function_fuzzy): New declaration.
65 (gfc_closest_fuzzy_match): New declaration.
66 (vec_push): New definition.
67 * misc.c (gfc_closest_fuzzy_match): New definition.
68 * resolve.c: Include spellcheck.h.
69 (lookup_function_fuzzy_find_candidates): New static function.
70 (lookup_uop_fuzzy_find_candidates): Likewise.
71 (lookup_uop_fuzzy): Likewise.
72 (resolve_operator) <INTRINSIC_USER>: Call lookup_uop_fuzzy.
73 (gfc_lookup_function_fuzzy): New definition.
74 (resolve_unknown_f): Call gfc_lookup_function_fuzzy.
75 * interface.c (check_interface0): Likewise.
76 (lookup_arg_fuzzy_find_candidates): New static function.
77 (lookup_arg_fuzzy ): Likewise.
78 (compare_actual_formal): Call lookup_arg_fuzzy.
79 * symbol.c: Include spellcheck.h.
80 (lookup_symbol_fuzzy_find_candidates): New static function.
81 (lookup_symbol_fuzzy): Likewise.
82 (gfc_set_default_type): Call lookup_symbol_fuzzy.
83 (lookup_component_fuzzy_find_candidates): New static function.
84 (lookup_component_fuzzy): Likewise.
85 (gfc_find_component): Call lookup_component_fuzzy.
87 2017-10-18 Thomas Koenig <tkoenig@gcc.gnu.org>
90 * frontend-passes.c (combine_array_constructor): If an array
91 constructor is all constants and has more elements than a small
92 constant, don't convert a*[b,c] to [a*b,a*c] to reduce compilation
95 2017-10-18 Thomas Koenig <tkoenig@gcc.gnu.org>
98 * resolve.c (resovle_symbol): Change gcc_assert to
99 sensible error message.
101 2017-10-18 Paul Thomas <pault@gcc.gnu.org>
104 * trans_decl.c (gfc_get_symbol_decl): Procedure symbols that
105 have the 'used_in_submodule' attribute should be processed by
106 'gfc_get_extern_function_decl'.
108 2017-10-16 Fritz Reese <fritzoreese@gmail.com>
111 * trans-io.c (transfer_expr): Treat BT_UNION as BT_DERIVED.
113 2017-10-15 Thomas Koenig <tkoenig@gcc.gnu.org>
116 * fortran/scanner.c (last_error_char): New global variable.
117 (gfc_scanner_init_1): Set last_error_char to NULL.
118 (gfc_gobble_whitespace): If a character not printable or
119 not newline, issue an error.
121 2017-10-13 Paul Thomas <pault@gcc.gnu.org>
124 * resolve.c (resolve_symbol): Ensure that derived type array
125 results get default initialization.
127 2017-10-11 Nathan Sidwell <nathan@acm.org>
129 * cpp.c (gfc_cpp_add_include_path): Update incpath_e names.
130 (gfc_cpp_add_include_path_after): Likewise.
132 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
134 * target-memory.c (gfc_interpret_logical): Use wi::to_wide when
135 operating on trees as wide_ints.
136 * trans-const.c (gfc_conv_tree_to_mpz): Likewise.
137 * trans-expr.c (gfc_conv_cst_int_power): Likewise.
138 * trans-intrinsic.c (trans_this_image): Likewise.
139 (gfc_conv_intrinsic_bound): Likewise.
140 (conv_intrinsic_cobound): Likewise.
142 2017-10-08 Steven G. Kargl <kargl@gcc.gnu.org>
144 * check.c (gfc_check_x): Remove function.
145 * intrinsic.c (add_functions): Use gfc_check_fn_r.
147 2017-10-08 Paul Thomas <pault@gcc.gnu.org>
150 * module.c : Bump up MOD_VERSION to 15.
151 (mio_component): Edit comment about PDT specification list.
152 (mio_expr, mio_symbol): Include the expression and symbol PDT
153 specification lists in the same way as in mio_component.
155 2017-10-08 Thomas Koenig <tkoenig@gcc.gnu.org>
157 * dump_prase_tree (show_symbol): Output list of variables in
159 (show_code_node): Add new line for ELSE and END DO for DO
161 * invoke.texi: Document that the output of
162 -fdump-fortran-original, -fdump-fortran-optimized and
163 -fdump-parse-tree is unsable and may lead to ICEs.
165 2017-10-07 Paul Thomas <pault@gcc.gnu.org>
168 * class.c (gfc_find_derived_vtab): Return NULL for a passed
169 pdt template to prevent bad procedures from being written.
170 * decl.c (gfc_get_pdt_instance): Do not use the default
171 initializer for pointer and allocatable pdt type components. If
172 the component is allocatbale, set the 'alloc_comp' attribute of
174 * module.c : Add a prototype for 'mio_actual_arglist'. Add a
175 boolean argument 'pdt'.
176 (mio_component): Call it for the parameter list of pdt type
177 components with 'pdt' set to true.
178 (mio_actual_arg): Add the boolean 'pdt' and, if it is set, call
179 mio_integer for the 'spec_type'.
180 (mio_actual_arglist): Add the boolean 'pdt' and use it in the
181 call to mio_actual_arg.
182 (mio_expr, mio_omp_udr_expr): Call mio_actual_arglist with
184 * resolve.c (get_pdt_spec_expr): Add the parameter name to the
185 KIND parameter error.
186 (get_pdt_constructor): Check that cons->expr is non-null.
187 * trans-array.c (structure_alloc_comps): For deallocation of
188 allocatable components, ensure that parameterized components
189 are deallocated first. Likewise, when parameterized components
190 are allocated, nullify allocatable components first. Do not
191 recurse into pointer or allocatable pdt components while
192 allocating or deallocating parameterized components. Test that
193 parameterized arrays or strings are allocated before freeing
195 (gfc_trans_pointer_assignment): Call the new function. Tidy up
196 a minor whitespace issue.
197 trans-decl.c (gfc_trans_deferred_vars): Set 'tmp' to NULL_TREE
198 to prevent the expression from being used a second time.
200 2017-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
203 * expr.c (gfc_check_pointer_assign): Error
204 for non-contiguous rhs.
206 2017-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
208 * gfortran.h (async_io_dt): Add external reference.
209 * io.c (async_io_dt): Add variable.
210 (compare_to_allowed_values): Add prototyte. Add optional argument
211 num. If present, set it to the number of the entry that was
213 (check_io_constraints): If this is for an asynchronous I/O
214 statement, set async_io_dt and set the asynchronous flag for
216 * resolve.c (resolve_transfer): If async_io_dt is set, set
217 the asynchronous flag on the variable.
218 (resolve_fl_namelist): If async_io_dt is set, set the asynchronous
219 flag on all elements of the namelist.
221 2017-10-04 Paul Thomas <pault@gcc.gnu.org>
225 * resolve.c (resolve_assoc_var): Deferred character type
226 associate names must not receive an integer conatant length.
227 * symbol.c (gfc_is_associate_pointer): Deferred character
228 length functions also require an associate pointer.
229 * trans-decl.c (gfc_get_symbol_decl): Deferred character
230 length functions or derived type components require the assoc
231 name to have variable string length.
232 * trans-stmt.c (trans_associate_var): Set the string length of
233 deferred string length associate names. The address expression
234 is not needed for allocatable, pointer or dummy targets. Change
235 the comment about defered string length targets.
237 2017-10-03 Thomas Koenig <tkoenig@gcc.gnu.org>
239 * io.c (match_wait_element): Correctly match END and EOR tags.
240 * dump-parse-tree.c (show_code_node): Handle EXEC_WAIT.
242 2017-10-02 Paul Thomas <pault@gcc.gnu.org>
245 * resolve.c (gfc_resolve_code): Simplify condition for class
246 pointer assignments becoming regular assignments by asserting
247 that only class valued targets are permitted.
248 * trans-expr.c (trans_class_pointer_fcn): New function using a
249 block of code from gfc_trans_pointer_assignment.
250 (gfc_trans_pointer_assignment): Call the new function. Tidy up
251 a minor whitespace issue.
253 2017-10-01 Dominique d'Humieres <dominiq@lps.ens.fr>
256 * parse.c (gfc_global_used): Replace the gfc_internal_error
259 2017-09-29 Dominique d'Humieres <dominiq@lps.ens.fr>
262 * interface.c (compare_actual_formal): Change warnings to errors
263 when "Actual argument contains too few elements for dummy
264 argument", unless -std=legacy is used.
266 2017-09-27 Thomas Schwinge <thomas@codesourcery.com>
268 * lang.opt <Wdo-subscript>: End help text with a period.
270 2017-09-26 Thomas Koenig <tkoenig@gcc.gnu.org>
272 * frontend-passes.c (do_subscript): Don't do anything
273 if inside an associate list.
275 2017-09-25 Thomas Koenig <tkoenig@gcc.gnu.org>
277 * lang.opt: Add -Wdo-subscript.
278 * frontend-passes.c (do_t): New type.
279 (doloop_list): Use variable of do_type.
280 (if_level): Variable to track if levels.
281 (select_level): Variable to track select levels.
282 (gfc_run_passes): Initialize i_level and select_level.
283 (doloop_code): Record current level of if + select
284 level in doloop_list. Add seen_goto if there could
285 be a branch outside the loop. Use different type for
287 (doloop_function): Call do_intent and do_subscript; move
288 functionality of checking INTENT to do_intent.
289 (insert_index_t): New type, for callback_insert_index.
290 (callback_insert_index): New function.
291 (insert_index): New function.
292 (do_subscript): New function.
293 (do_intent): New function.
294 (gfc_code_walker): Keep track of if_level and select_level.
295 * invoke.texi: Document -Wdo-subscript.
297 2017-09-25 Janne Blomqvist <jb@gcc.gnu.org>
299 * trans.c (gfc_unlikely): Remove unnecessary fold_convert.
300 (gfc_likely): Likewise.
302 2017-09-24 Thomas Koenig <tkoenig@gcc.gnu.org>
303 Steven G. Kargl <kargl@gcc.gnu.org>
306 * expr.c (gfc_get_full_arrayspec_from_expr): If there is
307 no symtree, set array spec to NULL.
309 2017-09-23 Janus Weil <janus@gcc.gnu.org>
312 * lang.opt: Add the options -fdefault-real-10 and -fdefault-real-16.
313 Rename flag_default_real to flag_default_real_8.
314 * invoke.texi: Add documentation.
315 * module.c (use_iso_fortran_env_module): flag_default_real is renamed.
316 * trans-types.c (gfc_init_kinds): Implement the flags
317 -fdefault-real-10 and -fdefault-real-16. Make -fdefault-double-8 work
318 without -fdefault-real-8.
320 2017-09-21 Paul Thomas <pault@gcc.gnu.org>
323 * match.c (gfc_match_associate): Before failing the association
324 try again, allowing a proc pointer selector.
329 * primary.c (gfc_match_varspec): Introduce 'tgt_expr', which
330 points to the associate selector, if any. Go through selector
331 references, after resolution for variables, to catch any full
332 or section array references. If a class associate name does
333 not have the same declared type as the selector, resolve the
334 selector and copy the declared type to the associate name.
335 Before throwing a no implicit type error, resolve all allowed
336 selector expressions, and copy the resulting typespec.
339 * resolve.c (resolve_assoc_var): Selector must cannot be the
340 NULL expression and it must have a type.
343 * resolve.c (resolve_symbol): Allow associate names to be
346 2017-09-21 Cesar Philippidis <cesar@codesourcery.com>
348 * openmp.c (gfc_match_oacc_wait): Don't restrict wait directive
349 arguments to constant integers.
351 2017-09-17 Paul Thomas <pault@gcc.gnu.org>
354 * decl.c (gfc_get_pdt_instance): Use the component initializer
355 expression for the default, rather than the parameter value.
356 * resolve.c (resolve_pdt): New function.
357 (resolve_symbol): Call it. Remove false error, prohibiting
358 deferred type parameters for dummy arguments.
361 * primary.c (gfc_match_varspec): If the type of an associate
362 name is unknown and yet there is a match, try resolving the
363 target expression and using its type.
365 2017-09-15 Paul Thomas <pault@gcc.gnu.org>
368 trans-decl.c (gfc_trans_deferred_vars): Do not null the 'span'
369 field if the symbol is either implicitly or explicitly saved.
371 2017-09-13 Paul Thomas <pault@gcc.gnu.org>
374 * decl.c (match_char_kind): If the kind expression is
375 parameterized, save it in saved_kind_expr and set kind = 0.
376 (gfc_get_pdt_instance): Resolve and simplify before emitting
377 error on expression kind. Insert a missing simplification after
378 insertion of kind expressions.
380 2017-09-12 Paul Thomas <pault@gcc.gnu.org>
384 * decl.c (variable_decl): Check pdt template components for
385 appearance of KIND/LEN components in the type parameter name
386 list, that components corresponding to type parameters have
387 either KIND or LEN attributes and that KIND or LEN components
388 are scalar. Copy the initializer to the parameter value.
389 (gfc_get_pdt_instance): Add a label 'error_return' and follow
390 it with repeated code, while replacing this code with a jump.
391 Check if a parameter appears as a component in the template.
392 Make sure that the parameter expressions are integer. Validate
394 (gfc_match_decl_type_spec): Search for pdt_types in the parent
395 namespace since they are instantiated in the template ns.
396 * expr.c (gfc_extract_int): Use a KIND parameter if it
397 appears as a component expression.
398 (gfc_check_init_expr): Allow expressions with the pdt_kind
400 *primary.c (gfc_match_actual_arglist): Make sure that the first
401 keyword argument is recognised when 'pdt' is set.
403 2017-09-10 Paul Thomas <pault@gcc.gnu.org>
411 * expr.c (is_subref_array): Add class pointer array dummies
412 to the list of expressions that return true.
413 * trans-array.c: Add SPAN_FIELD and update indices for
415 (gfc_conv_descriptor_span, gfc_conv_descriptor_span_get,
416 gfc_conv_descriptor_span_set, is_pointer_array,
417 get_array_span): New functions.
418 (gfc_get_descriptor_offsets_for_info): New function to preserve
419 API for access to descriptor fields for trans-types.c.
420 (gfc_conv_scalarized_array_ref): If the expression is a subref
421 array, make sure that info->descriptor is a descriptor type.
422 Otherwise, if info->descriptor is a pointer array, set 'decl'
423 and fix it if it is a component reference.
424 (build_array_ref): Simplify handling of class array refs by
425 passing the vptr to gfc_build_array_ref rather than generating
426 the pointer arithmetic in this function.
427 (gfc_conv_array_ref): As in gfc_conv_scalarized_array_ref, set
429 (gfc_array_allocate): Set the span field if this is a pointer
430 array. Use the expr3 element size if it is available, so that
431 the dynamic type element size is used.
432 (gfc_conv_expr_descriptor): Set the span field for pointer
434 * trans-array.h: Prototypes for gfc_conv_descriptor_span_get
435 gfc_conv_descriptor_span_set and
436 gfc_get_descriptor_offsets_for_info added.
437 trans-decl.c (gfc_get_symbol_decl): If a non-class pointer
438 array, mark the declaration as a GFC_DECL_PTR_ARRAY_P. Remove
439 the setting of GFC_DECL_SPAN.
440 (gfc_trans_deferred_vars): Set the span field to zero in thge
442 * trans-expr.c (gfc_conv_procedure_call): Do not use copy-in/
443 copy-out to pass subref expressions to a pointer dummy.
444 (gfc_trans_pointer_assignment): Remove code for setting of
445 GFC_DECL_SPAN. Set the 'span' field for non-class pointers to
446 class function results. Likewise for rank remap. In the case
447 that the target is not a whole array, use the target array ref
448 for remap and, since the 'start' indices are missing, set the
449 lbounds to one, as required by the standard.
450 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Pick up the
451 'token' offset from the field decl in the descriptor.
452 (conv_isocbinding_subroutine): Set the 'span' field.
453 * trans-io.c (gfc_trans_transfer): Always scalarize pointer
455 * trans-stmt.c (trans_associate_var): Set the 'span' field.
456 * trans-types.c (gfc_get_array_descriptor_base): Add the 'span'
457 field to the array descriptor.
458 (gfc_get_derived_type): Pointer array components are marked as
459 GFC_DECL_PTR_ARRAY_P.
460 (gfc_get_array_descr_info): Replaced API breaking code for
461 descriptor offset calling gfc_get_descriptor_offsets_for_info.
462 * trans.c (get_array_span): New function.
463 (gfc_build_array_ref): Simplify by calling get_array_span and
464 obtain 'span' if 'decl' or 'vptr' present.
465 * trans.h : Rename DECL_LANG_FLAG_6, GFC_DECL_SUBREF_ARRAY_P,
466 as GFC_DECL_PTR_ARRAY_P.
468 2017-09-09 Paul Thomas <pault@gcc.gnu.org>
470 * decl.c : Add decl_type_param_list, type_param_spec_list as
471 static variables to hold PDT spec lists.
472 (build_sym): Copy 'type_param_spec_list' to symbol spec_list.
473 (build_struct): Copy the 'saved_kind_expr' to the component
474 'kind_expr'. Check that KIND or LEN components appear in the
475 decl_type_param_list. These should appear as symbols in the
476 f2k_derived namespace. If the component is itself a PDT type,
477 copy the decl_type_param_list to the component param_list.
478 (gfc_match_kind_spec): If the KIND expression is parameterized
479 set KIND to zero and store the expression in 'saved_kind_expr'.
480 (insert_parameter_exprs): New function.
481 (gfc_insert_kind_parameter_exprs): New function.
482 (gfc_insert_parameter_exprs): New function.
483 (gfc_get_pdt_instance): New function.
484 (gfc_match_decl_type_spec): Match the decl_type_spec_list if it
485 is present. If it is, call 'gfc_get_pdt_instance' to obtain the
486 specific instance of the PDT.
487 (match_attr_spec): Match KIND and LEN attributes. Check for the
488 standard and for type/kind of the parameter. They are also not
489 allowed outside a derived type definition.
490 (gfc_match_data_decl): Null the decl_type_param_list and the
491 type_param_spec_list on entry and free them on exit.
492 (gfc_match_formal_arglist): If 'typeparam' is true, add the
493 formal symbol to the f2k_derived namespace.
494 (gfc_match_derived_decl): Register the decl_type_param_list
495 if this is a PDT. If this is a type extension, gather up all
496 the type parameters and put them in the right order.
497 *dump-parse-tree.c (show_attr): Signal PDT templates and the
498 parameter attributes.
499 (show_components): Output parameter atrributes and component
501 (show_symbol): Show variable parameter lists.
502 * expr.c (expr.c): Copy the expression parameter list.
503 (gfc_is_constant_expr): Pass on symbols representing PDT
505 (gfc_check_init_expr): Break on PDT KIND parameters and
506 PDT parameter expressions.
507 (gfc_check_assign): Assigning to KIND or LEN components is an
509 (derived_parameter_expr): New function.
510 (gfc_derived_parameter_expr): New function.
511 (gfc_spec_list_type): New function.
512 * gfortran.h : Add enum gfc_param_spec_type. Add the PDT attrs
513 to the structure symbol_attr. Add the 'kind_expr' and
514 'param_list' field to the gfc_component structure. Comment on
515 the reuse of the gfc_actual_arglist structure as storage for
516 type parameter spec lists. Add the new field 'spec_type' to
517 this structure. Add 'param_list' fields to gfc_symbol and
518 gfc_expr. Add prototypes for gfc_insert_kind_parameter_exprs,
519 gfc_insert_parameter_exprs, gfc_add_kind, gfc_add_len,
520 gfc_derived_parameter_expr and gfc_spec_list_type.
521 * interface.c (gfc_compare_derived_types): Treat PDTs in the
522 same way as sequence types.
523 * match.c : Add variable 'type_param_spec_list'.
524 (gfc_op2string, gfc_match_member_sep, gfc_match_label): Remove
526 (match_derived_type_spec): Match PDTs and find specific
528 (gfc_match_type_spec): Remove more trailing whitespace.
529 (gfc_match_allocate): Assumed or deferred parameters cannot
530 appear here. Copy the type parameter spec list to the expr for
531 the allocatable entity. Free 'type_param_spec_list'.
532 (gfc_match_common, gfc_match_namelist, gfc_match_module): Still
533 more trailing whitespace to remove.
534 (gfc_match_type_is): Allow PDT typespecs.
535 * match.h : Modify prototypes for gfc_match_formal_arglist and
536 gfc_match_actual_arglist.
537 * module.c (ab_attribute, mstring attr_bits): PDT attributes
539 (mio_symbol_attribute): PDT attributes handled.
540 (mio_component): Deal with 'kind_expr' field.
541 (mio_full_f2k_derived): For PDT templates, transfer the formal
542 namespace symroot to the f2k_derived namespace.
543 *primary.c (match_keyword_arg, gfc_match_actual_arglist): Add
544 modifications to handle PDT spec lists. These are flagged in
545 both cases by new boolean arguments, whose prototype defaults
547 (gfc_match_structure_constructor, match_variable): Remove yet
548 more trailing whitespace.
549 * resolve.c (get_pdt_spec_expr, get_pdt_constructor): New
551 (resolve_structure_cons): If the constructor is a PDT template,
552 call get_pdt_constructor to build it using the parameter lists
553 and then get the specific instance of the PDT.
554 (resolve_component): PDT strings need a hidden string length
555 component like deferred characters.
556 (resolve_symbol): Dummy PDTs cannot have deferred parameters.
557 * symbol.c (gfc_add_kind, gfc_add_len): New functions.
558 (free_components): Free 'kind_expr' and 'param_list' fields.
559 (gfc_free_symbol): Free the 'param_list' field.
560 (gfc_find_sym_tree): If the current state is a PDT template,
561 look for the symtree in the f2k_derived namspaces.
562 trans-array.c (structure_alloc_comps): Allocate and deallocate
563 PDTs. Check dummy arguments for compliance of LEN parameters.
564 Add the new functions to the preceeding enum.
565 (gfc_allocate_pdt_comp, gfc_deallocate_pdt_comp and
566 gfc_check_pdt_dummy): New functions calling above.
567 * trans-array.h : Add prototypes for these functions.
568 trans-decl.c (gfc_get_symbol_decl): Call gfc_defer_symbol_init
569 as appropriate for PDT symbols.
570 (gfc_trans_deferred_vars): Allocate/deallocate PDT entities as
571 they come into and out of scope. Exclude pdt_types from being
573 (gfc_trans_subcomponent_assign): PDT array components must be
574 handles as if they are allocatable.
575 * trans-stmt.c (gfc_trans_allocate): Handle initialization of
577 (gfc_trans_deallocate): Likewise.
578 * trans-types.c (gfc_get_derived_type): PDT templates must not
579 arrive here. PDT string components are handles as if deferred.
580 Similarly, PDT arrays are treated as if allocatable. PDT
581 strings are pointer types.
582 * trans.c (gfc_deferred_strlen): Handle PDT strings in the same
583 way as deferred characters.
585 2017-09-01 Jakub Jelinek <jakub@redhat.com>
588 * parse.c (decode_omp_directive): Use matchs instead of matcho for
589 end ordered and ordered directives, except for ordered depend. For
590 -fopenmp-simd and ordered depend, reject the stmt.
591 * trans-openmp.c (gfc_trans_omp_ordered): For -fopenmp-simd ignore
592 threads clause and if simd clause isn't present, just translate the
595 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
596 Alan Hayward <alan.hayward@arm.com>
597 David Sherwood <david.sherwood@arm.com>
599 * trans-types.c (gfc_init_kinds): Use opt_scalar_int_mode for
602 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
603 Alan Hayward <alan.hayward@arm.com>
604 David Sherwood <david.sherwood@arm.com>
606 * target-memory.c (size_integer): Use SCALAR_INT_TYPE_MODE.
607 (size_logical): Likewise.
609 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
610 Alan Hayward <alan.hayward@arm.com>
611 David Sherwood <david.sherwood@arm.com>
613 * trans-types.c (gfc_type_for_mode): Use is_a <scalar_int_mode>.
615 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
616 Alan Hayward <alan.hayward@arm.com>
617 David Sherwood <david.sherwood@arm.com>
619 * trans-types.c (gfc_init_kinds): Use opt_scalar_float_mode
620 and FOR_EACH_MODE_IN_CLASS.
622 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
623 Alan Hayward <alan.hayward@arm.com>
624 David Sherwood <david.sherwood@arm.com>
626 * target-memory.c (size_float): Use SCALAR_FLOAT_TYPE_MODE
627 instead of TYPE_MODE.
629 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
630 Alan Hayward <alan.hayward@arm.com>
631 David Sherwood <david.sherwood@arm.com>
633 * trans-types.c (gfc_init_kinds): Use machine_mode instead of int
636 2017-08-28 Janus Weil <janus@gcc.gnu.org>
639 * expr.c (gfc_check_pointer_assign): Improve the check whether pointer
640 may outlive pointer target.
642 2017-08-27 Thomas Koenig <tkoenig@gcc.gnu.org>
645 * frontend-passes (inline_matumul_assign): Explicity
646 set typespec for call to CONJG.
648 2017-08-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
651 * trans-io.c (get_dtio_proc): Add check for format label and set
652 formatted flag accordingly. Reorganize the code a little.
654 2017-08-16 Thomas Koenig <tkoenig@gcc.gnu.org>
657 * frontend-passes.c (realloc_string_callback): If expression is a
658 concatenation, also check for dependency.
659 (constant_string_length): Check for presence of symtree.
661 2017-08-13 Thomas Koenig <tkoenig@gcc.gnu.org>
663 * gfortran.texi: Document format of unformatted sequential files.
665 2017-08-11 Thomas Koenig <tkoenig@gcc.gnu.org>
667 * invoke.texi: Actually commit change about -Ofast.
669 2017-08-11 Thomas Koenig <tkoenig@gcc.gnu.org>
672 * resolve.c (resolve_symbol): Adjust (and reformat)
673 comment. Perform check if a BIND(C) is declared
674 at module level regardless of whether it is typed
677 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
679 * options.c (set_dec_flags): Only set legacy standards when value
682 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
684 * options.c (set_dec_flags, gfc_post_options): Only set flag_d_lines
685 with -fdec when not set by user.
687 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
689 * decl.c (attr_seen): New static variable.
690 * decl.c (variable_decl): Match %FILL in STRUCTURE body.
691 * gfortran.texi: Update documentation.
693 2017-08-08 Martin Liska <mliska@suse.cz>
695 * trans-types.c: Include header files.
697 2017-08-07 Thomas Koenig <tkoenig@gcc.gnu.org>
701 * options.c: Make -Ofast honor -fmax-stack-var-size.
702 * invoke.texi: Document change.
704 2017-08-01 Thomas König <tkoenig@gcc.gnu.org>
707 * intrisic.c (gfc_convert_type_warn): Only set typespec for
708 empty array constructors which don't have it already.
710 2017-08-01 Thomas Koenig <tkoenig@gcc.gnu.org>
713 * lang.opt (fc-prototypes): Add option.
714 * gfortran.h (gfc_typespec): Add interop_kind to struct.
715 (gfc_dump_c_prototypes): Add prototype.
716 * decl.c (gfc_match_kind_spec): Copy symbol used for kind to typespec.
717 * parse.c (gfc_parse_file): Call gfc_dump_prototypes.
718 * dump-parse-tree.c (gfc_dump_c_prototypes): New function.
719 (type_return): New enum.
720 (get_c_type_name): New function.
721 (write_decl): New function.
722 (write_type): New function.
723 (write_variable): New function.
724 (write_proc): New function.
725 (write_interop_decl): New function.
726 * invoke.texi: Document -fc-prototypes.
728 2017-08-01 Dominique d'Humieres <dominiq@lps.ens.fr>
731 * expr.c (gfc_check_init_expr): Use the renamed name.
733 2017-07-31 Jakub Jelinek <jakub@redhat.com>
735 * check.c (gfc_check_num_images): Fix a pasto.
737 2017-07-29 Jakub Jelinek <jakub@redhat.com>
739 * trans-decl.c (gfc_trans_use_stmts): Pass false as new argument to
740 the imported_module_or_decl debug hook.
742 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
744 * resolve.c (find_reachable_labels): Adjust.
746 2017-07-25 Jakub Jelinek <jakub@redhat.com>
748 * ioparm.def: Use 1U << 31 instead of 1 << 31 as flags2 mask.
750 2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
752 * dump-parse-tree.c (show_symbol): Show binding label if present.
754 2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
755 Mikael Morin <mikael@gcc.gnu.org>
758 * fortran/trans-array.c (gfc_conv_resolve_dependencies):
759 Break if dependency has been found.
761 2017-07-23 Alexander Monakov <amonakov@ispras.ru>
763 * interface.c (pair_cmp): Fix gfc_symbol comparison. Adjust comment.
765 2017-07-18 Nathan Sidwell <nathan@acm.org>
767 * trans.c (gfc_build_array_ref): Use TYPE_MAX_VALUE.
769 2017-07-09 Dominique d'Humieres <dominiq@lps.ens.fr>
772 * class.c (class_array_ref_detected): Remove a redundant
775 2017-07-06 Harald Anlauf <anlauf@gmx.de>
778 * array.c (gfc_ref_dimen_size): Handle bad subscript triplets.
780 2017-07-03 Dominique d'Humieres <dominiq@lps.ens.fr>
783 * resolve.c (resolve_symbol): Fix typo.
785 2017-07-03 Dominique d'Humieres <dominiq@lps.ens.fr>
788 * symbol.c (check_conflict): Add missing "conflicts".
790 2017-06-29 Cesar Philippidis <cesar@codesourcery.com>
793 * openmp.c (gfc_match_oacc_routine): Check if proc_name exist before
794 comparing the routine name against it.
796 2017-06-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
799 * trans-stmt.c (gfc_trans_call): If no code expr, use code->loc
800 as warning/error locus.
802 2017-06-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
805 * arith.c (wprecision_int_real): Set return value before
806 mpz_clear and then return after it.
808 2017-06-15 Janus Weil <janus@gcc.gnu.org>
811 * trans-expr.c (gfc_conv_procedure_call): Deallocate the result of
812 scalar allocatable procedure-pointer components.
814 2017-06-10 Thomas Koenig <tkoenig@gcc.gnu.org>
817 * frontend-passes.c (traverse_io_block): Also
818 check for variables occurring as indices multiple
819 time in a single implied DO loop.
821 2017-06-05 Janus Weil <janus@gcc.gnu.org>
824 * trans-expr.c (gfc_conv_procedure_call): Fix detection of allocatable
827 2017-06-05 Nicolas Koenig <koenigni@student.ethz.ch>
830 * frontend-passes.c (traverse_io_block): New function.
831 (simplify_io_impl_do): New function.
832 (optimize_namespace): Invoke gfc_code_walker with
835 2017-06-02 Jakub Jelinek <jakub@redhat.com>
838 * openmp.c (resolve_omp_clauses): Fix a typo.
840 2017-05-30 David Malcolm <dmalcolm@redhat.com>
842 * error.c (gfc_format_decoder): Update for new bool and
843 const char ** params.
845 2017-05-29 Thomas Koenig <tkoenig@gcc.gnu.org>
848 * frontend-passes.c (check_conjg_transpose_variable):
850 (has_dimen_vector_ref): Likewise
851 (matmul_temp_args): New function. Add prototype.
852 (optimize_namespace): Call matmul_temp_args.
854 2017-05-28 Thomas Koenig <tkoenig@gcc.gnu.org>
856 * frontend-passes.c (matmul_lhs_realloc): Correct
857 allocation size for case A1B2.
859 2017-05-25 Thomas Koenig <tkoenig@gcc.gnu.org>
861 * dump-parse-tree.c (show_expr): Also replace
862 with dumpfile for showing values for forgotten
865 2017-05-24 Thomas Koenig <tkoenig@gcc.gnu.org>
867 * dump-parse-tree.c (show_expr): Replace stdout
868 with dumpfile for showing values.
870 2017-05-24 Thomas Koenig <tkoenig@gcc.gnu.org>
873 * frontend-passes.c (matrix_case): Add A2TB2.
874 (inline_limit_check): Handle MATMUL(TRANSPOSE(A),B)
875 (inline_matmul_assign): Likewise.
877 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
879 * openmp.c (OACC_KERNELS_CLAUSES): Add "OMP_CLAUSE_NUM_GANGS",
880 "OMP_CLAUSE_NUM_WORKERS", "OMP_CLAUSE_VECTOR_LENGTH".
882 2017-05-22 Janus Weil <janus@gcc.gnu.org>
885 * resolve.c (resolve_fl_derived): Make sure that vtype symbols are
888 2017-05-19 Paul Thomas <pault@gcc.gnu.org>
891 * trans-io.c (nml_get_addr_expr): If we are dealing with class
892 type data set tmp tree to get that address.
893 (transfer_namelist_element): Set the array spec to point to the
896 2017-05-19 David Malcolm <dmalcolm@redhat.com>
899 * bbt.c (insert): Remove trailing exclamation mark from message.
900 * decl.c (gfc_match_final_decl): Likewise.
901 * dump-parse-tree.c (show_expr): Likewise.
902 * module.c (gfc_use_module): Likewise.
903 * primary.c (build_actual_constructor): Likewise.
904 (gfc_convert_to_structure_constructor): Likewise.
906 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
908 * gfortran.h (enum gfc_omp_default_sharing): Add
909 "OMP_DEFAULT_PRESENT".
910 * dump-parse-tree.c (show_omp_clauses): Handle it.
911 * openmp.c (gfc_match_omp_clauses): Likewise.
912 * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
914 2017-05-18 Fritz Reese <fritzoreese@gmail.com>
917 * decl.c (match_attr_spec, gfc_match_automatic,
918 gfc_match_static, gfc_match_structure_decl): Unify diagnostic
919 errors regarding -fdec options.
920 * io.c (match_dec_etag, match_dec_vtag, match_dec_ftag): Ditto.
922 2017-05-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
925 * trans-io.c (transfer_namelist_element): Change check from
926 NULL_TREE to null_pointer_node.
928 2017-05-17 Fritz Reese <fritzoreese@gmail.com>
931 * expr.c (component_initializer): Don't generate initializers for
933 * invoke.texi (-finit-derived): Document.
935 2017-05-16 Paul Thomas <pault@gcc.gnu.org>
938 * decl.c (build_sym): In a submodule allow overriding of host
939 associated symbols from the ancestor module with a new
942 2017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>
945 * trans-stmt.c (gfc_trans_integer_select): Remove redundant condition.
947 2017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>
950 * expr.c (gfc_generate_initializer): If type conversion fails,
951 check for error and return NULL.
953 2017-05-14 Nicolas Koenig <koenigni@student.ethz.ch>
956 * array.c (gfc_ref_dimen_size): Simplify stride
958 * data.c (gfc_advance_section): Simplify start,
959 end and stride expressions
960 (gfc_advance_section): Simplify start and end
962 (gfc_get_section_index): Simplify start expression
964 2017-05-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
966 * io.c (gfc_resolve_dt): Fix returns to bool type.
968 2017-05-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
971 * io.c (dtio_procs_present): Add new function to check for DTIO
972 procedures relative to I/O statement READ or WRITE.
973 (gfc_resolve_dt): Add namelist checks using the new function.
974 * resolve.c (dtio_procs_present): Remove function and related
975 namelist checks. (resolve_fl_namelist): Add check specific to
976 Fortran 95 restriction on namelist objects.
978 2017-05-11 Nathan Sidwell <nathan@acm.org>
980 * trans-decl.c: Include dumpfile.h not tree-dump.h,
982 2017-05-09 Janus Weil <janus@gcc.gnu.org>
985 * resolve.c (gfc_resolve_finalizers): Ensure that derived-type
986 components have a their finalizers resolved, also if the superordinate
987 type itself has a finalizer.
989 2017-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
992 * frontend-passes.c (matmul_to_var_expr): New function,
994 (matmul_to_var_code): Likewise.
995 (optimize_namespace): Use them from gfc_code_walker.
997 2017-05-05 David Malcolm <dmalcolm@redhat.com>
999 * cpp.c (cb_cpp_error): Replace report_diagnostic
1000 with diagnostic_report_diagnostic.
1001 * error.c (gfc_warning): Likewise.
1002 (gfc_warning_now_at): Likewise.
1003 (gfc_warning_now): Likewise.
1004 (gfc_warning_internal): Likewise.
1005 (gfc_error_now): Likewise.
1006 (gfc_fatal_error): Likewise.
1007 (gfc_error_opt): Likewise.
1008 (gfc_internal_error): Likewise.
1010 2017-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1013 * frontend-passes.c (inline_matmul_assign): Also check bounds
1014 for allocatable lhs and matrix-vector-multiplication.
1016 2017-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1019 * io.c (format_lex): Check for '/' and set token to FMT_SLASH.
1020 (check_format): Move FMT_DT checking code to data_desc section.
1021 * module.c (gfc_match_use): Include the case of INTERFACE_DTIO.
1023 2017-04-22 Janus Weil <janus@gcc.gnu.org>
1026 * trans-types.c (gfc_conv_procedure_call): Deallocate the components
1027 of allocatable intent(out) arguments.
1029 2017-04-21 Janus Weil <janus@gcc.gnu.org>
1032 * trans-types.c (gfc_get_derived_type): Prevent an infinite loop when
1033 building a derived type that includes a procedure pointer component
1034 with a polymorphic result.
1036 2017-04-17 Paul Thomas <pault@gcc.gnu.org>
1039 * module.c (find_symtree_for_symbol): Delete.
1040 (read_module): Remove the call to the above.
1042 2017-04-14 Janus Weil <janus@gcc.gnu.org>
1045 * class.c (generate_finalization_wrapper): Give the finalization wrapper
1046 the recursive attribute.
1048 2017-04-10 Nicolas Koenig <koenigni@student.ethz.ch>
1049 Paul Thomas <pault@gcc.gnu.org>
1052 * module.c (gfc_match_submodule): Add error
1053 if function is called in the wrong state.
1055 2017-04-10 Janus Weil <janus@gcc.gnu.org>
1058 * expr.c (gfc_check_pointer_assign): Check if procedure pointer
1059 components in a pointer assignment need an explicit interface.
1061 2017-03-18 Nicolas Koenig <koenigni@student.ethz.ch>
1064 * symbol.c (gfc_delete_symtree): If there is a period in the name, ignore
1065 everything before it.
1067 2017-03-28 Janus Weil <janus@gcc.gnu.org>
1070 * trans-io.c (transfer_namelist_element): Perform a polymorphic call
1071 to a DTIO procedure if necessary.
1073 2017-03-25 Paul Thomas <pault@gcc.gnu.org>
1077 * decl.c (access_attr_decl): Remove the error for an absent
1078 generic DTIO interface and ensure that symbol has the flavor
1081 2017-03-22 Dominique d'Humieres <dominiq@lps.ens.fr>
1084 * module.c: Remove trailing period.
1086 2017-03-22 Dominique d'Humieres <dominiq@lps.ens.fr>
1089 * decl.c: Replace '%s' with %qs.
1091 * interface.c: Likewise.
1092 * match.c: Likewise.
1093 * primary.c: Likewise.
1094 * resolve.c: Likewise.
1098 * io.c: Remove trailing spaces.
1099 * match.c: Likewise.
1100 * openmp.c: Likewise.
1101 * resolve.c: Likewise.
1102 * trans-intrinsic.c: Likewise.
1105 * expr.c: Remove a double spaces.
1108 * primary.c: Remove spurious quotes around %qs.
1110 2017-03-22 Thomas Koenig <tkoenig@gcc.gnu.org>
1113 * frontend-passes.c (combine_array_constructor): Take
1114 location of new expression from constructor expression instead
1117 2017-03-20 Nicolas Koenig <koenigni@student.ethz.ch>
1120 * symbol.c (check_conflict): Report an error if an EQUIVALENCE
1123 2017-03-18 Nicolas Koenig <koenigni@student.ethz.ch>
1126 * decl.c (add_hidden_procptr_result): Fixed Refs count of the
1127 created "ppr@" symbol.
1129 2017-03-18 Paul Thomas <pault@gcc.gnu.org>
1132 * module.c (mio_symbol_attribute): Remove reset of the flag
1133 'no_module_procedures'.
1134 (check_for_module_procedures): New function. Move declaration
1135 of 'no_module_procedures' to above it.
1136 (gfc_dump_module): Traverse namespace calling new function.
1138 2017-03-18 Paul Thomas <pault@gcc.gnu.org>
1141 * symbol.c (check_conflict): A dummy procedure in a submodule,
1142 module procedure is not an error.
1143 (gfc_add_flavor): Ditto.
1145 2017-03-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1148 * openmp.c (check_symbol_not_pointer): Adjust diagnostics.
1150 2017-03-16 Jakub Jelinek <jakub@redhat.com>
1153 * parse.c (gfc_ascii_statement): Use !$ACC for ST_OACC_ATOMIC
1154 and ST_OACC_END_ATOMIC, instead of !ACC.
1155 * trans-decl.c (finish_oacc_declare): Use !$ACC instead of $!ACC.
1156 * openmp.c (gfc_match_oacc_declare, gfc_match_oacc_wait,
1157 gfc_resolve_oacc_declare): Likewise.
1160 * error.c (gfc_format_decoder): Rename plus argument to set_locus,
1161 remove ATTRIBUTE_UNUSED from all arguments, call default_tree_printer
1162 if not a Fortran specific spec.
1163 * trans-io.c: Include options.h.
1164 (gfc_build_st_parameter): Temporarily disable -Wpadded around layout
1165 of artificial IO data structures.
1167 2017-03-15 David Malcolm <dmalcolm@redhat.com>
1170 * resolve.c (resolve_contained_fntype): Make error messages more
1171 amenable to translation.
1173 2017-03-06 Richard Biener <rguenther@suse.de>
1176 * trans.c (gfc_add_modify_loc): Weaken assert.
1178 2017-03-05 Andre Vehreschild <vehre@gcc.gnu.org>,
1179 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
1181 * check.c (positive_check): Add new function checking constant for
1182 being greater then zero.
1183 (gfc_check_image_status): Add checking of image_status arguments.
1184 (gfc_check_failed_or_stopped_images): Same but for failed_- and
1185 stopped_images function.
1186 * dump-parse-tree.c (show_code_node): Added output of FAIL IMAGE.
1187 * gfortran.h (enum gfc_statement): Added FAIL_IMAGE_ST.
1188 (enum gfc_isym_id): Added new intrinsic symbols.
1189 (enum gfc_exec_op): Added EXEC_FAIL_IMAGE.
1190 * gfortran.texi: Added description for the new API functions. Updated
1191 coverage of gfortran of TS18508.
1192 * intrinsic.c (add_functions): Added symbols to resolve new intrinsic
1194 * intrinsic.h: Added prototypes.
1195 * iresolve.c (gfc_resolve_failed_images): Resolve the failed_images
1197 (gfc_resolve_image_status): Same for image_status.
1198 (gfc_resolve_stopped_images): Same for stopped_images.
1199 * libgfortran.h: Added prototypes.
1200 * match.c (gfc_match_if): Added matching of FAIL IMAGE statement.
1201 (gfc_match_fail_image): Match a FAIL IMAGE statement.
1202 * match.h: Added prototype.
1203 * parse.c (decode_statement): Added matching for FAIL IMAGE.
1204 (next_statement): Same.
1205 (gfc_ascii_statement): Same.
1207 * simplify.c (gfc_simplify_failed_or_stopped_images): For COARRAY=
1208 single a constant result can be returne.d
1209 (gfc_simplify_image_status): For COARRAY=single the result is constant.
1210 * st.c (gfc_free_statement): Added FAIL_IMAGE handling.
1211 * trans-decl.c (gfc_build_builtin_function_decls): Added decls of the
1213 * trans-expr.c (gfc_conv_procedure_call): This is first time all
1214 arguments of a function are optional, which is now handled here
1216 * trans-intrinsic.c (conv_intrinsic_image_status): Translate
1218 (gfc_conv_intrinsic_function): Add support for image_status.
1219 (gfc_is_intrinsic_libcall): Add support for the remaining new
1221 * trans-stmt.c (gfc_trans_fail_image): Trans a fail image.
1222 * trans-stmt.h: Add the prototype for the above.
1223 * trans.c (trans_code): Dispatch for fail_image.
1224 * trans.h: Add the trees for the new intrinsics.
1226 2017-03-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1229 * openmp.c (check_symbol_not_pointer): Adjust diagnostic.
1231 2017-02-28 Paul Thomas <pault@gcc.gnu.org>
1234 * resolve.c (resolve_fl_procedure): Deal with the case where
1235 'submodule_name' is NULL so that gfc_error does not ICE.
1236 Reformat the error message to make it more consistent.
1238 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1240 * parse.c (parse_critical_block): Use cond ? G_("...") : G_("...")
1241 instead of just cond ? "..." : "...".
1242 * scanner.c (gfc_next_char_literal): Likewise.
1243 * match.c (match_exit_cycle): Likewise.
1245 2017-02-26 Thomas Koenig <tkoenig@gcc.gnu.org>
1248 * options.c (gfc_post_options): Set default limit for matmul
1250 * invoke.texi: Document change.
1252 2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
1255 * interface.c (check_dtio_arg_TKR_intent): Change 'intent'
1258 2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
1261 * interface.c (gfc_match_end_interface): Remove spurious comma
1262 and space, replace 'got %s' with 'got %qs'.
1264 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1267 * interface.c (check_dtio_arg_TKR_intent): Supply 'must'
1268 missing from error message.
1270 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1273 * interface.c (gfc_find_typebound_dtio_proc): Guard test for
1274 flavor attribute by checking that symbol is resolved.
1276 2017-02-16 Paul Thomas <pault@gcc.gnu.org>
1279 * decl.c (access_attr_decl): Test for presence of generic DTIO
1280 interface and emit error if not present.
1282 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1285 * parse.c (check_component, parse_union): Whitespace.
1286 (set_syms_host_assoc): For a derived type, check if the module
1287 in which it was declared is one of the submodule ancestors. If
1288 it is, make the components public. Otherwise, reset attribute
1289 'host_assoc' and set 'use-assoc' so that encapsulation is
1292 2017-02-19 Paul Thomas <pault@gcc.gnu.org>
1295 * decl.c (gfc_set_constant_character_len): Whitespace.
1296 (gfc_match_end): Catch case where a procedure is contained in
1297 a module procedure and ensure that 'end procedure' is the
1298 correct termination.
1300 2017-02-19 Paul Thomas <pault@gcc.gnu.org>
1303 * resolve.c (fixup_unique_dummy): New function.
1304 (gfc_resolve_expr): Call it for dummy variables with a unique
1307 2017-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
1310 * trans-expr.c (gfc_trans_assignment_1): Deref indirect refs when
1311 compiling with -fcheck=mem to check the pointer and not the data.
1313 2017-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
1316 * trans-array.c (duplicate_allocatable_coarray): Ensure attributes
1317 passed are properly initialized.
1318 (structure_alloc_comps): Same.
1319 * trans-expr.c (gfc_trans_structure_assign): Same.
1321 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1323 * trans-expr.c (gfc_conv_substring): Add missing space in diagnostics.
1325 2017-02-12 Thomas Koenig <tkoenig@gcc.gnu.org>
1328 * intrinsic.c (gfc_intrinsic_func_interface): Return an error
1329 for -std=f95 for disallowed transformational functions in
1330 initialization expressions.
1332 2017-02-09 Cesar Philippidis <cesar@codesourcery.com>
1333 Joseph Myers <joseph@codesourcery.com>
1335 * openmp.c (resolve_omp_clauses): Error on directives
1336 containing both tile and collapse clauses.
1337 (resolve_oacc_loop_blocks): Represent '*' tile arguments as zero.
1338 * trans-openmp.c (gfc_trans_omp_do): Lower tiled loops like
1341 2017-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
1343 * trans-types.c (gfc_get_int_kind_from_width_isofortranen): Choose
1344 REAL type with the widest precision if two (or more) have the same
1347 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1350 * trans-stmt.c (gfc_trans_allocate): Only deallocate the components of
1351 the temporary, when a new object was created for the temporary. Not
1352 when it is just an alias to an existing object.
1354 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1357 * trans-decl.c (generate_coarray_sym_init): Retrieve the symbol's
1358 attributes before using them.
1360 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1363 * trans-stmt.c (gfc_trans_allocate): Add the multiplying the _len
1364 component of unlimited polymorphic objects when source-allocating.
1366 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1369 * trans-array.c (structure_alloc_comps): Ignore pointer components when
1372 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1375 * f95-lang.c (gfc_create_decls): Include stringpool.h.
1376 Pass main_input_filename to build_translation_unit_decl.
1378 2017-01-23 Thomas Koenig <tkoenig@netcologne.de>
1380 * arith.c (arith_power): If simplifying integer power expression
1381 to zero, warn if -Winteger-division is given.
1383 2017-01-22 Jakub Jelinek <jakub@redhat.com>
1386 * parse.c (matchs, matcho, matchds, matchdo): Replace return st;
1387 with { ret = st; goto finish; }.
1388 (decode_omp_directive): Allow declare simd, declare target and
1389 simd directives in PURE/ELEMENTAL procedures. Only call
1390 gfc_unset_implicit_pure on successful match of other procedures.
1392 2017-01-21 Gerald Pfeifer <gerald@pfeifer.com>
1394 * gfc-internals.texi (Symbol Versioning): Change references
1395 to www.akkadia.org to https.
1397 2017-01-21 Jakub Jelinek <jakub@redhat.com>
1399 * gfortran.h (gfc_extract_int): Change return type to bool. Add
1400 int argument with = 0.
1401 * decl.c (gfc_match_kind_spec): Adjust gfc_extract_int caller, pass
1402 1 as new last argument to it, don't emit gfc_error.
1403 (match_char_kind): Likewise.
1404 (gfc_match_decl_type_spec): Use gfc_get_string ("%s", x) instead of
1406 (gfc_match_derived_decl, match_binding_attributes): Likewise.
1407 (gfc_match_structure_decl): Don't sprintf back to name, call
1408 get_struct_decl directly with gfc_dt_upper_string (name) result.
1409 * trans-stmt.c (gfc_trans_allocate): Use gfc_get_string ("%s", x)
1410 instead of gfc_get_string (x).
1411 * module.c (gfc_dt_lower_string, gfc_dt_upper_string,
1412 gfc_match_use, gfc_match_submodule, find_true_name, mio_pool_string,
1413 mio_symtree_ref, mio_expr, mio_omp_udr_expr, load_generic_interfaces,
1414 load_omp_udrs, load_needed, read_module, dump_module,
1415 create_intrinsic_function, import_iso_c_binding_module,
1416 create_int_parameter, create_int_parameter_array, create_derived_type,
1417 use_iso_fortran_env_module): Likewise.
1418 * error.c (gfc_diagnostic_starter, gfc_diagnostic_start_span): Use
1419 pp_verbatim (context->printer, "%s", x) instead of
1420 pp_verbatim (context->printer, x).
1421 * match.c (gfc_match_small_int): Adjust gfc_extract_int caller, pass
1422 1 as new last argument to it, don't emit gfc_error.
1423 (gfc_match_small_int_expr): Likewise.
1424 * iresolve.c (gfc_get_string): Optimize format "%s" case.
1425 (resolve_bound): Use gfc_get_string ("%s", x) instead of
1427 (resolve_transformational): Formatting fix.
1428 (gfc_resolve_char_achar): Change name argument to bool is_achar,
1429 use a single format string and if is_achar add "a" before "char".
1430 (gfc_resolve_achar, gfc_resolve_char): Adjust callers.
1431 * expr.c (gfc_extract_int): Change return type to bool, return true
1432 if some error occurred. Add REPORT_ERROR argument, if non-zero
1433 call either gfc_error or gfc_error_now depending on its sign.
1434 * arith.c (arith_power): Adjust gfc_extract_int caller.
1435 * symbol.c (gfc_add_component): Use gfc_get_string ("%s", x) instead
1436 of gfc_get_string (x).
1437 (gfc_new_symtree, gfc_delete_symtree, gfc_get_uop, gfc_new_symbol,
1438 gfc_get_gsymbol, generate_isocbinding_symbol): Likewise.
1439 * openmp.c (gfc_match_omp_clauses): Adjust gfc_extract_int caller, pass
1440 -1 as new last argument to it, don't emit gfc_error_now.
1441 (gfc_match_omp_declare_reduction): Use gfc_get_string ("%s", x)
1442 instead of gfc_get_string (x).
1443 * check.c (kind_check): Adjust gfc_extract_int caller.
1444 * intrinsic.c (add_sym, find_sym, make_alias): Use
1445 gfc_get_string ("%s", x) instead of gfc_get_string (x).
1446 * simplify.c (get_kind, gfc_simplify_btest, gfc_simplify_maskr,
1447 gfc_simplify_maskl, gfc_simplify_poppar, gfc_simplify_repeat,
1448 gfc_simplify_selected_int_kind, gfc_simplify_selected_real_kind):
1449 Adjust gfc_extract_int callers.
1450 * trans-decl.c (gfc_find_module): Use gfc_get_string ("%s", x)
1451 instead of gfc_get_string (x).
1452 * matchexp.c (expression_syntax): Add const.
1453 * primary.c (match_kind_param, match_hollerith_constant,
1454 match_string_constant): Adjust gfc_extract_int callers.
1455 (match_keyword_arg): Use gfc_get_string ("%s", x) instead of
1457 * frontend-passes.c (optimize_minmaxloc): Likewise.
1459 2017-01-19 Andre Vehreschild <vehre@gcc.gnu.org>
1462 * trans-decl.c (gfc_build_qualified_array): Add static decl to parent
1463 function only, when the decl-context is not the translation unit.
1465 2017-01-18 Louis Krupp <louis.krupp@zoho.com>
1469 * trans-expr.c (gfc_conv_variable): Don't treat temporary variables
1470 as function arguments.
1471 * trans-stmt.c (forall_make_variable_temp,
1472 generate_loop_for_temp_to_lhs, gfc_trans_assign_need_temp,
1473 gfc_trans_forall_1): Don't adjust offset of forall temporary
1474 for array sections, make forall temporaries work for substring
1475 expressions, improve test coverage by adding -ftest-forall-temp
1476 option to request usage of temporary array in forall code.
1477 * lang.opt: Add -ftest-forall-temp option.
1478 * invoke.texi: Add -ftest-forall-temp option.
1480 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
1482 * primary.c (caf_variable_attr): Improve figuring whether the current
1483 component is the last one refed.
1484 * trans-stmt.c (gfc_trans_allocate): Do not generate sync_all calls
1485 when allocating pointer or allocatable components.
1487 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
1489 * gfortran.texi: Add missing parameters to caf-API functions. Correct
1490 typos and clarify some descriptions.
1492 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
1495 Missed some cases, here they are:
1496 * trans-decl.c (gfc_build_qualified_array): Add static tokens to the
1497 parent function's scope.
1498 * trans-expr.c (gfc_get_tree_for_caf_expr): Shorten code. Remove
1501 2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org>
1504 * resolve.c (resolve_lock_unlock_event): Resolve the expression for
1505 event's until_count.
1507 2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org>
1510 * trans-expr.c (gfc_get_tree_for_caf_expr): Ensure the backend_decl
1511 is valid before accessing it.
1513 2017-01-09 Jakub Jelinek <jakub@redhat.com>
1515 PR translation/79019
1516 PR translation/79020
1517 * decl.c (attr_decl1): Fix spelling in translatable string.
1518 * intrinsic.texi: Fix spelling - invokation -> invocation.
1519 * lang.opt (faggressive-function-elimination, gfc_convert): Fix
1520 typos in descriptions.
1521 * openmp.c (resolve_omp_clauses): Add missing whitespace to
1522 translatable strings.
1524 2017-01-08 Martin Sebor <msebor@redhat.com>
1526 PR tree-optimization/78913
1528 * trans-common.c (build_equiv_decl): Increase buffer size to avoid
1529 truncation for any argument.
1530 * trans-types.c (gfc_build_logical_type): Same.
1532 2017-01-07 Andre Vehreschild <vehre@gcc.gnu.org>
1536 * expr.c (gfc_check_pointer_assign): Return the same error message for
1537 rewritten coarray pointer assignments like for plain ones.
1538 * gfortran.h: Change prototype.
1539 * primary.c (caf_variable_attr): Set attributes used ones only only
1540 ones. Add setting of pointer_comp attribute.
1541 (gfc_caf_attr): Add setting of pointer_comp attribute.
1542 * trans-array.c (gfc_array_allocate): Add flag that the component to
1543 allocate is not an ultimate coarray component. Add allocation of
1545 (structure_alloc_comps): Extend nullify to treat pointer components in
1546 coarrays correctly. Restructure nullify to remove redundant code.
1547 (gfc_nullify_alloc_comp): Allow setting caf_mode flags.
1548 * trans-array.h: Change prototype of gfc_nullify_alloc_comp ().
1549 * trans-decl.c (generate_coarray_sym_init): Call nullify_alloc_comp for
1550 derived type coarrays with pointer components.
1551 * trans-expr.c (gfc_trans_structure_assign): Also treat pointer
1553 (trans_caf_token_assign): Handle assignment of token of scalar pointer
1555 (gfc_trans_pointer_assignment): Call above routine.
1556 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Add treating pointer
1558 (gfc_conv_intrinsic_caf_get): Likewise.
1559 (conv_caf_send): Likewise.
1560 * trans-stmt.c (gfc_trans_allocate): After allocating a derived type in
1561 a coarray pre-register the tokens.
1562 (gfc_trans_deallocate): Simply determining the coarray type (scalar or
1563 array) and deregistering it correctly.
1564 * trans-types.c (gfc_typenode_for_spec): Replace in_coarray flag by the
1565 actual codim to allow lookup of array types in the cache.
1566 (gfc_build_array_type): Likewise.
1567 (gfc_get_array_descriptor_base): Likewise.
1568 (gfc_get_array_type_bounds): Likewise.
1569 (gfc_get_derived_type): Likewise.
1570 * trans-types.h: Likewise.
1571 * trans.c (gfc_deallocate_with_status): Enable deregistering of all kind
1572 of coarray components.
1573 (gfc_deallocate_scalar_with_status): Use free() in fcoarray_single mode
1574 instead of caf_deregister.
1576 2017-01-06 Jakub Jelinek <jakub@redhat.com>
1578 * simplify.c (simplify_transformation_to_array): Use
1579 GCC_DIAGNOSTIC_PUSH_IGNORED and GCC_DIAGNOSTIC_POP instead of
1580 #pragma GCC diagnostic {push,ignored,pop}.
1582 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
1584 * simplify.c (simplify_transformation_to_array): Silence
1585 array bounds warning. Fix whitespace.
1587 2017-01-04 Alexandre Oliva <aoliva@redhat.com>
1589 * module.c (load_omp_udrs): Initialize name.
1591 2017-01-02 Janne Blomqvist <jb@gcc.gnu.org>
1594 * trans-expr.c (gfc_trans_string_copy): Rework string copy
1595 algorithm to avoid -Wstringop-overflow warning.
1597 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1599 Update copyright years.
1601 * gfortranspec.c (lang_specific_driver): Update copyright notice
1603 * gfc-internals.texi: Bump @copying's copyright year.
1604 * gfortran.texi: Ditto.
1605 * intrinsic.texi: Ditto.
1606 * invoke.texi: Ditto.
1608 Copyright (C) 2017 Free Software Foundation, Inc.
1610 Copying and distribution of this file, with or without modification,
1611 are permitted in any medium without royalty provided the copyright
1612 notice and this notice are preserved.