1 2017-11-04 Paul Thomas <pault@gcc.gnu.org>
4 * trans-decl.c (gfc_trans_deferred_vars): Do a better job of a
5 case where 'tmp' was used unititialized and remove TODO.
7 2017-11-03 Steven G. Kargl <kargl@gcc.gnu.org>
10 * resolve.c (resolve_equivalence): An entity in a common block within
11 a module cannot appear in an equivalence statement if the entity is
12 with a pure procedure.
14 2017-10-31 Jim Wilson <wilson@tuliptree.org>
16 * parse.c (unexpected_eof): Call gcc_unreachable before return.
18 2017-10-30 Paul Thomas <pault@gcc.gnu.org>
21 * trans_expr.c (gfc_conv_procedure_call): When passing a class
22 argument to an unlimited polymorphic dummy, it is wrong to cast
23 the passed expression as unlimited, unless it is unlimited. The
24 correct way is to assign to each of the fields and set the _len
27 2017-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
29 * resolve.c (resolve_transfer): Set derived to correct symbol for
32 2017-10-29 Jim Wilson <wilson@tuliptree.org>
34 * invoke.texi: Delete adb and sdb references.
36 2017-10-28 Andre Vehreschild <vehre@gcc.gnu.org>
38 * check.c (gfc_check_co_reduce): Clarify error message.
40 2017-10-28 Paul Thomas <pault@gcc.gnu.org>
43 * trans-expr.c (trans_class_vptr_len_assignment): 'vptr_expr'
44 must only be set if the right hand side expression is of type
47 2017-10-27 Steven G. Kargl <kargl@gcc.gnu.org>
50 * match.c (gfc_match_allocate): Exit early on syntax error.
52 2017-10-27 Thomas Koenig <tkoenig@gcc.gnu.org>
55 * simplify.c (is_constant_array_expr): If the expression is
56 a parameter array, call gfc_simplify_expr.
58 2017-10-25 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
60 * match.c (gfc_match_type_is): Fix typo in error message.
62 2017-10-21 Paul Thomas <pault@gcc.gnu.org>
65 * decl.c (gfc_get_pdt_instance): Remove the error message that
66 the parameter does not have a corresponding component since
67 this is now taken care of when the derived type is resolved. Go
68 straight to error return instead.
69 (gfc_match_formal_arglist): Make the PDT relevant errors
70 immediate so that parsing of the derived type can continue.
71 (gfc_match_derived_decl): Do not check the match status on
72 return from gfc_match_formal_arglist for the same reason.
73 * resolve.c (resolve_fl_derived0): Check that each type
74 parameter has a corresponding component.
77 * resolve.c (resolve_generic_f): Check that the derived type
78 can be used before resolving the struture constructor.
81 * symbol.c (check_conflict): Add the conflicts involving PDT
82 KIND and LEN attributes.
84 2017-10-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
86 * interface.c (check_sym_interfaces, check_uop_interfaces,
87 gfc_check_interfaces): Base interface_name buffer off
90 2017-10-19 Jakub Jelinek <jakub@redhat.com>
93 * gfortran.h (gfc_resolve_do_iterator): Add a bool arg.
94 (gfc_resolve_omp_local_vars): New declaration.
95 * openmp.c (omp_current_ctx): Make static.
96 (gfc_resolve_omp_parallel_blocks): Handle EXEC_OMP_TASKLOOP
97 and EXEC_OMP_TASKLOOP_SIMD.
98 (gfc_resolve_do_iterator): Add ADD_CLAUSE argument, if false,
99 don't actually add any clause. Move omp_current_ctx test
101 (handle_local_var, gfc_resolve_omp_local_vars): New functions.
102 * resolve.c (gfc_resolve_code): Call gfc_resolve_omp_parallel_blocks
103 instead of just gfc_resolve_omp_do_blocks for EXEC_OMP_TASKLOOP
104 and EXEC_OMP_TASKLOOP_SIMD.
105 (gfc_resolve_code): Adjust gfc_resolve_do_iterator caller.
106 (resolve_codes): Call gfc_resolve_omp_local_vars.
108 2017-10-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
110 * gfortran.h (gfc_lookup_function_fuzzy): New declaration.
111 (gfc_closest_fuzzy_match): New declaration.
112 (vec_push): New definition.
113 * misc.c (gfc_closest_fuzzy_match): New definition.
114 * resolve.c: Include spellcheck.h.
115 (lookup_function_fuzzy_find_candidates): New static function.
116 (lookup_uop_fuzzy_find_candidates): Likewise.
117 (lookup_uop_fuzzy): Likewise.
118 (resolve_operator) <INTRINSIC_USER>: Call lookup_uop_fuzzy.
119 (gfc_lookup_function_fuzzy): New definition.
120 (resolve_unknown_f): Call gfc_lookup_function_fuzzy.
121 * interface.c (check_interface0): Likewise.
122 (lookup_arg_fuzzy_find_candidates): New static function.
123 (lookup_arg_fuzzy ): Likewise.
124 (compare_actual_formal): Call lookup_arg_fuzzy.
125 * symbol.c: Include spellcheck.h.
126 (lookup_symbol_fuzzy_find_candidates): New static function.
127 (lookup_symbol_fuzzy): Likewise.
128 (gfc_set_default_type): Call lookup_symbol_fuzzy.
129 (lookup_component_fuzzy_find_candidates): New static function.
130 (lookup_component_fuzzy): Likewise.
131 (gfc_find_component): Call lookup_component_fuzzy.
133 2017-10-18 Thomas Koenig <tkoenig@gcc.gnu.org>
136 * frontend-passes.c (combine_array_constructor): If an array
137 constructor is all constants and has more elements than a small
138 constant, don't convert a*[b,c] to [a*b,a*c] to reduce compilation
141 2017-10-18 Thomas Koenig <tkoenig@gcc.gnu.org>
144 * resolve.c (resovle_symbol): Change gcc_assert to
145 sensible error message.
147 2017-10-18 Paul Thomas <pault@gcc.gnu.org>
150 * trans_decl.c (gfc_get_symbol_decl): Procedure symbols that
151 have the 'used_in_submodule' attribute should be processed by
152 'gfc_get_extern_function_decl'.
154 2017-10-16 Fritz Reese <fritzoreese@gmail.com>
157 * trans-io.c (transfer_expr): Treat BT_UNION as BT_DERIVED.
159 2017-10-15 Thomas Koenig <tkoenig@gcc.gnu.org>
162 * fortran/scanner.c (last_error_char): New global variable.
163 (gfc_scanner_init_1): Set last_error_char to NULL.
164 (gfc_gobble_whitespace): If a character not printable or
165 not newline, issue an error.
167 2017-10-13 Paul Thomas <pault@gcc.gnu.org>
170 * resolve.c (resolve_symbol): Ensure that derived type array
171 results get default initialization.
173 2017-10-11 Nathan Sidwell <nathan@acm.org>
175 * cpp.c (gfc_cpp_add_include_path): Update incpath_e names.
176 (gfc_cpp_add_include_path_after): Likewise.
178 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
180 * target-memory.c (gfc_interpret_logical): Use wi::to_wide when
181 operating on trees as wide_ints.
182 * trans-const.c (gfc_conv_tree_to_mpz): Likewise.
183 * trans-expr.c (gfc_conv_cst_int_power): Likewise.
184 * trans-intrinsic.c (trans_this_image): Likewise.
185 (gfc_conv_intrinsic_bound): Likewise.
186 (conv_intrinsic_cobound): Likewise.
188 2017-10-08 Steven G. Kargl <kargl@gcc.gnu.org>
190 * check.c (gfc_check_x): Remove function.
191 * intrinsic.c (add_functions): Use gfc_check_fn_r.
193 2017-10-08 Paul Thomas <pault@gcc.gnu.org>
196 * module.c : Bump up MOD_VERSION to 15.
197 (mio_component): Edit comment about PDT specification list.
198 (mio_expr, mio_symbol): Include the expression and symbol PDT
199 specification lists in the same way as in mio_component.
201 2017-10-08 Thomas Koenig <tkoenig@gcc.gnu.org>
203 * dump_prase_tree (show_symbol): Output list of variables in
205 (show_code_node): Add new line for ELSE and END DO for DO
207 * invoke.texi: Document that the output of
208 -fdump-fortran-original, -fdump-fortran-optimized and
209 -fdump-parse-tree is unsable and may lead to ICEs.
211 2017-10-07 Paul Thomas <pault@gcc.gnu.org>
214 * class.c (gfc_find_derived_vtab): Return NULL for a passed
215 pdt template to prevent bad procedures from being written.
216 * decl.c (gfc_get_pdt_instance): Do not use the default
217 initializer for pointer and allocatable pdt type components. If
218 the component is allocatbale, set the 'alloc_comp' attribute of
220 * module.c : Add a prototype for 'mio_actual_arglist'. Add a
221 boolean argument 'pdt'.
222 (mio_component): Call it for the parameter list of pdt type
223 components with 'pdt' set to true.
224 (mio_actual_arg): Add the boolean 'pdt' and, if it is set, call
225 mio_integer for the 'spec_type'.
226 (mio_actual_arglist): Add the boolean 'pdt' and use it in the
227 call to mio_actual_arg.
228 (mio_expr, mio_omp_udr_expr): Call mio_actual_arglist with
230 * resolve.c (get_pdt_spec_expr): Add the parameter name to the
231 KIND parameter error.
232 (get_pdt_constructor): Check that cons->expr is non-null.
233 * trans-array.c (structure_alloc_comps): For deallocation of
234 allocatable components, ensure that parameterized components
235 are deallocated first. Likewise, when parameterized components
236 are allocated, nullify allocatable components first. Do not
237 recurse into pointer or allocatable pdt components while
238 allocating or deallocating parameterized components. Test that
239 parameterized arrays or strings are allocated before freeing
241 (gfc_trans_pointer_assignment): Call the new function. Tidy up
242 a minor whitespace issue.
243 trans-decl.c (gfc_trans_deferred_vars): Set 'tmp' to NULL_TREE
244 to prevent the expression from being used a second time.
246 2017-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
249 * expr.c (gfc_check_pointer_assign): Error
250 for non-contiguous rhs.
252 2017-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
254 * gfortran.h (async_io_dt): Add external reference.
255 * io.c (async_io_dt): Add variable.
256 (compare_to_allowed_values): Add prototyte. Add optional argument
257 num. If present, set it to the number of the entry that was
259 (check_io_constraints): If this is for an asynchronous I/O
260 statement, set async_io_dt and set the asynchronous flag for
262 * resolve.c (resolve_transfer): If async_io_dt is set, set
263 the asynchronous flag on the variable.
264 (resolve_fl_namelist): If async_io_dt is set, set the asynchronous
265 flag on all elements of the namelist.
267 2017-10-04 Paul Thomas <pault@gcc.gnu.org>
271 * resolve.c (resolve_assoc_var): Deferred character type
272 associate names must not receive an integer conatant length.
273 * symbol.c (gfc_is_associate_pointer): Deferred character
274 length functions also require an associate pointer.
275 * trans-decl.c (gfc_get_symbol_decl): Deferred character
276 length functions or derived type components require the assoc
277 name to have variable string length.
278 * trans-stmt.c (trans_associate_var): Set the string length of
279 deferred string length associate names. The address expression
280 is not needed for allocatable, pointer or dummy targets. Change
281 the comment about defered string length targets.
283 2017-10-03 Thomas Koenig <tkoenig@gcc.gnu.org>
285 * io.c (match_wait_element): Correctly match END and EOR tags.
286 * dump-parse-tree.c (show_code_node): Handle EXEC_WAIT.
288 2017-10-02 Paul Thomas <pault@gcc.gnu.org>
291 * resolve.c (gfc_resolve_code): Simplify condition for class
292 pointer assignments becoming regular assignments by asserting
293 that only class valued targets are permitted.
294 * trans-expr.c (trans_class_pointer_fcn): New function using a
295 block of code from gfc_trans_pointer_assignment.
296 (gfc_trans_pointer_assignment): Call the new function. Tidy up
297 a minor whitespace issue.
299 2017-10-01 Dominique d'Humieres <dominiq@lps.ens.fr>
302 * parse.c (gfc_global_used): Replace the gfc_internal_error
305 2017-09-29 Dominique d'Humieres <dominiq@lps.ens.fr>
308 * interface.c (compare_actual_formal): Change warnings to errors
309 when "Actual argument contains too few elements for dummy
310 argument", unless -std=legacy is used.
312 2017-09-27 Thomas Schwinge <thomas@codesourcery.com>
314 * lang.opt <Wdo-subscript>: End help text with a period.
316 2017-09-26 Thomas Koenig <tkoenig@gcc.gnu.org>
318 * frontend-passes.c (do_subscript): Don't do anything
319 if inside an associate list.
321 2017-09-25 Thomas Koenig <tkoenig@gcc.gnu.org>
323 * lang.opt: Add -Wdo-subscript.
324 * frontend-passes.c (do_t): New type.
325 (doloop_list): Use variable of do_type.
326 (if_level): Variable to track if levels.
327 (select_level): Variable to track select levels.
328 (gfc_run_passes): Initialize i_level and select_level.
329 (doloop_code): Record current level of if + select
330 level in doloop_list. Add seen_goto if there could
331 be a branch outside the loop. Use different type for
333 (doloop_function): Call do_intent and do_subscript; move
334 functionality of checking INTENT to do_intent.
335 (insert_index_t): New type, for callback_insert_index.
336 (callback_insert_index): New function.
337 (insert_index): New function.
338 (do_subscript): New function.
339 (do_intent): New function.
340 (gfc_code_walker): Keep track of if_level and select_level.
341 * invoke.texi: Document -Wdo-subscript.
343 2017-09-25 Janne Blomqvist <jb@gcc.gnu.org>
345 * trans.c (gfc_unlikely): Remove unnecessary fold_convert.
346 (gfc_likely): Likewise.
348 2017-09-24 Thomas Koenig <tkoenig@gcc.gnu.org>
349 Steven G. Kargl <kargl@gcc.gnu.org>
352 * expr.c (gfc_get_full_arrayspec_from_expr): If there is
353 no symtree, set array spec to NULL.
355 2017-09-23 Janus Weil <janus@gcc.gnu.org>
358 * lang.opt: Add the options -fdefault-real-10 and -fdefault-real-16.
359 Rename flag_default_real to flag_default_real_8.
360 * invoke.texi: Add documentation.
361 * module.c (use_iso_fortran_env_module): flag_default_real is renamed.
362 * trans-types.c (gfc_init_kinds): Implement the flags
363 -fdefault-real-10 and -fdefault-real-16. Make -fdefault-double-8 work
364 without -fdefault-real-8.
366 2017-09-21 Paul Thomas <pault@gcc.gnu.org>
369 * match.c (gfc_match_associate): Before failing the association
370 try again, allowing a proc pointer selector.
375 * primary.c (gfc_match_varspec): Introduce 'tgt_expr', which
376 points to the associate selector, if any. Go through selector
377 references, after resolution for variables, to catch any full
378 or section array references. If a class associate name does
379 not have the same declared type as the selector, resolve the
380 selector and copy the declared type to the associate name.
381 Before throwing a no implicit type error, resolve all allowed
382 selector expressions, and copy the resulting typespec.
385 * resolve.c (resolve_assoc_var): Selector must cannot be the
386 NULL expression and it must have a type.
389 * resolve.c (resolve_symbol): Allow associate names to be
392 2017-09-21 Cesar Philippidis <cesar@codesourcery.com>
394 * openmp.c (gfc_match_oacc_wait): Don't restrict wait directive
395 arguments to constant integers.
397 2017-09-17 Paul Thomas <pault@gcc.gnu.org>
400 * decl.c (gfc_get_pdt_instance): Use the component initializer
401 expression for the default, rather than the parameter value.
402 * resolve.c (resolve_pdt): New function.
403 (resolve_symbol): Call it. Remove false error, prohibiting
404 deferred type parameters for dummy arguments.
407 * primary.c (gfc_match_varspec): If the type of an associate
408 name is unknown and yet there is a match, try resolving the
409 target expression and using its type.
411 2017-09-15 Paul Thomas <pault@gcc.gnu.org>
414 trans-decl.c (gfc_trans_deferred_vars): Do not null the 'span'
415 field if the symbol is either implicitly or explicitly saved.
417 2017-09-13 Paul Thomas <pault@gcc.gnu.org>
420 * decl.c (match_char_kind): If the kind expression is
421 parameterized, save it in saved_kind_expr and set kind = 0.
422 (gfc_get_pdt_instance): Resolve and simplify before emitting
423 error on expression kind. Insert a missing simplification after
424 insertion of kind expressions.
426 2017-09-12 Paul Thomas <pault@gcc.gnu.org>
430 * decl.c (variable_decl): Check pdt template components for
431 appearance of KIND/LEN components in the type parameter name
432 list, that components corresponding to type parameters have
433 either KIND or LEN attributes and that KIND or LEN components
434 are scalar. Copy the initializer to the parameter value.
435 (gfc_get_pdt_instance): Add a label 'error_return' and follow
436 it with repeated code, while replacing this code with a jump.
437 Check if a parameter appears as a component in the template.
438 Make sure that the parameter expressions are integer. Validate
440 (gfc_match_decl_type_spec): Search for pdt_types in the parent
441 namespace since they are instantiated in the template ns.
442 * expr.c (gfc_extract_int): Use a KIND parameter if it
443 appears as a component expression.
444 (gfc_check_init_expr): Allow expressions with the pdt_kind
446 *primary.c (gfc_match_actual_arglist): Make sure that the first
447 keyword argument is recognised when 'pdt' is set.
449 2017-09-10 Paul Thomas <pault@gcc.gnu.org>
457 * expr.c (is_subref_array): Add class pointer array dummies
458 to the list of expressions that return true.
459 * trans-array.c: Add SPAN_FIELD and update indices for
461 (gfc_conv_descriptor_span, gfc_conv_descriptor_span_get,
462 gfc_conv_descriptor_span_set, is_pointer_array,
463 get_array_span): New functions.
464 (gfc_get_descriptor_offsets_for_info): New function to preserve
465 API for access to descriptor fields for trans-types.c.
466 (gfc_conv_scalarized_array_ref): If the expression is a subref
467 array, make sure that info->descriptor is a descriptor type.
468 Otherwise, if info->descriptor is a pointer array, set 'decl'
469 and fix it if it is a component reference.
470 (build_array_ref): Simplify handling of class array refs by
471 passing the vptr to gfc_build_array_ref rather than generating
472 the pointer arithmetic in this function.
473 (gfc_conv_array_ref): As in gfc_conv_scalarized_array_ref, set
475 (gfc_array_allocate): Set the span field if this is a pointer
476 array. Use the expr3 element size if it is available, so that
477 the dynamic type element size is used.
478 (gfc_conv_expr_descriptor): Set the span field for pointer
480 * trans-array.h: Prototypes for gfc_conv_descriptor_span_get
481 gfc_conv_descriptor_span_set and
482 gfc_get_descriptor_offsets_for_info added.
483 trans-decl.c (gfc_get_symbol_decl): If a non-class pointer
484 array, mark the declaration as a GFC_DECL_PTR_ARRAY_P. Remove
485 the setting of GFC_DECL_SPAN.
486 (gfc_trans_deferred_vars): Set the span field to zero in thge
488 * trans-expr.c (gfc_conv_procedure_call): Do not use copy-in/
489 copy-out to pass subref expressions to a pointer dummy.
490 (gfc_trans_pointer_assignment): Remove code for setting of
491 GFC_DECL_SPAN. Set the 'span' field for non-class pointers to
492 class function results. Likewise for rank remap. In the case
493 that the target is not a whole array, use the target array ref
494 for remap and, since the 'start' indices are missing, set the
495 lbounds to one, as required by the standard.
496 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Pick up the
497 'token' offset from the field decl in the descriptor.
498 (conv_isocbinding_subroutine): Set the 'span' field.
499 * trans-io.c (gfc_trans_transfer): Always scalarize pointer
501 * trans-stmt.c (trans_associate_var): Set the 'span' field.
502 * trans-types.c (gfc_get_array_descriptor_base): Add the 'span'
503 field to the array descriptor.
504 (gfc_get_derived_type): Pointer array components are marked as
505 GFC_DECL_PTR_ARRAY_P.
506 (gfc_get_array_descr_info): Replaced API breaking code for
507 descriptor offset calling gfc_get_descriptor_offsets_for_info.
508 * trans.c (get_array_span): New function.
509 (gfc_build_array_ref): Simplify by calling get_array_span and
510 obtain 'span' if 'decl' or 'vptr' present.
511 * trans.h : Rename DECL_LANG_FLAG_6, GFC_DECL_SUBREF_ARRAY_P,
512 as GFC_DECL_PTR_ARRAY_P.
514 2017-09-09 Paul Thomas <pault@gcc.gnu.org>
516 * decl.c : Add decl_type_param_list, type_param_spec_list as
517 static variables to hold PDT spec lists.
518 (build_sym): Copy 'type_param_spec_list' to symbol spec_list.
519 (build_struct): Copy the 'saved_kind_expr' to the component
520 'kind_expr'. Check that KIND or LEN components appear in the
521 decl_type_param_list. These should appear as symbols in the
522 f2k_derived namespace. If the component is itself a PDT type,
523 copy the decl_type_param_list to the component param_list.
524 (gfc_match_kind_spec): If the KIND expression is parameterized
525 set KIND to zero and store the expression in 'saved_kind_expr'.
526 (insert_parameter_exprs): New function.
527 (gfc_insert_kind_parameter_exprs): New function.
528 (gfc_insert_parameter_exprs): New function.
529 (gfc_get_pdt_instance): New function.
530 (gfc_match_decl_type_spec): Match the decl_type_spec_list if it
531 is present. If it is, call 'gfc_get_pdt_instance' to obtain the
532 specific instance of the PDT.
533 (match_attr_spec): Match KIND and LEN attributes. Check for the
534 standard and for type/kind of the parameter. They are also not
535 allowed outside a derived type definition.
536 (gfc_match_data_decl): Null the decl_type_param_list and the
537 type_param_spec_list on entry and free them on exit.
538 (gfc_match_formal_arglist): If 'typeparam' is true, add the
539 formal symbol to the f2k_derived namespace.
540 (gfc_match_derived_decl): Register the decl_type_param_list
541 if this is a PDT. If this is a type extension, gather up all
542 the type parameters and put them in the right order.
543 *dump-parse-tree.c (show_attr): Signal PDT templates and the
544 parameter attributes.
545 (show_components): Output parameter atrributes and component
547 (show_symbol): Show variable parameter lists.
548 * expr.c (expr.c): Copy the expression parameter list.
549 (gfc_is_constant_expr): Pass on symbols representing PDT
551 (gfc_check_init_expr): Break on PDT KIND parameters and
552 PDT parameter expressions.
553 (gfc_check_assign): Assigning to KIND or LEN components is an
555 (derived_parameter_expr): New function.
556 (gfc_derived_parameter_expr): New function.
557 (gfc_spec_list_type): New function.
558 * gfortran.h : Add enum gfc_param_spec_type. Add the PDT attrs
559 to the structure symbol_attr. Add the 'kind_expr' and
560 'param_list' field to the gfc_component structure. Comment on
561 the reuse of the gfc_actual_arglist structure as storage for
562 type parameter spec lists. Add the new field 'spec_type' to
563 this structure. Add 'param_list' fields to gfc_symbol and
564 gfc_expr. Add prototypes for gfc_insert_kind_parameter_exprs,
565 gfc_insert_parameter_exprs, gfc_add_kind, gfc_add_len,
566 gfc_derived_parameter_expr and gfc_spec_list_type.
567 * interface.c (gfc_compare_derived_types): Treat PDTs in the
568 same way as sequence types.
569 * match.c : Add variable 'type_param_spec_list'.
570 (gfc_op2string, gfc_match_member_sep, gfc_match_label): Remove
572 (match_derived_type_spec): Match PDTs and find specific
574 (gfc_match_type_spec): Remove more trailing whitespace.
575 (gfc_match_allocate): Assumed or deferred parameters cannot
576 appear here. Copy the type parameter spec list to the expr for
577 the allocatable entity. Free 'type_param_spec_list'.
578 (gfc_match_common, gfc_match_namelist, gfc_match_module): Still
579 more trailing whitespace to remove.
580 (gfc_match_type_is): Allow PDT typespecs.
581 * match.h : Modify prototypes for gfc_match_formal_arglist and
582 gfc_match_actual_arglist.
583 * module.c (ab_attribute, mstring attr_bits): PDT attributes
585 (mio_symbol_attribute): PDT attributes handled.
586 (mio_component): Deal with 'kind_expr' field.
587 (mio_full_f2k_derived): For PDT templates, transfer the formal
588 namespace symroot to the f2k_derived namespace.
589 *primary.c (match_keyword_arg, gfc_match_actual_arglist): Add
590 modifications to handle PDT spec lists. These are flagged in
591 both cases by new boolean arguments, whose prototype defaults
593 (gfc_match_structure_constructor, match_variable): Remove yet
594 more trailing whitespace.
595 * resolve.c (get_pdt_spec_expr, get_pdt_constructor): New
597 (resolve_structure_cons): If the constructor is a PDT template,
598 call get_pdt_constructor to build it using the parameter lists
599 and then get the specific instance of the PDT.
600 (resolve_component): PDT strings need a hidden string length
601 component like deferred characters.
602 (resolve_symbol): Dummy PDTs cannot have deferred parameters.
603 * symbol.c (gfc_add_kind, gfc_add_len): New functions.
604 (free_components): Free 'kind_expr' and 'param_list' fields.
605 (gfc_free_symbol): Free the 'param_list' field.
606 (gfc_find_sym_tree): If the current state is a PDT template,
607 look for the symtree in the f2k_derived namspaces.
608 trans-array.c (structure_alloc_comps): Allocate and deallocate
609 PDTs. Check dummy arguments for compliance of LEN parameters.
610 Add the new functions to the preceeding enum.
611 (gfc_allocate_pdt_comp, gfc_deallocate_pdt_comp and
612 gfc_check_pdt_dummy): New functions calling above.
613 * trans-array.h : Add prototypes for these functions.
614 trans-decl.c (gfc_get_symbol_decl): Call gfc_defer_symbol_init
615 as appropriate for PDT symbols.
616 (gfc_trans_deferred_vars): Allocate/deallocate PDT entities as
617 they come into and out of scope. Exclude pdt_types from being
619 (gfc_trans_subcomponent_assign): PDT array components must be
620 handles as if they are allocatable.
621 * trans-stmt.c (gfc_trans_allocate): Handle initialization of
623 (gfc_trans_deallocate): Likewise.
624 * trans-types.c (gfc_get_derived_type): PDT templates must not
625 arrive here. PDT string components are handles as if deferred.
626 Similarly, PDT arrays are treated as if allocatable. PDT
627 strings are pointer types.
628 * trans.c (gfc_deferred_strlen): Handle PDT strings in the same
629 way as deferred characters.
631 2017-09-01 Jakub Jelinek <jakub@redhat.com>
634 * parse.c (decode_omp_directive): Use matchs instead of matcho for
635 end ordered and ordered directives, except for ordered depend. For
636 -fopenmp-simd and ordered depend, reject the stmt.
637 * trans-openmp.c (gfc_trans_omp_ordered): For -fopenmp-simd ignore
638 threads clause and if simd clause isn't present, just translate the
641 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
642 Alan Hayward <alan.hayward@arm.com>
643 David Sherwood <david.sherwood@arm.com>
645 * trans-types.c (gfc_init_kinds): Use opt_scalar_int_mode for
648 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
649 Alan Hayward <alan.hayward@arm.com>
650 David Sherwood <david.sherwood@arm.com>
652 * target-memory.c (size_integer): Use SCALAR_INT_TYPE_MODE.
653 (size_logical): Likewise.
655 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
656 Alan Hayward <alan.hayward@arm.com>
657 David Sherwood <david.sherwood@arm.com>
659 * trans-types.c (gfc_type_for_mode): Use is_a <scalar_int_mode>.
661 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
662 Alan Hayward <alan.hayward@arm.com>
663 David Sherwood <david.sherwood@arm.com>
665 * trans-types.c (gfc_init_kinds): Use opt_scalar_float_mode
666 and FOR_EACH_MODE_IN_CLASS.
668 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
669 Alan Hayward <alan.hayward@arm.com>
670 David Sherwood <david.sherwood@arm.com>
672 * target-memory.c (size_float): Use SCALAR_FLOAT_TYPE_MODE
673 instead of TYPE_MODE.
675 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
676 Alan Hayward <alan.hayward@arm.com>
677 David Sherwood <david.sherwood@arm.com>
679 * trans-types.c (gfc_init_kinds): Use machine_mode instead of int
682 2017-08-28 Janus Weil <janus@gcc.gnu.org>
685 * expr.c (gfc_check_pointer_assign): Improve the check whether pointer
686 may outlive pointer target.
688 2017-08-27 Thomas Koenig <tkoenig@gcc.gnu.org>
691 * frontend-passes (inline_matumul_assign): Explicity
692 set typespec for call to CONJG.
694 2017-08-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
697 * trans-io.c (get_dtio_proc): Add check for format label and set
698 formatted flag accordingly. Reorganize the code a little.
700 2017-08-16 Thomas Koenig <tkoenig@gcc.gnu.org>
703 * frontend-passes.c (realloc_string_callback): If expression is a
704 concatenation, also check for dependency.
705 (constant_string_length): Check for presence of symtree.
707 2017-08-13 Thomas Koenig <tkoenig@gcc.gnu.org>
709 * gfortran.texi: Document format of unformatted sequential files.
711 2017-08-11 Thomas Koenig <tkoenig@gcc.gnu.org>
713 * invoke.texi: Actually commit change about -Ofast.
715 2017-08-11 Thomas Koenig <tkoenig@gcc.gnu.org>
718 * resolve.c (resolve_symbol): Adjust (and reformat)
719 comment. Perform check if a BIND(C) is declared
720 at module level regardless of whether it is typed
723 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
725 * options.c (set_dec_flags): Only set legacy standards when value
728 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
730 * options.c (set_dec_flags, gfc_post_options): Only set flag_d_lines
731 with -fdec when not set by user.
733 2017-08-10 Fritz Reese <fritzoreese@gmail.com>
735 * decl.c (attr_seen): New static variable.
736 * decl.c (variable_decl): Match %FILL in STRUCTURE body.
737 * gfortran.texi: Update documentation.
739 2017-08-08 Martin Liska <mliska@suse.cz>
741 * trans-types.c: Include header files.
743 2017-08-07 Thomas Koenig <tkoenig@gcc.gnu.org>
747 * options.c: Make -Ofast honor -fmax-stack-var-size.
748 * invoke.texi: Document change.
750 2017-08-01 Thomas König <tkoenig@gcc.gnu.org>
753 * intrisic.c (gfc_convert_type_warn): Only set typespec for
754 empty array constructors which don't have it already.
756 2017-08-01 Thomas Koenig <tkoenig@gcc.gnu.org>
759 * lang.opt (fc-prototypes): Add option.
760 * gfortran.h (gfc_typespec): Add interop_kind to struct.
761 (gfc_dump_c_prototypes): Add prototype.
762 * decl.c (gfc_match_kind_spec): Copy symbol used for kind to typespec.
763 * parse.c (gfc_parse_file): Call gfc_dump_prototypes.
764 * dump-parse-tree.c (gfc_dump_c_prototypes): New function.
765 (type_return): New enum.
766 (get_c_type_name): New function.
767 (write_decl): New function.
768 (write_type): New function.
769 (write_variable): New function.
770 (write_proc): New function.
771 (write_interop_decl): New function.
772 * invoke.texi: Document -fc-prototypes.
774 2017-08-01 Dominique d'Humieres <dominiq@lps.ens.fr>
777 * expr.c (gfc_check_init_expr): Use the renamed name.
779 2017-07-31 Jakub Jelinek <jakub@redhat.com>
781 * check.c (gfc_check_num_images): Fix a pasto.
783 2017-07-29 Jakub Jelinek <jakub@redhat.com>
785 * trans-decl.c (gfc_trans_use_stmts): Pass false as new argument to
786 the imported_module_or_decl debug hook.
788 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
790 * resolve.c (find_reachable_labels): Adjust.
792 2017-07-25 Jakub Jelinek <jakub@redhat.com>
794 * ioparm.def: Use 1U << 31 instead of 1 << 31 as flags2 mask.
796 2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
798 * dump-parse-tree.c (show_symbol): Show binding label if present.
800 2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
801 Mikael Morin <mikael@gcc.gnu.org>
804 * fortran/trans-array.c (gfc_conv_resolve_dependencies):
805 Break if dependency has been found.
807 2017-07-23 Alexander Monakov <amonakov@ispras.ru>
809 * interface.c (pair_cmp): Fix gfc_symbol comparison. Adjust comment.
811 2017-07-18 Nathan Sidwell <nathan@acm.org>
813 * trans.c (gfc_build_array_ref): Use TYPE_MAX_VALUE.
815 2017-07-09 Dominique d'Humieres <dominiq@lps.ens.fr>
818 * class.c (class_array_ref_detected): Remove a redundant
821 2017-07-06 Harald Anlauf <anlauf@gmx.de>
824 * array.c (gfc_ref_dimen_size): Handle bad subscript triplets.
826 2017-07-03 Dominique d'Humieres <dominiq@lps.ens.fr>
829 * resolve.c (resolve_symbol): Fix typo.
831 2017-07-03 Dominique d'Humieres <dominiq@lps.ens.fr>
834 * symbol.c (check_conflict): Add missing "conflicts".
836 2017-06-29 Cesar Philippidis <cesar@codesourcery.com>
839 * openmp.c (gfc_match_oacc_routine): Check if proc_name exist before
840 comparing the routine name against it.
842 2017-06-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
845 * trans-stmt.c (gfc_trans_call): If no code expr, use code->loc
846 as warning/error locus.
848 2017-06-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
851 * arith.c (wprecision_int_real): Set return value before
852 mpz_clear and then return after it.
854 2017-06-15 Janus Weil <janus@gcc.gnu.org>
857 * trans-expr.c (gfc_conv_procedure_call): Deallocate the result of
858 scalar allocatable procedure-pointer components.
860 2017-06-10 Thomas Koenig <tkoenig@gcc.gnu.org>
863 * frontend-passes.c (traverse_io_block): Also
864 check for variables occurring as indices multiple
865 time in a single implied DO loop.
867 2017-06-05 Janus Weil <janus@gcc.gnu.org>
870 * trans-expr.c (gfc_conv_procedure_call): Fix detection of allocatable
873 2017-06-05 Nicolas Koenig <koenigni@student.ethz.ch>
876 * frontend-passes.c (traverse_io_block): New function.
877 (simplify_io_impl_do): New function.
878 (optimize_namespace): Invoke gfc_code_walker with
881 2017-06-02 Jakub Jelinek <jakub@redhat.com>
884 * openmp.c (resolve_omp_clauses): Fix a typo.
886 2017-05-30 David Malcolm <dmalcolm@redhat.com>
888 * error.c (gfc_format_decoder): Update for new bool and
889 const char ** params.
891 2017-05-29 Thomas Koenig <tkoenig@gcc.gnu.org>
894 * frontend-passes.c (check_conjg_transpose_variable):
896 (has_dimen_vector_ref): Likewise
897 (matmul_temp_args): New function. Add prototype.
898 (optimize_namespace): Call matmul_temp_args.
900 2017-05-28 Thomas Koenig <tkoenig@gcc.gnu.org>
902 * frontend-passes.c (matmul_lhs_realloc): Correct
903 allocation size for case A1B2.
905 2017-05-25 Thomas Koenig <tkoenig@gcc.gnu.org>
907 * dump-parse-tree.c (show_expr): Also replace
908 with dumpfile for showing values for forgotten
911 2017-05-24 Thomas Koenig <tkoenig@gcc.gnu.org>
913 * dump-parse-tree.c (show_expr): Replace stdout
914 with dumpfile for showing values.
916 2017-05-24 Thomas Koenig <tkoenig@gcc.gnu.org>
919 * frontend-passes.c (matrix_case): Add A2TB2.
920 (inline_limit_check): Handle MATMUL(TRANSPOSE(A),B)
921 (inline_matmul_assign): Likewise.
923 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
925 * openmp.c (OACC_KERNELS_CLAUSES): Add "OMP_CLAUSE_NUM_GANGS",
926 "OMP_CLAUSE_NUM_WORKERS", "OMP_CLAUSE_VECTOR_LENGTH".
928 2017-05-22 Janus Weil <janus@gcc.gnu.org>
931 * resolve.c (resolve_fl_derived): Make sure that vtype symbols are
934 2017-05-19 Paul Thomas <pault@gcc.gnu.org>
937 * trans-io.c (nml_get_addr_expr): If we are dealing with class
938 type data set tmp tree to get that address.
939 (transfer_namelist_element): Set the array spec to point to the
942 2017-05-19 David Malcolm <dmalcolm@redhat.com>
945 * bbt.c (insert): Remove trailing exclamation mark from message.
946 * decl.c (gfc_match_final_decl): Likewise.
947 * dump-parse-tree.c (show_expr): Likewise.
948 * module.c (gfc_use_module): Likewise.
949 * primary.c (build_actual_constructor): Likewise.
950 (gfc_convert_to_structure_constructor): Likewise.
952 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
954 * gfortran.h (enum gfc_omp_default_sharing): Add
955 "OMP_DEFAULT_PRESENT".
956 * dump-parse-tree.c (show_omp_clauses): Handle it.
957 * openmp.c (gfc_match_omp_clauses): Likewise.
958 * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
960 2017-05-18 Fritz Reese <fritzoreese@gmail.com>
963 * decl.c (match_attr_spec, gfc_match_automatic,
964 gfc_match_static, gfc_match_structure_decl): Unify diagnostic
965 errors regarding -fdec options.
966 * io.c (match_dec_etag, match_dec_vtag, match_dec_ftag): Ditto.
968 2017-05-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
971 * trans-io.c (transfer_namelist_element): Change check from
972 NULL_TREE to null_pointer_node.
974 2017-05-17 Fritz Reese <fritzoreese@gmail.com>
977 * expr.c (component_initializer): Don't generate initializers for
979 * invoke.texi (-finit-derived): Document.
981 2017-05-16 Paul Thomas <pault@gcc.gnu.org>
984 * decl.c (build_sym): In a submodule allow overriding of host
985 associated symbols from the ancestor module with a new
988 2017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>
991 * trans-stmt.c (gfc_trans_integer_select): Remove redundant condition.
993 2017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>
996 * expr.c (gfc_generate_initializer): If type conversion fails,
997 check for error and return NULL.
999 2017-05-14 Nicolas Koenig <koenigni@student.ethz.ch>
1002 * array.c (gfc_ref_dimen_size): Simplify stride
1004 * data.c (gfc_advance_section): Simplify start,
1005 end and stride expressions
1006 (gfc_advance_section): Simplify start and end
1008 (gfc_get_section_index): Simplify start expression
1010 2017-05-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1012 * io.c (gfc_resolve_dt): Fix returns to bool type.
1014 2017-05-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1017 * io.c (dtio_procs_present): Add new function to check for DTIO
1018 procedures relative to I/O statement READ or WRITE.
1019 (gfc_resolve_dt): Add namelist checks using the new function.
1020 * resolve.c (dtio_procs_present): Remove function and related
1021 namelist checks. (resolve_fl_namelist): Add check specific to
1022 Fortran 95 restriction on namelist objects.
1024 2017-05-11 Nathan Sidwell <nathan@acm.org>
1026 * trans-decl.c: Include dumpfile.h not tree-dump.h,
1028 2017-05-09 Janus Weil <janus@gcc.gnu.org>
1031 * resolve.c (gfc_resolve_finalizers): Ensure that derived-type
1032 components have a their finalizers resolved, also if the superordinate
1033 type itself has a finalizer.
1035 2017-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
1038 * frontend-passes.c (matmul_to_var_expr): New function,
1040 (matmul_to_var_code): Likewise.
1041 (optimize_namespace): Use them from gfc_code_walker.
1043 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1045 * cpp.c (cb_cpp_error): Replace report_diagnostic
1046 with diagnostic_report_diagnostic.
1047 * error.c (gfc_warning): Likewise.
1048 (gfc_warning_now_at): Likewise.
1049 (gfc_warning_now): Likewise.
1050 (gfc_warning_internal): Likewise.
1051 (gfc_error_now): Likewise.
1052 (gfc_fatal_error): Likewise.
1053 (gfc_error_opt): Likewise.
1054 (gfc_internal_error): Likewise.
1056 2017-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1059 * frontend-passes.c (inline_matmul_assign): Also check bounds
1060 for allocatable lhs and matrix-vector-multiplication.
1062 2017-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1065 * io.c (format_lex): Check for '/' and set token to FMT_SLASH.
1066 (check_format): Move FMT_DT checking code to data_desc section.
1067 * module.c (gfc_match_use): Include the case of INTERFACE_DTIO.
1069 2017-04-22 Janus Weil <janus@gcc.gnu.org>
1072 * trans-types.c (gfc_conv_procedure_call): Deallocate the components
1073 of allocatable intent(out) arguments.
1075 2017-04-21 Janus Weil <janus@gcc.gnu.org>
1078 * trans-types.c (gfc_get_derived_type): Prevent an infinite loop when
1079 building a derived type that includes a procedure pointer component
1080 with a polymorphic result.
1082 2017-04-17 Paul Thomas <pault@gcc.gnu.org>
1085 * module.c (find_symtree_for_symbol): Delete.
1086 (read_module): Remove the call to the above.
1088 2017-04-14 Janus Weil <janus@gcc.gnu.org>
1091 * class.c (generate_finalization_wrapper): Give the finalization wrapper
1092 the recursive attribute.
1094 2017-04-10 Nicolas Koenig <koenigni@student.ethz.ch>
1095 Paul Thomas <pault@gcc.gnu.org>
1098 * module.c (gfc_match_submodule): Add error
1099 if function is called in the wrong state.
1101 2017-04-10 Janus Weil <janus@gcc.gnu.org>
1104 * expr.c (gfc_check_pointer_assign): Check if procedure pointer
1105 components in a pointer assignment need an explicit interface.
1107 2017-03-18 Nicolas Koenig <koenigni@student.ethz.ch>
1110 * symbol.c (gfc_delete_symtree): If there is a period in the name, ignore
1111 everything before it.
1113 2017-03-28 Janus Weil <janus@gcc.gnu.org>
1116 * trans-io.c (transfer_namelist_element): Perform a polymorphic call
1117 to a DTIO procedure if necessary.
1119 2017-03-25 Paul Thomas <pault@gcc.gnu.org>
1123 * decl.c (access_attr_decl): Remove the error for an absent
1124 generic DTIO interface and ensure that symbol has the flavor
1127 2017-03-22 Dominique d'Humieres <dominiq@lps.ens.fr>
1130 * module.c: Remove trailing period.
1132 2017-03-22 Dominique d'Humieres <dominiq@lps.ens.fr>
1135 * decl.c: Replace '%s' with %qs.
1137 * interface.c: Likewise.
1138 * match.c: Likewise.
1139 * primary.c: Likewise.
1140 * resolve.c: Likewise.
1144 * io.c: Remove trailing spaces.
1145 * match.c: Likewise.
1146 * openmp.c: Likewise.
1147 * resolve.c: Likewise.
1148 * trans-intrinsic.c: Likewise.
1151 * expr.c: Remove a double spaces.
1154 * primary.c: Remove spurious quotes around %qs.
1156 2017-03-22 Thomas Koenig <tkoenig@gcc.gnu.org>
1159 * frontend-passes.c (combine_array_constructor): Take
1160 location of new expression from constructor expression instead
1163 2017-03-20 Nicolas Koenig <koenigni@student.ethz.ch>
1166 * symbol.c (check_conflict): Report an error if an EQUIVALENCE
1169 2017-03-18 Nicolas Koenig <koenigni@student.ethz.ch>
1172 * decl.c (add_hidden_procptr_result): Fixed Refs count of the
1173 created "ppr@" symbol.
1175 2017-03-18 Paul Thomas <pault@gcc.gnu.org>
1178 * module.c (mio_symbol_attribute): Remove reset of the flag
1179 'no_module_procedures'.
1180 (check_for_module_procedures): New function. Move declaration
1181 of 'no_module_procedures' to above it.
1182 (gfc_dump_module): Traverse namespace calling new function.
1184 2017-03-18 Paul Thomas <pault@gcc.gnu.org>
1187 * symbol.c (check_conflict): A dummy procedure in a submodule,
1188 module procedure is not an error.
1189 (gfc_add_flavor): Ditto.
1191 2017-03-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1194 * openmp.c (check_symbol_not_pointer): Adjust diagnostics.
1196 2017-03-16 Jakub Jelinek <jakub@redhat.com>
1199 * parse.c (gfc_ascii_statement): Use !$ACC for ST_OACC_ATOMIC
1200 and ST_OACC_END_ATOMIC, instead of !ACC.
1201 * trans-decl.c (finish_oacc_declare): Use !$ACC instead of $!ACC.
1202 * openmp.c (gfc_match_oacc_declare, gfc_match_oacc_wait,
1203 gfc_resolve_oacc_declare): Likewise.
1206 * error.c (gfc_format_decoder): Rename plus argument to set_locus,
1207 remove ATTRIBUTE_UNUSED from all arguments, call default_tree_printer
1208 if not a Fortran specific spec.
1209 * trans-io.c: Include options.h.
1210 (gfc_build_st_parameter): Temporarily disable -Wpadded around layout
1211 of artificial IO data structures.
1213 2017-03-15 David Malcolm <dmalcolm@redhat.com>
1216 * resolve.c (resolve_contained_fntype): Make error messages more
1217 amenable to translation.
1219 2017-03-06 Richard Biener <rguenther@suse.de>
1222 * trans.c (gfc_add_modify_loc): Weaken assert.
1224 2017-03-05 Andre Vehreschild <vehre@gcc.gnu.org>,
1225 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
1227 * check.c (positive_check): Add new function checking constant for
1228 being greater then zero.
1229 (gfc_check_image_status): Add checking of image_status arguments.
1230 (gfc_check_failed_or_stopped_images): Same but for failed_- and
1231 stopped_images function.
1232 * dump-parse-tree.c (show_code_node): Added output of FAIL IMAGE.
1233 * gfortran.h (enum gfc_statement): Added FAIL_IMAGE_ST.
1234 (enum gfc_isym_id): Added new intrinsic symbols.
1235 (enum gfc_exec_op): Added EXEC_FAIL_IMAGE.
1236 * gfortran.texi: Added description for the new API functions. Updated
1237 coverage of gfortran of TS18508.
1238 * intrinsic.c (add_functions): Added symbols to resolve new intrinsic
1240 * intrinsic.h: Added prototypes.
1241 * iresolve.c (gfc_resolve_failed_images): Resolve the failed_images
1243 (gfc_resolve_image_status): Same for image_status.
1244 (gfc_resolve_stopped_images): Same for stopped_images.
1245 * libgfortran.h: Added prototypes.
1246 * match.c (gfc_match_if): Added matching of FAIL IMAGE statement.
1247 (gfc_match_fail_image): Match a FAIL IMAGE statement.
1248 * match.h: Added prototype.
1249 * parse.c (decode_statement): Added matching for FAIL IMAGE.
1250 (next_statement): Same.
1251 (gfc_ascii_statement): Same.
1253 * simplify.c (gfc_simplify_failed_or_stopped_images): For COARRAY=
1254 single a constant result can be returne.d
1255 (gfc_simplify_image_status): For COARRAY=single the result is constant.
1256 * st.c (gfc_free_statement): Added FAIL_IMAGE handling.
1257 * trans-decl.c (gfc_build_builtin_function_decls): Added decls of the
1259 * trans-expr.c (gfc_conv_procedure_call): This is first time all
1260 arguments of a function are optional, which is now handled here
1262 * trans-intrinsic.c (conv_intrinsic_image_status): Translate
1264 (gfc_conv_intrinsic_function): Add support for image_status.
1265 (gfc_is_intrinsic_libcall): Add support for the remaining new
1267 * trans-stmt.c (gfc_trans_fail_image): Trans a fail image.
1268 * trans-stmt.h: Add the prototype for the above.
1269 * trans.c (trans_code): Dispatch for fail_image.
1270 * trans.h: Add the trees for the new intrinsics.
1272 2017-03-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1275 * openmp.c (check_symbol_not_pointer): Adjust diagnostic.
1277 2017-02-28 Paul Thomas <pault@gcc.gnu.org>
1280 * resolve.c (resolve_fl_procedure): Deal with the case where
1281 'submodule_name' is NULL so that gfc_error does not ICE.
1282 Reformat the error message to make it more consistent.
1284 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1286 * parse.c (parse_critical_block): Use cond ? G_("...") : G_("...")
1287 instead of just cond ? "..." : "...".
1288 * scanner.c (gfc_next_char_literal): Likewise.
1289 * match.c (match_exit_cycle): Likewise.
1291 2017-02-26 Thomas Koenig <tkoenig@gcc.gnu.org>
1294 * options.c (gfc_post_options): Set default limit for matmul
1296 * invoke.texi: Document change.
1298 2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
1301 * interface.c (check_dtio_arg_TKR_intent): Change 'intent'
1304 2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
1307 * interface.c (gfc_match_end_interface): Remove spurious comma
1308 and space, replace 'got %s' with 'got %qs'.
1310 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1313 * interface.c (check_dtio_arg_TKR_intent): Supply 'must'
1314 missing from error message.
1316 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1319 * interface.c (gfc_find_typebound_dtio_proc): Guard test for
1320 flavor attribute by checking that symbol is resolved.
1322 2017-02-16 Paul Thomas <pault@gcc.gnu.org>
1325 * decl.c (access_attr_decl): Test for presence of generic DTIO
1326 interface and emit error if not present.
1328 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
1331 * parse.c (check_component, parse_union): Whitespace.
1332 (set_syms_host_assoc): For a derived type, check if the module
1333 in which it was declared is one of the submodule ancestors. If
1334 it is, make the components public. Otherwise, reset attribute
1335 'host_assoc' and set 'use-assoc' so that encapsulation is
1338 2017-02-19 Paul Thomas <pault@gcc.gnu.org>
1341 * decl.c (gfc_set_constant_character_len): Whitespace.
1342 (gfc_match_end): Catch case where a procedure is contained in
1343 a module procedure and ensure that 'end procedure' is the
1344 correct termination.
1346 2017-02-19 Paul Thomas <pault@gcc.gnu.org>
1349 * resolve.c (fixup_unique_dummy): New function.
1350 (gfc_resolve_expr): Call it for dummy variables with a unique
1353 2017-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
1356 * trans-expr.c (gfc_trans_assignment_1): Deref indirect refs when
1357 compiling with -fcheck=mem to check the pointer and not the data.
1359 2017-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
1362 * trans-array.c (duplicate_allocatable_coarray): Ensure attributes
1363 passed are properly initialized.
1364 (structure_alloc_comps): Same.
1365 * trans-expr.c (gfc_trans_structure_assign): Same.
1367 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1369 * trans-expr.c (gfc_conv_substring): Add missing space in diagnostics.
1371 2017-02-12 Thomas Koenig <tkoenig@gcc.gnu.org>
1374 * intrinsic.c (gfc_intrinsic_func_interface): Return an error
1375 for -std=f95 for disallowed transformational functions in
1376 initialization expressions.
1378 2017-02-09 Cesar Philippidis <cesar@codesourcery.com>
1379 Joseph Myers <joseph@codesourcery.com>
1381 * openmp.c (resolve_omp_clauses): Error on directives
1382 containing both tile and collapse clauses.
1383 (resolve_oacc_loop_blocks): Represent '*' tile arguments as zero.
1384 * trans-openmp.c (gfc_trans_omp_do): Lower tiled loops like
1387 2017-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
1389 * trans-types.c (gfc_get_int_kind_from_width_isofortranen): Choose
1390 REAL type with the widest precision if two (or more) have the same
1393 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1396 * trans-stmt.c (gfc_trans_allocate): Only deallocate the components of
1397 the temporary, when a new object was created for the temporary. Not
1398 when it is just an alias to an existing object.
1400 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1403 * trans-decl.c (generate_coarray_sym_init): Retrieve the symbol's
1404 attributes before using them.
1406 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1409 * trans-stmt.c (gfc_trans_allocate): Add the multiplying the _len
1410 component of unlimited polymorphic objects when source-allocating.
1412 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
1415 * trans-array.c (structure_alloc_comps): Ignore pointer components when
1418 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1421 * f95-lang.c (gfc_create_decls): Include stringpool.h.
1422 Pass main_input_filename to build_translation_unit_decl.
1424 2017-01-23 Thomas Koenig <tkoenig@netcologne.de>
1426 * arith.c (arith_power): If simplifying integer power expression
1427 to zero, warn if -Winteger-division is given.
1429 2017-01-22 Jakub Jelinek <jakub@redhat.com>
1432 * parse.c (matchs, matcho, matchds, matchdo): Replace return st;
1433 with { ret = st; goto finish; }.
1434 (decode_omp_directive): Allow declare simd, declare target and
1435 simd directives in PURE/ELEMENTAL procedures. Only call
1436 gfc_unset_implicit_pure on successful match of other procedures.
1438 2017-01-21 Gerald Pfeifer <gerald@pfeifer.com>
1440 * gfc-internals.texi (Symbol Versioning): Change references
1441 to www.akkadia.org to https.
1443 2017-01-21 Jakub Jelinek <jakub@redhat.com>
1445 * gfortran.h (gfc_extract_int): Change return type to bool. Add
1446 int argument with = 0.
1447 * decl.c (gfc_match_kind_spec): Adjust gfc_extract_int caller, pass
1448 1 as new last argument to it, don't emit gfc_error.
1449 (match_char_kind): Likewise.
1450 (gfc_match_decl_type_spec): Use gfc_get_string ("%s", x) instead of
1452 (gfc_match_derived_decl, match_binding_attributes): Likewise.
1453 (gfc_match_structure_decl): Don't sprintf back to name, call
1454 get_struct_decl directly with gfc_dt_upper_string (name) result.
1455 * trans-stmt.c (gfc_trans_allocate): Use gfc_get_string ("%s", x)
1456 instead of gfc_get_string (x).
1457 * module.c (gfc_dt_lower_string, gfc_dt_upper_string,
1458 gfc_match_use, gfc_match_submodule, find_true_name, mio_pool_string,
1459 mio_symtree_ref, mio_expr, mio_omp_udr_expr, load_generic_interfaces,
1460 load_omp_udrs, load_needed, read_module, dump_module,
1461 create_intrinsic_function, import_iso_c_binding_module,
1462 create_int_parameter, create_int_parameter_array, create_derived_type,
1463 use_iso_fortran_env_module): Likewise.
1464 * error.c (gfc_diagnostic_starter, gfc_diagnostic_start_span): Use
1465 pp_verbatim (context->printer, "%s", x) instead of
1466 pp_verbatim (context->printer, x).
1467 * match.c (gfc_match_small_int): Adjust gfc_extract_int caller, pass
1468 1 as new last argument to it, don't emit gfc_error.
1469 (gfc_match_small_int_expr): Likewise.
1470 * iresolve.c (gfc_get_string): Optimize format "%s" case.
1471 (resolve_bound): Use gfc_get_string ("%s", x) instead of
1473 (resolve_transformational): Formatting fix.
1474 (gfc_resolve_char_achar): Change name argument to bool is_achar,
1475 use a single format string and if is_achar add "a" before "char".
1476 (gfc_resolve_achar, gfc_resolve_char): Adjust callers.
1477 * expr.c (gfc_extract_int): Change return type to bool, return true
1478 if some error occurred. Add REPORT_ERROR argument, if non-zero
1479 call either gfc_error or gfc_error_now depending on its sign.
1480 * arith.c (arith_power): Adjust gfc_extract_int caller.
1481 * symbol.c (gfc_add_component): Use gfc_get_string ("%s", x) instead
1482 of gfc_get_string (x).
1483 (gfc_new_symtree, gfc_delete_symtree, gfc_get_uop, gfc_new_symbol,
1484 gfc_get_gsymbol, generate_isocbinding_symbol): Likewise.
1485 * openmp.c (gfc_match_omp_clauses): Adjust gfc_extract_int caller, pass
1486 -1 as new last argument to it, don't emit gfc_error_now.
1487 (gfc_match_omp_declare_reduction): Use gfc_get_string ("%s", x)
1488 instead of gfc_get_string (x).
1489 * check.c (kind_check): Adjust gfc_extract_int caller.
1490 * intrinsic.c (add_sym, find_sym, make_alias): Use
1491 gfc_get_string ("%s", x) instead of gfc_get_string (x).
1492 * simplify.c (get_kind, gfc_simplify_btest, gfc_simplify_maskr,
1493 gfc_simplify_maskl, gfc_simplify_poppar, gfc_simplify_repeat,
1494 gfc_simplify_selected_int_kind, gfc_simplify_selected_real_kind):
1495 Adjust gfc_extract_int callers.
1496 * trans-decl.c (gfc_find_module): Use gfc_get_string ("%s", x)
1497 instead of gfc_get_string (x).
1498 * matchexp.c (expression_syntax): Add const.
1499 * primary.c (match_kind_param, match_hollerith_constant,
1500 match_string_constant): Adjust gfc_extract_int callers.
1501 (match_keyword_arg): Use gfc_get_string ("%s", x) instead of
1503 * frontend-passes.c (optimize_minmaxloc): Likewise.
1505 2017-01-19 Andre Vehreschild <vehre@gcc.gnu.org>
1508 * trans-decl.c (gfc_build_qualified_array): Add static decl to parent
1509 function only, when the decl-context is not the translation unit.
1511 2017-01-18 Louis Krupp <louis.krupp@zoho.com>
1515 * trans-expr.c (gfc_conv_variable): Don't treat temporary variables
1516 as function arguments.
1517 * trans-stmt.c (forall_make_variable_temp,
1518 generate_loop_for_temp_to_lhs, gfc_trans_assign_need_temp,
1519 gfc_trans_forall_1): Don't adjust offset of forall temporary
1520 for array sections, make forall temporaries work for substring
1521 expressions, improve test coverage by adding -ftest-forall-temp
1522 option to request usage of temporary array in forall code.
1523 * lang.opt: Add -ftest-forall-temp option.
1524 * invoke.texi: Add -ftest-forall-temp option.
1526 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
1528 * primary.c (caf_variable_attr): Improve figuring whether the current
1529 component is the last one refed.
1530 * trans-stmt.c (gfc_trans_allocate): Do not generate sync_all calls
1531 when allocating pointer or allocatable components.
1533 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
1535 * gfortran.texi: Add missing parameters to caf-API functions. Correct
1536 typos and clarify some descriptions.
1538 2017-01-18 Andre Vehreschild <vehre@gcc.gnu.org>
1541 Missed some cases, here they are:
1542 * trans-decl.c (gfc_build_qualified_array): Add static tokens to the
1543 parent function's scope.
1544 * trans-expr.c (gfc_get_tree_for_caf_expr): Shorten code. Remove
1547 2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org>
1550 * resolve.c (resolve_lock_unlock_event): Resolve the expression for
1551 event's until_count.
1553 2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org>
1556 * trans-expr.c (gfc_get_tree_for_caf_expr): Ensure the backend_decl
1557 is valid before accessing it.
1559 2017-01-09 Jakub Jelinek <jakub@redhat.com>
1561 PR translation/79019
1562 PR translation/79020
1563 * decl.c (attr_decl1): Fix spelling in translatable string.
1564 * intrinsic.texi: Fix spelling - invokation -> invocation.
1565 * lang.opt (faggressive-function-elimination, gfc_convert): Fix
1566 typos in descriptions.
1567 * openmp.c (resolve_omp_clauses): Add missing whitespace to
1568 translatable strings.
1570 2017-01-08 Martin Sebor <msebor@redhat.com>
1572 PR tree-optimization/78913
1574 * trans-common.c (build_equiv_decl): Increase buffer size to avoid
1575 truncation for any argument.
1576 * trans-types.c (gfc_build_logical_type): Same.
1578 2017-01-07 Andre Vehreschild <vehre@gcc.gnu.org>
1582 * expr.c (gfc_check_pointer_assign): Return the same error message for
1583 rewritten coarray pointer assignments like for plain ones.
1584 * gfortran.h: Change prototype.
1585 * primary.c (caf_variable_attr): Set attributes used ones only only
1586 ones. Add setting of pointer_comp attribute.
1587 (gfc_caf_attr): Add setting of pointer_comp attribute.
1588 * trans-array.c (gfc_array_allocate): Add flag that the component to
1589 allocate is not an ultimate coarray component. Add allocation of
1591 (structure_alloc_comps): Extend nullify to treat pointer components in
1592 coarrays correctly. Restructure nullify to remove redundant code.
1593 (gfc_nullify_alloc_comp): Allow setting caf_mode flags.
1594 * trans-array.h: Change prototype of gfc_nullify_alloc_comp ().
1595 * trans-decl.c (generate_coarray_sym_init): Call nullify_alloc_comp for
1596 derived type coarrays with pointer components.
1597 * trans-expr.c (gfc_trans_structure_assign): Also treat pointer
1599 (trans_caf_token_assign): Handle assignment of token of scalar pointer
1601 (gfc_trans_pointer_assignment): Call above routine.
1602 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Add treating pointer
1604 (gfc_conv_intrinsic_caf_get): Likewise.
1605 (conv_caf_send): Likewise.
1606 * trans-stmt.c (gfc_trans_allocate): After allocating a derived type in
1607 a coarray pre-register the tokens.
1608 (gfc_trans_deallocate): Simply determining the coarray type (scalar or
1609 array) and deregistering it correctly.
1610 * trans-types.c (gfc_typenode_for_spec): Replace in_coarray flag by the
1611 actual codim to allow lookup of array types in the cache.
1612 (gfc_build_array_type): Likewise.
1613 (gfc_get_array_descriptor_base): Likewise.
1614 (gfc_get_array_type_bounds): Likewise.
1615 (gfc_get_derived_type): Likewise.
1616 * trans-types.h: Likewise.
1617 * trans.c (gfc_deallocate_with_status): Enable deregistering of all kind
1618 of coarray components.
1619 (gfc_deallocate_scalar_with_status): Use free() in fcoarray_single mode
1620 instead of caf_deregister.
1622 2017-01-06 Jakub Jelinek <jakub@redhat.com>
1624 * simplify.c (simplify_transformation_to_array): Use
1625 GCC_DIAGNOSTIC_PUSH_IGNORED and GCC_DIAGNOSTIC_POP instead of
1626 #pragma GCC diagnostic {push,ignored,pop}.
1628 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
1630 * simplify.c (simplify_transformation_to_array): Silence
1631 array bounds warning. Fix whitespace.
1633 2017-01-04 Alexandre Oliva <aoliva@redhat.com>
1635 * module.c (load_omp_udrs): Initialize name.
1637 2017-01-02 Janne Blomqvist <jb@gcc.gnu.org>
1640 * trans-expr.c (gfc_trans_string_copy): Rework string copy
1641 algorithm to avoid -Wstringop-overflow warning.
1643 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1645 Update copyright years.
1647 * gfortranspec.c (lang_specific_driver): Update copyright notice
1649 * gfc-internals.texi: Bump @copying's copyright year.
1650 * gfortran.texi: Ditto.
1651 * intrinsic.texi: Ditto.
1652 * invoke.texi: Ditto.
1654 Copyright (C) 2017 Free Software Foundation, Inc.
1656 Copying and distribution of this file, with or without modification,
1657 are permitted in any medium without royalty provided the copyright
1658 notice and this notice are preserved.