1 2019-12-30 Thomas Koenig <tkoenig@gcc.gnu.org>
4 * intrinsic.c (add_sym_4ind): New function.
5 (add_functions): Use it for INDEX.
6 (resolve_intrinsic): Also call f1m for INDEX.
7 * intrinsic.h (gfc_resolve_index_func): Adjust prototype to
8 take a gfc_arglist instead of individual arguments.
9 * iresolve.c (gfc_resolve_index_func): Adjust arguments.
10 Remove KIND argument if present, and make sure this is
12 * trans-decl.c: Include "intrinsic.h".
13 (gfc_get_extern_function_decl): Special case for resolving INDEX.
15 2019-12-30 Thomas Koenig <tkoenig@gcc.gnu.org>
18 * gfortran.h (gfc_seen_div0): Add declaration.
19 * arith.h (gfc_seen_div0): Add definition.
20 (eval_intrinsic): For integer division by zero, set gfc_seen_div0.
21 * decl.c (variable_decl): If resolution resp. simplification
22 fails for array spec and a division of zero error has been
23 seen, return MATCH_ERROR.
25 2019-12-21 Harald Anlauf <anlauf@gmx.de>
28 * match.c (gfc_match_nullify): Check for valid pointer object.
29 Reject bounds remapping.
31 2019-12-21 Paul Thomas <pault@gcc.gnu.org>
34 * expr.c (find_inquiry_ref): Catch INQUIRY_LEN case, where the
35 temporary expression has been converted to a constant and make
36 the new expression accordingly. Correct the error in INQUIRY_RE
37 and INQUIRY_IM cases. The original rather than the resolved
38 expression was being used as the source in mpfr_set.
40 2019-12-20 Jakub Jelinek <jakub@redhat.com>
44 * lang.opt (-finline-arg-packing): Add trailing dot to help text.
46 2019-12-20 Thomas Koenig <tkoenig@gcc.gnu.org>
50 * invoke.texi: Document -finline-arg-packing.
51 * lang.opt: Add -finline-arg-packing.
52 * options.c (gfc_post_options): Handle -finline-arg-packing.
53 * trans-array.c (gfc_conv_array_parameter): Use
54 flag_inline_arg_packing instead of checking for optimize and
57 2019-12-20 Tobias Burnus <tobias@codesourcery.com>
60 * expr.c (simplify_parameter_variable): Call gfc_resolve_ref and
61 gfc_expression_rank; fix location info.
62 * gfortran.h (gfc_resolve_ref, gfc_expression_rank): Declare.
63 * match.c (gfc_match_stopcode): Remove redundant setting of
64 gfc_init_expr_flag; early return if gfc_simplify_expr has an error.
65 * resolve.c (gfc_expression_rank): Renamed from expression_rank;
67 (gfc_resolve_ref): Removed static and renamed from resolve_ref.
68 (resolve_variable, resolve_typebound_function,
69 resolve_typebound_subroutine, resolve_ppc_call, resolve_expr_ppc,
70 gfc_resolve_expr, resolve_procedure): Update calls.
72 2019-12-20 Tobias Burnus <tobias@codesourcery.com>
74 * openmp.c (resolve_omp_clauses): Move is-coindexed check from here ...
75 (gfc_match_omp_variable_list): ... to here.
77 2019-12-19 Julian Brown <julian@codesourcery.com>
79 * openmp.c (resolve_oacc_data_clauses): Don't disallow allocatable
80 polymorphic types for OpenACC.
81 * trans-openmp.c (gfc_trans_omp_clauses): Support polymorphic class
84 2019-12-19 Julian Brown <julian@codesourcery.com>
86 * gfortran.h (gfc_omp_map_op): Add OMP_MAP_ATTACH, OMP_MAP_DETACH.
87 * openmp.c (gfc_match_omp_variable_list): Add allow_derived parameter.
88 Parse derived-type member accesses if true.
89 (omp_mask2): Add OMP_CLAUSE_ATTACH and OMP_CLAUSE_DETACH.
90 (gfc_match_omp_map_clause): Add allow_derived parameter. Pass to
91 gfc_match_omp_variable_list.
92 (gfc_match_omp_clauses): Support attach and detach. Support derived
93 types for appropriate OpenACC directives.
94 (OACC_PARALLEL_CLAUSES, OACC_SERIAL_CLAUSES, OACC_KERNELS_CLAUSES,
95 OACC_DATA_CLAUSES, OACC_ENTER_DATA_CLAUSES): Add OMP_CLAUSE_ATTACH.
96 (OACC_EXIT_DATA_CLAUSES): Add OMP_CLAUSE_DETACH.
97 (check_symbol_not_pointer): Don't disallow pointer objects of derived
99 (resolve_oacc_data_clauses): Don't disallow allocatable derived types.
100 (resolve_omp_clauses): Perform duplicate checking only for non-derived
101 type component accesses (plain variables and arrays or array sections).
102 Support component refs.
103 * trans-expr.c (gfc_conv_component_ref,
104 conv_parent_component_references): Make global.
105 (gfc_maybe_dereference_var): New function, broken out of...
106 (gfc_conv_variable): ...here. Call above function.
107 * trans-openmp.c (gfc_omp_privatize_by_reference): Support component
109 (gfc_trans_omp_array_section): New function, broken out of...
110 (gfc_trans_omp_clauses): ...here. Support component refs/derived
111 types, attach and detach clauses.
112 * trans.h (gfc_conv_component_ref, conv_parent_component_references,
113 gfc_maybe_dereference_var): Add prototypes.
115 2019-12-19 Mark Eggleston <mark.eggleston@codethink.com>
118 * array.c (walk_array_constructor): Replace call to gfc_convert_type
119 with call to gfc_convert_type_warn with new argument set to true.
120 (check_element_type): Replace call to cfg_convert_type with call to
121 gfc_convert_type_warn with new argument set to true.
122 * gfortran.h: Add argument "array" to gfc_convert_type_warn default
124 *intrinsic.c (gfc_convert_type_warn): Update description of arguments.
125 Add new argument to argument list. Add check for conversion to numeric
126 or logical from character and array set to true, i.e. if conversion
127 from character is in an array constructor reject it, goto bad.
129 2019-12-19 Jakub Jelinek <jakub@redhat.com>
132 * frontend-passes.c (call_external_blas): Use || instead of |.
134 2019-12-19 Jakub Jelinek <jakub@redhat.com>
137 * frontend-passes.c (in_omp_atomic): New variable.
138 (cfe_expr_0, matmul_to_var_expr, matmul_temp_args,
139 inline_matmul_assign, call_external_blas): Don't optimize in
141 (optimize_namespace): Clear in_omp_atomic.
142 (gfc_code_walker): Set in_omp_atomic for EXEC_OMP_ATOMIC, save/restore
145 2019-12-19 Julian Brown <julian@codesourcery.com>
146 Maciej W. Rozycki <macro@codesourcery.com>
147 Tobias Burnus <tobias@codesourcery.com>
148 Thomas Schwinge <thomas@codesourcery.com>
150 * gfortran.h (gfc_omp_map_op): Add OMP_MAP_NO_ALLOC.
151 * openmp.c (omp_mask2): Add OMP_CLAUSE_NO_CREATE.
152 (gfc_match_omp_clauses): Support no_create.
153 (OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES)
154 (OACC_DATA_CLAUSES): Add OMP_CLAUSE_NO_CREATE.
155 * trans-openmp.c (gfc_trans_omp_clauses_1): Support
158 2019-12-18 Harald Anlauf <anlauf@gmx.de>
161 * trans-expr.c (gfc_trans_pointer_assignment): Reject bounds
162 remapping if pointer target is NULL().
164 2019-12-12 Harald Anlauf <anlauf@gmx.de>
167 * check.c (gfc_check_is_contiguous): Simplify check to handle
168 arbitrary NULL() argument.
170 2019-12-11 Jakub Jelinek <jakub@redhat.com>
173 * trans-openmp.c (gfc_trans_omp_atomic): For GFC_OMP_ATOMIC_SWAP,
174 do look through conversion on expr2 if any.
176 2019-12-11 Steven G. Kargl <kargl@gcc.gnu.org>
179 * array.c (gfc_set_array_spec): Remove invalid assert() triggered
180 by invalid Fortran code.
182 2019-12-10 Thomas Koenig <tkoenig@gcc.gnu.org>
185 * trans-array.c (gfc_conv_array_parameter): Do not repack
186 an assumed rank dummy argument.
188 2019-12-10 Martin Liska <mliska@suse.cz>
191 * dependency.c (gfc_dep_compare_expr): Bail out
192 when one of the arguments is null.
194 2019-12-10 Thomas Koenig <tkoenig@gcc.gnu.org>
197 * misc.c (gfc_typename): If derived component is NULL for
198 derived or class, return "invalid type" or "invalid class",
201 2019-12-10 Tobias Burnus <tobias@codesourcery.com>
204 * trans-array.c (get_CFI_desc): Fix cond whether saved desc exists.
206 2019-12-09 David Malcolm <dmalcolm@redhat.com>
208 * error.c (gfc_diagnostic_starter): Add pp_newline call before
209 call to diagnostic_show_locus.
211 2019-12-09 Frederik Harwath <frederik@codesourcery.com>
213 * trans-openmp.c (gfc_trans_omp_reduction_list): Pass correct location for each
214 clause to build_omp_clause.
216 2018-12-08 Thomas Koenig <tkoenig@gcc.gnu.org>
219 * resolve.c (resolve_assoc_var): Issue error if the associating
222 2018-12-08 Thomas Koenig <tkoenig@gcc.gnu.org>
225 * interface.c (gfc_procedure_use): Check for existence of derived
226 component before using (twice).
228 2019-12-08 Thomas Koenig <tkoenig@gcc.gnu.org>
231 * dependency.c (gfc_dep_resolver): Move skipping of _data ref
234 2019-12-07 Tobias Burnus <tobias@codesourcery.com>
237 * trans.c (gfc_get_location): Declare.
238 * trans.c (gfc_get_location): Define; returns column-corrected location.
239 (trans_runtime_error_vararg, gfc_trans_runtime_check,
240 gfc_generate_module_code): Use new function.
241 * trans-array.c (gfc_trans_auto_array_allocation): Likewise.
242 * trans-common.c (build_field, get_init_field, create_common): Likewise.
243 * trans-decl.c (gfc_build_label_decl, gfc_get_symbol_decl): Likewise.
244 * trans-openmp.c (gfc_trans_omp_reduction_list, gfc_trans_omp_clauses):
246 * trans-stmt.c (gfc_trans_if_1): Likewise.
248 2019-12-06 Jakub Jelinek <jakub@redhat.com>
251 * trans.h (struct lang_type, struct lang_decl): Remove span member.
252 (GFC_DECL_SPAN, GFC_TYPE_ARRAY_SPAN): Remove macros.
253 * trans-array.h (gfc_get_descriptor_offsets_for_info): Add another
255 * trans-array.c (gfc_get_descriptor_offsets_for_info): Add SPAN_OFF
256 argument and initialize *SPAN_OFF to the offset of span field.
257 * trans-types.c (gfc_get_array_descr_info): Adjust
258 gfc_get_descriptor_offsets_for_info caller. Compute elem_size
259 as base->span instead of TYPE_SIZE_UNIT (etype) constant.
261 2019-12-06 Tobias Burnus <tobias@codesourcery.com>
262 Kwok Cheung Yeung <kcy@codesourcery.com>
264 * trans-openmp.c (gfc_build_conditional_assign,
265 gfc_build_conditional_assign_expr): New static functions.
266 (gfc_omp_finish_clause, gfc_trans_omp_clauses): Handle mapping of
267 absent optional arguments and fix mapping of present optional args.
269 2019-12-05 Tobias Burnus <tobias@codesourcery.com>
271 * trans-openmp.c (gfc_omp_is_optional_argument,
272 gfc_omp_check_optional_argument): Handle type(c_ptr),value which uses a
274 2019-12-05 Jakub Jelinek <jakub@redhat.com>
277 * trans-decl.c (gfc_get_symbol_decl): If sym->backend_decl is
278 current_function_decl, add length to current rather than parent
279 function and expect DECL_CONTEXT (length) to be current_function_decl.
281 2019-12-04 Tobias Burnus <tobias@codesourcery.com>
284 * intrinsic.c (gfc_intrinsic_func_interface): Set
285 sym's flavor, intrinsic and function attribute if
288 2019-12-04 Jakub Jelinek <jakub@redhat.com>
291 * trans-openmp.c (gfc_trans_omp_teams): Wrap OMP_TEAMS body into a
292 BIND_EXPR with a forced BLOCK.
294 2019-11-30 Thomas Koenig <tkoenig@gcc.gnu.org>
297 * dependency.c (gfc_dep_resolver): Do not look at _data
298 component if present.
300 2019-11-28 Jerry DeLisle <jvdelisle@gcc.ngu.org>
303 * io.c (check_format): Allow zero width expoenent with e0.
305 2019-11-27 Jakub Jelinek <jakub@redhat.com>
308 * simplify.c (gfc_simplify_spread): Check gfc_init_expr_flag instead
309 of gfc_current_ns->sym_root->n.sym->attr.flavor == FL_PARAMETER.
311 2019-11-27 Tobias Burnus <tobias@codesourcery.com>
314 * arith.c (gfc_check_real_range): Replace mp_exp_t by mpfr_exp_t.
316 2019-11-25 Harald Anlauf <anlauf@gmx.de>
319 * simplify.c (convert_mpz_to_unsigned): Skip assert for argument
320 range when -fno-range-check is specified.
322 2019-11-25 Mark Eggleston <mark.eggleston@codethink.com>
323 Jim MacArthur <jim.macarthur@codethink.co.uk>
325 * gfortran.texi: Update Hollerith constants support for character types
326 and use in comparisons.
327 * invoke.texi: Tidy up list of options. Update description of
328 -fdec-char-conversions.
329 * resolve.c (is_character_based): New.
330 (Convert_hollerith_to_character): New. (convert_to_numeric): New.
331 (resolve_operator): If both sides are character based and -fdec is
332 enabled convert Hollerith to character. If an operand is Hollerith, the
333 other is numeric and -fdec is enabled convert to numeric.
334 (resolve_ordinary_assign): Add check for -fdec-char-conversions for
335 assignment of character literals.2019-11-20 Janne Blomqvist <jb@gcc.gnu.org>
339 * simplify.c (norm2_do_sqrt, gfc_simplify_norm2): Use
340 mpfr_regular_p instead of mpfr_number_p && !mpfr_zero_p.
341 (norm2_add_squared): Likewise. Use mpfr_exp_t rather than
344 2019-11-20 Janne Blomqvist <jb@gcc.gnu.org>
347 * arith.c (gfc_mpfr_to_mpz): Change mp_exp_t to mpfr_exp_t.
348 (gfc_check_real_range): Likewise.
349 * gfortran.h (GFC_RND_MODE): Change GMP_RNDN to MPFR_RNDN.
350 * module.c (mio_gmp_real): Change mp_exp_t to mpfr_exp_t.
351 * simplify.c (degrees_f): Change mp_rnd_t to mpfr_rnd_t.
352 (radians_f): Likewise.
353 (fullprec_erfc_scaled): Change mp_prec_t to mpfr_prec_t.
354 (asympt_erfc_scaled): Likewise.
355 (gfc_simplify_nearest): Change mp_exp_t to mpfr_exp_t, and
356 GMP_RND* to MPFR_RND*.
358 2019-11-15 Paul Thomas <pault@gcc.gnu.org>
361 * trans-expr.c (gfc_trans_structure_assign): Move assignment to
362 'cm' after treatment of C pointer types and test that the type
363 has been completely built before it. Add an assert that the
364 backend_decl for each component exists.
366 2019-11-13 Tobias Burnus <tobias@codesourcery.com>
368 * trans-expr.c (gfc_conv_procedure_call): Fold hidden
369 is-present argument to the right type.
371 2019-11-12 Harald Anlauf <anlauf@gmx.de>
374 * module.c (gzopen_included_file, gzopen_included_file_1)
375 (gzopen_intrinsic_module, bad_module, gfc_use_module): Use fully
376 qualified module path for error reporting.
378 2019-11-12 Martin Liska <mliska@suse.cz>
380 * options.c (gfc_init_options):
381 Use SET_OPTION_IF_UNSET.
383 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
384 Frederik Harwath <frederik@codesourcery.com>
387 * gfortran.h (gfc_statement): Add ST_OACC_SERIAL_LOOP,
388 ST_OACC_END_SERIAL_LOOP, ST_OACC_SERIAL and ST_OACC_END_SERIAL
389 enumeration constants.
390 (gfc_exec_op): Add EXEC_OACC_SERIAL_LOOP and EXEC_OACC_SERIAL
391 enumeration constants.
392 * match.h (gfc_match_oacc_serial): New prototype.
393 (gfc_match_oacc_serial_loop): Likewise.
394 * dump-parse-tree.c (show_omp_node, show_code_node): Handle
395 EXEC_OACC_SERIAL_LOOP and EXEC_OACC_SERIAL.
396 * match.c (match_exit_cycle): Handle EXEC_OACC_SERIAL_LOOP.
397 * openmp.c (OACC_SERIAL_CLAUSES): New macro.
398 (gfc_match_oacc_serial_loop): New function.
399 (gfc_match_oacc_serial): Likewise.
400 (oacc_is_loop): Handle EXEC_OACC_SERIAL_LOOP.
401 (resolve_omp_clauses): Handle EXEC_OACC_SERIAL.
402 (oacc_code_to_statement): Handle EXEC_OACC_SERIAL and
403 EXEC_OACC_SERIAL_LOOP.
404 (gfc_resolve_oacc_directive): Likewise.
405 * parse.c (decode_oacc_directive) <'s'>: Add case for "serial"
407 (next_statement): Handle ST_OACC_SERIAL_LOOP and ST_OACC_SERIAL.
408 (gfc_ascii_statement): Likewise. Handle ST_OACC_END_SERIAL_LOOP
409 and ST_OACC_END_SERIAL.
410 (parse_oacc_structured_block): Handle ST_OACC_SERIAL.
411 (parse_oacc_loop): Handle ST_OACC_SERIAL_LOOP and
412 ST_OACC_END_SERIAL_LOOP.
413 (parse_executable): Handle ST_OACC_SERIAL_LOOP and
415 (is_oacc): Handle EXEC_OACC_SERIAL_LOOP and EXEC_OACC_SERIAL.
416 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
417 * st.c (gfc_free_statement): Likewise.
418 * trans-openmp.c (gfc_trans_oacc_construct): Handle
420 (gfc_trans_oacc_combined_directive): Handle
421 EXEC_OACC_SERIAL_LOOP.
422 (gfc_trans_oacc_directive): Handle EXEC_OACC_SERIAL_LOOP and
424 * trans.c (trans_code): Likewise.
426 2019-11-11 Janne Blomqvist <jb@gcc.gnu.org>
429 * simplify.c (gfc_simplify_fraction): Remove fallback path for
432 2019-11-11 Tobias Burnus <tobias@codesourcery.com>
433 Kwok Cheung Yeung <kcy@codesourcery.com>
435 * trans-expr.c (gfc_conv_expr_present): Check for DECL_ARTIFICIAL
436 for the VALUE hidden argument avoiding -fallow-underscore issues.
437 * trans-decl.c (create_function_arglist): Also set
438 GFC_DECL_OPTIONAL_ARGUMENT for per-value arguments.
439 * f95-lang.c (LANG_HOOKS_OMP_CHECK_OPTIONAL_ARGUMENT):
440 Renamed from LANG_HOOKS_OMP_IS_OPTIONAL_ARGUMENT; point
441 to gfc_omp_check_optional_argument.
442 * trans.h (gfc_omp_check_optional_argument): Subsitutes
443 gfc_omp_is_optional_argument declaration.
444 * trans-openmp.c (gfc_omp_is_optional_argument): Make static.
445 (gfc_omp_check_optional_argument): New function.
447 2019-11-10 Janne Blomqvist <jb@gcc.gnu.org>
450 * trans-decl.c (gfc_finish_var_decl): Don't print warning when
451 -fno-automatic is enabled.
453 2019-11-10 Paul Thomas <pault@gcc.gnu.org>
456 *decl.c (gfc_verify_c_interop_param): Remove error asserting
457 that pointer or allocatable variables in a bind C procedure are
458 not supported. Delete some trailing spaces.
459 * trans-stmt.c (trans_associate_var): Correct the attempt to
460 treat scalar pointer or allocatable temporaries as if they are
463 2019-11-09 Thomas Koenig <tkoenig@gcc.gnu.org>
466 * frontend-passes.c (call_external_blas): Commit symbol for
467 external BLAS routine.
469 2019-11-08 Jakub Jelinek <jakub@redhat.com>
471 * arith.c (character2representation): Change i type to size_t.
473 2019-11-08 Mark Eggleston <mark.eggleston@codethink.com>
474 Jim MacArthur <jim.macarthur@codethink.co.uk>
476 * arith.c (hollerith2representation): Use OPT_Wcharacter_truncation in
478 (character2representation, gfc_character2int, gfc_character2real,
479 gfc_character2complex and gfc_character2logical): New.
480 * arith.h (gfc_character2int, gfc_character2real, gfc_character2complex,
481 gfc_character2logical): Declare.
482 * expr.c (gfc_check_assign): Return true if left hand side is numeric
483 or logical and the right hand side is character and of kind=1.
484 * gfortran.texi: Add -fdec-char-conversions.
485 * intrinsic.c (add_conversions): Add conversions from character to
486 integer, real, complex and logical types for their supported kinds.
487 (gfc_convert_type_warn): Reorder if..else if.. sequence so that warnings
488 are produced for conversion to logical.
489 * invoke.texi: Add option to list of options.
490 * invoke.texi: Add Character conversion subsection to Extensions
492 * lang.opt: Add new option.
493 * options.c (set_dec_flags): Add SET_BITFLAG for
494 flag_dec_char_conversions.
495 * resolve.c (resolve_ordindary_assign): Issue error if the left hand
496 side is numeric or logical and the right hand side is a character
498 * simplify.c (gfc_convert_constant): Assign the conversion function
499 depending on destination type.
500 * trans-const.c (gfc_constant_to_tree): Use OPT_Wsurprising in
501 gfc_warning allowing the warning to be switched off only if
502 flag_dec_char_conversions is enabled.
504 2019-11-08 Tobias Burnus <tobias@codesourcery.com
507 * scanner.c (skip_fixed_comments): Move comment
508 lines to next if block.
509 (gfc_next_char_literal): Fix continue_line setting.
510 (get_file): Remove bogus ATTRIBUTE_UNUSED.
512 2019-11-06 Jerry DeLisle <jvdelisle@gcc.ngu.org>
515 * io.c (check_format): Allow zero width for D, E, EN, and ES
516 specifiers as default and when -std=F2018 is given. Retain
517 existing errors when using the -fdec family of flags.
519 2019-11-03 Thomas Koenig <tkoenig@gcc.gnu.org>
522 * trans-decl.c (gfc_get_symbol_decl): If __def_init actually
523 contains a value, put it into the read-only section.
525 2019-11-01 Steven G. Kargl <kargl@gcc.gnu.org>
527 * decl.c (match_byte_typespec): New function. Match BYTE type-spec.
528 (gfc_match_decl_type_spec): Use it.
530 2019-11-01 Steven G. Kargl <kargl@gcc.gnu.org>
533 * decl.c (gfc_match_private, gfc_match_public): Fixed-form source code
534 does not require whitespace between PRIVATE (or PUBLIC) and an entity.
536 2019-11-01 Tobias Burnus <tobias@codesourcery.com>
538 * f95-lang.c (LANG_HOOKS_OMP_ARRAY_DATA): Set to gfc_omp_array_data.
539 * trans-array.c (gfc_conv_descriptor_data_get): Handle also
541 * trans-openmp.c (gfc_omp_array_data): New.
542 * trans.h (gfc_omp_array_data): New prototype.
544 2019-10-31 Tobias Burnus <tobias@codesourcery.com>
547 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Free CFI descriptor
548 at the end; partial revised revert of Rev. 277502.
550 2019-10-31 Tobias Burnus <tobias@codesourcery.com>
553 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Fix DECL_ARTIFICIAL
556 2019-10-30 Tobias Burnus <tobias@codesourcery.com>
559 * trans-array.c (gfc_conv_array_parameter): Only copy
560 string-length backend_decl if expression is not a function.
562 2019-10-30 Mark Eggleston <mark.eggleston@codethink.com>
564 * invoke.texi: Add -Wno-overwrite-recursive to list of options. Add
565 description of -Wno-overwrite-recursive. Fix typo in description
566 of -Winteger-division.
567 * lang.opt: Add option -Woverwrite-recursive initialised as on.
568 * option.c (gfc_post_options): Output warning only if it is enabled.
570 2019-10-28 Tobias Burnus <tobias@codesourcery.com>
573 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Don't free data
574 memory as that's done on the Fortran side.
575 (gfc_conv_procedure_call): Handle void* pointers from
576 gfc_conv_gfc_desc_to_cfi_desc.
578 2019-10-27 Paul Thomas <pault@gcc.gnu.org>
581 * resolve.c (flag_fn_result_spec): Correct a typo before the
582 function declaration.
583 * trans-decl.c (gfc_sym_identifier): Boost the length of 'name'
584 to allow for all variants. Simplify the code by using a pointer
585 to the symbol's proc_name and taking the return out of each of
586 the conditional branches. Allow symbols with fn_result_spec set
587 that do not come from a procedure namespace and have a module
588 name to go through the non-fn_result_spec branch.
590 2019-10-25 Cesar Philippidis <cesar@codesourcery.com>
591 Tobias Burnus <tobias@codesourcery.com>
593 * openmp.c (gfc_match_omp_map_clause): Add and pass allow_commons
595 (gfc_match_omp_clauses): Update calls to permit common blocks for
596 OpenACC's copy/copyin/copyout, create/delete, host,
597 pcopy/pcopy_in/pcopy_out, present_or_copy, present_or_copy_in,
598 present_or_copy_out, present_or_create and self.
600 2019-10-24 Martin Liska <mliska@suse.cz>
603 * array.c (gfc_resolve_array_spec): Break the loop
604 for out of bounds index.
605 * resolve.c (is_non_constant_shape_array): Likewise.
607 2019-10-23 Steven G. Kargl <kargl@gcc.gnu.org>
609 dump-parse-tree.c (show_expr): Add dumping of BT_BOZ constants.
611 2019-10-22 Steven G. Kargl <kargl@gcc.gnu.org>
614 * decl.c (attr_decl1): Move check for F2018:C822 from here ...
615 * array.c (gfc_set_array_spec): ... to here.
617 2019-10-18 Steven G. Kargl <kargl@gcc.gnu.org>
620 * trans-decl.c (generate_local_decl): Avoid misconstructed
621 intrinsic modules in a BLOCK construct.
623 2019-10-18 Tobias Burnus <tobias@codesourcery.com>
626 * class.c (gfc_find_derived_vtab): Return NULL
627 instead of deref'ing NULL pointer.
629 2019-10-15 James Norris <jnorris@codesourcery.com>
630 Tobias Burnus <tobias@codesourcery.com>
633 * openmp.c (check_array_not_assumed): Remove pointer check.
635 2019-10-14 Steven G. Kargl <kargl@gcc.gnu.org>
638 decl.c (gfc_match_function_decl): Ignore duplicate BIND(C) for function
639 declaration in submodule. Implement at check for F2018 C1550.
640 (gfc_match_entry): Use temporary for locus, which allows removal of
642 (gfc_match_subroutine): Ignore duplicate BIND(C) for subroutine
643 declaration in submodule. Implement at check for F2018 C1550.
645 2019-10-14 Thomas Koenig <tkoenig@gcc.gnu.org>
648 * array.c (expand_constructor): Set from_constructor on
650 * gfortran.h (gfc_symbol): Add maybe_array.
651 (gfc_expr): Add from_constructor.
652 * interface.c (maybe_dummy_array_arg): New function.
653 (compare_parameter): If the formal argument is generated from a
654 call, check the conditions where an array element could be
655 passed to an array. Adjust error message for assumed-shape
656 or pointer array. Use correct language for assumed shaped arrays.
657 (gfc_get_formal_from_actual_arglist): Set maybe_array on the
658 symbol if the actual argument is an array element fulfilling
659 the conditions of 15.5.2.4.
661 2019-10-14 Tobias Burnus <tobias@codesourcery.com>
663 * error.c: Remove debug pragma added in previous commit.
665 2019-10-14 Tobias Burnus <tobias@codesourcery.com>
668 * error.c (error_print, gfc_format_decoder): Fix %C column-
671 2019-10-13 Damian Rouson <damain@sourceryinstitue.org>
674 * resolve.c (resolve_ordinary_assign): Improved error message.
676 2019-10-13 Steven G. Kargl <kargl@gcc.gnu.org>
679 * resolve.c (resolve_typebound_function): Remove code with no
682 2019-10-13 Thomas Koenig <tkoenig@gcc.gnu.org>
685 * expr.c (simplify_parameter_variable): Set the character length
686 of the result expression from the original expression if
689 2019-10-11 Steven G. Kargl <kargl@gcc.gnu.org>
692 check.c (gfc_check_findloc): Additional checking for valid arguments
694 2019-10-11 Steven G. Kargl <kargl@gcc.gnu.org>
697 * decl.c (gfc_match_prefix): If matching a type-spec returns an error,
698 it's an error so re-act correctly.
700 2019-10-11 Steven G. Kargl <kargl@gcc.gnu.org>
703 * check.c (reset_boz): New function.
704 (illegal_boz_arg, boz_args_check, gfc_check_complex, gfc_check_float,
705 gfc_check_transfer): Use it.
706 (gfc_check_dshift): Use reset_boz, and re-arrange the checking to
707 help suppress possible run-on errors.
708 (gfc_check_and): Restore checks for valid argument types. Use
709 reset_boz, and re-arrange the checking to help suppress possible
711 * resolve.c (resolve_function): Actual arguments cannot be BOZ in
712 a function reference.
714 2019-10-11 Steven G. Kargl <kargl@gcc.gnu.org>
717 * array.c (match_subscript): BOZ cannot be an array subscript.
719 2019-10-11 Tobias Burnus <tobias@codesourcery.com>
722 * trans-expr.c (gfc_conv_procedure_call): Handle code generated
725 2019-10-11 Tobias Burnus <tobias@codesourcery.com>
727 * f95-lang.c (LANG_HOOKS_OMP_IS_ALLOCATABLE_OR_PTR): Re-define to
728 gfc_omp_is_allocatable_or_ptr.
729 * trans-decl.c (create_function_arglist): Set GFC_DECL_OPTIONAL_ARGUMENT
730 only if not passed by value.
731 * trans-openmp.c (gfc_omp_is_allocatable_or_ptr): New.
732 (gfc_trans_omp_clauses): For MAP, handle (present) optional arguments;
733 for target update, handle allocatable/pointer scalars.
734 * trans.h (gfc_omp_is_allocatable_or_ptr): Declare.
736 2019-10-10 Tobias Burnus <tobias@codesourcery.com>
738 * trans-openmp.c (gfc_trans_omp_clauses): Actually pass use_device_addr
739 on to the middle end.
741 2019-10-08 Steven G. Kargl <kargl@gcc.gnu.org>
744 * simplify.c (gfc_simplify_reshape): Convert a gcc_assert into a
745 gfc_error as a user can easily hit the condition.
747 2019-10-08 Tobias Burnus <tobias@codesourcery.com>
749 * parse.c (parse_executable): Add missing ST_OMP_TARGET_SIMD.
751 2019-10-08 Tobias Burnus <tobias@codesourcery.com>
753 * match.h (gfc_match_omp_eos_error): Renamed from gfc_match_omp_eos.
754 * openmp.c (gfc_match_omp_eos): Make static.
755 (gfc_match_omp_eos_error): New.
756 * parse.c (matchs, matchdo, matchds): Do as done for 'matcho' -
757 if error occurred after OpenMP/OpenACC directive matched, do not
758 try other directives.
759 (decode_oacc_directive, decode_omp_directive): Call new function
762 2019-10-05 Steven G. Kargl <kargl@gcc.gnu.org>
765 * decl.c (variable_decl): Do not search parent namespace for symbol.
767 2019-10-05 Paul Thomas <pault@gcc.gnu.org>
770 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Correct the
771 assignment of the attribute field to account correctly for an
772 assumed shape dummy. Assign separately to the gfc and cfi
773 descriptors since the atribute can be different. Add btanch to
774 correctly handle missing optional dummies.
776 2019-10-04 Steven G. Kargl <kargl@gcc.gnu.org>
779 * fortran/decl.c (variable_decl): Re-arrange code for matching %FILL.
781 2019-10-04 Tobias Burnus <tobias@codesourcery.com>
783 * error.c (error_print, gfc_format_decoder): Fix off-by one issue
786 2019-10-03 Steven G. Kargl <kargl@gcc.gnu.org>
789 * simplify.c (gfc_simplify_dble, simplify_intconv, gfc_simplify_real,
790 gfc_simplify_sngl): Disable -Wconversion and -Wconversion-extra
791 warnings for explicit conversion of literal constants.
793 2019-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
795 * primary.c (match_real_constant): Remove shadowing local vars.
796 Rename local vars. Fix undefined behavior in loop termination.
797 (gfc_convert_to_structure_constructor): Rename local var.
799 2019-10-03 Thomas Koenig <tkoenig@gcc.gnu.org>
802 * trans-decl.c (gfc_get_symbol_decl): For __def_init, set
803 DECL_ARTIFICAL and do not set TREE_READONLY.
805 2019-10-03 Mark Eggleston <mark.eggleston@codethink.com>
807 * array.c (check_element_type): Call gfc_typename with the gfc_expr
808 "expr" instead of its gfc_typespec "ts".
809 * check.c (gfc_check_co_reduce): Call gfc_typename with the gfc_expr
810 "a" instead of its gfc_typespec "ts".
811 (gfc_check_co_reduce): Call gfc_typename with the gfc_expr "a" instead
812 of its gfc_typespec "ts".
813 (gfc_check_eoshift): Call gfc_typename with the gfc_expr "array"
814 instead of its gfc_typespec ts.
815 (gfc_check_same_type_as): In two calls to gfc_typename use "a" and "b"
816 of type gfc_expr instead of the "ts" fields of "a" and "b"
817 * decl.c (variable_decl): Call gfc_typename with the gfc_expr
818 "initializer" instead of its gfc_typespec "ts".
819 * expr.c (gfc_check_assign): Use "rvalue" and "lvalue" of type gfc_expr
820 in calls to gfc_typename instead of their "ts" fields of type
822 (gfc_check_pointer_assign): Use "rvalue" and "lvalue" of type gfc_expr
823 in calls to gfc_typename instead of their "ts" fields of type
825 * gfortran.h: Add prototypes for gfc_dummy_typename and a new function
826 gfc_typename for gfc_expr *.
827 *interface.c (gfc_check_dummy_characteristics): Use gfc_dummy_typename
828 for the dummy variable.
829 (compare_parameter): Use gfc_dummy_typename for the formal argument.
830 Use "actual" of type gfc_expr in call to gfc_typename for the actual
832 * intrinsic.c (check_arglist): Use gfc_dummy_typename for the formal
833 argument. Use expressions of type gfc_expr from the argument list to
835 (gfc_convert_type_warn): New local variable "is_char_constant" set if
836 the expression type is a character constant. At the "bad" label
837 determine source type name by calling gfc_typename with either "expr"
838 for character constants or "from_ts" and use that in the warning
839 messages instead of the original call to gfc_typename.
840 * misc.c (gfc_typename): New function for gfc_expr *, use for where
841 character types are possible it can get the character length from
842 gfc_expr for character literals.
843 (gfc_dummy_typename): New functionfor gfc_typespec *, if no character
844 length is present the character type is assumed and the appropriate
845 string is return otherwise it calls gfc_typename for gfc_typespec *.
846 (gfc_typespec): for character types construct the type name with length
847 and kind (if it is not default kind).
849 2019-10-02 Steven G. Kargl <kargl@gcc.gnu.org>
852 * simplify.c (gfc_convert_constant): Simplify expression if the
853 expression type is EXPR_OP.
855 2019-10-02 Steven G. Kargl <kargl@gcc.gnu.org>
858 * primary.c (gfc_match_varspec): Ensure an inquiry parameter has
861 2019-10-02 Steven G. Kargl <kargl@gcc.gnu.org>
864 * io.c (match_vtag): Check for non-NULL result->symtree.
865 (match_out_tag): Check for invalid constant due to inquiry parameter.
866 (match_filepos): Instead of a syntax error, go to cleanup to get better
869 2019-10-02 Steven G. Kargl <kargl@gcc.gnu.org>
872 * match.c (gfc_match_call): BOZ cannot be an actual argument in
873 a subroutine reference.
874 * resolve.c (resolve_function): BOZ cannot be an actual argument in
875 a function reference.
877 2019-10-01 Jan Hubicka <jh@suse.cz>
879 * module.c (load_commons): Initialize flags to 0 to silence
880 -Wmaybe-uninitialized warning.
881 (read_module): Likewise for n and comp_name.
883 2019-10-02 Tobias Burnus <tobias@codesourcery.com>
885 * dump-parse-tree.c (show_omp_clauses): Handle OMP_LIST_USE_DEVICE_ADDR.
886 * gfortran.h (enum): Add OMP_LIST_USE_DEVICE_ADDR.
887 * openmp.c (omp_mask1): Likewise.
888 (gfc_match_omp_clauses): Match 'use_device_addr'.
889 (OMP_TARGET_DATA_CLAUSES): Add OMP_LIST_USE_DEVICE_ADDR.
890 (resolve_omp_clauses): Add it; add is_device_ptr checks.
892 2019-10-02 Tobias Burnus <tobias@codesourcery.com>
894 * openmp.c (gfc_match_omp_clauses): Show a clause-parsing
895 error if none was rised before.
896 * parse.c (matcha, matcho): If error occurred after
897 OpenMP/OpenACC directive matched, do not try other directives.
899 2019-10-02 Tobias Burnus <tobias@codesourcery.com>
901 * trans-openmp.c (gfc_omp_is_optional_argument): Fix coding
904 2019-10-02 Kwok Cheung Yeung <kcy@codesourcery.com>
906 * f95-lang.c (LANG_HOOKS_OMP_IS_OPTIONAL_ARGUMENT): Define to
907 gfc_omp_is_optional_argument.
908 * trans-decl.c (create_function_arglist): Set
909 GFC_DECL_OPTIONAL_ARGUMENT in the generated decl if the parameter is
911 * trans-openmp.c (gfc_omp_is_optional_argument): New.
912 (gfc_omp_privatize_by_reference): Return true if the decl is an
913 optional pass-by-reference argument.
914 * trans.h (gfc_omp_is_optional_argument): New declaration.
915 (lang_decl): Add new optional_arg field.
916 (GFC_DECL_OPTIONAL_ARGUMENT): New macro.
918 2019-10-01 David Malcolm <dmalcolm@redhat.com>
920 * error.c (gfc_diagnostic_starter): Clear the prefix before
921 calling diagnostic_show_locus.
923 2019-09-29 Steven G. Kargl <kargl@gcc.gnu.org>
926 * check.c (gfc_check_is_contiguous): null() cannot be an actual
927 argument to is_contiguous().
929 2019-09-29 Steven G. Kargl <kargl@gcc.gnu.org>
932 * decl.c (gfc_match_decl_type_spec): Issue errors for a few
935 2019-09-29 Paul Thomas <pault@gcc.gnu.org>
938 * resolve.c (gfc_expr_to_initialize): Bail out with a copy of
939 the original expression if the array ref is a scalar and the
940 array_spec has corank.
941 * trans-array.c (gfc_conv_array_ref): Such expressions are OK
942 even if the array ref codimen is zero.
943 * trans-expr.c (gfc_get_class_from_expr): New function taken
944 from gfc_get_vptr_from_expr.
945 (gfc_get_vptr_from_expr): Call new function.
946 * trans-stmt.c (trans_associate_var): If one of these is a
947 target expression, extract the class expression from the target
948 and copy its fields to a new target variable.
949 * trans.h : Add prototype for gfc_get_class_from_expr.
951 2019-09-28 Jerry DeLisle <jvdelisle@gcc.ngu.org>
954 * decl.c (attr_decl1): Return MATCH_ERROR without free to avoid
955 bad expression type in free_expr0() ICE in rank+corank check.
957 2019-09-28 Steven G. Kargl <kargl@gcc.ngu.org>
960 * decl.c (attr_decl1): Check if rank+corank > 15.
962 2019-09-28 Steven G. Kargl <kargl@gcc.gnu.org>
965 * gcc/fortran/io.c (match_io_element): An inquiry parameter cannot be
967 * gcc/fortran/match.c (gfc_match_allocate): An inquiry parameter
968 can be neither an allocate-object nor stat variable.
969 (gfc_match_deallocate): An inquiry parameter cannot be deallocated.
971 2019-09-26 Alessandro Fanfarillo <afanfa@gcc.gnu.org>
973 * trans-array.c (structure_alloc_comps):
974 Add new enum item for BCAST_ALLOC_COMP.
975 New argument for structure_alloc_comp, and new case to handle
976 recursive components in derived types.
977 * trans-array.c (gfc_bcast_alloc_comp): New function
978 used to handleco_broadcast for allocatable components
980 * trans-array.h: Add gfc_bcast_alloc_comp
981 * trans-intrinsics.c (conv_co_collective): Add check for
982 derived type variable and invocation of co_bcast_alloc_comp.
983 * trans.h: New data structure gfc_co_subroutines_args.
985 2019-09-25 David Malcolm <dmalcolm@redhat.com>
988 * error.c (curr_diagnostic): New static variable.
989 (gfc_report_diagnostic): New static function.
990 (gfc_warning): Replace call to diagnostic_report_diagnostic with
991 call to gfc_report_diagnostic.
992 (gfc_format_decoder): Colorize the text of %L and %C to match the
993 colorization used by diagnostic_show_locus.
994 (gfc_warning_now_at): Replace call to diagnostic_report_diagnostic with
995 call to gfc_report_diagnostic.
996 (gfc_warning_now): Likewise.
997 (gfc_warning_internal): Likewise.
998 (gfc_error_now): Likewise.
999 (gfc_fatal_error): Likewise.
1000 (gfc_error_opt): Likewise.
1001 (gfc_internal_error): Likewise.
1003 2019-09-23 Paul Thomas <pault@gcc.gnu.org>
1006 * match.c (gfc_match_select_rank): Initialise 'as' to NULL.
1007 Check for a symtree in the selector expression before trying to
1008 assign a value to 'as'. Revert to gfc_error and go to cleanup
1009 after setting a MATCH_ERROR.
1011 2019-09-20 Tobias Burnus <tobias@codesourcery.com>
1014 * openmp.c (gfc_resolve_oacc_declare): Reject all
1015 non variables but accept function result variables.
1016 * trans-openmp.c (gfc_trans_omp_clauses): Handle
1017 function-result variables for remaing cases.
1019 2019-09-17 Paul Thomas <pault@gcc.gnu.org>
1022 * expr.c (check_inquiry): Remove extended component refs by
1023 using symbol pointers. If a function argument is an associate
1024 variable with a constant target, copy the target expression in
1025 place of the argument expression. Check that the charlen is not
1026 NULL before using the string length.
1027 (gfc_check_assign): Remove extraneous space.
1029 2019-09-15 Steven G. Kargl <kargl@gcc.gnu.org>
1032 * resolve.c (conformable_arrays): If array-spec is NULL, then
1033 allocate-object is a scalar. a conformability check only occurs
1034 for an array source-expr.
1036 2019-09-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1039 * frontend-passes.c (do_subscript): If step equals
1040 zero, a previuos error has been reported; do nothing
1042 * resolve.c (gfc_resolve_iterator): Move error checking
1043 after type conversion.
1045 2019-09-14 Thomas Koenig <tkoenig@gcc.gnu.org>
1049 * frontend-passes.c (check_externals_procedure): Reformat argument
1050 list. Use gfc_compare_actual_formal instead of gfc_procedure_use.
1051 * gfortran.h (gfc_symbol): Add flag error.
1052 * interface.c (gfc_compare_interfaces): Reformat.
1053 (argument_rank_mismatch): Add where_formal argument. If it is
1054 present, note that the error is between different calls.
1055 (compare_parameter): Change warnings that previously dependended
1056 on -Wargument-mismatch to unconditional. Issue an error / warning
1057 on type mismatch only once. Pass where_formal to
1058 argument_rank_mismatch for artificial variables.
1059 (compare_actual_formal): Change warnings that previously
1060 dependeded on -Wargument-mismatch to unconditional.
1061 (gfc_check_typebound_override): Likewise.
1062 (gfc_get_formal_from_actual_arglist): Set declared_at for
1064 * invoke.texi: Extend description of -fallow-argument-mismatch.
1065 Delete -Wargument-mismatch.
1066 * lang.opt: Change -Wargument-mismatch to do-nothing option.
1067 * resolve.c (resolve_structure_cons): Change warnings that
1068 previously depended on -Wargument-mismatch to unconditional.
1069 * trans-decl.c (generate_local_decl): Do not warn if the symbol is
1072 2019-09-13 Steven G. Kargl <kargl@gcc.gnu.org>
1075 * simplify.c (gfc_simplify_merge): Need to simplify expression
1076 after insertation of parenthesis.
1078 2019-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1081 * trans-array.c (gfc_conv_array_initializer): Always assign the
1082 array type of the field to the string constant.
1084 2019-09-13 Paul Thomas <pault@gcc.gnu.org>
1087 * dependency.c (gfc_dep_resolver): Flag identical components
1088 and exit with return value 1 if set and no array refs.
1090 2019-09-11 Steven G. Kargl <kargl@gcc.gnu.org>
1093 * simplify.c (gfc_convert_constant): During conversion check if the
1094 constant is enclosed in parenthesis, and simplify expression.
1096 2019-09-11 Steven G. Kargl <kargl@gcc.gnu.org>
1099 * io.c (gfc_match_inquire): null() cannot be in an iolength inquire
1102 2019-09-05 Harald Anlauf <anlauf@gmx.de>
1105 * parse.c (parse_executable): Improve error messages for
1106 improperly placed pragmas not preceeding a loop.
1108 2019-09-05 Steven G. Kargl <kargl@gcc.gnu.org>
1111 * decl.c (gfc_match_decl_type_spec): Improve and restore error
1112 message for malformed types-spec.
1114 2019-09-04 Steven G. Kargl <kargl@gcvc.gnu.org>
1117 * io.c (match_io_element): An output IO list item cannot be a BOZ.
1119 2019-09-03 Steven G. Kargl <kargl@gcc.gnu.org>
1121 * gfortran.texi: Update documentation to catch up with BOZ changes.
1122 * invoke.texi: Fix English from previous BOZ changes commit.
1124 2019-09-02 Paul Thomas <pault@gcc.gnu.org>
1127 * primary.c (gfc_match_varspec): Return MATCH_NO on an apparent
1128 component ref, when the primary type is intrinsic.
1130 2019-09-02 Steven G. Kargl <kargl@gc.gnu.org>
1133 * array.c (walk_array_constructor): New function.
1134 (gfc_match_array_constructor): Use it.
1136 2019-09-01 Paul Thomas <pault@gcc.gnu.org>
1138 * array.c (spec_dimen_size): Check for the presence of
1139 expressions for the bounds.
1140 * decl.c (gfc_match_end): Add case COMP_SELECT_RANK.
1141 * dump-parse-tree.c(show_symbol): Show the arrayspec of class
1143 (show_code_node): Show the code for SELECT_RANK.
1144 * expr.c (gfc_check_vardef_context): Omit the context of
1145 variable definition for select rank associate names since the
1146 ASSUMED RANK throws.
1147 * gfortran.h : Add ST_SELECT_RANK and ST_RANK to enum
1148 gfc_statement. Add select_rank_temporary to symbol attribute
1149 structure. Add EXEC_SELECT_RANK to enum gfc_exec_op.
1150 * match.c (match_exit_cycle): Add COMP_SELECT_RANK.
1151 (copy_ts_from_selector_to_associate): Add as special case for
1152 assumed rank class variables.
1153 (select_intrinsic_set_tmp): Clean up the code by using symbols
1154 for references to the temporary and the selector.
1155 (select_type_set_tmp): Ditto.
1156 (select_rank_set_tmp): New function.
1157 (gfc_match_select_rank): New function.
1158 (gfc_match_rank_is): New function.
1159 * match.h : Add prototypes for gfc_match_select_rank and
1161 * parse.c (decode_statement): Attempt to match select_rank and
1163 (next_statement, gfc_ascii_statement): Add ST_SELECT_RANK.
1164 (parse_select_rank_block): New function.
1165 (parse_executable): Parse select rank block for ST_SELECT_RANK.
1166 * parse.h : Add COMP_SELECT_RANK to enum gfc_compile_state.
1167 * resolve.c (resolve_variable): Exclude select_rank_temporaries
1168 from the check on use of ASSUMED RANK.
1169 (gfc_resolve_expr): Make sure that unlimited polymorphic select
1170 rank temporaries expressions are not resolved again after being
1171 successfully resolved.
1172 (resolve_assoc_var): Do not do the rank check for select rank
1174 (resolve_select_rank): New function.
1175 (gfc_resolve_blocks): Deal with case EXEC_SELECT_RANK.
1176 (resolve_symbol): Exclude select rank temporaries for check on
1177 use of ASSUMED RANK.
1178 * st.c (gfc_free_statement): Include EXEC_SELECT_RANK.
1179 * trans-array.c (gfc_conv_array_ref): Select rank temporaries
1180 may have dimen == 0.
1181 (gfc_conv_expr_descriptor): Zero the offset of select rank
1183 * trans-stmt.c (copy_descriptor): New function.
1184 (trans_associate_var): Add code to associate select rank temps.
1185 (gfc_trans_select_rank_cases): New function.
1186 (gfc_trans_select_rank): New function.
1187 * trans-stmt.h : Add prototype for gfc_trans_select_rank.
1188 trans.c (trans_code): Add select rank case.
1190 2019-08-30 Steven G. Kargl <kargl@gcc.gnu.org>
1193 * io.c (match_filepos): MATCH_ERROR should branch to a syntax error.
1195 2019-08-28 Steven G. Kargl <kargl@gcc.gnu.org>
1198 * intrinsic.c (sort_actual): ALLOCATED has one argument. Check for
1201 2019-08-28 Steven G. Kargl <kargl@gcc.gnu.org>
1204 * simplify.c (gfc_simplify_reshape): Add additional checks of the
1205 ORDER dummy argument.
1207 2019-08-28 Steven G. Kargl <kargl@gcc.gnu.org>
1210 * check.c (gfc_check_kill_sub): Additional checks on status dummy
1213 2019-08-28 Mark Eggleston <mark.eggleston@codethink.com>
1215 * intrinsics.text: Corrected stated standard for intrinsics
1216 and specific intrinsics where necessary. Also in C_SIZEOF the
1217 printed value is T not .TRUE.. In IPARITY example wrap BOZ
1218 constants in calls to INT.
1220 2019-08-27 Harald Anlauf <anlauf@gmx.de>
1223 * gfortran.h: Extend struct gfc_iterator for loop annotations.
1224 * array.c (gfc_copy_iterator): Copy loop annotations by IVDEP,
1225 VECTOR, and NOVECTOR pragmas.
1226 * decl.c (gfc_match_gcc_ivdep, gfc_match_gcc_vector)
1227 (gfc_match_gcc_novector): New matcher functions handling IVDEP,
1228 VECTOR, and NOVECTOR pragmas.
1229 * match.h: Declare prototypes of matcher functions handling IVDEP,
1230 VECTOR, and NOVECTOR pragmas.
1231 * parse.c (decode_gcc_attribute, parse_do_block)
1232 (parse_executable): Decode IVDEP, VECTOR, and NOVECTOR pragmas;
1233 emit warning for unrecognized pragmas instead of error.
1234 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do): Add code to
1235 emit annotations for IVDEP, VECTOR, and NOVECTOR pragmas.
1236 * gfortran.texi: Document IVDEP, VECTOR, and NOVECTOR pragmas.
1238 2019-08-27 Mark Eggleston <mark.eggleston@codethink.com>
1240 * invoke.texi: Ensure that the option lists fit within the
1241 margins of a PDF page. Re-worded description of
1242 '-ffrontend-loop-interchange' so that it fits with the margins
1243 of a PDF page. Add '-fdec-include', '-fdec-blank-format-item'
1244 and '-fdec-format-defaults' to list of options that are enabled
1247 2019-08-26 Thomas Koenig <tkoenig@gcc.gnu.org>
1251 * frontend-passes.c (gfc_check_externals): Make
1252 gfc_errors_to_warnings conditional on -fallow-argument-mismatch.
1253 * invoke.texi: Document -fallow-argument-mismatch.
1254 * lang.opt: Add -fallow-argument-mismatch.
1256 2019-08-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1260 * frontend-passes.c (check_externals_procedure): New
1261 function. If a procedure is not in the translation unit, create
1262 an "interface" for it, including its formal arguments.
1263 (check_externals_code): Use check_externals_procedure for common
1264 code with check_externals_expr.
1265 (check_externals_expr): Vice versa.
1266 * gfortran.h (gfc_get_formal_from_actual-arglist): New prototype.
1267 (gfc_compare_actual_formal): New prototype.
1268 * interface.c (compare_actual_formal): Rename to
1269 (gfc_compare_actual_formal): New function, make global.
1270 (gfc_get_formal_from_actual_arglist): Make global, and move here from
1271 * trans-types.c (get_formal_from_actual_arglist): Remove here.
1272 (gfc_get_function_type): Use gfc_get_formal_from_actual_arglist.
1274 2019-08-23 Mark Eggleston <mark.eggleston@codethink.com>
1276 * intrinsics.text: References in 'See also:' are now on
1277 separate lines to ensure that they always fit in the margins of
1278 a PDF page. The column widths of tables have been adjusted
1279 where necessary to prevent overlapping text. All program
1280 examples now fit within the margins of a PDF page.
1282 2019-08-23 Jakub Jelinek <jakub@redhat.com>
1285 * options.c (gfc_post_options): Set flag_excess_precision instead of
1286 flag_excess_precision_cmdline. Remove comment.
1288 2019-08-23 Mark Eggleston <mark.eggleston@codethink.com>
1290 * intrinsics.text: Removed empty sections. The order of
1291 sections for each intrinsic is now consistent throughout.
1292 Stray words removed. Text in the wrong section moved.
1293 Missing standard statement inserted.
1295 2019-08-23 Mark Eggleston <mark.eggleston@codethink.com>
1297 * intrinsics.text: Correct the return types for ZABS and CDABS.
1299 2019-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
1301 * intrinsic.c (add_subroutines): ERRMSG is INTENT(INOUT) in
1302 co_broadcast, co_max, co_min, co_reduce, and co_sum.
1304 2019-08-20 Mark Eggleston <mark.eggleston@codethink.com>
1307 * intrinsic.texi: Add GNU extension notes to DIM, MOD, MODULO.
1309 2019-08-19 Mark Eggleston <mark.eggleston@codethink.com>
1311 * gfortran.texi: Delete paragraph about integer overload errors
1312 when initialising integer variables with BOZ constants as these
1315 2019-08-18 Steven G. Kargl <kargl@gcc.gnu.org>
1318 module.c (gfc_match_use): User defined operator cannot conflict with
1321 2019-08-17 Steven G. Kargl <kargl@gcc.gnu.org>
1324 * module.c (gfc_match_use): When renaming a module entity, search
1325 current namespace for conflicting symbol.
1327 2019-08-17 Steven G. Kargl <kargl@gcc.gnu.org>
1330 * match.c (gfc_match_st_function): When matching a statement function,
1331 need to check if the statement function name shadows the function
1334 2019-08-17 Steven G. Kargl <kargl@gcc.gnu.org>
1337 * decl.c (get_proc_name): Check for a CLASS entity when trying to
1338 add attributes to an entity that already has an explicit interface.
1340 2019-08-17 Steven G. Kargl <kargl@gcc.gnu.org>
1343 * primary.c (gfc_variable_attr): Remove a gfc_internal_error(),
1344 which cannot be reached by conforming Fortran code, but seems to
1345 be reachable from nonconforming Fortran code. Treat the AR_UNKNOWN
1348 2019-08-17 Janne Blomqvist <jb@gcc.gnu.org>
1351 * trans-decl.c (gfc_build_builtin_function_decls): Replace
1352 os_error with os_error_at decl.
1353 * trans.c (trans_runtime_error_vararg): Modify so the error
1354 function decl is passed directly.
1355 (gfc_trans_runtime_error): Pass correct error function decl.
1356 (gfc_trans_runtime_check): Likewise.
1357 (trans_os_error_at): New function.
1358 (gfc_call_malloc): Use trans_os_error_at.
1359 (gfc_allocate_using_malloc): Likewise.
1360 (gfc_call_realloc): Likewise.
1361 * trans.h (gfor_fndecl_os_error): Replace with gfor_fndecl_os_error_at.
1363 2019-08-16 Jeff Law <law@redhat.com>
1364 Mark Eggleston <mark.eggleston@codethink.com>
1366 * gfortran.h: Add gfc_check_conflict declaration.
1367 * symbol.c (check_conflict): Rename cfg_check_conflict and remove
1369 * symbol.c (cfg_check_conflict): Remove automatic in equivalence
1371 * symbol.c (save_symbol): Add check for in equivalence to stop the
1372 the save attribute being added.
1373 * trans-common.c (build_equiv_decl): Add is_auto parameter and
1374 add !is_auto to condition where TREE_STATIC (decl) is set.
1375 * trans-common.c (build_equiv_decl): Add local variable is_auto,
1376 set it true if an atomatic attribute is encountered in the variable
1377 list. Call build_equiv_decl with is_auto as an additional parameter.
1378 flag_dec_format_defaults is enabled.
1379 * trans-common.c (accumulate_equivalence_attributes) : New subroutine.
1380 * trans-common.c (find_equivalence) : New local variable dummy_symbol,
1381 accumulated equivalence attributes from each symbol then check for
1384 2019-08-16 Richard Biener <rguenther@suse.de>
1386 * trans-intrinsic.c (gfc_conv_intrinsic_findloc): Initialize
1387 forward_branch to avoid bogus uninitialized warning.
1389 2019-08-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1392 * frontend-passes.c (check_externals_expr): New function.
1393 (check_externals_code): New function.
1394 (gfc_check_externals): New function.
1395 * gfortran.h (debug): Add prototypes for gfc_symbol * and
1397 (gfc_check_externals): Add prototype.
1398 * interface.c (compare_actual_formal): Do not complain about
1399 alternate returns if the formal argument is optional.
1400 (gfc_procedure_use): Handle cases when an error has been issued
1401 previously. Break long line.
1402 * parse.c (gfc_parse_file): Call gfc_check_externals for all
1403 external procedures.
1404 * resolve.c (resolve_global_procedure): Remove checking of
1407 2019-08-13 Steven G. Kargl <kargl@gcc.gnu.org>
1410 * resolve.c (check_data_variable): data-stmt-object with pointer
1411 attribute requires a data-stmt-value with the target attribute.
1413 2019-08-13 Steven G. Kargl <kargl@gcc.gnu.org>
1416 * misc.c (gfc_typename): Do not point to something that ought not to
1419 2013-08-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1422 * frontend-passes.c (insert_index): Suppress errors while
1423 simplifying the resulting expression.
1425 2019-08-13 Steven G. Kargl <kargl@gcc.gnu.org>
1428 resolve.c (resolve_typebound_procedure): Allow host associated
1429 procedure to be a binding target. While here, wrap long line.
1431 2019-08-13 Steven G. Kargl <kargl@gcc.gnu.org>
1434 * expr.c (gfc_simplify_expr): Simplifcation of an array with a kind
1435 type inquiry suffix yields a constant expression.
1437 2019-08-13 Janne Blomqvist <jb@gcc.gnu.org>
1440 * check.c (gfc_check_random_seed): Reduce seed_size.
1441 * intrinsic.texi (RANDOM_NUMBER): Update to match new PRNG.
1443 2019-08-12 Thomas Koenig <tkoenig@gcc.gnu.org>
1446 * frontend-passes.c (do_subscript): Do not warn for an
1447 expression a second time. Do not warn about a zero-trip loop.
1448 (doloop_warn): Also look at contained namespaces.
1450 2019-08-11 Janne Blomqvist <jb@gcc.gnu.org>
1453 * invoke.texi (-fmax-stack-var-size): Document increased default.
1454 * options.c (gfc_post_options): Increase default stack var size to
1456 * trans-decl.c (gfc_finish_var_decl): Generate warning when local
1457 array moved to static storage.
1459 2019-08-10 Steven G. Kargl <kargl@gcc.gnu.org>
1461 * decl.c (match_old_style_init): Use a clearer error message.
1462 * expr.c (gfc_check_assign): Update BOZ checking to provide a stricter
1463 adherence to the Fortran standard. Use gfc_invalid_boz () to
1464 relax errors into warnings.
1465 * gfortran.h (gfc_isym_id): Add new ids GFC_ISYM_DFLOAT,
1466 GFC_ISYM_FLOAT, GFC_ISYM_REALPART, and GFC_ISYM_SNGL
1467 * intrinsic.c (add_functions): Use new ids to split REAL generic into
1468 REAL, FLOAT, DFLOAT, SNGL, and REALPART generics.
1469 (gfc_intrinsic_func_interface): Allow new intrinsics in an
1470 initialization expression
1471 * resolve.c (resolve_operator): Deal with BOZ as operands.
1472 Use gfc_invalid_boz to allow for errors or warnings via the
1473 -fallow-invalid-boz option. A BOZ cannot be an operand to an
1474 unary operator. Both operands of a binary operator cannot be BOZ.
1475 For binary operators, convert a BOZ operand into the type and
1476 kind of the other operand for REAL or INTEGER operand.
1477 * trans-intrinsic.c: Use new ids to cause conversions to happen.
1479 2019-08-06 Steven G. Kargl <kargl@gcc.gnu.org>
1482 * trans-decl.c (gfc_generate_return): Ensure something is returned
1485 2019-08-06 Steven G. Kargl <kargl@gcc.gnu.org>
1488 * check.c(gfc_check_allocated): Add comment pointing to ...
1489 * intrinsic.c(sort_actual): ... the checking done here.
1491 2019-08-05 Steven g. Kargl <kargl@gcc.gnu.org>
1494 * decl.c (gfc_match_data): Allow an implied do-loop to nestle against
1497 2019-08-04 Steven G. Kargl <kargl@gcc.gnu.org>
1500 * check.c (oct2bin): New function. Convert octal string to binary.
1501 (hex2bin): New function. Convert hexidecimal string to binary.
1502 (bin2real): New function. Convert binary string to REAL. Use
1503 oct2bin and hex2bin.
1504 (gfc_boz2real): Use fallback conversion bin2real.
1506 2019-08-02 Steven G. Kargl <kargl@gcc.gnu.org>
1509 * decl.c (gfc_match_data): In free-form code, DATA be followed by
1512 2019-08-02 Steven G. Kargl <kargl@gcc.gnu.org>
1515 * match.c (gfc_match_equivalence): Check that EQUIVALENCE is followed
1518 2019-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1521 * interface.c (compare_actual_expr): When checking for aliasing, add
1522 a case to handle REF_INQUIRY (e.g., foo(x%re, x%im) do not alias).
1524 2019-07-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1527 * dump-parse-tree.c (show_global_symbol): New function.
1528 (gfc_dump_global_symbols): New function.
1529 * gfortran.h (gfc_traverse_gsymbol): Add prototype.
1530 (gfc_dump_global_symbols): Likewise.
1531 * invoke.texi: Document -fdump-fortran-global.
1532 * lang.opt: Add -fdump-fortran-global.
1533 * parse.c (gfc_parse_file): Handle flag_dump_fortran_global.
1534 * symbol.c (gfc_traverse_gsymbol): New function.
1535 * trans-decl.c (sym_identifier): New function.
1536 (mangled_identifier): New function, doing most of the work
1537 of gfc_sym_mangled_identifier.
1538 (gfc_sym_mangled_identifier): Use mangled_identifier. Add mangled
1539 identifier to global symbol table.
1540 (get_proc_pointer_decl): Use backend decl from global identifier
1543 2019-07-25 Thomas Koenig <tkoenig@gcc.gnu.org>
1546 * dependency.h (gfc_dep_resovler): Add optional argument identical.
1547 * dependency.c (gfc_check_dependency): Do not alway return 1 if
1548 the symbol is the same. Pass on identical to gfc_dep_resolver.
1549 (gfc_check_element_vs_element): Whitespace fix.
1550 (gfc_dep_resolver): Adjust comment for function. If identical is
1551 true, return 1 if any overlap has been found.
1553 2019-07-23 Steven G. Kargl <kargl@gcc.gnu.org>
1556 * check.c (gfc_invalid_boz): Fix comment.
1557 (illegal_boz_arg): New function.
1558 (gfc_check_transfer): Use to arguments.
1559 (gfc_check_storage_size): Ditto.
1560 (gfc_check_complex): Remove leftover comment from BOZ patch.
1561 * primary.c (match_boz_constant): Remove leftover comment.
1563 2019-07-23 Steven G. Kargl <kargl@gcc.gnu.org>
1565 * arith.c (gfc_convert_integer, gfc_convert_real, gfc_convert_complex):
1567 * primary.c (convert_integer, convert_real, convert_complex): ... here.
1568 Rename and make static functions.
1569 (match_integer_constant): Use convert_integer
1570 (match_real_constant): Use convert_real.
1571 (match_complex_constant: Use convert_complex.
1572 * arith.h (gfc_convert_integer, gfc_convert_real, gfc_convert_complex):
1574 * array.c (match_array_cons_element): A BOZ cannot be a data
1575 statement value. Jump to a common exit point.
1576 * check.c (gfc_invalid_boz): New function. Emit error or warning
1577 for a BOZ in an invalid context.
1578 (boz_args_check): Move to top of file to prevent need of forward
1580 (is_boz_constant): New function. Check that BOZ expr is constant.
1581 (gfc_boz2real): New function. In-place conversion of BOZ literal
1582 constant to REAL in accordance to F2018.
1583 (gfc_boz2int): New function. In-place conversion of BOZ literal
1584 constant to INTEGER in accordance to F2018.
1585 (gfc_check_achar, gfc_check_char, gfc_check_float): Use gfc_invalid_boz. Convert BOZ
1587 (gfc_check_bge_bgt_ble_blt): Enforce F2018 requirements on BGE,
1588 BGT, BLE, and BLT intrinsic functions.
1589 (gfc_check_cmplx): Re-organize to check kind, if present, first.
1590 Convert BOZ real and/or imaginary parts as needed in accordance to
1592 (gfc_check_complex): Use gfc_invalid_boz. Convert BOZ as needed.
1593 (gfc_check_dcmplx, gfc_check_dble ): Convert BOZ as needed.
1594 (gfc_check_dshift): Make dshift[lr] conform to F2018 standard.
1595 gfc_check_float (gfc_expr *a)
1596 (gfc_check_iand_ieor_ior): Make IAND, IEOR, and IOR conform to
1598 (gfc_check_int): Conform to F2018 standard.
1599 (gfc_check_intconv): Deprecate SHORT and LONG aliases for INT2 and
1600 INT. Simply return for a BOZ argument. See gfc_simplify_intconv.
1601 (gfc_check_merge_bits): Make MERGE_BITS conform to Fortran 2018
1603 (gfc_check_real): Remove incorrect comment. Check kind, if present,
1604 first. Simply return for a BOZ argument. See gfc_simplify_real.
1605 (gfc_check_and): Re-do error handling for BOZ arguments. Remove
1606 special casing ts.type != BT_INTEGER or BT_LOGICAL.
1607 * decl.c (match_old_style_init): Check for BOZ in old-style
1608 initialization. Issue error or warning depending on
1609 -fallow-invalid-boz option. Issue error if variable is not an
1610 INTEGER or REAL and the value is BOZ.
1611 * expr.c (gfc_copy_expr): Copy a BT_BOZ gfc_expr.
1612 (gfc_check_assign): Re-do error handling for a BOZ in an assignment
1613 statement. Do in-place conversion of RHS based on LHS type of
1615 * gfortran.h (gfc_expr): Add a boz component. Remove is_boz component.
1616 (gfc_boz2int, gfc_boz2real, gfc_invalid_boz): New prototypes.
1617 * interface.c (gfc_extend_assign): Guard against replacing an
1618 intrinsic involving a BOZ literal constant on RHS.
1619 * invoke.texi: Doument -fallow-invalid-boz.
1620 * lang.opt: New option. -fallow-invalid-boz.
1621 * libgfortran.h (bt): Elevate BOZ to a basic type.
1622 * misc.c (gfc_basic_typename, gfc_typename): Translate BT_BOZ to BOZ.
1623 * primary.c (convert_integer, convert_real, convert_complex): to here.
1624 Rename and make static functions.
1625 * primary.c(match_boz_constant): Rewrite parsing of a BOZ. Re-do
1626 error handling. Deprecate 'X' for hexidecimal and postfix notation.
1627 Use -fallow-invalid-boz and gfc_invalid_boz to accept deprecated code.
1628 * resolve.c (resolve_ordinary_assign): Rework a RHS that is a
1629 BOZ literal constant. Use gfc_invalid_boz to allow previous
1630 nonstandard behavior. Remove range checking of BOZ conversion.
1631 * simplify.c (convert_boz): Remove function.
1632 (simplify_cmplx): Remove conversion of BOZ constants, because
1633 conversion is done in gfc_check_cmplx.
1634 (gfc_simplify_float): Remove conversion of BOZ constant, because
1635 conversion is done in gfc_check_float.
1636 (simplify_intconv): Use gfc_boz2int to convert BOZ to INTEGER.
1637 Remove range checking for BOZ conversion.
1638 (gfc_simplify_real): Use k, if present, to determine kind. Convert
1639 BOZ to REAL. Remove range checking for BOZ conversion.
1640 target-memory.c (gfc_convert_boz): Rewrite to deal with convert of
1641 a BOZ to a REAL value.
1643 2019-07-21 Thomas König <tkoenig@gcc.gnu.org>
1646 * gfortran.texi (GFORTRAN_FORMATTED_BUFFER_SIZE): Document
1647 (GFORTRAN_UNFORMATTED_BUFFER_SIZE): Likewise.
1649 2019-07-16 Harald Anlauf <anlauf@gmx.de>
1652 * libgfortran.h: Add mask for -fcheck=bits option.
1653 * options.c (gfc_handle_runtime_check_option): Add option "bits"
1654 to run-time checks selectable via -fcheck.
1655 * trans-intrinsic.c (gfc_conv_intrinsic_btest)
1656 (gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits)
1657 (gfc_conv_intrinsic_shift, gfc_conv_intrinsic_ishft)
1658 (gfc_conv_intrinsic_ishftc): Implement run-time checks for the
1659 POS, LEN, SHIFT, and SIZE arguments.
1660 * gfortran.texi: Document run-time checks for bit manipulation
1662 * invoke.texi: Document new -fcheck=bits option.
1664 2019-07-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1667 * expr.c (check_restricted): Relax constraint C1279 which was
1668 removed from F2008 and above.
1670 2019-07-07 Paul Thomas <pault@gcc.gnu.org>
1673 * trans-array.c (gfc_conv_scalarized_array_ref) Delete code
1674 that gave symbol backend decl for subref arrays and deferred
1677 2019-07-05 Andrew Stubbs <ams@codesourcery.com>
1679 * openmp.c (resolve_omp_clauses): Add custom error messages for
1680 parameters in map clauses.
1682 2019-07-03 Martin Liska <mliska@suse.cz>
1684 * check.c (gfc_check_c_funloc): Remove
1686 * decl.c (variable_decl): Likewise.
1687 * resolve.c (resolve_typebound_function): Likewise.
1688 * simplify.c (gfc_simplify_matmul): Likewise.
1689 (gfc_simplify_scan): Likewise.
1690 * trans-array.c (gfc_could_be_alias): Likewise.
1691 * trans-common.c (add_equivalences): Likewise.
1692 * trans-expr.c (trans_class_vptr_len_assignment): Likewise.
1693 (gfc_trans_array_constructor_copy): Likewise.
1694 (gfc_trans_assignment_1): Likewise.
1695 * trans-intrinsic.c (conv_intrinsic_atomic_op): Likewise.
1696 * trans-openmp.c (gfc_omp_finish_clause): Likewise.
1697 * trans-types.c (gfc_get_array_descriptor_base): Likewise.
1698 * trans.c (gfc_build_final_call): Likewise.
1700 2019-06-27 Steven G. Kargl <kargl@gcc.gnu.org>
1703 * gfortran.dg/common_1.f: new test.
1704 * gfortran.dg/common_26.f90: Ditto.
1706 2019-06-26 Steven G. Kargl <kargl@gcc.gnu.org>
1709 ChangeLog forgotten with revision 272667
1710 * decl.c (access_attr_decl): Use temporary variable to reduce
1711 unreadability of code. Normalize jumping to return.
1712 (gfc_match_protected): Fix parsing error. Add comments to
1713 explain code. Remove dead code.
1714 (gfc_match_private): Use temporary variable to reduce unreadability
1715 of code. Fix parsing error. Move code to test for blank PRIVATE.
1717 (gfc_match_public): Move code to test for blank PUBLIC. Fix
1718 parsing error. Remove dead code.
1720 2019-06-24 Jan Hubicka <jh@suse.cz>
1722 * trans-expr.c (gfc_conv_substring): Check that
1723 type is array or integer prior checking string flag.
1724 (gfc_conv_string_parameter): Likewise.
1725 * trans-openmp.c (gfc_omp_scalar_p): Likewise.
1726 * trans.c (gfc_build_array_ref): Likewise.
1728 2019-06-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1731 * io.c (gfc_resolve_dt): Check that internal units are not
1732 character PARAMETER.
1734 2019-06-21 Steven G. Kargl <kargl@gcc.gnu.org>
1737 * resolve.c (deferred_requirements) : Check only the result variable.
1738 (resolve_fl_procedure): Check deferred requirements on functions.
1740 2019-06-21 Steven G. Kargl <kargl@gcc.gnu.org>
1743 * decl.c (gfc_match_save): If SAVE was not seen, return MATCH_NO
1744 instead issuing an error message and returning MATCH_ERROR.
1746 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
1749 * /decl.c (variable_decl): Mark a variable that is a target in pointer
1750 initialization when in PROGRAM, MODULE, or SUBMODULE scope with an
1753 2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
1756 * symbol.c (verify_bind_c_derived_type): Remove erroneous error
1757 checking for BIND(C) and PRIVATE attributes.
1759 2019-06-20 Thomas Koenig <tkoenig@gcc.gnu.org>
1762 * trans-types.c (get_formal_from_actual_arglist): Get symbol from
1763 current namespace so it will be freed later. If symbol is of type
1764 character, get an empty character length.
1766 2019-06-19 Steven G. Kargl <kargl@gcc.gnu.org>
1769 * match.c (gfc_match_select_type): SELECT TYPE is an executable
1770 statement, and cannot appear in MODULE or SUBMODULE scope.
1772 2019-06-19 Steven G. Kargl <kargl@gcc.gnu.org>
1775 * decl.c (attr_decl): Check for duplicate DIMENSION attribute for a
1778 2019-06-19 Steven G. Kargl <kargl@gcc.gnu.org>
1781 * resolve.c (resolve_contained_fntype): Do not dereference a NULL
1784 2019-06-19 Jim MacArthur <jim.macarthur@codethink.co.uk>
1785 Mark Eggleston <mark.eggleston@codethink.com>
1788 * gfortran.texi: Add -fdec-blank-format-item
1789 * invoke.texi: Add option to list of options.
1790 * invoke.texi: Add to section on Commas in FORMAT specifications.
1791 * io.c (check_format): At FMT_RPAREN goto finished if
1792 -fdec-blank-format-item otherwise set error string.
1793 * lang.opt: Add new option.
1794 * options.c (set_dec_flags): Add SET_BITFLAG for
1795 flag_dec_format_defaults.
1797 2019-06-18 Julian Brown <julian@codesourcery.com>
1800 * trans-decl.c (finish_oacc_declare): Reset module_oacc_clauses
1801 before scanning each namespace.
1803 2019-06-18 Thomas Schwinge <thomas@codesourcery.com>
1806 * trans-decl.c (add_attributes_to_decl): Handle OpenACC 'declare'
1809 2019-06-16 Thomas Koenig <tkoenig@gcc.gnu.org>
1811 * dump_parse_tree (debug): Add verison for formal arglist.
1812 Do not crash when a gfc_expr is NULL.
1814 2019-06-15 Steven G. Kargl <kargl@gcc.gnu.org>
1816 * decl.c (gfc_match_derived_decl): Dummy argument cannot be a derived
1819 2019-06-14 Steven G. Kargl <kargl@gcc.gnu.org>
1821 * arith.c (arith_power): Rework overflow of an integer to an integer
1824 2019-06-14 Harald Anlauf <anlauf@gmx.de>
1828 * trans-intrinsic.c (gfc_conv_intrinsic_shift): Properly
1829 distinguish logical/arithmetic shifts.
1830 * intrinsic.texi: Update documentation for SHIFTR/SHIFTL/SHIFTA
1831 (Fortran 2008) and LSHIFT/RSHIFT (GNU extensions).
1833 2019-06-14 Steven G. Kargl <kargl@gcc.gnu.org>
1836 * dependency.c (gfc_check_argument_var_dependency): Suppress spurious
1837 warnings by comparing variable names.
1839 2019-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
1842 * resolve.c (is_dt_name): New function to compare symbol name against
1843 list of derived types.
1844 (resolve_actual_arglist): Use it to find wrong code.
1846 2019-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
1849 * expr.c (gfc_check_vardef_context): Check for INTENT(IN) variable
1850 in SELECT TYPE construct.
1852 2019-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
1855 * dependency.c (gfc_dep_resolver): Re-arrange code to make the logic
1856 a bit more transparent. Fix 2 nearby formatting issues.
1858 2019-06-13 Jakub Jelinek <jakub@redhat.com>
1860 * io.c (check_format): Use G_(...) instead of _(...) for error values,
1861 append " in format string at %L" to all strings but unexpected_element,
1862 use error as gfc_error formating string instead of
1863 "%s in format string at %L". Formatting fixes.
1865 2019-06-12 Steven G. Kargl <kargl@gcc.gnu.org>
1867 * gfortran.h (gfc_free_dt_list): Remove prototype.
1869 2019-06-12 Steven G. Kargl <kargl@gcc.gnu.org>
1872 * array.c (gfc_free_array_spec): When freeing an array-spec, avoid
1873 an ICE for assumed-shape coarrays.
1875 2019-06-08 Paul Thomas <pault@gcc.gnu.org>
1878 * trans-expr.c (pointer_assignment_is_proc_pointer) Remove as
1879 it is very simple and only called from one place.
1880 (gfc_trans_pointer_assignment): Rename non_proc_pointer_assign
1881 as non_proc_ptr_assign. Assign to it directly, rather than call
1882 to above, deleted function and use gfc_expr_attr instead of
1883 only checking the reference chain.
1885 2019-06-08 Thomas Koenig <tkoenig@gcc.gnu.org>
1886 Tomáš Trnka <trnka@scm.com>
1889 * trans-types.c (get_formal_from_actual_arglist): Unset typespec
1890 flags which make no sense for procedures without explicit
1893 2019-06-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1896 * trans-expr.c (gfc_conv_subref_array_arg): If the size of the
1897 expression can be determined to be one, treat it as contiguous.
1898 Set likelyhood of presence of an actual argument according to
1899 PRED_FORTRAN_ABSENT_DUMMY and likelyhood of being contiguous
1900 according to PRED_FORTRAN_CONTIGUOUS.
1902 2019-05-30 Thomas Koenig <tkoenig@gcc.gnu.org>
1904 * gfc-internals.texi (Translating to GENERIC): New chapter.
1906 2019-05-30 Marek Polacek <polacek@redhat.com>
1908 * lang.opt (ftail-call-workaround): Fix a typo.
1910 2019-05-30 Jakub Jelinek <jakub@redhat.com>
1912 * lang.opt (ftail-call-workaround=): Fix a typo - lenghts to lengths.
1914 2019-05-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1917 * gfortran.h (gfc_has_dimen_vector_ref): Add prototype.
1918 * trans.h (gfc_conv_subref_array_arg): Add argument check_contiguous.
1919 (gfc_conv_is_contiguous_expr): Add prototype.
1920 * frontend-passes.c (has_dimen_vector_ref): Remove prototype,
1922 (gfc_has_dimen_vector_ref): New function name.
1923 (matmul_temp_args): Use gfc_has_dimen_vector_ref.
1924 (inline_matmul_assign): Likewise.
1925 * trans-array.c (gfc_conv_array_parameter): Also check for absence
1926 of a vector subscript before calling gfc_conv_subref_array_arg.
1927 Pass additional argument to gfc_conv_subref_array_arg.
1928 * trans-expr.c (gfc_conv_subref_array_arg): Add argument
1929 check_contiguous. If that is true, check if the argument
1930 is contiguous and do not repack in that case.
1931 * trans-intrinsic.c (gfc_conv_intrinsic_is_contiguous): Split
1932 away most of the work into, and call
1933 (gfc_conv_intrinsic_is_coniguous_expr): New function.
1935 2019-05-29 Jakub Jelinek <jakub@redhat.com>
1938 * lang.opt (fbroken-callers): Remove.
1939 (ftail-call-workaround, ftail-call-workaround=): New options.
1940 * gfortran.h (struct gfc_namespace): Add implicit_interface_calls.
1941 * interface.c (gfc_procedure_use): Set implicit_interface_calls
1942 for calls to implicit interface procedures.
1943 * trans-decl.c (create_function_arglist): Use flag_tail_call_workaround
1944 instead of flag_broken_callers. If it is not 2, also require
1945 sym->ns->implicit_interface_calls.
1946 * invoke.texi (fbroken-callers): Remove documentation.
1947 (ftail-call-workaround, ftail-call-workaround=): Document.
1949 2019-05-26 Thomas Koenig <tkoenig@gcc.gnu.org>
1952 * trans-types.c (get_formal_from_actual_arglist): Set rank
1953 and lower bound for assumed size arguments.
1955 2019-05-22 Andrew Stubbs <ams@codesourcery.com>
1957 * trans-stmt.c (gfc_trans_critical): Use size_type_node for
1958 gfor_fndecl_caf_lock and gfor_fndecl_caf_unlock calls.
1959 (gfc_trans_allocate): Use size_type_node for gfor_fndecl_caf_sync_all
1962 2019-05-22 Jeff Law <law@redhat.com>
1963 Mark Eggleston <mark.eggleston@codethink.com>
1966 * gfortran.texi: Add Default widths for F, G and I format
1967 descriptors to Extensions section.
1968 * invoke.texi: Add -fdec-format-defaults
1969 * io.c (check_format): Use default widths for i, f and g when
1970 flag_dec_format_defaults is enabled.
1971 * lang.opt: Add new option.
1972 * options.c (set_dec_flags): Add SET_BITFLAG for
1973 flag_dec_format_defaults.
1975 2019-05-21 Janne Blomqvist <jb@gcc.gnu.org>
1978 * intrinsic.texi (EXECUTE_COMMAND_LINE): Explain new
1979 wait=.false. implementation.
1981 2019-05-20 Mark Eggleston <markeggleston@codethink.com>
1983 * gfortran.texi: Remove reference to the ASSIGN statement, capitalise
1984 complex, state that padding is with spaces and modify the Hollerith
1987 2019-05-19 Paul Thomas <pault@gcc.gnu.org>
1990 * trans-stmt.c (trans_associate_var) Do not use the saved
1991 descriptor if the expression is a COMPONENT_REF.
1993 2019-05-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1996 * invoke.texi: Document -fbroken-callers.
1997 * lang.opt: Add -fbroken-callers.
1998 * trans-decl.c (create_function_arglist): Only set
1999 DECL_HIDDEN_STRING_LENGTH if flag_broken_callers is set.
2001 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2004 * f95-lang.c (gfc_attribute_table): Set min_len to -1 for "omp
2006 * trans-decl.c (add_attributes_to_decl): Refer to OpenACC
2007 'routine' clauses from "omp declare target" attribute.
2009 2019-05-16 Martin Sebor <msebor@redhat.com>
2011 * gfortranspec.c (append_arg): Spell out the word "argument."
2013 2019-05-16 Jakub Jelinek <jakub@redhat.com>
2016 * trans-decl.c (create_function_arglist): Set
2017 DECL_HIDDEN_STRING_LENGTH on hidden string length PARM_DECLs if
2020 2019-05-15 Janne Blomqvist <jb@gcc.gnu.org>
2022 * parse.c (gfc_parse_file): Remove translation string markers.
2024 2019-05-12 Janne Blomqvist <jb@gcc.gnu.org>
2026 * dump-parse-tree.c (get_c_type_name): Use macros for complex type
2028 * parse.c (gfc_parse_file): Define complex macros, add CPP support
2029 when printing C prototypes.
2031 2019-05-10 Thomas Koenig <tkoenig@gcc.gnu.org>
2034 * interface.c (compare_actual_formal): Do not create a vtab if
2035 the actual argument is assumed type.
2037 2019-05-10 Paul Thomas <pault@gcc.gnu.org>
2040 * trans-decl.c (convert_CFI_desc): Test that the dummy is
2041 present before doing any of the conversions.
2044 * decl.c (gfc_verify_c_interop_param): Restore the error for
2045 charlen > 1 actual arguments passed to bind(C) procs.
2046 Clean up trailing white space.
2049 * trans-array.c (gfc_trans_create_temp_array): Set the 'span'
2050 field to the element length for all types.
2051 (gfc_conv_expr_descriptor): The force_no_tmp flag is used to
2052 prevent temporary creation, especially for substrings.
2053 * trans-decl.c (gfc_trans_deferred_vars): Rather than assert
2054 that the backend decl for the string length is non-null, use it
2055 as a condition before calling gfc_trans_vla_type_sizes.
2056 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): 'force_no_tmp'
2057 is set before calling gfc_conv_expr_descriptor.
2058 * trans.c (get_array_span): Move the code for extracting 'span'
2059 from gfc_build_array_ref to this function. This is specific to
2060 descriptors that are component and indirect references.
2061 * trans.h : Add the force_no_tmp flag bitfield to gfc_se.
2063 2019-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
2067 * dump-parse-tree.c: Include version.h.
2068 (gfc_dump_external_c_prototypes): New function.
2069 (get_c_type_name): Select "char" as a name for a simple char.
2070 Adjust to handling external functions. Also handle complex.
2071 (write_decl): Add argument bind_c. Adjust for dumping of external
2073 (write_proc): Likewise.
2074 (write_interop_decl): Add bind_c argument to call of write_proc.
2075 * gfortran.h: Add prototype for gfc_dump_external_c_prototypes.
2076 * lang.opt: Add -fc-prototypes-external flag.
2077 * parse.c (gfc_parse_file): Move dumping of BIND(C) prototypes.
2078 Call gfc_dump_external_c_prototypes if option is set.
2079 * invoke.texi: Document -fc-prototypes-external.
2081 2019-05-06 Steven G. Kargl <kargl@gcc.gnu.org>
2084 * match.c (gfc_match_stopcode): Check F2008 condition on stop code.
2086 2019-05-01 Andrew Benson <abensonca@gmail.com>
2088 * module.c (write_module): Initialize module_column before writing
2089 module to ensure line break occurs at correct column.
2091 2019-05-01 Dominique d'Humieres <dominiq@gcc.gnu.org>
2094 * match.c (gfc_match_parens): Change the location for missing ')'.
2095 (gfc_match_if): Detect a missing '('. Remove the spurious named
2096 constant error. Change the wording of some errors.
2097 (gfc_match_else): Change the wording of an error.
2098 (gfc_match_elseif): Detect a missing '('. Improve the matching
2099 process to get a better syntax analysis.
2101 2019-04-19 Steven G. Kargl <kargl@gcc.gnu.org>
2104 * decl.c (in_module_or_interface): New function to check that the
2105 current state is in a module, submodule, or interface.
2106 (gfc_match_prefix): Use it.
2108 2019-04-22 Paul Thomas <pault@gcc.gnu.org>
2111 * resolve.c (find_array_spec): If this is a class expression
2112 and the symbol and component array specs are the same, this is
2114 *trans-intrinsic.c (gfc_conv_intrinsic_size): If a class symbol
2115 argument, has no namespace, it has come from the interface
2116 mapping and the _data component must be accessed directly.
2118 2019-04-17 Thomas Schwinge <thomas@codesourcery.com>
2121 * openmp.c (gfc_resolve_do_iterator): Handle sharing_clauses for
2123 (gfc_resolve_oacc_blocks): Populate sharing_clauses with private
2126 2019-04-14 Paul Thomas <pault@gcc.gnu.org>
2129 * trans-decl.c (gfc_get_symbol_decl): Assumed shape and assumed
2130 rank dummies of bind C procs require deferred initialization.
2131 (convert_CFI_desc): New procedure to convert incoming CFI
2132 descriptors to gfc types and back again.
2133 (gfc_trans_deferred_vars): Call it.
2134 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Null the CFI
2135 descriptor pointer. Free the descriptor in all cases.
2138 * expr.c (is_CFI_desc): New function.
2139 (is_subref_array): Tidy up by referencing the symbol directly.
2140 * gfortran.h : Prototype for is_CFI_desc.
2141 * trans_array.c (get_CFI_desc): New function.
2142 (gfc_get_array_span, gfc_conv_scalarized_array_ref,
2143 gfc_conv_array_ref): Use it.
2144 * trans.c (get_array_span): Extract the span from descriptors
2145 that are indirect references.
2148 * trans-decl.c (gfc_get_symbol_decl): Make sure that the se
2149 expression is a pointer type before converting it to the symbol
2151 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Eliminate
2152 temporary creation for intent(in).
2154 2019-04-13 Dominique d'Humieres <dominiq@gcc.gnu.org>
2157 * module.c (gfc_use_module): use complete sentences.
2159 2019-04-11 Thomas Koenig <tkoenig@gcc.gnu.org>
2161 PR translation/89939
2162 * frontend-passes.c (B_ERROR): Delete macro.
2163 (C_ERROR): Delete macro.
2164 (B_ERROR_1): New macro.
2165 (C_ERROR_1): New macro.
2166 (C_ERROR_2): New macro.
2167 (inline_matmul_assign): Use new macros.
2168 (call_external_blas): Likewise.
2170 2019-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
2173 * gfortran.h (gfc_component): Add finalized field.
2174 * class.c (finalize_component): If the component is already
2175 finalized, return early. Set component->finalized on exit.
2177 2019-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
2180 * resolve.c (resolve_global_procedure): If the global symbol is an
2181 ENTRY, also look up its name among the entries.
2183 2019-04-04 Harald Anlauf <anlauf@gmx.de>
2186 * check.c (gfc_check_transfer): Reject procedures as actual
2187 arguments for SOURCE and MOLD of TRANSFER intrinsic.
2189 2019-04-03 Steven G. Kargl <kargl@gcc.gnu.org>
2192 * expr.c (gfc_reduce_init_expr): Add extra check to avoid
2193 dereferencing a null pointer.
2195 2019-04-03 Dominique d'Humieres <dominiq@gcc.gnu.org>
2198 * expr.c (comp_pointer): Remove redundant condition.
2200 2019-03-31 Harald Anlauf <anlauf@gmx.de>
2204 * trans-types.c (gfc_typenode_for_spec): Handle conversion for
2206 * target-memory.c (gfc_element_size): Handle size determination
2207 for procedure pointers.
2209 2019-03-31 Thomas Koenig <tkoenig@gcc.gnu.org>
2211 * dump-parse-tree.c (debug): Add for symbol_attribute *,
2212 symbol_attribute and gfc_ref * arguments.
2214 2019-03-30 Paul Thomas <pault@gcc.gnu.org>
2217 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Use the formal
2218 argument attributes rather than those of the actual argument.
2221 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Call
2222 'set_dtype_for_unallocated' for any type of arrayspec.
2224 2019-03-27 Janus Weil <janus@gcc.gnu.org>
2227 * expr.c (gfc_check_assign_symbol): Reject internal and dummy procedures
2228 in procedure pointer initialization.
2230 2019-03-27 Paul Thomas <pault@gcc.gnu.org>
2233 * expr.c (is_subref_array): Permit substrings to be detected
2235 * trans-array.c (get_array_ctor_var_strlen): Obtain the length
2236 of deferred length strings. Handle substrings with a NULL end
2238 (trans_array_constructor): Remove an unnecessary blank line.
2239 (gfc_conv_scalarized_array_ref): Skip to label 'done' if 'decl'
2241 (get_array_charlen): If the expression is an array, convert the
2242 first element of the constructor and use its string length. Get
2243 a new charlen if necessary.
2244 (gfc_conv_expr_descriptor): Call 'get_array_charlen' for array
2245 constructor expressions. If the ss_info string length is
2246 available, use that to set the span of character arrays.
2247 * trans-expr.c (gfc_get_expr_charlen): Handle substrings
2248 * trans-stmt.c (trans_associate_var): Set the pointer array
2249 flag for variable targets and constant array constructors. Take
2250 care not to reset the string length or the span in the case of
2251 expressions that are not converted as direct by reference.
2253 2019-03-25 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2255 * intrinsic.texi (MINLOC): Fix typo in BACK argument documentation.
2258 2019-03-24 Thomas Koenig <tkoenig@gcc.gnu.org>
2261 * interface.c (compare_actual_formal): Change errors about
2262 missing or extra to gfc_error_now to make sure they are issued.
2263 Change "spec" to "specifier" in message.
2264 * resolve.c (resolve_global_procedure): Also check for mismatching
2265 interface with global symbols if the namespace has already been
2268 2019-03-21 Thomas Schwinge <thomas@codesourcery.com>
2271 * openmp.c (gfc_match_oacc_routine): Set the level of parallelism
2273 (gfc_resolve_oacc_routines): Call gfc_add_omp_declare_target.
2276 * gfortran.h (gfc_oacc_routine_name): Add loc member.
2277 (gfc_resolve_oacc_routines): Declare.
2278 * openmp.c (gfc_match_oacc_routine): Move some error checking
2280 (gfc_resolve_oacc_routines): ... this new function.
2281 * resolve.c (resolve_codes): Call it.
2284 * openmp.c (gfc_match_oacc_routine): Clarify.
2287 * module.c (verify_OACC_ROUTINE_LOP_NONE): New function.
2288 (enum ab_attribute): Add AB_OACC_ROUTINE_LOP_GANG,
2289 AB_OACC_ROUTINE_LOP_WORKER, AB_OACC_ROUTINE_LOP_VECTOR,
2290 AB_OACC_ROUTINE_LOP_SEQ.
2291 (attr_bits): Add these.
2292 (mio_symbol_attribute): Handle these.
2294 2019-03-20 Janus Weil <janus@gcc.gnu.org>
2297 * symbol.c (check_conflict): ABSTRACT attribute conflicts with
2298 INTRINSIC attribute.
2300 2019-03-18 Thomas Koenig <tkoeng@gcc.gnu.org>
2303 * iresolve.c: Include trans.h.
2304 (gfc_resolve_fe_runtine_error): Set backend_decl on
2307 2019-03-17 Thomas Koenig <tkoenig@gcc.gnu.org>
2310 * gfortran.h (expr_t): Add EXPR_UNKNOWN.
2311 * expr.c (gfc_copy_expr): Add EXPR_UNKNOWN to switch statement.
2312 (gfc_simplify_expr): Likewise.
2313 * module.c (mio_expr): Likewise.
2314 * resovle.c (extract_compcall_passed_object): Issue error on
2316 (check_typebound_baseobject): Issue error on wrong type.
2317 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Add
2318 EXPR_UNKNOWN to switch statement.
2320 2019-03-16 Jakub Jelinek <jakub@redhat.com>
2323 * scanner.c (load_line): Remove linenum and current_line static
2324 variables, add warned_tabs automatic variable. Use current_file->line
2325 instead of current_line and warned_tabs boolean to avoid diagnosing
2326 tabs multiple times on the same line.
2328 2019-03-16 Thomas Koenig <tkoenig@gcc.gnu.org>
2331 * symbol.c (gfc_add_subroutine): If we are encountering a
2332 subrtoutine within a BLOCK DATA and the name starts with an
2333 underscore, do not check.
2335 2019-03-15 Harald Anlauf <anlauf@gmx.de>
2338 * expr.c (gfc_check_pointer_assign): Correct and improve error
2339 messages for invalid pointer assignments.
2341 2019-03-14 Thomas Koenig <tkoenig@gcc.gnu.org>
2343 * gfortran.texi: Document Q edit descriptor under
2344 "Extensions not implemented in GNU Fortran".
2346 2019-03-13 Harald Anlauf <anlauf@gmx.de>
2349 * trans-expr.c (gfc_trans_pointer_assignment): Move check for same
2350 string length so that we do not get false errors for deferred
2353 2019-03-13 Janus Weil <janus@gcc.gnu.org>
2356 * decl.c (gfc_match_formal_arglist): Reject empty type parameter lists.
2357 (gfc_match_derived_decl): Mark as PDT only if type parameter list was
2358 matched successfully.
2360 2019-03-13 Thomas Koenig <tkoenig@gcc.gnu.org>
2365 * gfortran.h (gfc_symbol): Add bind_c component.
2366 (gfc_get_gsymbol): Add argument bind_c.
2367 * decl.c (add_global_entry): Add bind_c argument to
2369 * parse.c (parse_block_data): Likewise.
2370 (parse_module): Likewise.
2371 (add_global_procedure): Likewise.
2372 (add_global_program): Likewise.
2373 * resolve.c (resolve_common_blocks): Likewise.
2374 (resolve_global_procedure): Likewise.
2375 (gfc_verify_binding_labels): Likewise.
2376 * symbol.c (gfc_get_gsymbol): Add argument bind_c. Set bind_c
2378 * trans-decl.c (gfc_get_module_backend_decl): Add bind_c argument
2380 (gfc_get_extern_function_decl): If the sym has a binding label
2381 and it cannot be found in the global symbol tabel, it is the wrong
2384 2019-03-12 Thomas Koenig <tkoenig@gcc.gnu.org>
2387 * match.c (gfc_match_type_spec): Remove call to
2388 gfc_resolve_expr for character length.
2390 2019-03-12 Martin Liska <mliska@suse.cz>
2392 * decl.c (add_init_expr_to_sym): Replace usage of 'can't'
2394 (variable_decl): Likewise.
2395 (cray_pointer_decl): Likewise.
2396 (match_binding_attributes): Likewise.
2397 * f95-lang.c (gfc_init): Likewise.
2398 * interface.c (gfc_check_typebound_override): Likewise.
2399 * intrinsic.c (make_generic): Likewise.
2400 * module.c (dump_module): Likewise.
2401 (gfc_use_module): Likewise.
2402 * primary.c (gfc_convert_to_structure_constructor): Likewise.
2403 * resolve.c (resolve_entries): Likewise.
2404 (check_generic_tbp_ambiguity): Likewise.
2405 (get_checked_tb_operator_target): Likewise.
2406 * scanner.c (load_file): Likewise.
2407 * trans-expr.c (gfc_conv_intrinsic_to_class): Likewise.
2409 2019-03-12 Paul Thomas <pault@gcc.gnu.org>
2413 * trans-expr.c (set_dtype_for_unallocated): New function.
2414 (gfc_conv_gfc_desc_to_cfi_desc): Call it for allocatable and
2416 (gfc_conv_procedure_call): Likewise. Also, set the ubound of
2417 the final dimension to -1 for assumed rank formal args that are
2418 associated with assumed size arrays.
2419 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Return -1 for
2420 the final dimension of assumed rank entities that are argument
2421 associated with assumed size arrays.
2422 (gfc_conv_intrinsic_shape): Likewise return -1 for the final
2423 dimension of the shape intrinsic.
2425 2019-03-11 Jakub Jelinek <jakub@redhat.com>
2428 * trans-openmp.c (gfc_omp_clause_default_ctor): Set TREE_NO_WARNING
2429 on decl if adding COND_EXPR for allocatable.
2430 (gfc_omp_clause_copy_ctor): Set TREE_NO_WARNING on dest.
2432 2019-03-11 Martin Liska <mliska@suse.cz>
2434 * decl.c (match_record_decl): Wrap an option name
2435 in a string format message and fix GNU coding style.
2436 (gfc_match_pointer): Likewise.
2437 * expr.c (find_array_section): Likewise.
2438 * intrinsic.c (gfc_is_intrinsic): Likewise.
2439 * options.c (gfc_post_options): Likewise.
2440 * primary.c (match_integer_constant): Likewise.
2441 * trans-common.c (translate_common): Likewise.
2443 2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
2446 * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
2447 Return false if a scalar tempoary is needed.
2448 (gfc_walk_variable_expr): Fix up class refs.
2450 2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
2453 * symbol.c (gfc_add_procedure): Only throw an error if the
2454 procedure has not been declared either PUBLIC or PRIVATE.
2456 2019-03-09 Thomas Koenig <tkoenig@gcc.gnu.org>
2459 * trans-types.c (gfc_typenode_for_spec) Set ts->is_c_interop of
2461 (create_fn_spec): Mark argument as escaping if ts->is_c_interop is set.
2463 2019-03-09 Janus Weil <janus@gcc.gnu.org>
2466 * expr.c (gfc_check_assign_symbol): Deal with procedure pointers to
2467 pointer-valued functions.
2469 2019-03-09 Thomas König <tkoenig@gcc.gnu.org>
2472 * decl.c (add_init_expr_to_sym): Add shape if init has none. Add
2473 asserts that it has to be an EXPR_ARRAY in this case.
2475 2019-03-08 Jakub Jelinek <jakub@redhat.com>
2478 * arith.c (gfc_complex2complex): Avoid two spaces in the middle of
2480 * resolve.c (resolve_allocate_expr): Likewise.
2482 2019-03-06 Harald Anlauf <anlauf@gmx.de>
2485 * expr.c (simplify_const_ref): Avoid null pointer dereference.
2487 2019-03-03 Harald Anlauf <anlauf@gmx.de>
2488 Steven G. Kargl <kargl@gcc.gnu.org>
2491 * symbol.c (check_conflict): Check for valid procedure name
2492 passed to error reporting routine.
2494 2019-03-03 Thomas Koenig <tkoenig@gcc.gnu.org>
2497 * resolve.c (resolve_allocate_expr): Add some tests for coarrays.
2499 2019-03-02 Harald Anlauf <anlauf@gmx.de>
2502 * check.c (gfc_calculate_transfer_sizes): Correct checks for cases
2503 where storage size of elements of MOLD is 0.
2505 2019-02-28 Thomas Schwinge <thomas@codesourcery.com>
2506 Cesar Philippidis <cesar@codesourcery.com>
2510 * openmp.c (gfc_match_oacc_routine): Handle repeated use of the
2511 Fortran OpenACC 'routine' directive.
2514 * gfortran.h (enum oacc_routine_lop): Add OACC_ROUTINE_LOP_ERROR.
2515 * openmp.c (gfc_oacc_routine_lop, gfc_match_oacc_routine): Use it.
2516 * trans-decl.c (add_attributes_to_decl): Likewise.
2520 * openmp.c (gfc_match_oacc_routine): Accept intrinsic symbols.
2522 2019-02-26 Harald Anlauf <anlauf@gmx.de>
2525 * check.c (gfc_calculate_transfer_sizes): Handle cases where
2526 storage size of elements of MOLD is 0.
2528 2019-02-26 Thomas Koenig <tkoenig@gcc.gnu.org>
2531 * trans-types.c (get_formal_from_actual_arglist): If
2532 the actual arglist has no expression, the corresponding
2533 formal arglist is an alternate return.
2535 2019-02-26 Uroš Bizjak <ubizjak@gmail.com>
2537 * invoke.texi (-ffpe-trap): Use @var for every item in the list.
2539 2019-02-26 Jakub Jelinek <jakub@redhat.com>
2542 * trans-array.c (gfc_conv_array_initializer): Use RANGE_EXPR instead
2543 of duplicating the initializer possibly many times.
2545 2019-02-24 Thomas Koenig <tkoenig@gcc.gnu.org>
2548 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Add is_mold
2549 to arguments. If we are dealing with a MOLD, call
2550 gfc_expr_to_initialize().
2551 * trans-stmt.c (gfc_trans_allocate): For MOLD, pass is_mold=true
2552 to gfc_find_and_cut_at_last_class_ref.
2553 * trans.h (gfc_find_and_cut_at_last_class_ref): Add optional
2554 argument is_mold with default false.
2556 2019-02-24 Harald Anlauf <anlauf@gmx.de>
2560 * target-memory.c (gfc_element_size): Return false if element size
2561 cannot be determined; element size is returned separately.
2562 (gfc_target_expr_size): Return false if expression size cannot be
2563 determined; expression size is returned separately.
2564 * target-memory.h: Adjust prototypes.
2565 * check.c (gfc_calculate_transfer_sizes): Adjust references to
2566 gfc_target_expr_size, gfc_element_size.
2567 * arith.c (hollerith2representation): Likewise.
2568 * class.c (find_intrinsic_vtab): Likewise.
2569 * simplify.c (gfc_simplify_sizeof): Likewise.
2571 2019-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2574 * trans-io.c (transfer_expr): Do not return if there are no
2575 components to the derived type or class.
2577 2019-02-23 Paul Thomas <pault@gcc.gnu.org>
2580 * resolve.c (deferred_op_assign): Return if the lhs expression
2581 has the pointer attribute.
2582 * trans-expr.c (gfc_trans_assignment_1): Do not fix the string
2583 length if the lhs expression has the pointer attribute.
2585 2019-02-23 Paul Thomas <pault@gcc.gnu.org>
2589 * decl.c (gfc_verify_c_interop_param): Restriction on string
2590 length being one is lifted for F2018.
2591 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): For scalar
2592 characters with intent in, make a temporary and copy the result
2593 of the expression evaluation into it.
2594 (gfc_conv_procedure_call): Set a flag for character formal args
2595 having a character length that is not unity. If the procedure
2596 is bind C, call gfc_conv_gfc_desc_to_cfi_desc in this case.
2597 Also, extend bind C calls to unconditionally convert both
2598 pointers and allocatable expressions.
2600 2019-02-23 David Malcolm <dmalcolm@redhat.com>
2601 Jakub Jelinek <jakub@redhat.com>
2604 * simplify.c (norm2_do_sqrt, gfc_simplify_norm2): Use
2605 mpfr_number_p && !mpfr_zero_p instead of mpfr_regular_p.
2606 (norm2_add_squared): Likewise. Use mp_exp_t rather than mpfr_exp_t.
2608 2019-02-22 Harald Anlauf <anlauf@gmx.de>
2611 * io.c (gfc_match_open): Fix logic in checks of OPEN statement
2612 when NEWUNIT= is specified.
2614 2019-02-22 Steven G. Kargl <kargl@gcc.gnu.org>
2617 * gfortran.texi: Fix documentation to match the implementation.
2619 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2620 Cesar Philippidis <cesar@codesourcery.com>
2623 * gfortran.h (oacc_routine_lop): New enum.
2624 (symbol_attribute): Use it.
2625 * openmp.c (gfc_oacc_routine_dims): Replace with...
2626 (gfc_oacc_routine_lop): ... this new function.
2627 (gfc_match_oacc_routine): Adjust.
2628 * trans-decl.c (add_attributes_to_decl): Likewise.
2630 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2632 * openmp.c (gfc_match_oacc_declare): Revert earlier changes.
2634 2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
2636 * dump-parse-tree.c (debug): Implement for gfc_expr *,
2637 gfc_typespec *, gfc_typespec and gfc_symbol *.
2639 2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
2642 * class.c (gfc_get_len_component): Add argument k for kind.
2643 If the kind of the resulting expression is not equal to k,
2645 * gfortran.h (gfc_len_component): Adjust prototype.
2646 * simplify.c (gfc_simplify_len): Pass kind to
2647 gfc_get_len_component.
2649 2019-02-20 Martin Liska <mliska@suse.cz>
2651 * gfortran.texi: Change singular to plural.
2653 2019-02-20 Martin Liska <mliska@suse.cz>
2655 * gfortran.texi: Document Fortran header directive.
2657 2019-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
2660 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): If the dummy
2661 argument is contiguous and the actual argument may not be,
2662 use gfc_conv_subref_array_arg.
2664 2019-02-19 Thomas Schwinge <thomas@codesourcery.com>
2667 * openmp.c (gfc_match_omp_clauses): Add representation of wait clause
2668 without argument as 'wait (GOMP_ASYNC_NOVAL)'.
2670 2019-02-18 Thomas Koenig <tkoenig@gcc.gnu.org>
2673 * trans-decl.c (gfc_get_extern_function_decl): Add argument
2674 actual_args and pass it through to gfc_get_function_type.
2675 * trans-expr.c (conv_function_val): Add argument actual_args
2676 and pass it on to gfc_get_extern_function_decl.
2677 (conv_procedure_call): Pass actual arguments to conv_function_val.
2678 * trans-types.c (get_formal_from_actual_arglist): New function.
2679 (gfc_get_function_type): Add argument actual_args. Generate
2680 formal args from actual args if necessary.
2681 * trans-types.h (gfc_get_function_type): Add optional argument.
2682 * trans.h (gfc_get_extern_function_decl): Add optional argument.
2684 2019-02-18 Martin Liska <mliska@suse.cz>
2686 * decl.c (gfc_match_gcc_builtin): Add support for filtering
2687 of builtin directive based on multilib ABI name.
2689 2019-02-17 Harald Anlauf <anlauf@gmx.de>
2692 * resolve.c (resolve_common_blocks,resolve_common_vars): Move
2693 check for obsolent COMMON feature in F2018 to better place.
2695 2019-02-17 Harald Anlauf <anlauf@gmx.de>
2698 * decl.c (gfc_set_constant_character_len): Clear original string
2699 representation after padding has been performed to target length.
2701 2019-02-16 Jakub Jelinek <jakub@redhat.com>
2704 * simplify.c (simplify_transformation_to_array): Run post_op
2705 immediately after processing corresponding row, rather than at the
2707 (norm2_scale): New variable.
2708 (add_squared): Rename to ...
2709 (norm2_add_squared): ... this. Scale down operand and/or result
2711 (do_sqrt): Rename to ...
2712 (norm2_do_sqrt): ... this. Handle the result == e case. Scale up
2713 result and clear norm2_scale.
2714 (gfc_simplify_norm2): Clear norm2_scale. Change add_squared to
2715 norm2_add_squared and &do_sqrt to norm2_do_sqrt. Scale up result
2716 and clear norm2_scale again.
2718 2019-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
2721 * trans-decl.c (generate_coarray_sym_init): For an array
2722 constructor in a DATA statement of a coarray variable, set the
2723 rank to 1 to avoid confusion later on. If the constructor
2724 contains only one value, use that for initiailizig.
2726 2019-02-14 Janne Blomqvist <jb@gcc.gnu.org>
2729 * gfortran.h (gfc_option_t): Make flag_init_integer_value a long.
2730 * options.c (gfc_handle_option): Use strtol instead of atoi.
2731 * invoke.texi: Document -finit-integer behavior in more detail.
2733 2019-02-14 Harald Anlauf <anlauf@gmx.de>
2736 * symbol.c: Move check for labeled DO statement from
2737 gfc_define_st_label to gfc_reference_st_label.
2739 2019-02-14 Cesar Philippidis <cesar@codesourcery.com>
2742 * openmp.c (resolve_oacc_nested_loops): Error on do concurrent
2745 2019-02-13 Martin Liska <mliska@suse.cz>
2748 * resolve.c (resolve_operator): Initialize 't' right
2749 after function entry. Skip switch (e->value.op.op)
2750 for -fdec operands that become function calls.
2752 2019-02-10 Thomas Koenig <tkoenig@gcc.gnu.org>
2755 * expr.c (gfc_check_assign): Add argument is_init_expr. If we are
2756 looking at an init expression, issue error if the target is not a
2757 TARGET and we are not looking at a procedure pointer.
2758 * gfortran.h (gfc_check_assign): Add optional argument
2761 2019-02-09 Harald Anlauf <anlauf@gmx.de>
2764 * resolve.c (gfc_resolve_substring_charlen): Check substring
2765 length for constantness prior to general calculation of length.
2767 2019-02-09 Paul Thomas <pault@gcc.gnu.org>
2770 * trans-array.c (gfc_trans_create_temp_array): Set the 'span'
2771 field for derived types.
2773 2019-02-04 Harald Anlauf <anlauf@gmx.de>
2776 * decl.c (add_init_expr_to_sym): Copy length of string initializer
2779 2019-02-04 Martin Liska <mliska@suse.cz>
2782 * resolve.c (resolve_ref): Remove breakout variable as
2783 we need to prevent prev = &(*prev)->next to happen
2786 2019-02-04 Martin Liska <mliska@suse.cz>
2789 * scanner.c (load_file): Report error for -fpre-include
2790 file and do not ICE.
2792 2019-02-02 Dominique d'Humieres <dominiq@gcc.gnu.org>
2795 * invoke.texi: Document the behavior of repeated -ffpe-trap
2798 2019-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
2801 * arith.c (gfc_int2int): Do not warn if src->do_not_warn is set.
2802 * gfortran.h (gfc_expr): Add flag do_not_warn.
2803 * intrinsic.c (gfc_convert_type_warn): Set expr->do_not_warn if
2804 no warning is desired.
2806 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
2809 * trans-expr.c (gfc_conv_procedure_call): For derived entities,
2810 passed in parentheses to class formals, invert the order of
2811 copying allocatable components to taking the _data of the
2814 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
2817 * trans-array.c (gfc_array_init_size): Add element_size to the
2819 (gfc_array_allocate): Remove the recalculation of the size of
2820 the element and use element_size from the call to the above.
2821 Unconditionally set the span field of the descriptor.
2823 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
2826 * expr.c (is_subref_array): Move the check for class pointer
2827 dummy arrays to after the reference check. If we haven't seen
2828 an array reference other than an element and a component is not
2829 class or derived, return false.
2831 2019-02-01 Jakub Jelinek <jakub@redhat.com>
2835 * trans-decl.c (generate_local_decl): Add referenced FL_PARAMETERs
2836 if sym->ns->construct_entities rather than if
2837 sym->ns->parent->code->op == EXEC_BLOCK.
2839 2019-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
2842 * resolve.c (resolve_component): If the reference is a BT_CLASS,
2843 copy the contiguous attribute from the reference and use the
2846 2019-01-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2849 * io.c (match_io): Add check for comma after '*' without subsequent
2852 2019-01-30 Dominique d'Humieres <dominiq@gcc.gnu.org>
2855 * invoke.texi: Document the promotion of double precision
2858 2019-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
2861 * interface.c (gfc_compare_types): If a derived type and an
2862 integer both have a derived type, and they are identical,
2863 this is a C binding type and compares equal.
2865 2019-01-26 Harald Anlauf <anlauf@gmx.de>
2868 * expr.c (check_inquiry): Add list of inquiry functions allowed in
2869 constant expressions for F2008+.
2871 2019-01-25 Steven G. Kargl <kargl@gcc.gnu.org>
2874 * decl.c (gfc_match_subroutine): Check for conflict between BIND(C)
2875 and alternative return.
2877 2019-01-24 Paul Thomas <pault@gcc.gnu.org>
2880 * trans-array.c (gfc_conv_descriptor_elem_len): New function.
2881 * trans-array.h : Add prototype for above.
2882 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Take account of
2883 assumed rank arrays being flagged by rank = -1 in expressions.
2884 Intent in arrays need a pointer to a copy of the data to be
2885 assigned to the descriptor passed for conversion. This should
2886 then be freed, together with the CFI descriptor on return from
2889 2019-01-22 Harald Anlauf <anlauf@gmx.de>
2892 * trans-expr.c (gfc_conv_power_op): Handle cases of (2**e) ** integer
2893 and (- 2**e) ** integer.
2895 2019-01-19 Dominique d'Humieres <dominiq@gcc.gnu.org>
2898 * resolve.c (resolve_types): Add !flag_automatic.
2899 * symbol.c (gfc_add_save): Silence warnings.
2901 2019-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
2904 * io.c (match_io_element): input-item cannot be an external function.
2906 2018-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
2907 Paul Thomas <pault@gcc.gnu.org>
2910 * trans-expr.c (gfc_conv_procedure_call): Call
2911 gfc_conv_subref_array_arg if the formal arg is contiguous
2912 and the actual arg may not be.
2914 2019-01-17 Thomas Koenig <tkoenig@gcc.gnu.org>
2917 * resolve.c (resolve_ref): Fix logic for removal of
2920 2019-01-19 Jakub Jelinek <jakub@redhat.com>
2923 * trans-decl.c (gfc_get_symbol_decl): Don't add length to function
2924 or parent function if it has been added there already.
2926 2019-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
2929 * resolve.c (resolve_array_ref): Add equal_length argument; set it
2930 if the length of the substring equals that of the orignal
2932 (resolve_ref): Remove the substring if it is equal in length to
2933 the original variable, unless it is an EXPR_SUBSTRING).
2935 2019-01-15 Steven G. Kargl <kargl@gcc.gnu.org>
2938 * resolve.c (resolve_symbol): Host associated varaibles can appear
2939 in the specification statement of a RESULT array.
2941 2019-01-15 Paul Thomas <pault@gcc.gnu.org>
2943 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Deal with exprs
2944 that are indirect references; ie. dummy arguments.
2946 2019-01-13 Dominique d'Humieres <dominiq@gcc.gnu.org>
2949 * gfortran.texi: Replace @xref with @ref and adjust the sentence.
2951 2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
2954 * trans-array.c (gfc_conv_array_parameter): Do not pack/unpack
2955 functions with contiguous results.
2957 2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
2960 * trans-array.c (gfc_conv_array_parameter): Remove TODO. Do not
2961 pack/unpack results of functions which return an explicit-shaped
2962 or allocatable array.
2964 2019-01-12 Steven G. Kargl <kargl@gcc.gnu.org>
2967 * resolve.c (gfc_verify_binding_labels): Break if-elseif-elseif
2968 structure into independent if's with a return to simplify logic.
2969 Avoid a check for ENTRY name with bind(c).
2971 2019-01-12 Paul Thomas <pault@gcc.gnu.org>
2973 * gfortran.texi: Add description in sections on TS 29113 and
2974 further interoperability with C.
2975 * trans-array.c (gfc_conv_descriptor_attribute): New function.
2976 (gfc_get_dataptr_offset): Remove static function attribute.
2977 * trans-array.h: Add prototypes for above functions.
2978 * trans-decl.c: Add declarations for the library functions
2979 cfi_desc_to_gfc_desc and gfc_desc_to_cfi_desc.
2980 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): New function.
2981 (gfc_conv_procedure_call): Call it for scalar and array actual
2982 arguments, when the formal arguments are bind_c with assumed
2983 shape or assumed rank.
2984 * trans.h: External declarations for gfor_fndecl_cfi_to_gfc
2985 and gfor_fndecl_gfc_to_cfi.
2987 2019-01-11 Steven G. Kargl <kargl@gcc.gnu.org>
2990 * decl.c (gfc_match_entry): Check for F2018:C1546. Fix nearby
2993 2019-01-11 Jakub Jelinek <jakub@redhat.com>
2997 * trans-openmp.c: Include attribs.h.
2998 (gfc_walk_alloc_comps, gfc_omp_clause_linear_ctor): Handle
2999 VAR_DECL max bound with "omp dummy var" attribute like NULL or
3000 error_mark_node - recompute number of elts independently.
3002 2019-01-11 Thomas Koenig <tkoenig@gcc.gnu.org>
3005 * trans-array.c (gfc_conv_parameter_array): Temporary
3006 arrays generated for expressions do not need to be repacked.
3008 2019-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
3011 * decl.c (top_var_list): Set locus of expr.
3012 (gfc_match_data): Detect pointer on non-rightmost part-refs.
3014 2019-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
3017 * resolve.c (is_illegal_recursion): Remove an assert().
3019 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
3022 * expr.c: Change "can not" to "cannot".
3024 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
3027 * class.c: Mechanically replace "can not" with "cannot".
3030 * gfc-internals.texi: Likewise.
3031 * intrinsic.texi: Likewise.
3032 * invoke.texi: Likewise.
3034 * match.c: Likewise.
3035 * parse.c: Likewise.
3036 * primary.c: Likewise.
3037 * resolve.c: Likewise.
3038 * symbol.c: Likewise.
3039 * trans-array.c: Likewise.
3040 * trans-decl.c: Likewise.
3041 * trans-intrinsic.c: Likewise.
3042 * trans-stmt.c: Likewise.
3044 2019-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
3047 * simplify.c (gfc_simplify_spread): Also simplify if the
3048 type of source is an EXPR_STRUCTURE.
3050 2019-01-08 Janus Weil <janus@gcc.gnu.org>
3053 * class.c (gfc_find_vtab): For polymorphic typespecs, the components of
3054 the class container may not be available (in case of invalid code).
3056 2019-01-08 Richard Biener <rguenther@suse.de>
3059 * trans-expr.c (gfc_conv_initializer): For ISOCBINDING_NULL_*
3060 directly build the expected GENERIC tree.
3062 2019-01-07 Thomas Koenig <tkoenig@gcc.gnu.org>
3063 Harald Anlauf <anlauf@gmx.de>
3064 Tobias Burnus <burnus@gcc.gnu.org>
3067 * check.c (gfc_check_is_contiguous): New function.
3068 * expr.c (gfc_is_not_contiguous): New function.
3069 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IS_CONTIGUOUS.
3070 Add prototype for gfc_is_not_contiguous.
3071 * intrinsic.c (do_ts29113_check): Add GFC_ISYM_IS_CONTIGUOUS.
3072 (add_function): Add is_contiguous.
3073 * intrinsic.h: Add prototypes for gfc_check_is_contiguous,
3074 gfc_simplify_is_contiguous and gfc_resolve_is_contiguous.
3075 * intrinsic.texi: Add IS_CONTIGUOUS.
3076 * iresolve.c (gfc_resolve_is_contiguous): New function.
3077 * simplify.c (gfc_simplify_is_contiguous): New function.
3078 * trans-decl.c (gfor_fncecl_is_contiguous0): New variable.
3079 (gfc_build_intrinsic_function_decl): Add it.
3080 * trans-intrinsic.c (gfc_conv_intrinsic_is_contiguous): New
3082 (gfc_conv_intrinsic_function): Handle GFC_ISYM_IS_CONTIGUOUS.
3084 2019-01-06 Thomas Koenig <tkoenig@gcc.gnu.org>
3087 * gfortran.h: Add macro gfc_real_4_kind
3088 * simplify.c (simplify_min_max): Special case for the types of
3089 AMAX0, AMIN0, MAX1 and MIN1, which actually change the types of
3092 2019-01-05 Janus Weil <janus@gcc.gnu.org>
3095 * class.c (gfc_find_derived_vtab): Mark the _final component as
3097 (find_intrinsic_vtab): Ditto. Also add an extra check to avoid
3098 dereferencing a null pointer and adjust indentation.
3099 * resolve.c (resolve_fl_variable): Add extra check to avoid
3100 dereferencing a null pointer. Move variable declarations to local scope.
3101 (resolve_fl_procedure): Add extra check to avoid dereferencing a null
3103 * symbol.c (check_conflict): Suppress errors for artificial symbols.
3105 2019-01-01 Steven G. Kargl <kargl@gcc.gnu.org>
3107 * parse.c (decode_statement): Suppress "Unclassifiable statement"
3108 error if previous error messages were emittes.
3110 2019-01-01 Thomas Koenig <tkoenig@gcc.gnu.org>
3113 * primary.c (gfc_convert_to_structure_constructor): If a character
3114 in a constructor is too long, add a warning with
3115 -Wcharacter-truncation.
3117 2019-01-01 Jakub Jelinek <jakub@redhat.com>
3119 Update copyright years.
3121 * gfortranspec.c (lang_specific_driver): Update copyright notice
3123 * gfc-internals.texi: Bump @copying's copyright year.
3124 * gfortran.texi: Ditto.
3125 * intrinsic.texi: Ditto.
3126 * invoke.texi: Ditto.
3128 Copyright (C) 2019 Free Software Foundation, Inc.
3130 Copying and distribution of this file, with or without modification,
3131 are permitted in any medium without royalty provided the copyright
3132 notice and this notice are preserved.