1 2018-12-29 Steven G. Kargl <kargl@gcc.gnu.org>
3 * expr.c (external_spec_function): Add ieee_support_subnormal to list
4 of IEEE inquiry functions.
6 2018-12-29 Steven G. Kargl <kargl@gcc.gnu.org>
8 * cpp.c (gfc_cpp_init): Add pre-defined macros for INTEGER(1)
9 INTEGER(2), INTEGER(8) and INTEGER(16) if supported. Add pre-defined
10 macros for REAL(10) and REAL(16) if available.
11 * gfortran.texi: Document new macros.
13 2018-12-27 Steven G. Kargl <kargl@gcc.gnu.org>
16 * expr.c (gfc_check_init_expr): Distinguish assumed-shape versus
17 deferred-shape dummy arguments in an error message.
19 2018-12-26 Harald Anlauf <anlauf@gmx.de>
22 * module.c (read_module): Convert assert to fatal error to give a
23 sensible error message.
25 2018-12-24 Steven G. Kargl <kargl@gcc.gnu.org>
29 * check.c: Rename function gfc_check_iand to gfc_check_iand_ieor_ior.
30 * check.c (boz_args_check): New function. Check I and J not both BOZ.
31 (gfc_check_dshift,gfc_check_iand_ieor_ior, gfc_check_ishft,
32 gfc_check_and, gfc_check_merge_bits): Use it.
33 * check.c (gfc_check_iand_ieor_ior): Force conversion of BOZ to kind
34 type of other agrument. Remove silly GNU extension.
35 (gfc_check_ieor, gfc_check_ior): Delete now unused functions.
36 * intrinsic.c (add_functions): Use gfc_check_iand_ieor_ior. Wrap long
38 * intrinsic.h: Rename gfc_check_iand to gfc_check_iand_ieor_ior.
39 Delete prototype for bool gfc_check_ieor and gfc_check_ior
40 * intrinsic.texi: Update documentation for boz-literal-constant.
42 2018-12-23 Paul Thomas <pault@gcc.gnu.org>
45 * resolve.c (get_temp_from_expr): Use the string length of
46 constant character expressions.
48 2018-12-22 Steven G. Kargl <kargl@gcc.gnu.org>
51 * io.c (resolve_tag_format): Add error for zero-sized array.
52 (gfc_resolve_dt): Manipulate gfc_current_locus to get sensible error
55 2018-12-22 Steven G . Kargl <kargl@gcc.gnu.org>
58 * decl.c (gfc_match_data): If a component of a derived type entity
59 appears in data statement, check that does not have the allocatable
62 2018-12-22 Steven G. Kargl <kargl@gcc.gnu.org>
65 * module.c (mio_namelist): Remove an error condition/message that
66 is contrary to the Fortran standard.
68 2018-12-22 Thomas Koenig <tkoenig@gcc.gnu.org>
71 * frontend-passes.c (optimize_power): Remove.
72 (optimize_op): Remove call to optimize_power.
73 * trans-expr.c (gfc_conv_power_op): Handle cases of 1**integer,
74 (2|4|8|16) ** integer and (-1) ** integer.
76 2018-12-21 Paul Thomas <pault@gcc.gnu.org>
79 * expr.c (find_inquiry_ref): Loop through the inquiry refs in
80 case there are two of them.
81 (simplify_ref_chain): Return true after a successful call to
84 2018-12-19 Steven G. Kargl <kargl@gcc.gnu.org>
87 * resolve.c (resolve_fl_variable): Avoid a NULL pointer.
89 2018-12-16 Steven G. Kargl <kargl@gcc.gnu.org>
91 * resolve.c (resolve_transfer): Remove dead code.
93 2018-12-16 Steven G. Kargl <kargl@gcc.gnu.org>
97 * array.c (gfc_match_array_constructor): Check return value of
98 gfc_convert_type(). Skip constructor elements with BT_UNKNOWN,
99 which need to go through resolution.
100 * intrinsic.c (gfc_convert_type_warn): Return early if the types
101 match (i.e., no conversion is required).
102 * simplify.c (gfc_convert_constant): Remove a gfc_internal_error,
103 and return gfc_bad_expr.
105 2018-12-16 Steven G. Kargl <kargl@gcc.gnu.org>
107 * decl.c (variable_decl): Typo fixes in comment and error messsage.
109 2018-12-16 Thomas Koenig <tkoenig@gcc.gnu.org>
112 * trans-expr.c (gfc_conv_expr_reference): Do not add clobber if
113 the expression contains a reference.
115 2018-12-15 Steven G. Kargl <kargl@gcc.gnu.org>
118 * decl.c (match_data_constant): Allow inquiry parameter as data
119 constant in data statement.
121 2018-12-15 Steven G. Kargl <kargl@gcc.gnu.org>
124 * decl.c (variable_decl): Check that a derived isn't being assigned
125 an incompatible entity in an initialization.
127 2018-12-12 Jakub Jelinek <jakub@redhat.com>
130 * trans-openmp.c (gfc_omp_predetermined_sharing): Handle TREE_READONLY
131 VAR_DECLs with DECL_EXTERNAL like those with TREE_STATIC.
133 2018-12-11 Steven G. Kargl <kargl@gcc.gnu.org>
136 * primary.c (gfc_match_structure_constructor): Set the locus of
137 an expression to avoid a NULL pointer dereference.
139 2018-12-11 Steven G. Kargl <kargl@gcc.gnu.org>
142 * gfortran.h: Update prototype for gfc_resolve_filepos().
143 * io.c (gfc_resolve_filepos): Check for UNIT number if ERR= is present.
144 Use passed in locus for error message.
145 * resolve.c (gfc_resolve_code): Pass locus in gfc_resolve_filepos()
148 2018-12-10 Steven G. Kargl <kargl@gcc.gnu.org>
151 * io.c (gfc_match_open): Additional checks on ASYNCHRONOUS.
153 2018-12-10 Steven G. Kargl <kargl@gcc.gnu.org>
156 * io.c (io_constraint): Update macro. If locus line buffer is NULL,
157 use gfc_current_locus in error messages.
158 (check_io_constraints): Catch missing IO UNIT in write and read
159 statements. io_constraint macro is incompatible here.
161 2018-12-09 Steven G. Kargl <kargl@gcc.gnu.org>
164 * io.c (gfc_match_open): Move NEWUNIT checks to after STATUS checks.
166 2018-12-09 Steven G. Kargl <kargl@gcc.gnu.org>
169 * match.c (gfc_match_type_spec): REAL can be an intrinsic function.
171 2018-12-09 Fritz Reese <fritzoreese@gmail.com>
174 * resolve.c (resolve_operator): Do not call resolve_function.
175 Break like other cases.
177 2018-12-09 Cesar Philippidis <cesar@codesourcery.com>
179 * trans-openmp.c (gfc_trans_oacc_combined_directive): Set the
180 location of combined acc loops.
182 2018-12-09 Thomas Schwinge <thomas@codesourcery.com>
184 * openmp.c (resolve_oacc_loop_blocks): Remove checking of OpenACC
188 * openmp.c (resolve_oacc_loop_blocks): Remove "Clause SEQ
189 conflicts with INDEPENDENT" diagnostic.
191 2018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
194 * resolve.c (check_data_variable): Named constant cannot be a
197 2018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
200 * decl.c (var_element): Inquiry parameters cannit be data objects.
202 2018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
205 * expr.c (gfc_apply_init): Remove asserts that cannot trigger.
206 Check for a NULL pointer.
208 2018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
211 * class.c (insert_component_ref): Check for NULL pointer and
212 previous error message issued.
213 * parse.c (parse_associate): Check for NULL pointer.
214 * resolve.c (resolve_assoc_var): Check for NULL pointer.
216 2018-12-07 Jakub Jelinek <jakub@redhat.com>
219 * trans-openmp.c (gfc_omp_clause_default_ctor,
220 gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
221 gfc_omp_clause_linear_ctor, gfc_omp_clause_dtor): Only consider
222 GFC_DECL_GET_SCALAR_ALLOCATABLE vars as scalar allocatables if they
225 2018-12-03 Fritz Reese <fritzoreese@gmail.com>
226 Mark Eggleston <mark.eggleston@codethink.co.uk>
229 * options.c (SET_FLAG, SET_BITFLAG, SET_BITFLAG2): New macros.
230 (set_dec_flags): Set/unset DEC and std flags according to value.
231 (post_dec_flags, set_init_local_zero): New functions.
232 (gfc_init_options): Use set_init_local_zero and post_dec_flags.
233 (gfc_handle_options) <case OPT_fcheck_array_temporaries>: Use
235 <case OPT_finit_local_zero>: Use set_init_local_zero.
236 <case OPT_fdec>: Pass value to set_dec_flags.
237 <case OPT_fdec_structure>: Remove.
239 2018-11-30 Thomas Schwinge <thomas@codesourcery.com>
241 * gfortran.h (struct gfc_omp_clauses): Remove "wait". Adjust all
244 * openmp.c (gfc_match_omp_clauses): Support multiple OpenACC wait
247 2018-11-27 Martin Liska <mliska@suse.cz>
249 * decl.c (gfc_match_gcc_builtin): New function.
250 * gfortran.h (struct vect_builtin_tuple): New.
251 (gfc_adjust_builtins): Likewise.
252 * lang-specs.h (TARGET_F951_OPTIONS): New.
253 (F951_OPTIONS): Use it.
254 * lang.opt: Add new option -fpre-include.
255 * match.h (gfc_match_gcc_builtin): Declare new function.
256 * parse.c (decode_gcc_attribute): Handle builtin.
257 (parse_progunit): Call gfc_adjust_builtins.
258 * scanner.c (gfc_new_file): Load pre-included header file
260 * trans-intrinsic.c (add_simd_flag_for_built_in): New.
261 (gfc_adjust_builtins): Likewise.
263 2018-11-24 Paul Thomas <pault@gcc.gnu.org>
266 * resolve.c (resolve_variable): Check for associate names with
269 2018-11-23 Jakub Jelinek <jakub@redhat.com>
271 * lang.opt (fpad-source): New option.
272 * scanner.c (load_line): Don't pad fixed form lines if
274 * invoke.texi (-fno-pad-source): Document.
276 2018-11-21 Jakub Jelinek <jakub@redhat.com>
278 * invoke.texi (-fdec-include): Document.
280 2018-11-21 Jakub Jelinek <jakub@redhat.com>
281 Mark Eggleston <mark.eggleston@codethink.com>
283 * lang.opt (fdec-include): New option.
284 * options.c (set_dec_flags): Set also flag_dec_include.
285 * scanner.c (include_line): Change return type from bool to int.
286 In fixed form allow spaces in between include keyword letters.
287 For -fdec-include, allow in fixed form 0 in column 6. With
288 -fdec-include return -1 if the parsed line is not full include
289 statement and it could be successfully completed on continuation
291 (include_stmt): New function.
292 (load_file): Adjust include_line caller. If it returns -1, keep
293 trying include_stmt until it stops returning -1 whenever adding
294 further line of input.
296 2018-11-18 Thomas Koenig <tkoenig@gcc.gnu.org>
299 * frontend-passes.c (combine_array_constructor): Do not do
300 anything if in a WHERE statement.
302 2018-11-18 Thomas Koenig <tkoenig@gcc.gnu.org>
305 * expr.c (gfc_check_assign): Reject assigning to an external
307 (gfc_check_pointer_assign): Add suppress_type_test
308 argument. Insert line after if. A non-proc pointer can not point
309 to a constant. Only check types if suppress_type_test is false.
310 * gfortran.h (gfc_check_pointer_assign): Add optional
311 suppress_type_test argument.
312 * resolve.c (gfc_resolve_code): Move up gfc_check_pointer_assign
313 and give it the extra argument.
314 (resolve_fl_procedure): Set error on value for a function with
317 2018-11-15 David Malcolm <dmalcolm@redhat.com>
320 * error.c (gfc_diagnostic_finalizer): Add diagnostic_t param.
322 2018-11-13 David Malcolm <dmalcolm@redhat.com>
324 * cpp.c: Replace "source_location" with "location_t".
325 * gfortran.h: Likewise.
327 2018-11-08 Jakub Jelinek <jakub@redhat.com>
329 * trans-openmp.c (gfc_trans_omp_clauses): Use
330 OMP_CLAUSE_DEFAULTMAP_SET_KIND.
331 (gfc_trans_omp_atomic): Set OMP_ATOMIC_MEMORY_ORDER
332 rather than OMP_ATOMIC_SEQ_CST.
333 (gfc_trans_omp_taskgroup): Build OMP_TASKGROUP using
334 make_node instead of build1_loc.
335 * types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
336 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
337 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
338 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
339 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
340 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
341 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): Formatting fix.
343 2018-11-02 Thomas Koenig <tkoenig@gcc.gnu.org>
346 * decl.c (verify_bind_c_sym): Remove unnecessary space
349 2018-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
352 * frontend-passes.c (constant_string_length): If there is a
353 substring with a length which cannot be reduced to a constant,
356 2018-11-01 Paul Thomas <pault@gcc.gnu.org>
359 * dependency.c (are_identical_variables): Return false if the
360 inquiry refs are not the same.
361 (gfc_ref_needs_temporary_p): Break on an inquiry ref.
362 * dump_parse_tree.c (show_ref): Show the inquiry ref type.
363 * expr.c (gfc_free_ref_list): Break on an inquiry ref.
364 (gfc_copy_ref): Copy the inquiry ref types.
365 (find_inquiry_ref): New function.
366 (simplify_const_ref, simplify_ref_chain): Call it. Add new arg
367 to simplify_ref_chain.
368 (gfc_simplify_expr): Use the new arg in call to
370 (gfc_get_full_arrayspec_from_expr, gfc_is_coarray): Break on
372 (gfc_traverse_expr): Return true for inquiry ref.
373 * frontend-passes.c (gfc_expr_walker): Break on inquiry ref.
374 * gfortran.h : Add enums and union member in gfc_ref to
375 implement inquiry refs.
376 * intrinsic.c : Fix white nois.
377 * match.c (gfc_match_assignment): A constant lavlue is an
379 * module.c : Add DECL_MIO_NAME for inquiry_type and the mstring
381 (mio_ref): Handle inquiry refs.
382 * primary.c (is_inquiry_ref): New function.
383 (gfc_match_varspec): Handle inquiry refs calling new function.
384 (gfc_variable_attr): Detect inquiry ref for disambiguation
386 (caf_variable_attr): Treat inquiry and substring refs in the
388 * resolve.c (find_array_spec): ditto.
389 (gfc_resolve_substring_charlen): If there is neither a charlen
390 ref not an inquiry ref, return.
391 (resolve_ref): Handle inqiry refs as appropriate.
392 (resolve_allocate_expr): Entities with an inquiry ref cannot be
394 * simplify.c (simplify_bound, simplify_cobound): Punt on
396 * trans-array.c (get_array_ctor_var_strlen): Break on inquiry
398 *trans-expr.c (conv_inquiry): New function.
399 (gfc_conv_variable): Retain the last typespec to pass to
400 conv_inquiry on detecting an inquiry ref.
402 2018-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
405 * decl.c (verify_bind_c_sym): Improve error message.
407 2018-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
410 * gfortran.texi (File format of unformatted sequential files):
411 Replace random comma with period.
412 * intrinsic.texi (Intrinsic Procedures): Add FINDLOC to menu.
414 (MAXLOC): Add refrence to FINDLOC.
417 2018-10-31 Nathan Sidwell <nathan@acm.org>
419 * cpp.c (gfc_cpp_init): Adjust cpp_force_token_locations call.
421 2018-10-31 Martin Liska <mliska@suse.cz>
423 * trans-decl.c (struct module_hasher): Call htab_hash_string
424 for s->name and not for s.
426 2018-10-30 Thomas Koenig <tkoenig@gcc.gnu.org>
429 * simplify.c (simplify_min_max): Do not convert the type of the
432 2017-10-28 Thomas Koenig <tkoenig@gcc.gnu.org>
435 * gfortran.h (gfc_isym_id): Add GFC_ISYM_FINDLOC.
436 (gfc_check_f): Add f6fl field.
437 (gfc_simplify_f): Add f6 field.
438 (gfc_resolve_f): Likewise.
439 (gfc_type_letter): Add optional logical_equas_int flag.
440 * check.c (intrinsic_type_check): New function.
441 (gfc_check_findloc): New function.
442 * intrinsics.c (gfc_type_letter): If logical_equals_int is
443 set, act accordingly.
444 (add_sym_5ml): Reformat comment.
445 (add_sym_6fl): New function.
446 (add_functions): Add findloc.
447 (check_arglist): Add sixth argument, handle it.
448 (resolve_intrinsic): Likewise.
449 (check_specific): Handle findloc.
450 * intrinsic.h (gfc_check_findloc): Add prototype.
451 (gfc_simplify_findloc): Likewise.
452 (gfc_resolve_findloc): Likewise.
453 (MAX_INTRINSIC_ARGS): Adjust.
454 * iresolve.c (gfc_resolve_findloc): New function.
455 * simplify.c (gfc_simplify_minmaxloc): Make static.
456 (simplify_findloc_to_scalar): New function.
457 (simplify_findloc_nodim): New function.
458 (simplify_findloc_to_array): New function.
459 (gfc_simplify_findloc): New function.
460 (gfc_conv_intrinsic_findloc): New function.
461 (gfc_conv_intrinsic_function): Handle GFC_ISYM_FINDLOC.
462 (gfc_is_intrinsic_libcall): Likewise.
464 2018-10-27 Thomas Koenig <tkoenig@gcc.gnu.org>
467 * frontend-passes.c (check_locus_code): Add information that
468 warning about missing location information points to an
469 inconsisten internal state.
470 (check_locus_expr): Likewise.
472 2018-10-25 Jakub Jelinek <jakub@redhat.com>
475 * openmp.c (gfc_match_omp_clauses): Parse simd, monotonic and
476 nonmonotonic modifiers regardless of if they have been parsed
477 already or if the opposite one has. Fix up check whether
478 comma after modifier should be parsed.
479 (resolve_omp_clauses): Diagnose schedule modifier restrictions.
481 2018-10-23 Paul Thomas <pault@gcc.gnu.org>
484 * frontend-passes.c (get_len_call): New function to generate a
485 call to intrinsic LEN.
486 (create_var): Use this to make length expressions for variable
488 Clean up some white space issues.
490 2018-10-21 Paul Thomas <pault@gcc.gnu.org>
493 * trans-expr.c (gfc_trans_pointer_assignment): Set the string
494 length for array valued deferred length lhs.
496 2018-10-18 Tobias Burnus <burnus@net-b.de>
499 * trans-array.c (gfc_is_reallocatable_lhs): Detect allocatable
502 2018-10-18 Paul Thomas <pault@gcc.gnu.org>
505 * trans-stmt.c (trans_associate_var): All strings that return
506 as pointer types can be assigned directly to the associate
507 name so remove 'attr' and the condition that uses it.
509 2018-10-18 Paul Thomas <pault@gcc.gnu.org>
512 * trans-decl.c (gfc_get_symbol_decl): Deal correctly with the
513 initialization with NULL() of a deferred length pointer.
515 2018-10-17 Tobias Burnus <burnus@net-b.de>
518 * resolve.c (resolve_select_type): Use correct variable.
520 2018-10-17 David Malcolm <dmalcolm@redhat.com>
522 * Make-lang.in (selftest-fortran): New.
524 2018-10-17 Paul Thomas <pault@gcc.gnu.org>
531 * resolve.c (resolve_variable): Fix up expressions with array
532 associate names, where the parser did not detect that this is
533 array and there was no array part_ref in the expression.
535 2018-10-16 Tobias Burnus <burnus@net-b.de>
538 * trans-array.c (gfc_array_init_size, gfc_array_allocate):
539 Rename argument e3_is_array_constr to e3_has_nodescriptor
541 * trans-stmt.c (gfc_trans_allocate): Also fix lower bound
542 to 1 for nonalloc/nonpointer func results/vars besides
545 2018-10-16 Tobias Burnus <burnus@net-b.de>
548 * trans-stmt.c (form_team, change_team, sync_team):
549 Don't ignore argse.pre/argse.post.
551 2018-10-15 Paul Thomas <pault@gcc.gnu.org>
552 Tobias Burnus <burnus@gcc.gnu.org>
555 * resolve.c (resolve_assoc_var): Add missing array spec for
556 class associate names.
557 (resolve_select_type): Handle case where last typed component
558 of the selector has a different type to the expression.
559 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Replace
560 call to gfc_expr_to_initialize with call to gfc_copy_expr.
561 (gfc_conv_class_to_class): Guard assignment to 'len' field
562 against case where zero constant is supplied.
564 2018-10-12 Tobias Burnus <burnus@net-b.de>
567 * expr.c (gfc_simplify_expr): Avoid simplifying
568 the 'array' argument to lbound/ubound/lcobound/
571 2018-10-12 Tobias Burnus <burnus@net-b.de>
574 * decl.c (get_proc_name): Return with error before
577 2018-10-11 Tobias Burnus <burnus@net-b.de>
580 2018-10-09 Tobias Burnus <burnus@net-b.de>
583 * resolve.c (resolve_ref): Reject nonscalar
584 substring references.
586 2018-10-09 David Malcolm <dmalcolm@redhat.com>
588 * cpp.c (gfc_cpp_init_0): Update for renamings.
589 (cb_cpp_error): Rename to...
590 (cb_cpp_diagnostic): ...this, converting level and reason to
593 2018-10-09 Tobias Burnus <burnus@net-b.de>
596 * resolve.c (resolve_ref): Reject nonscalar
597 substring references.
599 2018-10-09 Paul Thomas <pault@gcc.gnu.org>
602 * trans-array.c (gfc_get_array_span): Deal with deferred char
603 array components having a TYPE_MAX_VALUE of zero.
604 (gfc_array_init_size): Use the hidden string length component
605 to build the descriptor dtype.
606 (gfc_array_allocate): Remove the erroneous replacement of the
607 charlen backend decl with a temporary.
608 (gfc_conv_expr_descriptor): Use the ss_info string length in
609 the case of deferred character components.
610 (gfc_alloc_allocatable_for_assignment): Actually compare the
611 string lengths for deferred characters. Make sure that kind > 1
612 is handled correctly. Set the span field of the descriptor.
613 * trans-intrinsic.c (gfc_conv_intrinsic_len): Remove the stupid
617 * trans-array.c (gfc_array_allocate): Set the span field for
618 variable length character arrays.
620 2018-10-08 Cesar Philippidis <cesar@codesourcery.com>
622 * expr.c (gfc_check_pointer_assign): Demote "Assignment to
623 contiguous pointer from non-contiguous target" to a warning.
625 2018-10-08 Paul Thomas <pault@gcc.gnu.org>
628 * trans-stmt.c (trans_associate_var): Character associate names
629 with variable string length do not have to be deferred length
630 for the string length to be set, if variable.
632 2018-10-06 Thomas Koenig <tkoenig@gcc.gnu.org>
635 * gfortran.h (enum arith): Add ARITH_WRONGCONCAT.
636 * arith.h (gfc_arith_error): Issue error for ARITH_WRONGCONCAT.
637 (gfc_arith_concat): If the types of op1 and op2 are not
638 character of if their kinds do not match, issue ARITH_WRONGCONCAT.
640 2018-10-06 Paul Thomas <pault@gcc.gnu.org>
643 * resolve.c (resolve_fl_procedure): Include class functions in
644 the test that elemental function results be scalar.
646 2018-10-06 Thomas Koenig <tkoenig@gcc.gnu.org>
649 * simplify.c (gfc_simplify_cshift): Extend size of hs_ex and ss_ex
650 by one. Set extents one past the array boundaries to zero to avoid
651 warning with instrumented compiler.
652 (gfc_simplify_eoshift): Likewise, only for ss_ex.
654 2018-10-05 Paul Thomas <pault@gcc.gnu.org>
657 * trans-decl.c (gfc_get_symbol_decl): Make sure that deferred
658 character length pointer initializer has the right type to fix
659 problem with deferred_character_24.f90 on big endian.
661 2018-10-03 Jeff Law <law@redhat.comg>
663 * trans-types.c (get_typenode_from_name): Moved into gcc/tree.c.
665 2018-10-01 Paul Thomas <pault@gcc.gnu.org>
668 * trans-expr.c (gfc_trans_assignment_1): Set the 'identical'
669 flag in the call to gfc_check_dependency.
671 2018-09-30 Paul Thomas <pault@gcc.gnu.org>
674 * trans-array.c (gfc_is_reallocatable_lhs): Correct the problem
675 introduced by r264358, which prevented components of associate
676 names from being reallocated on assignment.
678 2018-09-30 Paul Thomas <pault@gcc.gnu.org>
682 * trans-array.c (gfc_conv_scalarized_array_ref): If this is a
683 deferred type and the info->descriptor is present, use the
685 (gfc_conv_array_ref): Is the se expr is a descriptor type, pass
686 it as 'decl' rather than the symbol backend_decl.
687 (gfc_array_allocate): If the se string_length is a component
688 reference, fix it and use it for the expression string length
689 if the latter is not a variable type. If it is a variable do
690 an assignment. Make use of component ref string lengths to set
691 the descriptor 'span'.
692 (gfc_conv_expr_descriptor): For pointer assignment, do not set
693 the span field if gfc_get_array_span returns zero.
694 * trans.c (get_array_span): If the upper bound a character type
695 is zero, use the descriptor span if available.
697 2018-09-30 Paul Thomas <pault@gcc.gnu.org>
700 * trans-decl.c (gfc_get_symbol_decl): A deferred character
701 length pointer that is initialized needs the string length to
702 be initialized as well.
704 2018-09-29 Paul Thomas <pault@gcc.gnu.org>
707 * trans-expr.c (gfc_trans_assignment_1): If there is dependency
708 fix the rse stringlength.
710 2018-09-25 Martin Liska <mliska@suse.cz>
713 * decl.c (add_hidden_procptr_result): Simplify condition
714 as we are in branch witch 'case1 || case2'.
716 2018-09-25 Martin Liska <mliska@suse.cz>
718 * trans.c (remove_suffix): Remove
721 2018-09-24 Thomas Koenig <tkoenig@gcc.gnu.org>
724 * gfc_conv_procedure_call: Do not add clobber on INTENT(OUT)
725 for variables in an associate statement.
727 2018-09-24 Bernhard Reuther-Fischer <aldot@gcc.gnu.org>
728 Cesar Philippidis <cesar@codesourcery.com>
730 * openmp.c (resolve_oacc_loop_blocks):
732 2018-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
735 * gfc_conv_procedure_call: Do not add clobber on INTENT(OUT)
736 for variables having the dimension attribute.
738 2018-09-23 Janne Blomqvist <jb@gcc.gnu.org>
740 * trans-expr.c (gfc_caf_get_image_index): Do array index
741 calculations in gfc_array_index_type.
742 * trans-intrinsic.c (conv_intrinsic_event_query): Likewise.
743 * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
744 (gfc_trans_event_post_wait): Likewise.
746 2018-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
749 * gfc_conv_procedure_call: Reformat comments slightly. Do not add
750 clobber on INTENT(OUT) for saved variables.
752 2018-09-22 Thomas Koenig <tkoenig@gcc.gnu.org>
755 * trans.h (gfc_conv_expr_reference): Add optional argument
756 add_clobber to prototype.
757 (gfc_conv_procedure_call): Set add_clobber argument to
758 gfc_conv_procedure_reference to true for scalar, INTENT(OUT),
759 non-pointer, non-allocatable, non-dummy variables whose type
760 is neither BT_CHARACTER, BT_DERIVED or BT_CLASS, but only if
761 the procedure is not elemental.
762 * trans-expr.c (gfc_conv_procedure_reference): Add clobber
763 statement before call if add_clobber is set.
765 2018-09-22 Paul Thomas <pault@gcc.gnu.org>
768 * trans-array.c (gfc_alloc_allocatable_for_assignment): Test
769 the charlen backend_decl before using the VAR_P macro.
771 2018-09-21 Paul Thomas <pault@gcc.gnu.org>
774 * trans-array.c (gfc_alloc_allocatable_for_assignment): If the
775 rhs has a charlen expression, convert that and use it.
776 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
777 assignment of deferred character array vars to a realocatable
778 lhs should not be added to the exterior block since vector
779 indices, for example, generate temporaries indexed within the
782 2018-09-21 Paul Thomas <pault@gcc.gnu.org>
785 * trans-stmt.c (gfc_trans_allocate): Don't deallocate alloc
786 components if must_finalize is set for expr3.
788 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
789 Kwok Cheung Yeung <kcy@codesourcery.com>
791 * trans-expr.c (gfc_trans_structure_assign): Ensure that the first
792 argument of a call to _gfortran_caf_register is of size_type_node.
793 * trans-intrinsic.c (conv_intrinsic_event_query): Convert computed
794 index to a size_type_node type.
795 * trans-stmt.c (gfc_trans_event_post_wait): Likewise.
797 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
799 * gfortranspec.c (lang_specific_driver): Handle -r like -nostdlib.
801 2018-09-20 Janus Weil <janus@gcc.gnu.org>
803 * gfortran.h (gfc_str_startswith): New macro.
804 * decl.c (variable_decl, gfc_match_end): Use it.
805 * iresolve.c (is_trig_resolved): Ditto.
806 * module.c (load_omp_udrs, read_module): Ditto.
807 * options.c (gfc_handle_runtime_check_option): Ditto.
808 * primary.c (match_arg_list_function): Ditto.
809 * trans-decl.c (gfc_get_symbol_decl): Ditto.
810 * trans-expr.c (gfc_conv_procedure_call): Ditto.
811 * interface.c (dtio_op): Replace strncmp by strcmp.
812 * resolve.c (resolve_actual_arglist, resolve_function): Ditto.
813 * trans-expr.c (conv_arglist_function): Ditto.
814 * trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Replace macro
815 STARTS_WITH by gfc_str_startswith.
817 2018-09-20 Cesar Philippidis <cesar@codesourcery.com>
819 * dump-parse-tree.c (show_omp_clauses): Add missing omp list_types
820 and reorder the switch cases to match the enum in gfortran.h.
822 2018-09-19 Paul Thomas <pault@gcc.gnu.org>
825 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
826 assignment of deferred character intrinsic elemental function
827 results to a realocatable lhs must not be added to the exterior
828 block if they are array valued but must go to the loop body.
830 2018-09-18 Thomas Koenig <tkoenig@gcc.gnu.org>
833 * gfortran.h (gfc_expr): Add external_blas flag.
834 * frontend-passes.c (matrix_case): Add case A2TB2T.
835 (optimize_namespace): Handle flag_external_blas by
836 calling call_external_blas.
837 (get_array_inq_function): Add argument okind. If
838 it is nonzero, use it as the kind of argument
840 (inline_limit_check): Remove m_case argument, add
841 limit argument instead. Remove assert about m_case.
842 Set the limit for inlining from the limit argument.
843 (matmul_lhs_realloc): Handle case A2TB2T.
844 (inline_matmul_assign): Handle inline limit for other cases with
845 two rank-two matrices. Remove no-op calls to inline_limit_check.
846 (call_external_blas): New function.
847 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Do not add
848 argument to external BLAS if external_blas is already set.
850 2018-09-18 Paul Thomas <pault@gcc.gnu.org>
853 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
854 assignment of deferred character elemental function results to
855 a realocatable lhs must not be added to the exterior block but
856 must go to the loop body.
858 2018-09-18 Paul Thomas <pault@gcc.gnu.org>
861 * trans-array.c (gfc_get_array_span): Try to get the element
862 length of incomplete types. Return NULL_TREE otherwise.
863 (gfc_conv_expr_descriptor): Only set the 'span' field if the
864 above does not return NULL_TREE. Set 'span' field if possible
865 for all new descriptors.
867 2018-09-17 Paul Thomas <pault@gcc.gnu.org>
870 * trans-decl.c (gfc_get_symbol_decl): Flag allocatable, scalar
871 characters with a variable length expression for deferred init.
872 (gfc_trans_deferred_vars): Perform the assignment for these
873 symbols by calling gfc_conv_string_length.
875 2018-09-17 Paul Thomas <pault@gcc.gnu.org>
878 * resolve.c (resolve_assoc_var): If the target expression is a
879 deferred charlen dummy and the associate name shares the
880 charlen, generate a new one. Make sure that new charlens are in
881 the namespace list so that they get cleaned up.
882 * trans-array.c (gfc_is_reallocatable_lhs): Associate names are
884 * trans-decl.c (gfc_get_symbol_decl): Put deferred character
885 length dummy and result arrays on the deferred initialization
886 list so that the variable length arrays can be correctly dealt
888 * trans-expr.c (gfc_conv_string_length): Return if 'expr' is
889 NULL rather than ICEing..
891 2018-09-16 Janus Weil <janus@gcc.gnu.org>
895 * match.c (gfc_match_assignment): For a polymorphic assignment,
896 make sure that the vtab for the rhs type is generated.
898 2018-09-16 Thomas Koenig <tkoenig@gcc.gnu.org>
901 * frontend-passes.c (B_ERROR): New macro for matmul bounds
902 checking error messages.
904 (inline_matmul_assign): Reorganize bounds checking, use B_ERROR
907 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
909 * trans-array.c (gfc_conv_array_initializer): Remove excess precision
910 from overlength string initializers.
912 2018-09-12 Paul Thomas <pault@gcc.gnu.org>
915 * trans-expr.c (gfc_trans_class_init_assign): Access to
916 to array elements of the dynamic type requires that the array
917 reference be added to the class expression and not the _data
918 component, unlike scalar expressions.
920 2018-09-11 Janus Weil <janus@gcc.gnu.org>
923 * resolve.c (resolve_fl_derived): If a type has the 'use_assoc'
924 attribute, then it was declared in another module, so there should be
925 no error that it has not been declared.
927 2018-09-11 Paul Thomas <pault@gcc.gnu.org>
930 * expr.c (is_subref_array): Add the check of dimensionality for
931 class, dummy, pointer arrays.
933 2018-09-11 Janus Weil <janus@gcc.gnu.org>
936 * expr.c (gfc_is_simply_contiguous): Handle type-bound procedure calls
937 with non-polymorphic objects.
939 2018-09-10 Janus Weil <janus@gcc.gnu.org>
942 * decl.c (match_binding_attributes): Use correct default accessibility
943 for procedure pointer components.
945 2018-09-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
947 * simplify.c (gfc_simplify_modulo): Re-arrange code to test whether
948 'P' is zero and issue an error if it is.
950 2018-08-31 Paul Thomas <pault@gcc.gnu.org>
954 * trans-array.c (gfc_conv_scalarized_array_ref): Do not fix
955 info->descriptor but pass it directly to gfc_build_array_ref.
956 (gfc_conv_array_ref): Likewise for se->expr.
957 * trans.c (gfc_build_array_ref): If 'decl' is a COMPONENT_REF
958 obtain the span field directly from it.
960 2017-08-28 Paul Thomas <pault@gcc.gnu.org>
963 * trans-expr.c (gfc_conv_procedure_call): Allocatable class
964 scalar results being passed to a derived type formal argument
965 are finalized if possible. Otherwise, rely on existing code for
966 deallocation. Make the deallocation of allocatable result
967 components conditional on finalization not taking place. Make
968 the freeing of data components after finalization conditional
969 on the data being NULL.
970 (gfc_trans_arrayfunc_assign): Change the gcc_assert to a
971 condition to return NULL_TREE.
972 (gfc_trans_assignment_1): If the assignment is class to class
973 and the rhs expression must be finalized but the assignment
974 is not marked as a polymorphic assignment, use the vptr copy
975 function instead of gfc_trans_scalar_assign.
978 * trans-expr.c (gfc_conv_expr_reference): Do not add the post
979 block to the pre block if the expression is to be finalized.
980 * trans-stmt.c (gfc_trans_allocate): If the expr3 must be
981 finalized, load the post block into a finalization block and
982 add it right at the end of the allocation block.
984 2018-08-27 David Malcolm <dmalcolm@redhat.com>
987 * error.c (gfc_format_decoder): Update for conversion of
988 show_caret_p to a tri-state.
990 2018-08-25 Janus Weil <janus@gcc.gnu.org>
993 * resolve.c (resolve_transfer): Correctly determine typespec for
994 generic function calls, in order to throw a proper error.
996 2018-08-24 Thomas Koenig <tkoenig@gcc.gnu.org>
999 * frontend-passes.c (var_in_expr_callback): New function.
1000 (var_in_expr): New function.
1001 (traverse_io_block): Use var_in_expr instead of
1002 gfc_check_dependency for checking if the variable depends on the
1003 previous interators.
1005 2018-08-23 Janne Blomqvist <blomqvist.janne@gmail.com>
1007 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Delete
1008 HONOR_SIGNED_ZEROS checks.
1010 2018-08-23 Paul Thomas <pault@gcc.gnu.org>
1013 * resolve.c (resolve_typebound_call): If the TBP is not marked
1014 as a subroutine, check the specific symbol.
1016 2018-08-22 Thomas Koenig <tkoenig@gcc.gnu.org>
1018 * gfortran.texi: Mention that asynchronous I/O does
1019 not work on systems which lack condition variables, such
1022 2018-08-22 Janus Weil <janus@gcc.gnu.org>
1025 * match.c (gfc_match_associate): Improve diagnostics for the ASSOCIATE
1028 2018-08-22 Andrew Benson <abensonca@gmail.com>
1030 * module.c (load_generic_interfaces): Move call to find_symbol()
1031 so that only occurs if actually needed.
1033 2018-08-22 Janus Weil <janus@gcc.gnu.org>
1036 * decl.c (gfc_match_data_decl): Allow allocatable components of
1037 indirectly recursive type.
1038 * resolve.c (resolve_component): Remove two errors messages ...
1039 (resolve_fl_derived): ... and replace them by a new one.
1041 2018-08-21 Janne Blomqvist <jb@gcc.gnu.org>
1043 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Use
1044 MAX_EXPR/MIN_EXPR unconditionally for real arguments.
1045 * gfortran.texi (Compiler Characteristics): Document MAX/MIN
1048 2018-08-21 Nicolas Koenig <koenigni@gcc.gnu.org>
1049 Thomas Koenig <tkoenig@gcc.gnu.org>
1052 * gfortran.texi: Add description of asynchronous I/O.
1053 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
1055 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
1056 st_wait_async and change argument spec from ".X" to ".w".
1057 (gfc_trans_wait): Pass ID argument via reference.
1059 2018-08-16 Nathan Sidwell <nathan@acm.org>
1061 * cpp.c (dump_macro): Use cpp_user_macro_p.
1063 2018-08-14 Janus Weil <janus@gcc.gnu.org>
1066 * interface.c (compare_type): Remove a CLASS/TYPE check.
1067 (compare_type_characteristics): New function that behaves like the old
1069 (gfc_check_dummy_characteristics, gfc_check_result_characteristics):
1070 Call 'compare_type_characteristics' instead of 'compare_type'.
1072 2018-08-12 Paul Thomas <pault@gcc.gnu.org>
1075 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Class array
1076 elements are returned as references to the data element. Get
1077 the class expression by stripping back the references. Use this
1078 for the element size.
1080 2018-08-12 Paul Thomas <pault@gcc.gnu.org>
1083 * resolve.c (resolve_fl_variable_derived): Check if the derived
1084 type is use associated before checking for the host association
1087 2018-08-10 Janus Weil <janus@gcc.gnu.org>
1090 * invoke.texi (frontend-optimize): Mention short-circuiting.
1091 * options.c (gfc_post_options): Disable -ffrontend-optimize with -Og.
1092 * resolve.c (resolve_operator): Warn about short-circuiting only with
1093 -ffrontend-optimize.
1094 * trans-expr.c (gfc_conv_expr_op): Use short-circuiting operators only
1095 with -ffrontend-optimize. Without that flag, make sure that both
1096 operands are evaluated.
1098 2018-08-08 Nathan Sidwell <nathan@acm.org>
1100 * cpp.c (cb_file_change): Use linemap_included_from.
1102 2018-08-07 Cesar Philippidis <cesar@codesourcery.com>
1104 * trans-stmt.h: Remove stale reference to trans-openacc.c.
1106 2018-08-04 Janus Weil <janus@gcc.gnu.org>
1109 * interface.c (gfc_compare_interfaces): Apply additional
1110 distinguishability criteria of F08 to operator interfaces.
1112 2018-07-31 Andre Vieira <andre.simoesdiasvieira@arm.com>
1114 Revert 'AsyncI/O patch committed'
1115 2018-07-25 Nicolas Koenig <koenigni@gcc.gnu.org>
1116 Thomas Koenig <tkoenig@gcc.gnu.org>
1119 * gfortran.texi: Add description of asynchronous I/O.
1120 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
1122 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
1123 st_wait_async and change argument spec from ".X" to ".w".
1124 (gfc_trans_wait): Pass ID argument via reference.
1126 2018-07-25 Nicolas Koenig <koenigni@gcc.gnu.org>
1127 Thomas Koenig <tkoenig@gcc.gnu.org>
1130 * gfortran.texi: Add description of asynchronous I/O.
1131 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
1133 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
1134 st_wait_async and change argument spec from ".X" to ".w".
1135 (gfc_trans_wait): Pass ID argument via reference.
1137 2018-07-20 Martin Sebor <msebor@redhat.com>
1140 * gfortran.h (gfc_handle_option): Change function argument
1142 * options.c (gfc_handle_option): Same.
1144 2018-07-20 Andrew Benson <abenson@carnegiescience.edu>
1146 * gfortran.h (gfc_symbol): Add pointer to next derived type.
1147 (gfc_dt_list, gfc_get_dt_list): Remove.
1148 (gfc_namespace): Replace gfc_dt_list with gfc_symbol.
1149 * parse.c (resolve_all_program_units): Replace gfc_free_dt_list() with
1150 simple nullification of gfc_derived_types.
1151 * resolve.c (resolve_global_procedure): Replace gfc_dt_list with
1153 (add_dt_to_dt_list): Change derived type linked list insertion to
1154 utilize dt_next pointers in gfc_symbol.
1155 * symbol.c (gfc_new_symbol, gfc_free_dt_list, gfc_symbol_done2)
1156 (get_iso_c_binding_dt, generate_isocbinding_symbol): Remove
1157 gfc_free_dt_list as gfc_dt_list is obsoleted. Change derived type
1158 linked list search/insertion to utilize dt_next pointers in gfc_symbol.
1159 * trans-types.c (gfc_get_derived_type): Change derived type linked
1160 list search to utilize dt_next pointers in gfc_symbol.
1162 2018-07-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1164 * trans-intrinsic.c: (gfc_conv_intrinsic_minmax): Emit MIN_MAX_EXPR
1165 or IFN_FMIN/FMAX sequence to calculate the min/max when possible.
1167 2018-07-18 Janus Weil <janus@gcc.gnu.org>
1168 Thomas Koenig <tkoenig@gcc.gnu.org>
1171 * dump-parse-tree.c (show_attr): Add handling of implicit_pure.
1172 * frontend-passes.c (do_warn_function_elimination): Do not warn for
1174 * gfortran.h: Add prototypes for gfc_pure_function and
1175 gfc_implicit_pure_function.
1176 * gfortran.texi: Add chapter on evaluation of logical expressions.
1177 * invoke.texi: Mention that -Wfunction-elimination is implied
1179 * lang.opt: Make -Wextra imply -Wfunction-elimination.
1180 * resolve.c (pure_function): Rename to gfc_pure_function.
1181 (gfc_implicit_pure_function): New function.
1182 (check_pure_function): Use it here.
1183 (impure_function_callback): New function.
1184 (resolve_operator): Call it via gfc_expr_walker.
1186 2018-07-16 Fritz Reese <fritzoreese@gmail.com>
1189 * decl.c (match_old_style_init): Initialize locus of variable expr when
1190 creating a data variable.
1191 (match_clist_expr): Verify array is explicit shape/size before
1192 attempting to allocate constant array constructor.
1194 2018-07-16 Fritz Reese <fritzoreese@gmail.com>
1197 * module.c (mio_component): Set component->loc when loading from module.
1199 2018-07-10 Jakub Jelinek <jakub@redhat.com>
1202 * module.c (omp_declare_simd_clauses): Add LINEAR with _REF, _VAL and
1204 (mio_omp_declare_simd): Save and restore ref, val and uval modifiers
1205 on linear clauses. Initialize n->where to gfc_current_locus.
1207 2018-07-05 Paul Thomas <pault@gcc.gnu.org>
1210 * resolve.c.c (resolve_contained_fntype): Reference to C418 is
1211 in F2008 and not F2003.
1212 (resolve_function): Ditto in error message. Also, exclude
1213 deferred character length results from the error.
1215 2018-07-05 Fritz Reese <fritzoreese@gmail.com>
1219 * expr.c (class_allocatable, class_pointer, comp_allocatable,
1220 comp_pointer): New helpers.
1221 (component_initializer): Generate EXPR_NULL for allocatable or pointer
1222 components. Do not generate initializers for components within BT_CLASS.
1223 Do not assign to comp->initializer.
1224 (gfc_generate_initializer): Use new helpers; move code to generate
1225 EXPR_NULL for class allocatable components into component_initializer().
1227 2018-07-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1230 * trans-decl.c (gfc_process_block_locals): Delete assert and set
1231 saved_local_decls = NULL_TREE.
1233 2018-07-02 Richard Biener <rguenther@suse.de>
1236 * trans-types.c (gfc_get_array_type_bounds): Unshare TYPE_FIELDs
1237 for the distinct type copy.
1239 2018-07-02 Paul Thomas <pault@gcc.gnu.org>
1243 * trans-array.c (structure_alloc_comps): Do not explicitly copy
1244 procedure pointer components.
1246 2018-07-02 Paul Thomas <pault@gcc.gnu.org>
1249 * expr.c : Add a prototype for scalarize_intrinsic_call.
1250 (gfc_simplify_expr): Use scalarize_intrinsic_call for elemental
1251 intrinsic function calls.
1252 (scalarize_intrinsic_call): Add 'init_flag' argument. Check if
1253 the expression or any of the actual argument expressions are
1254 NULL. Before calling gfc_check_init_expr, check 'init_flag'.
1255 Only simplify the scalarized expressions if there are no errors
1257 (gfc_check_init_expr): Set 'init_flag' true in the call to
1258 scalarize_intrinsic_call.
1260 2018-06-28 Fritz Reese <fritzoreese@gmail.com>
1263 * decl.c (gfc_match_type): Refactor and check for PDT declarations.
1265 2018-06-28 Martin Liska <mliska@suse.cz>
1267 * gfortranspec.c: Include opt-suggestions.h.
1269 2018-06-25 Fritz Reese <fritzoreese@gmail.com>
1274 * expr.c (component_initializer): Assign init expr to c->initializer.
1275 (generate_isocbinding_initializer): New.
1276 (gfc_generate_initializer): Call generate_isocbinding_initializer to
1277 generate initializers for c_ptr and c_funptr with -finit-derived.
1279 2018-06-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1282 * interface.c (check_dtio_interface1): Delete assert.
1284 2018-06-22 Paul Thomas <pault@gcc.gnu.org>
1285 Rainer Orth <ro@gcc.gnu.org>
1288 * resolve.c (resolve_contained_fntype): Check for the charlen
1289 before testing the length.
1291 2018-06-21 Paul Thomas <pault@gcc.gnu.org>
1294 * resolve.c (resolve_contained_fntype): Change standard ref.
1295 from F95 to F2003: C418. Correct a spelling error in a comment.
1296 It is an error for an abstract interface to have an assumed
1297 character length result.
1298 * trans-expr.c (gfc_conv_procedure_call): Likewise change the
1301 2018-06-21 Paul Thomas <pault@gcc.gnu.org>
1304 * resolve.c (resolve_ordinary_assign): Force the creation of a
1305 vtable for assignment of non-polymorphic expressions to an
1306 unlimited polymorphic object.
1307 * trans-array.c (gfc_alloc_allocatable_for_assignment): Use the
1308 size of the rhs type for such assignments. Set the dtype, _len
1309 and vptrs appropriately.
1310 * trans-expr.c (gfc_trans_assignment): Force the use of the
1311 _copy function for these assignments.
1313 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1314 Thomas Schwinge <thomas@codesourcery.com>
1315 Cesar Philippidis <cesar@codesourcery.com>
1317 * gfortran.h (gfc_omp_clauses): Add unsigned if_present, finalize
1319 * openmp.c (enum omp_mask2): Remove OMP_CLAUSE_PRESENT_OR_*. Add
1320 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
1321 (gfc_match_omp_clauses): Update handling of copy, copyin, copyout,
1322 create, deviceptr, present_of_*. Add support for finalize and
1324 (OACC_PARALLEL_CLAUSES): Remove PRESENT_OR_* clauses.
1325 (OACC_KERNELS_CLAUSES): Likewise.
1326 (OACC_DATA_CLAUSES): Likewise.
1327 (OACC_DECLARE_CLAUSES): Likewise.
1328 (OACC_UPDATE_CLAUSES): Add IF_PRESENT clause.
1329 (OACC_ENTER_DATA_CLAUSES): Remove PRESENT_OR_* clauses.
1330 (OACC_EXIT_DATA_CLAUSES): Add FINALIZE clause.
1331 (gfc_match_oacc_declare): Update to OpenACC 2.5 semantics.
1332 * trans-openmp.c (gfc_trans_omp_clauses): Add support for IF_PRESENT
1335 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
1337 * trans-decl.c (gfc_get_fake_result_decl): Revert latest change.
1339 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
1341 * trans-decl.c (nonlocal_dummy_decl_pset): Delete.
1342 (nonlocal_dummy_decls): Likewise.
1343 (gfc_nonlocal_dummy_array_decl): Likewise.
1344 (gfc_get_symbol_decl): Do not call gfc_nonlocal_dummy_array_decl.
1345 (gfc_get_fake_result_decl): Do not generate a new DECL if simply
1346 reusing the result of a recursive call.
1347 (gfc_generate_function_code): Do not create, insert and destroy
1348 nonlocal_dummy_decls.
1350 2018-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
1353 * array.c (gfc_resolve_character_array_constructor): Avoid NULL
1354 pointer dereference.
1356 2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
1359 * parse.c (decode_oacc_directive): Set gfc_matching_function
1361 (decode_omp_directive): Likewise.
1363 2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
1366 * openmp.c (gfc_match_oacc_wait): Use %C to report error location.
1368 2018-06-12 David Malcolm <dmalcolm@redhat.com>
1371 * misc.c (gfc_closest_fuzzy_match): Update for renaming of
1372 levenshtein_distance to get_edit_distance.
1374 2018-06-12 Steven G. Kargl <kargl@gcc.gnu.org>
1377 * expr.c (gfc_check_assign): Select non-NULL locus.
1379 2018-06-11 Janus Weil <janus@gcc.gnu.org>
1382 * interface.c (compare_ptr_alloc): New function.
1383 (generic_correspondence): Call it.
1385 2018-06-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1387 * gfortran.h (gfc_expr): Add no_bounds_check field.
1388 * frontend-passes.c (get_array_inq_function): Set no_bounds_check
1389 on function and function argument.
1390 (inline_matmul_assign): Set no_bounds_check on zero expression
1391 and on lhs of zero expression.
1392 Also handle A1B2 case if realloc on assigment is active.
1393 * trans-array.c (gfc_conv_array_ref): Don't do range checking
1394 if expr has no_bounds_check set.
1395 (gfc_conv_expr_descriptor): Set no_bounds_check on ss if expr
1397 * trans-expr.c (gfc_trans_assignment_1): Set no_bounds_check
1398 on lss and lss if the corresponding expressions have it set.
1400 2018-06-10 Dominique d'Humieres <dominiq@gcc.gnu.org>
1403 * trans-const.c: Remove include "diagnostic-core.h".
1404 (gfc_conv_constant_to_tree): Replace fatal_error with gcc_unreachable.
1406 2018-06-10 Janus Weil <janus@gcc.gnu.org>
1409 * decl.c (match_attr_spec): Synchronize the DECL_* enum values with the
1410 INTENT_* values from the enum 'sym_intent'. Call 'match_intent_spec'
1411 and remove a TODO note.
1412 * gfortran.h: Add a comment to sym_intent.
1414 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
1417 * resolve.c (resolve_operator): Provide better error message for
1418 derived type entity used in an binary intrinsic numeric operator.
1420 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
1425 * decl.c (gfc_match_char_spec): Use private namespace in attempt to
1426 reduce a charlen to a constant.
1428 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
1431 * data.c (gfc_assign_data_value): Re-arrange code to allow for
1432 an error for double initialization of CHARACTER entities.
1434 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
1437 * symbol.c (gfc_add_volatile): Enforce F2008:C1282 and F2018:C1588.
1439 2018-06-08 Thomas Koenig <tkoenig@gcc.gnu.org>
1442 * trans.h (gfc_ss): Add field no_bounds_check.
1443 * trans-array.c (gfc_conv_ss_startstride): If flag_realloc_lhs and
1444 ss->no_bounds_check is set, do not use runtime checks.
1445 * trans-expr.c (gfc_trans_assignment_1): Set lss->no_bounds_check
1446 for reallocatable lhs.
1448 2018-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
1451 * array.c (match_array_cons_element): NULL() cannot be in an
1454 2018-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
1457 * data.c (create_character_initializer): Return early if type is
1458 incompatible with CHARACTER.
1460 2018-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
1463 * simplify.c (gfc_simplify_mod): Re-arrange code to test whether
1464 'P' is zero and issue an error if it is.
1466 2018-06-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1469 * frontend-passes.c (is_fe_temp): Add prototype.
1470 (realloc_string_callback): Early return for frontend-generated
1473 2018-06-05 Cesar Philippidis <cesar@codesourcery.com>
1477 * openmp.c (gfc_resolve_oacc_declare): Error on functions and
1478 subroutine data clause arguments.
1480 2018-06-04 Steven G. Kargl <kargl@gcc.gnu.org>
1483 * resolve.c (resolve_allocate_deallocate): Check errmsg is default
1486 2018-06-03 Paul Thomas <pault@gcc.gnu.org>
1489 * decl.c (variable_decl): Use gfc_add_type for cray pointees.
1491 2018-06-01 Steven G. Kargl <kargl@gcc.gnu.org>
1494 * check.c (gfc_check_random_init): New function. Check arguments of
1496 * gfortran.h (GFC_ISYM_RANDOM_INIT): New enum token.
1497 * intrinsic.c (add_subroutines): Add RANDOM_INIT to list of
1499 (gfc_check_intrinsic_standard): Introduce Fortran 2018 check.
1500 * intrinsic.h: Add prototypes for gfc_check_random_init and
1501 gfc_resolve_random_init
1502 * intrinsic.texi: Document new intrinsic subprogram.
1503 * iresolve.c (gfc_resolve_random_init): Resolve routine name.
1504 * trans-decl.c: Declare gfor_fndecl_random_init
1505 * trans-intrinsic.c (conv_intrinsic_random_init): New function.
1506 Translate call to RANDOM_INIT.
1507 (gfc_conv_intrinsic_subroutine): Call it.
1508 * trans.h: Declare gfor_fndecl_random_init
1510 2018-05-27 Steven G. Kargl <kargl@gcc.gnu.org>
1512 * decl.c (match_data_constant): Fortran 2018 allows pointer
1513 initialization in a data statement.
1515 2018-05-25 Janus Weil <janus@gcc.gnu.org>
1518 * match.c (gfc_match_block_data): Call gfc_notify_std to warn about
1519 an obsolescent feature in Fortran 2018.
1520 (gfc_match_equivalence): Ditto.
1521 * resolve.c (resolve_common_blocks): Ditto.
1522 (gfc_resolve_forall): Ditto.
1523 * symbol.c (gfc_define_st_label): Ditto.
1525 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
1528 * resolve.c (update_current_proc_array_outer_dependency): Avoid NULL
1529 pointer dereference.
1531 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
1534 * resolve.c (resolve_fl_procedure): Avoid NULL dereference.
1536 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
1539 * decl.c (gfc_match_derived_decl): Fix NULL point dereference.
1541 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
1544 * resolve.c (resolve_sync): Resolve expression before checking for
1547 2018-05-22 Janus Weil <janus@gcc.gnu.org>
1550 * libgfortran.h: Remove the macros GFC_STD_F2008_TS and
1552 * error.c (notify_std_msg): Remove GFC_STD_F2008_TS.
1553 * options.c (set_default_std_flags): Ditto.
1554 (gfc_handle_option): Make -std=f2008ts an alias for -std=f2018.
1555 * array.c (gfc_match_array_spec): Replace GFC_STD_F2008_TS by
1557 * check.c (gfc_check_atomic, gfc_check_event_query,
1558 gfc_check_c_f_pointer, gfc_check_c_f_procpointer, gfc_check_c_funloc,
1559 gfc_check_c_loc, gfc_check_num_images, gfc_check_this_image): Ditto.
1560 * decl.c (gfc_verify_c_interop_param, gfc_match_decl_type_spec): Ditto.
1561 * intrinsic.c (add_functions, add_subroutines,
1562 gfc_check_intrinsic_standard): Ditto.
1563 * iso-c-binding.def: Ditto.
1564 * iso-fortran-env.def: Ditto.
1565 * match.c (gfc_match_event_post, gfc_match_event_wait,
1566 gfc_match_fail_image, gfc_match_form_team, gfc_match_change_team,
1567 gfc_match_end_team, gfc_match_sync_team): Ditto.
1568 * gfortran.texi: Remove mention of -std=f2008ts.
1569 Move TSs into F2018 section.
1570 * invoke.texi: Update documentation of -std=f2008ts.
1572 2018-05-21 Janus Weil <janus@gcc.gnu.org>
1575 * libgfortran.h: New macros GFC_STD_OPT_*.
1576 * error.c (notify_std_msg): New function.
1577 (gfc_notify_std): Adjust such that it can handle combinations of
1578 GFC_STD_* flags in the 'std' argument, not just a single one.
1579 * match.c (match_arithmetic_if, gfc_match_if): Reject arithmetic if
1581 (gfc_match_stopcode): Use GFC_STD_OPT_* macros.
1582 * options.c (set_default_std_flags): Warn for F2018 deleted features
1584 (gfc_handle_option): F2018 deleted features are allowed in earlier
1586 * symbol.c (gfc_define_st_label, gfc_reference_st_label): Reject
1587 nonblock do constructs in Fortran 2018.
1589 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
1592 * resolve.c (flag_fn_result_spec): Use the 'sym' argument to
1593 test for self refs to the function result in the character len
1594 expression. If a self reference is found, emit an error and
1596 (resolve_fntype): Use the function symbol in the calls to the
1599 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
1602 * trans-array.c (gfc_get_array_span): Renamed from
1604 (gfc_conv_expr_descriptor): Change references to above.
1605 * trans-array.h : Add prototype for 'gfc_get_array_span'.
1606 * trans-intrinsic.c (gfc_conv_associated): Add pre and post
1608 * trans-stmt.c (trans_associate_var): If the associate name is
1609 a subref array pointer, use gfc_get_array_span for the span.
1611 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
1614 * match.c (gfc_match_type_spec): Go through the array ref and
1615 decrement 'rank' for every dimension that is an element.
1617 2018-05-19 Paul Thomas <pault@gcc.gnu.org>
1622 * trans-array.c (gfc_alloc_allocatable_for_assignment): Set the
1623 charlen backend_decl of the rhs expr to ss->info->string_length
1624 so that the value in the current scope is used.
1626 2018-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
1629 * gfortran.texi: Clarify documentation for Cray pointer and
1630 assumed-sized array.
1632 2018-05-13 Paul Thomas <pault@gcc.gnu.org>
1635 * trans-types.c (gfc_get_dtype_rank_type): Reorder evaluation
1636 of 'size'. If the element type is a pointer use the size of the
1637 TREE_TYPE of the type, unless it is VOID_TYPE. In this latter
1638 case, set the size to zero.
1640 2018-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
1642 * gfortran.h: Remove prototype.
1643 * symbol.c (gfc_new_undo_checkpoint): Remove unused function.
1645 2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
1648 * expr.c (check_inquiry): Avoid NULL pointer dereference.
1650 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
1653 * check.c (gfc_check_rank): Check that the argument is a data object.
1655 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
1658 * array.c (gfc_resolve_character_array_constructor): Substrings
1659 with upper bound smaller than lower bound are zero length strings.
1661 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
1664 * data.c (gfc_assign_data_value): Check that a data object does
1665 not also have default initialization.
1667 2018-05-10 Marek Polacek <polacek@redhat.com>
1670 * options.c (gfc_post_options): Set main_input_filename.
1672 2018-05-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1675 * intrinsic.texi: Document BACK for MINLOC and MAXLOC.
1677 2018-05-10 Paul Thomas <pault@gcc.gnu.org>
1681 * resolve.c (get_temp_from_expr): The temporary must not have
1682 dummy or intent attributes.
1684 2018-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
1687 * check.c (gfc_check_minmaxloc): Remove error for BACK not being
1688 implemented. Use gfc_logical_4_kind for BACK.
1689 * simplify.c (min_max_choose): Add optional argument back_val.
1691 (simplify_minmaxloc_to_scalar): Add argument back_val. Pass
1692 back_val to min_max_choose.
1693 (simplify_minmaxloc_to_nodim): Likewise.
1694 (simplify_minmaxloc_to_array): Likewise.
1695 (gfc_simplify_minmaxloc): Add argument back, handle it.
1696 Pass back_val to specific simplification functions.
1697 (gfc_simplify_minloc): Remove ATTRIBUTE_UNUSED from argument back,
1698 pass it on to gfc_simplify_minmaxloc.
1699 (gfc_simplify_maxloc): Likewise.
1700 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Adjust
1701 comment. If BACK is true, use greater or equal (or lesser or
1702 equal) insteal of greater (or lesser). Mark the condition of
1703 having found a value which exceeds the limit as unlikely.
1705 2018-05-07 Jeff Law <law@redhat.comg>
1707 * scanner.c (preprocessor_line): Call linemap_add after a line
1708 directive that changes the current filename.
1710 2018-05-06 Andre Vehreschild <vehre@gcc.gnu.org>
1713 * dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
1714 introduced by r259385.
1715 * trans-intrinsic.c (conv_caf_send): Always report a dependency for
1716 same variables in coarray assignments.
1718 2018-05-02 Tom de Vries <tom@codesourcery.com>
1721 * f95-lang.c (DEF_GOACC_BUILTIN_ONLY): Define.
1723 2018-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
1726 * decl.c (gfc_match_char_spec): Check for negative length and set to 0.
1728 2018-04-14 Andre Vehreschild <vehre@gcc.gnu.org>
1732 * dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
1733 during dependency computation. They define no data dependency.
1734 * trans-array.c (conv_array_index_offset): The stride can not be set
1736 * trans-intrinsic.c (conv_caf_send): Add creation of temporary array
1737 for caf_get's result and copying to the array with vectorial
1740 2018-04-14 Thomas Koenig <tkoenig@gcc.gnu.org>
1743 * frontend-passes.c (traverse_io_block): Check for start, end or
1744 stride being defined by an outer implied DO loop.
1746 2018-04-12 Thomas Koenig <tkoenig@gcc.gnu.org>
1750 * trans-stmt.c (gfc_trans_forall_loop): Use annot_expr_ivdep_kind
1751 for annotation and remove dependence on -ftree-parallelize-loops.
1753 2018-04-10 Jakub Jelinek <jakub@redhat.com>
1756 * openmp.c (resolve_omp_do): Remove bogus if (j < i) break;.
1757 (resolve_oacc_nested_loops): Likewise. Formatting fix.
1759 2018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
1762 * trans-stmt.c (gfc_trans_forall_loop): Remove annotation for
1763 parallell processing of DO CONCURRENT -ftree-parallelize-loops
1766 2018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
1769 * resolve.c (resolve_variable): Simplify cases where access to a
1770 parameter array results in a single constant.
1772 2018-04-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1775 * decl.c (variable_decl): If upper or lower bounds simplify
1776 to a constant, use that.
1778 2018-03-30 Paul Thomas <pault@gcc.gnu.org>
1781 * simplify.c (gfc_convert_constant): Handle case of array
1782 constructors within an array that has no iterator and improve
1783 the conciseness of this section of code.
1785 2017-03-30 Thomas Koenig <tkoenig@gcc.gnu.org>
1788 * array.c (gfc_resolve_character_array_constructor): Early
1789 exit for zero-size arrays.
1790 * simplify.c (simplify_transformation_to_array): Exit early
1791 if the result size is zero.
1792 (simplify_minmaxloc_to_array): Likewise.
1794 2018-03-28 Mikael Morin <mikael@gcc.gnu.org>
1797 * symbol.c (gfc_symbol_done_2): Start freeing namespaces
1799 (gfc_free_namespace): Restore assert (revert r258839).
1801 2018-03-28 Jakub Jelinek <jakub@redhat.com>
1803 * gfortran.h (gfc_dt): Rename default_exp field to dec_ext.
1804 * ioparm.def (IOPARM_dt_default_exp): Rename to ...
1805 (IOPARM_dt_dec_ext): ... this.
1806 * trans-io.c (build_dt): Adjust for default_exp renaming to
1807 dec_ext and IOPARM_dt_default_exp renaming to IOPARM_dt_dec_ext.
1808 * io.c (match_io): Likewise.
1810 2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1813 * frontend-passes.c (gfc_run_passes): Do not run front-end
1814 optimizations if a previous error occurred.
1816 2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1817 Harald Anlauf <anlauf@gmx.de>
1820 * primary.c (gfc_convert_to_structure_constructor): Check
1821 conformance of argument types in structure constructor.
1823 2018-03-26 Thomas Koenig <tkoenig@gcc.gnu.org>
1826 * io.c: Include constructor.h.
1827 (resolve_tag_format): For a constant character array, concatenate
1828 into a single character expression.
1830 2018-03-25 Seth Johnson <johnsonsr@ornl.gov>
1831 Dominique d'Humieres <dominiq@gcc.gnu.org>
1834 * check.c (gfc_check_c_f_pointer): Allow scalar noninteroperable
1835 scalar derived type with -std=f2003 and -std=f2008.
1837 2018-03-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1838 Dominique d'Humieres <dominiq@gcc.gnu.org>
1841 * symbol.c (gfc_free_namespace): Delete the assert and only if
1842 refs count is equals zero, free the namespace. Otherwise,
1843 something is halfway and other errors will resound.
1845 2018-03-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1848 * expr.c (find_substring_ref): Change types of start, end
1849 and length variables to gfc_charlen_t. Set length to zero
1850 for empty substring.
1852 2018-03-24 Steven G. Kargl <kargl@gcc.gnu.org>
1855 * decl.c (check_function_name): Improved error message
1856 (gfc_match_volatile, gfc_match_asynchronous) Use check_function_name.
1858 2018-03-22 Steven G. Kargl <kargl@gcc.gnu.org>
1861 * decl.c (get_proc_name): If the MODULE prefix appears in interface
1862 body, then it must appear on the contained subroutine or function.
1863 While here, fix nearby mis-indented code.
1865 2018-03-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1866 Harald Anlauf <anlauf@gmx.de>
1869 * trans-types.c (gfc_sym_type): Do not dereference NULL pointer.
1871 2018-03-21 Janne Blomqvist <jb@gcc.gnu.org>
1874 * trans-expr.c (gfc_conv_procedure_call): Convert charlen to
1875 gfc_charlen_type_node when calling procedure.
1877 2018-03-20 Steven G. Kargl <kargl@gcc.gnu.org>
1880 * interface.c (symbol_rank): Remove bogus null pointer check that
1881 crept in when translating a ternary operator into an if-else
1884 2018-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1887 * simplify.c (gfc_convert_constant): Correctly handle iterators
1888 for type conversion.
1890 2018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
1893 * decl.c (get_proc_name): Check for a subroutine re-defined in
1894 the contain portion of a subroutine. Change language of existing
1895 error message to better describe the issue. While here fix whitespace
1898 2018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
1901 * decl.c (get_proc_name): Catch clash between a procedure statement
1902 and a contained subprogram
1904 2018-03-16 Steven G. Kargl <kargl@gcc.gnu.org>
1907 * decl.c (merge_array_spec): Correct the error condition.
1909 2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
1912 * decl.c (get_proc_name): Check for clash of entry name with
1915 2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
1918 * decl.c (merge_array_spec): Limit the merging to maximum allowed
1919 dimensions, and issue error message if limit is exceeded.
1921 2018-03-13 Steven G. Kargl <kargl@gcc.gnu.org>
1923 * check.c (gfc_check_kill_sub): Remove check for INTEGER(4) or (8).
1924 * intrinsic.c (add_functions): Remove reference to gfc_resolve_kill.
1925 (add_subroutines): Remove reference to gfc_resolve_kill_sub.
1926 * intrinsic.texi: Update documentation.
1927 * iresolve.c (gfc_resolve_kill, gfc_resolve_kill_sub): Remove.
1928 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
1929 gfor_fndecl_kill and gfor_fndecl_kill_sub
1930 * trans-intrinsic.c (conv_intrinsic_kill, conv_intrinsic_kill_sub): new
1932 (gfc_conv_intrinsic_function): Use conv_intrinsic_kill.
1933 (gfc_conv_intrinsic_subroutine): Use conv_intrinsic_kill_sub.
1934 * trans.h: Declare gfor_fndecl_kill and gfor_fndecl_kill_sub.
1936 2018-03-11 Paul Thomas <pault@gcc.gnu.org>
1939 * trans-array.c (structure_alloc_comps): Make sure that the
1940 vptr is copied and that the unlimited polymorphic _len is used
1941 to compute the size to be allocated.
1942 * trans-expr.c (gfc_get_class_array_ref): If unlimited, use the
1943 unlimited polymorphic _len for the offset to the element.
1944 (gfc_copy_class_to_class): Set the new 'unlimited' argument.
1945 * trans.h : Add the boolean 'unlimited' to the prototype.
1947 2018-03-11 Steven G. Kargl <kargl@gcc.gnu.org>
1950 * resolve.c (resolve_fl_procedure): Enforce F2018:C15100.
1952 2018-03-11 Steven G. Kargl <kargls@gcc.gnu.org>
1954 * check.c (gfc_check_kill): Check pid and sig are scalar.
1955 (gfc_check_kill_sub): Restrict kind to 4 and 8.
1956 * intrinsic.c (add_function): Sort keyword list. Add pid and sig
1957 keywords for KILL. Remove redundant *back="back" in favor of the
1958 original *bck="back".
1959 (add_subroutines): Sort keyword list. Add pid and sig keywords
1961 * intrinsic.texi: Fix documentation to consistently use pid and sig.
1962 * iresolve.c (gfc_resolve_kill): Kind can only be 4 or 8. Choose the
1964 (gfc_resolve_rename_sub): Add comment.
1966 2018-03-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1969 * simplify.c (simplify_transformation): Return default result for
1970 empty array argument.
1971 (gfc_simplify_all): Remove special-case handling for zerosize.
1972 (gfc_simplify_any): Likewise.
1973 (gfc_simplify_count): Likewise.
1974 (gfc_simplify_iall): Likewise.
1975 (gfc_simplify_iany): Likewise.
1976 (gfc_simplify_iparity): Likewise.
1977 (gfc_simplify_minval): Likewise.
1978 (gfc_simplify_maxval): Likewise.
1979 (gfc_simplify_norm2): Likewise.
1980 (gfc_simplify_product): Likewise.
1981 (gfc_simplify_sum): Likewise.
1983 2018-03-10 Steven G. Kargl <kargl@gcc.gnu.org>
1986 * arith.c (check_result, eval_intrinsic): If result overflows, pass
1987 the expression up the chain instead of a NULL pointer.
1989 2018-03-07 Steven G. Kargl <kargl@gcc.gnu.org>
1993 * decl.c (gfc_match_char_spec): Try to reduce a charlen to a constant.
1995 2017-03-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1999 * expr.c (simplify_parameter_variable): If p is a size zero array
2000 and not an ARRAY_EXPR insert an empty array constructor and
2002 * gfortran.h: Add prototype for gfc_is_size_zero_array.
2003 * simplify.c (is_size_zero_array): Make non-static and rename into
2004 (gfc_is_size_zero_array): Check for parameter arrays of zero
2005 size by comparing shape and absence of constructor.
2006 (gfc_simplify_all): Use gfc_is_size_zero_array instead of
2008 (gfc_simplify_count): Likewise.
2009 (gfc_simplify_iall): Likewise.
2010 (gfc_simplify_iany): Likewise.
2011 (gfc_simplify_iparity): Likewise.
2012 (gfc_simplify_minval): Likewise.
2013 (gfc_simplify_maxval): Likewise.
2014 (gfc_simplify_product): Likewise.
2015 (gfc_simplify_sum): Likewise.
2017 2018-03-06 Steven G. Kargl <kargl@gcc.gnu.org>
2020 * primary.c (match_sym_complex_part): Give the matcher for an implied
2021 do-loop a chance to run.
2023 2018-03-03 Harald Anlauf <anlauf@gmx.de>
2026 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Do not
2027 dereference NULL pointer.
2029 2018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
2032 * simplify.c (is_size_zero_array): New function to check for size
2034 (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
2035 gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
2036 gfc_simplify_minval, gfc_simplify_maxval, gfc_simplify_norm2,
2037 gfc_simplify_product, gfc_simplify_sum): Use it, and implement
2038 requirements from F2018.
2040 2018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
2043 * simplify.c (gfc_simplify_transfer): Resolve mold.
2045 2018-03-03 Paul Thomas <pault@gcc.gnu.org>
2048 * resolve.c (build_loc_call): Change symtree name from 'loc' to
2051 2018-03-01 Paul Thomas <pault@gcc.gnu.org>
2054 * target-memory.c (gfc_interpret_derived): Assert that BT_VOID
2055 components are caf tokens.
2056 (gfc_target_interpret_expr): Treat BT_VOID expressions as
2059 2018-03-01 Paul Thomas <pault@gcc.gnu.org>
2062 * class.c (class_array_ref_detected): Remove the condition that
2063 there be no reference after the array reference.
2064 (find_intrinsic_vtab): Remove excess whitespace.
2065 * trans-array.c (gfc_conv_scalarized_array_ref): Rename 'tmp'
2066 as 'base and call build_class_array_ref earlier.
2068 2018-02-28 Paul Thomas <pault@gcc.gnu.org>
2071 * trans-stmt.c (trans_associate_var): Make sure that the se
2072 expression is a pointer type before converting it to the symbol
2075 2018-02-25 Steven G. Kargl <kargl@gcc.gnu.org>
2078 * decl.c (variable_decl): Check that an explicit-shape-array with
2079 nonconstant bounds is allowed.
2081 2018-02-25 Paul Thomas <pault@gcc.gnu.org>
2084 * trans-intrinsic.c (gfc_conv_allocated): If the argument se
2085 has a pre block, add it to the expression pre block.
2087 2018-02-25 Thomas Koenig <tkoenig@gcc.gnu.org>
2090 * gfortran.h (gfc_integer_4_kind): Define.
2091 * resolve.c (resolve_select_type): Make sure that the
2092 kind of c->high is gfc_integer_4_kind.
2094 2018-02-24 Steven G. Kargl <kargl@gcc.gnu.org>
2097 * decl.c (gfc_match_data): Check for invalid substring in
2100 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
2102 * intrinsic.texi: Arguments to MATMUL cannot both be rank one.
2104 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
2107 * trans-io.c (transfer_expr): Deal with C_LOC in transfer statement.
2109 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
2112 * interface.c (compare_actual_formal): Issue error if keyword is
2113 used in a statement function.
2115 2018-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2118 * trans-io.c (set_parameter_value_inquire): Adjust range check of
2119 negative unit values for kind=8 units to the kind=4 negative limit.
2121 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
2124 * trans-types.c (gfc_sym_type): Test sym->ns->proc_name before
2125 accessing its components.
2127 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
2130 * trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
2131 before accessing its components.
2133 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
2136 * trans-const.c : Clean up some whitespace issues.
2137 * trans-expr.c (gfc_conv_initializer): If an iso_c_binding
2138 derived type has a kind value of zero, set it to the default
2141 2018-02-23 Janne Blomqvist <jb@gcc.gnu.org>
2144 * trans-decl.c (gfc_build_builtin_function_decls): Add bool
2145 argument to stop and error stop decls.
2146 * trans-stmt.c (gfc_trans_stop): Add false value to argument
2149 2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
2153 * trans-decl.c (gfc_build_builtin_function_decls): Pass
2154 gfc_int8_type node to pause_numeric, size_type_node to
2156 * trans-stmt.c (gfc_trans_pause): Likewise.
2158 2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
2160 * gfortran.texi: Update Coarray API description.
2161 * trans-decl.c (gfc_build_builtin_function_decls): Use size_t for
2162 character lengths, int for exit codes.
2163 (generate_coarray_sym_init): Use size_t for character length.
2164 * trans-intrinsic.c (conv_co_collective): Likewise.
2165 * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
2166 (gfc_trans_event_post_wait): Likewise.
2167 (gfc_trans_sync): Likewise.
2168 (gfc_trans_stop): Use size_t for character lengths, int for exit
2171 2018-02-20 Thomas Koenig <tkoenig@gcc.gnu.org>
2175 * primary.c (gfc_convert_to_structure_constructor):
2176 For a constant string constructor, make sure the length
2179 2018-02-19 Paul Thomas <pault@gcc.gnu.org>
2183 * resolve.c (resolve_assoc_var): Rearrange the logic for the
2184 determination of the character length of associate names. If
2185 the associate name is missing a length expression or the length
2186 expression is not a constant and the target is not a variable,
2187 make the associate name allocatable and deferred length.
2188 * trans-decl.c (gfc_get_symbol_decl): Null the character length
2189 backend_decl for deferred length associate names that are not
2190 variables. Set 'length' to gfc_index_zero_node for character
2191 associate names, whose character length is a PARM_DECL.
2193 2018-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
2196 * frontend-passes.c (traverse_io_block): Remove workaround for
2199 2018-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
2201 * gfortran.texi: Document additional src/dst_type. Fix some typos.
2202 * trans-decl.c (gfc_build_builtin_function_decls): Declare the new
2203 argument of _caf_*_by_ref () with * e { get, send, sendget }.
2204 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Add the type of the
2205 data referenced when generating a call to caf_get_by_ref ().
2206 (conv_caf_send): Same but for caf_send_by_ref () and
2207 caf_sendget_by_ref ().
2209 2018-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2212 * io.c (check_format): Allow FMT_COLON.
2214 2018-02-18 Paul Thomas <pault@gcc.gnu.org>
2217 * trans-array.c (gfc_conv_expr_descriptor): Set parmtype from
2218 the typenode in the case of deferred length characters.
2220 2018-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
2223 * frontend-passes (scalarized_expr): If the expression
2224 is an assumed size array, leave in the last reference
2225 and pass AR_SECTION instead of AR_FULL to gfc_resolve
2226 in order to avoid an error.
2228 2018-02-17 Paul Thomas <pault@gcc.gnu.org>
2231 * resolve.c (resolve_assoc_var): If a non-constant target expr.
2232 has no string length expression, make the associate variable
2233 into a deferred length, allocatable symbol.
2234 * trans-decl.c (gfc_is_reallocatable_lhs): Add and use a ptr to
2236 * trans-stmt.c (trans_associate_var): Null and free scalar
2237 associate names that are allocatable. After assignment, remove
2238 the allocatable attribute to prevent reallocation.
2240 2018-02-16 Jakub Jelinek <jakub@redhat.com>
2243 * trans-openmp.c (gfc_trans_omp_clauses): For OMP_CLAUSE_LINEAR_REF
2244 kind set OMP_CLAUSE_LINEAR_STEP to TYPE_SIZE_UNIT times last_step.
2246 2018-02-16 Dominique d'Humieres <dominiq@gcc.gnu.org>
2249 * decl.c (gfc_get_pdt_instance): Replace '%qs' with %qs.
2251 2018-02-15 Janus Weil <janus@gcc.gnu.org>
2254 * interface.c (check_dtio_arg_TKR_intent): Add a check for character
2257 2018-02-14 Janus Weil <janus@gcc.gnu.org>
2260 * match.c (gfc_match_select_type): Fix check for selector in
2261 SELECT TYPE statement.
2263 2018-02-13 Janus Weil <janus@gcc.gnu.org>
2266 * symbol.c (check_conflict): Reject procedure pointers in common blocks.
2268 2018-02-13 Alastair McKinstry <alastair.mckinstry@sceal.ie>
2269 Janne Blomqvist <jb@gcc.gnu.org>
2271 * module.c (dump_module): Use lbasename to ensure that module
2272 files are reproducible.
2274 2018-02-12 Janus Weil <janus@gcc.gnu.org>
2277 * resolve.c (resolve_component): Fix checks of passed argument in
2278 procedure-pointer components.
2280 2018-02-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2283 * resolve.c (resolve_formal_arglist): Update error message.
2285 2018-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
2287 * gfortran.texi: Fix typos in documentation of caf_register ().
2288 * trans-array.c (structure_alloc_comps): Only register a component of
2289 a derived typed corray, not of an ultimate component coarray.
2291 2018-02-11 Steven G. Kargl <kargl@gcc.gnu.org>
2295 * interface.c (compare_actual_formal): Add in_statement_function
2296 bool parameter. Skip check of INTENT attribute for statement
2297 functions. Arguments to a statement function cannot be optional,
2298 issue error for missing argument.
2299 (gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
2300 in_statement_function.
2302 2018-02-11 Paul Thomas <pault@gcc.gnu.org>
2305 * trans-expr.c (gfc_conv_derived_to_class): Set the use_offset
2306 flag. If the is a vector subscript or the expression is not a
2307 variable, make the descriptor one-based.
2309 2018-02-10 Paul Thomas <pault@gcc.gnu.org>
2313 * trans-array.c (gfc_array_init_size): Revert the change made
2314 in revision 257356 setting the dtype.
2315 * trans-types.c (gfc_get_dtype): Do not use the cached dtype.
2316 Call gfc_get_dtype_rank_type every time.
2319 * trans-array.c (gfc_conv_expr_descriptor): If the source array
2320 is a descriptor type, use its offset, removing the condition
2321 that is be a class expression.
2323 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
2326 * match.c (gfc_match_deallocate): Check for NULL pointer.
2328 2018-02-07 Thomas Koenig <tkoenig@gcc.gnu.org>
2331 * trans-intrinsic.c (gfc_conv_intrinsic_shape): New function.
2332 (gfc_conv_intrinsic_function): Call it.
2334 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
2337 * match.c (gfc_match_type_spec): If the charlen is non-NULL, then
2338 try to resolve it. While here return early if possible.
2340 2018-02-04 Paul Thomas <pault@gcc.gnu.org>
2343 * trans-decl.c (gfc_get_symbol_decl): Do not finish the decl of
2344 'length' if the symbol charlen backend_decl is an indirect ref.
2346 2018-02-03 Paul Thomas <pault@gcc.gnu.org>
2350 * trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
2351 use gfc_get_dtype_rank_type.
2353 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
2357 * resolve.c (resolve_assoc_var): Generate an error if
2358 target length unknown.
2360 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
2363 * simplify.c (gfc_simplify_repeat): Increase limit for deferring
2364 to runtime, print a warning message.
2366 2018-01-31 Jakub Jelinek <jakub@redhat.com>
2369 * openmp.c (gfc_match_omp_clauses): If all the linear
2370 gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
2371 nor set *head = NULL. Formatting fixes.
2373 2018-01-31 Paul Thomas <pault@gcc.gnu.org>
2376 * trans-expr.c (gfc_conv_procedure_call): If the parm expr is
2377 an address expression passed to an assumed rank dummy, convert
2378 to an indirect reference.
2380 2018-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
2382 * dump-parse-tree.c (write_proc): Use sym_name (which may
2383 be sym->binding_label) instead of sym->name.
2385 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
2387 * trans-const.c (gfc_conv_string_init): Use gfc_charlen_t instead
2390 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
2393 * trans-expr.c (fill_with_spaces): Use memset instead of
2395 (gfc_trans_string_copy): Improve opportunity to use builtins with
2398 2018-01-30 Jakub Jelinek <jakub@redhat.com>
2401 * trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off
2402 to DATA_FIELD's offset rather than OFFSET_FIELD's offset.
2404 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
2407 * array.c (gfc_ref_dimen_size): Whitespace fixes. If stride is
2410 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
2413 * frontend-passes (matmul_to_var_expr): Return early if
2414 in association list.
2415 (inline_matmul_assign): Likewise.
2417 2017-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
2420 * resolve.c (resolve_component): Ensure BIND(C) character
2421 components have length one.
2422 (resolve_symbol): Likewise for variables.
2424 2018-01-27 Jakub Jelinek <jakub@redhat.com>
2427 * decl.c (add_init_expr_to_sym): Ignore initializers for too large
2430 2018-01-26 Damian Rouson <damian@sourceryinstitute.org>
2431 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
2432 Soren Rasmussen <s.c.rasmussen@gmail.com>
2434 Partial support for Fortran 2018 teams features.
2436 * array.c (gfc_match_array_ref): add team attribute in coarray
2438 * check.c (gfc_check_get_team, gfc_check_team_number): add new
2439 functions for get_team and team_number.
2440 * dump-parse-tree.c (show_code_node): add new statements: form team,
2441 change team, end team, and sync team.
2442 * expr.c (gfc_find_team_co): add new function.
2443 * gfortran.h: add new statements.
2444 * intrinsic.c (add_functions): add get_team and team_number functions.
2445 * intrinsic.h: add get_team and team_number prototypes for check,
2446 simplify, and resolve.
2447 * iresolve.c (gfc_resolve_get_team, gfc_resolve_team_number): add new
2449 * iso-fortran-env.def: add the team_type derived type.
2450 * match.c (gfc_match_if, gfc_match_form_team, gfc_match_team_number)
2451 (gfc_match_end_team, gfc_match_sync_team, gfc_match_change_team):
2452 add change team, end team, form team, sync team match and functions.
2453 * match.h: add new prototypes for change team, end team, form team,
2455 * parse.c (decode_statement): add cases for change team, end team,
2456 form team, and sync team.
2457 * resolve.c: add cases for exec form team, change team, end team, and
2459 * simplify.c (gfc_simplify_get_team): add new function for get team.
2460 * st.c (gfc_free_statement): add cases exec for change team, end team,
2461 form team, sync team.
2462 * trans-decl.c (gfor_fndecl_caf_form_team)
2463 (gfor_fndecl_caf_change_team, gfor_fndecl_caf_end_team)
2464 (gfor_fndecl_caf_sync_team, gfor_fndecl_caf_get_team)
2465 (gfor_fndecl_caf_team_number): add functions and definitions.
2466 * trans-intrinsic.c (conv_caf_send, conv_intrinsic_team_number): add
2467 new function and team_type argument support.
2468 * trans-stmt.c (gfc_trans_form_team, gfc_trans_change_team)
2469 (gfc_trans_end_team, gfc_trans_sync_team): add new functions.
2470 * trans-stmt.h: add new prototypes.
2471 * trans-types.c (gfc_get_derived_type): check condition for team_type.
2472 * trans.c (trans_code): new exec cases for form team, change team, end
2473 team, and sync team.
2474 * trans.h: add new prototypes.
2476 2018-01-26 Steven G. Kargl <kargl@gcc.gnu.org>
2479 * simplify.c (compute_dot_product): Initialize result to INTEGER(1) 0
2480 or .false. The summation does the correct type conversion.
2481 (gfc_simplify_dot_product): Special case zero-sized arrays.
2483 2018-25-01 Paul Thomas <pault@gcc.gnu.org>
2486 * array.c (gfc_match_array_ref): If standard earlier than F2008
2487 it is an error if the reference dimension is greater than 7.
2488 libgfortran.h : Increase GFC_MAX_DIMENSIONS to 15. Change the
2489 dtype masks and shifts accordingly.
2490 * trans-array.c (gfc_conv_descriptor_dtype): Use the dtype
2491 type node to check the field.
2492 (gfc_conv_descriptor_dtype): Access the rank field of dtype.
2493 (duplicate_allocatable_coarray): Access the rank field of the
2494 dtype descriptor rather than the dtype itself.
2495 * trans-expr.c (get_scalar_to_descriptor_type): Store the type
2496 of 'scalar' on entry and use its TREE_TYPE if it is ARRAY_TYPE
2498 (gfc_conv_procedure_call): Pass TREE_OPERAND (tmp,0) to
2499 get_scalar_to_descriptor_type if the actual expression is a
2501 (gfc_trans_structure_assign): Assign the rank directly to the
2503 * trans-intrinsic.c (gfc_conv_intrinsic_rank): Cast the result
2504 to default integer kind.
2505 (gfc_conv_intrinsic_sizeof): Obtain the element size from the
2506 'elem_len' field of the dtype.
2507 * trans-io.c (gfc_build_io_library_fndecls): Replace
2508 gfc_int4_type_node with dtype_type_node where necessary.
2509 (transfer_namelist_element): Use gfc_get_dtype_rank_type for
2511 * trans-types.c : Provide 'get_dtype_type_node' to acces the
2512 dtype_type_node and, if necessary, build it.
2513 The maximum size of an array element is now determined by the
2514 maximum value of size_t.
2515 Update the description of the array descriptor, including the
2516 type def for the dtype_type.
2517 (gfc_get_dtype_rank_type): Build a constructor for the dtype.
2518 Distinguish RECORD_TYPEs that are BT_DERIVED or BT_CLASS.
2519 (gfc_get_array_descriptor_base): Change the type of the dtype
2520 field to dtype_type_node.
2521 (gfc_get_array_descr_info): Get the offset to the rank field of
2523 * trans-types.h : Add a prototype for 'get_dtype_type_node ()'.
2524 * trans.h : Define the indices of the dtype fields.
2526 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
2529 * decl.c (gfc_match_derived_decl): If eos not matched, recover
2530 and emit error about garbage after declaration.
2532 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
2535 * trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
2538 2018-01-22 Janne Blomqvist <jb@gcc.gnu.org>
2542 * arith.c (gfc_arith_concat): Use size_t for string length.
2543 (gfc_compare_string): Likewise.
2544 (gfc_compare_with_Cstring): Likewise.
2545 * array.c (gfc_resolve_character_array_constructor): Use
2546 HOST_WIDE_INT, gfc_mpz_get_hwi.
2547 * check.c (gfc_check_fe_runtime_error): Use size_t.
2548 * data.c (create_character_initializer): Use HOST_WIDE_INT,
2550 * decl.c (gfc_set_constant_character_len): Use gfc_charlen_t.
2551 (add_init_expr_to_sym): Use HOST_WIDE_INT.
2552 * expr.c (gfc_build_init_expr): Use HOST_WIDE_INT,
2554 (gfc_apply_init): Likewise.
2555 * match.h (gfc_set_constant_character_len): Update prototype.
2556 * primary.c (match_string_constant): Use size_t.
2557 * resolve.c (resolve_ordinary_assign): Use HOST_WIDE_INT,
2559 * simplify.c (init_result_expr): Likewise.
2560 (gfc_simplify_len_trim): Use size_t.
2561 * target-memory.c (gfc_encode_character): Use size_t.
2562 (gfc_target_encode_expr): Use HOST_WIDE_INT, gfc_mpz_get_hwi.
2563 (interpret_array): Use size_t.
2564 (gfc_interpret_character): Likewise.
2565 * target-memory.h (gfc_encode_character): Update prototype.
2566 (gfc_interpret_character): Likewise.
2567 (gfc_target_interpret_expr): Likewise.
2568 * trans-const.c (gfc_build_string_const): Use size_t for length
2570 (gfc_build_wide_string_const): Likewise.
2571 * trans-const.h (gfc_build_string_const): Likewise.
2572 (gfc_build_wide_string_const): Likewise.
2574 2018-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
2577 * simplify.c (gfc_simplify_matmul): Set return type correctly.
2579 2018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
2582 * simplify.c (gfc_simplify_matmul): Delete bogus assertion.
2584 2018-01-17 Harald Anlauf <anlauf@gmx.de>
2587 * expr.c (add_init_expr_to_sym): Do not dereference NULL pointer.
2589 2018-01-17 Harald Anlauf <anlauf@gmx.de>
2592 * decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.
2594 2018-01-15 Louis Krupp <louis.krupp@zoho.com>
2597 * interface.c (compare_rank): Don't try to retrieve CLASS_DATA
2598 from symbol marked unlimited polymorphic.
2599 * resolve.c (resolve_structure_cons): Likewise.
2600 * misc.c (gfc_typename): Don't dereference derived->components
2603 2018-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
2606 * gfortran.h (gfc_check_f): Rename f4ml to f5ml.
2607 (gfc_logical_4_kind): New macro
2608 * intrinsic.h (gfc_simplify_minloc): Add a gfc_expr *argument.
2609 (gfc_simplify_maxloc): Likewise.
2610 (gfc_resolve_maxloc): Likewise.
2611 (gfc_resolve_minloc): Likewise.
2612 * check.c (gfc_check_minloc_maxloc): Add checking for "back"
2613 argument; also raise error if it is used (for now). Add it
2614 if it isn't present.
2615 * intrinsic.c (add_sym_4ml): Rename to
2616 (add_sym_5ml), adjust for extra argument.
2617 (add_functions): Add "back" constant. Adjust maxloc and minloc
2619 * iresolve.c (gfc_resolve_maxloc): Add back argument. If back is
2620 not of gfc_logical_4_kind, convert.
2621 (gfc_resolve_minloc): Likewise.
2622 * simplify.c (gfc_simplify_minloc): Add back argument.
2623 (gfc_simplify_maxloc): Likewise.
2624 * trans-intinsic.c (gfc_conv_intrinsic_minmaxloc): Rename last
2625 argument to %VAL to ensure passing by value.
2626 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_minmaxloc
2627 also for library calls.
2629 2018-01-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2632 * resolve.c (resolve_transfer): Delete code looking for 'DT'
2633 format specifiers in format strings. Set formatted to true if a
2634 format string or format label is present.
2635 * trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix
2638 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
2641 * dump-parse-tree.c (get_c_type_name): Remove extra line.
2642 Change for loop to use declaration in for loop. Handle BT_LOGICAL
2644 (write_decl): Add where argument. Fix indentation. Replace
2645 assert with error message. Add typename to warning
2647 (write_type): Adjust locus to call of write_decl.
2648 (write_variable): Likewise.
2649 (write_proc): Likewise. Replace assert with error message.
2651 2018-01-13 Paul Thomas <pault@gcc.gnu.org>
2654 * trans-expr.c (gfc_trans_scalar_assign): Flag is_alloc_lhs if
2655 the rhs expression is neither an elemental nor a conversion
2659 * trans-array.c (is_pointer_array): Remove unconditional return
2660 of false for -fopenmp.
2662 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
2666 * dump-parse-tree.c (write_proc): Always emit closing parenthesis
2669 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
2672 * resolve.c (resolve_allocate_expr): Check for NULL pointer.
2674 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
2677 * resolve.c (resolve_charlen): Check the type of cl->length
2680 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
2683 * trans-array.c (gfc_trans_array_ctor_element): Fix formatting.
2685 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
2688 * trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
2689 LHS type when assigning.
2691 2018-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
2694 * expr.c (gfc_is_simply_contiguous): Check for NULL pointer.
2696 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
2698 * match.c (gfc_match_allocate): Check for NULL pointer.
2700 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
2702 * expr.c (gfc_check_pointer_assign): Fix typo in comment.
2704 2018-01-08 Paul Thomas <pault@gcc.gnu.org>
2707 * decl.c (gfc_get_pdt_instance): If parameterized arrays have
2708 an initializer, convert the kind parameters and add to the
2709 component if the instance.
2710 * trans-array.c (structure_alloc_comps): Add 'is_pdt_type' and
2711 use it with case COPY_ALLOC_COMP. Call 'duplicate_allocatable'
2712 for parameterized arrays. Clean up typos in comments. Convert
2713 parameterized array initializers and copy into the array.
2714 * trans-expr.c (gfc_trans_scalar_assign): Do a deep copy for
2715 parameterized types.
2716 *trans-stmt.c (trans_associate_var): Deallocate associate vars
2717 as necessary, when they are PDT function results for example.
2720 * trans-array.c (structure_alloc_comps): Only compare len parms
2721 when they are declared explicitly.
2723 2018-01-06 Janne Blomqvist <jb@gcc.gnu.org>
2726 * trans-expr.c (gfc_trans_pointer_assignment): fold_convert rhs to
2729 2018-01-05 Janne Blomqvist <jb@gcc.gnu.org>
2733 * array.c (got_charlen): Use gfc_charlen_int_kind.
2734 * class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
2736 (find_intrinsic_vtab): Likewise.
2737 * decl.c (match_char_length): Use gfc_charlen_int_kind.
2738 (add_init_expr_to_sym): Use gfc_charlen_t and gfc_charlen_int_kind.
2739 (gfc_match_implicit): Use gfc_charlen_int_kind.
2740 * dump-parse-tree.c (show_char_const): Use gfc_charlen_t and size_t.
2741 (show_expr): Use HOST_WIDE_INT_PRINT_DEC.
2742 * expr.c (gfc_get_character_expr): Length parameter of type
2744 (gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
2745 (gfc_extract_hwi): New function.
2746 (simplify_const_ref): Make string_len of type gfc_charlen_t.
2747 (gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
2748 * frontend-passes.c (optimize_trim): Use gfc_charlen_int_kind.
2749 * gfortran.h (gfc_mpz_get_hwi): New prototype.
2750 (gfc_mpz_set_hwi): Likewise.
2751 (gfc_charlen_t): New typedef.
2752 (gfc_expr): Use gfc_charlen_t for character lengths.
2753 (gfc_size_kind): New extern variable.
2754 (gfc_extract_hwi): New prototype.
2755 (gfc_get_character_expr): Use gfc_charlen_t for character length.
2756 (gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
2757 * gfortran.texi: Update description of hidden string length argument.
2758 * iresolve.c (check_charlen_present): Use gfc_charlen_int_kind.
2759 (gfc_resolve_char_achar): Likewise.
2760 (gfc_resolve_repeat): Pass string length directly without
2761 temporary, use gfc_charlen_int_kind.
2762 (gfc_resolve_transfer): Use gfc_charlen_int_kind.
2763 * match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
2764 * misc.c (gfc_mpz_get_hwi): New function.
2765 (gfc_mpz_set_hwi): New function.
2766 * module.c (atom_int): Change type from int to HOST_WIDE_INT.
2767 (parse_integer): Don't complain about large integers.
2768 (write_atom): Use HOST_WIDE_INT for integers.
2769 (mio_integer): Handle integer type mismatch.
2770 (mio_hwi): New function.
2771 (mio_intrinsic_op): Use HOST_WIDE_INT.
2772 (mio_array_ref): Likewise.
2773 (mio_expr): Likewise.
2774 * primary.c (match_substring): Use gfc_charlen_int_kind.
2775 * resolve.c (resolve_substring_charlen): Use gfc_charlen_int_kind.
2776 (resolve_character_operator): Likewise.
2777 (resolve_assoc_var): Likewise.
2778 (resolve_select_type): Use HOST_WIDE_INT for charlen, use snprintf.
2779 (resolve_charlen): Use mpz_sgn to determine sign.
2780 * simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
2782 * symbol.c (generate_isocbinding_symbol): Use gfc_charlen_int_kind.
2783 * target-memory.c (size_character): Length argument of type
2785 (gfc_encode_character): Likewise.
2786 (gfc_interpret_character): Use gfc_charlen_t.
2787 * target-memory.h (gfc_encode_character): Modify prototype.
2788 * trans-array.c (gfc_trans_array_ctor_element): Use existing type.
2789 (get_array_ctor_var_strlen): Use gfc_conv_mpz_to_tree_type.
2790 (trans_array_constructor): Use existing type.
2791 (get_array_charlen): Likewise.
2792 * trans-const.c (gfc_conv_mpz_to_tree_type): New function.
2793 * trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
2794 * trans-decl.c (gfc_trans_deferred_vars): Use existing type.
2795 (add_argument_checking): Likewise.
2796 * trans-expr.c (gfc_class_len_or_zero_get): Build const of type
2797 gfc_charlen_type_node.
2798 (gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
2799 4, fold_convert to correct type.
2800 (gfc_conv_class_to_class): Build const of type size_type_node for
2802 (gfc_copy_class_to_class): Likewise.
2803 (gfc_conv_string_length): Use same type in expression.
2804 (gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
2805 (gfc_conv_string_tmp): Make sure len is of the right type.
2806 (gfc_conv_concat_op): Use same type in expression.
2807 (gfc_conv_procedure_call): Likewise.
2808 (fill_with_spaces): Comment out memset() block due to spurious
2809 -Wstringop-overflow warnings.
2810 (gfc_trans_string_copy): Use gfc_charlen_type_node.
2811 (alloc_scalar_allocatable_for_subcomponent_assignment):
2812 fold_convert to right type.
2813 (gfc_trans_subcomponent_assign): Likewise.
2814 (trans_class_vptr_len_assignment): Build const of correct type.
2815 (gfc_trans_pointer_assignment): Likewise.
2816 (alloc_scalar_allocatable_for_assignment): fold_convert to right
2818 (trans_class_assignment): Build const of correct type.
2819 * trans-intrinsic.c (gfc_conv_associated): Likewise.
2820 (gfc_conv_intrinsic_repeat): Do calculation in sizetype.
2821 * trans-io.c (gfc_build_io_library_fndecls): Use
2822 gfc_charlen_type_node for character lengths.
2823 (set_string): Convert to right type in assignment.
2824 * trans-stmt.c (gfc_trans_label_assign): Build const of
2825 gfc_charlen_type_node.
2826 (trans_associate_var): Likewise.
2827 (gfc_trans_character_select): Likewise.
2828 (gfc_trans_allocate): Likewise, don't typecast strlen result.
2829 (gfc_trans_deallocate): Don't typecast strlen result.
2830 * trans-types.c (gfc_size_kind): New variable.
2831 (gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
2832 from size_type_node.
2833 * trans-types.h: Fix comment.
2835 2018-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
2839 * check.c (gfc_check_eoshift): Check for string length and
2840 for conformance of boundary.
2841 * intrinsic.c (add_functions): Add gfc_simplify_eoshift.
2842 * intrinsic.h: Add prototype for gfc_simplify_eoshift.
2843 * simplify.c (gfc_simplify_eoshift): New function.
2845 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2846 Alan Hayward <alan.hayward@arm.com>
2847 David Sherwood <david.sherwood@arm.com>
2849 * trans-types.c (gfc_type_for_mode): Handle MODE_VECTOR_BOOL.
2851 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2852 Alan Hayward <alan.hayward@arm.com>
2853 David Sherwood <david.sherwood@arm.com>
2855 * trans-types.c (gfc_type_for_mode): Check valid_vector_subparts_p.
2857 2018-01-03 Thomas Koenig <tkoenig@gcc.gnu.org>
2860 * check.c (gfc_check_eoshift): Error for missing boundary if array
2861 is not one of the standard types.
2863 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2865 Update copyright years.
2867 * gfortranspec.c (lang_specific_driver): Update copyright notice
2869 * gfc-internals.texi: Bump @copying's copyright year.
2870 * gfortran.texi: Ditto.
2871 * intrinsic.texi: Ditto.
2872 * invoke.texi: Ditto.
2874 2017-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
2877 * intrinsic.c (add_function): Add gfc_simplify_maxloc and
2878 gfc_simplify_minloc to maxloc and minloc, respectively.
2879 * intrinsic.h: Add prototypes for gfc_simplify_minloc
2880 and gfc_simplify_maxloc.
2881 * simplify.c (min_max_chose): Adjust prototype. Modify function
2882 to have a return value which indicates if the extremum was found.
2883 (is_constant_array_expr): Fix typo in comment.
2884 (simplify_minmaxloc_to_scalar): New function.
2885 (simplify_minmaxloc_nodim): New function.
2886 (new_array): New function.
2887 (simplify_minmaxloc_to_array): New function.
2888 (gfc_simplify_minmaxloc): New function.
2889 (simplify_minloc): New function.
2890 (simplify_maxloc): New function.
2892 2018-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
2896 * simplify.c (gfc_simplify_cshift): Re-implement to allow full
2899 2018-01-01 Paul Thomas <pault@gcc.gnu.org>
2902 * resolve.c (resolve_fl_derived0): Add caf_token fields for
2903 allocatable and pointer scalars, when -fcoarray selected.
2904 * trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
2905 field as well as the backend_decl.
2906 (gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
2907 derived types that are not vtypes. Components with caf_token
2908 attribute are pvoid types. For a component requiring it, find
2909 the caf_token field and have the component token field point to
2913 *trans-types.c (gfc_get_array_descriptor_base): Add the token
2914 field to the descriptor even when codimen not set.
2916 Copyright (C) 2018 Free Software Foundation, Inc.
2918 Copying and distribution of this file, with or without modification,
2919 are permitted in any medium without royalty provided the copyright
2920 notice and this notice are preserved.
2923 * decl.c (var_element): Inquiry parameters cannit be data objects.
2925 2018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
2928 * expr.c (gfc_apply_init): Remove asserts that cannot trigger.
2929 Check for a NULL pointer.
2931 2018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
2934 * class.c (insert_component_ref): Check for NULL pointer and
2935 previous error message issued.
2936 * parse.c (parse_associate): Check for NULL pointer.
2937 * resolve.c (resolve_assoc_var): Check for NULL pointer.
2939 2018-12-07 Jakub Jelinek <jakub@redhat.com>
2942 * trans-openmp.c (gfc_omp_clause_default_ctor,
2943 gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
2944 gfc_omp_clause_linear_ctor, gfc_omp_clause_dtor): Only consider
2945 GFC_DECL_GET_SCALAR_ALLOCATABLE vars as scalar allocatables if they
2948 2018-12-03 Fritz Reese <fritzoreese@gmail.com>
2949 Mark Eggleston <mark.eggleston@codethink.co.uk>
2952 * options.c (SET_FLAG, SET_BITFLAG, SET_BITFLAG2): New macros.
2953 (set_dec_flags): Set/unset DEC and std flags according to value.
2954 (post_dec_flags, set_init_local_zero): New functions.
2955 (gfc_init_options): Use set_init_local_zero and post_dec_flags.
2956 (gfc_handle_options) <case OPT_fcheck_array_temporaries>: Use
2958 <case OPT_finit_local_zero>: Use set_init_local_zero.
2959 <case OPT_fdec>: Pass value to set_dec_flags.
2960 <case OPT_fdec_structure>: Remove.
2962 2018-11-30 Thomas Schwinge <thomas@codesourcery.com>
2964 * gfortran.h (struct gfc_omp_clauses): Remove "wait". Adjust all
2967 * openmp.c (gfc_match_omp_clauses): Support multiple OpenACC wait
2970 2018-11-27 Martin Liska <mliska@suse.cz>
2972 * decl.c (gfc_match_gcc_builtin): New function.
2973 * gfortran.h (struct vect_builtin_tuple): New.
2974 (gfc_adjust_builtins): Likewise.
2975 * lang-specs.h (TARGET_F951_OPTIONS): New.
2976 (F951_OPTIONS): Use it.
2977 * lang.opt: Add new option -fpre-include.
2978 * match.h (gfc_match_gcc_builtin): Declare new function.
2979 * parse.c (decode_gcc_attribute): Handle builtin.
2980 (parse_progunit): Call gfc_adjust_builtins.
2981 * scanner.c (gfc_new_file): Load pre-included header file
2983 * trans-intrinsic.c (add_simd_flag_for_built_in): New.
2984 (gfc_adjust_builtins): Likewise.
2986 2018-11-24 Paul Thomas <pault@gcc.gnu.org>
2989 * resolve.c (resolve_variable): Check for associate names with
2992 2018-11-23 Jakub Jelinek <jakub@redhat.com>
2994 * lang.opt (fpad-source): New option.
2995 * scanner.c (load_line): Don't pad fixed form lines if
2997 * invoke.texi (-fno-pad-source): Document.
2999 2018-11-21 Jakub Jelinek <jakub@redhat.com>
3001 * invoke.texi (-fdec-include): Document.
3003 2018-11-21 Jakub Jelinek <jakub@redhat.com>
3004 Mark Eggleston <mark.eggleston@codethink.com>
3006 * lang.opt (fdec-include): New option.
3007 * options.c (set_dec_flags): Set also flag_dec_include.
3008 * scanner.c (include_line): Change return type from bool to int.
3009 In fixed form allow spaces in between include keyword letters.
3010 For -fdec-include, allow in fixed form 0 in column 6. With
3011 -fdec-include return -1 if the parsed line is not full include
3012 statement and it could be successfully completed on continuation
3014 (include_stmt): New function.
3015 (load_file): Adjust include_line caller. If it returns -1, keep
3016 trying include_stmt until it stops returning -1 whenever adding
3017 further line of input.
3019 2018-11-18 Thomas Koenig <tkoenig@gcc.gnu.org>
3022 * frontend-passes.c (combine_array_constructor): Do not do
3023 anything if in a WHERE statement.
3025 2018-11-18 Thomas Koenig <tkoenig@gcc.gnu.org>
3028 * expr.c (gfc_check_assign): Reject assigning to an external
3030 (gfc_check_pointer_assign): Add suppress_type_test
3031 argument. Insert line after if. A non-proc pointer can not point
3032 to a constant. Only check types if suppress_type_test is false.
3033 * gfortran.h (gfc_check_pointer_assign): Add optional
3034 suppress_type_test argument.
3035 * resolve.c (gfc_resolve_code): Move up gfc_check_pointer_assign
3036 and give it the extra argument.
3037 (resolve_fl_procedure): Set error on value for a function with
3040 2018-11-15 David Malcolm <dmalcolm@redhat.com>
3043 * error.c (gfc_diagnostic_finalizer): Add diagnostic_t param.
3045 2018-11-13 David Malcolm <dmalcolm@redhat.com>
3047 * cpp.c: Replace "source_location" with "location_t".
3048 * gfortran.h: Likewise.
3050 2018-11-08 Jakub Jelinek <jakub@redhat.com>
3052 * trans-openmp.c (gfc_trans_omp_clauses): Use
3053 OMP_CLAUSE_DEFAULTMAP_SET_KIND.
3054 (gfc_trans_omp_atomic): Set OMP_ATOMIC_MEMORY_ORDER
3055 rather than OMP_ATOMIC_SEQ_CST.
3056 (gfc_trans_omp_taskgroup): Build OMP_TASKGROUP using
3057 make_node instead of build1_loc.
3058 * types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
3059 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
3060 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
3061 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
3062 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
3063 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
3064 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): Formatting fix.
3066 2018-11-02 Thomas Koenig <tkoenig@gcc.gnu.org>
3069 * decl.c (verify_bind_c_sym): Remove unnecessary space
3072 2018-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
3075 * frontend-passes.c (constant_string_length): If there is a
3076 substring with a length which cannot be reduced to a constant,
3079 2018-11-01 Paul Thomas <pault@gcc.gnu.org>
3082 * dependency.c (are_identical_variables): Return false if the
3083 inquiry refs are not the same.
3084 (gfc_ref_needs_temporary_p): Break on an inquiry ref.
3085 * dump_parse_tree.c (show_ref): Show the inquiry ref type.
3086 * expr.c (gfc_free_ref_list): Break on an inquiry ref.
3087 (gfc_copy_ref): Copy the inquiry ref types.
3088 (find_inquiry_ref): New function.
3089 (simplify_const_ref, simplify_ref_chain): Call it. Add new arg
3090 to simplify_ref_chain.
3091 (gfc_simplify_expr): Use the new arg in call to
3093 (gfc_get_full_arrayspec_from_expr, gfc_is_coarray): Break on
3095 (gfc_traverse_expr): Return true for inquiry ref.
3096 * frontend-passes.c (gfc_expr_walker): Break on inquiry ref.
3097 * gfortran.h : Add enums and union member in gfc_ref to
3098 implement inquiry refs.
3099 * intrinsic.c : Fix white nois.
3100 * match.c (gfc_match_assignment): A constant lavlue is an
3102 * module.c : Add DECL_MIO_NAME for inquiry_type and the mstring
3104 (mio_ref): Handle inquiry refs.
3105 * primary.c (is_inquiry_ref): New function.
3106 (gfc_match_varspec): Handle inquiry refs calling new function.
3107 (gfc_variable_attr): Detect inquiry ref for disambiguation
3109 (caf_variable_attr): Treat inquiry and substring refs in the
3111 * resolve.c (find_array_spec): ditto.
3112 (gfc_resolve_substring_charlen): If there is neither a charlen
3113 ref not an inquiry ref, return.
3114 (resolve_ref): Handle inqiry refs as appropriate.
3115 (resolve_allocate_expr): Entities with an inquiry ref cannot be
3117 * simplify.c (simplify_bound, simplify_cobound): Punt on
3119 * trans-array.c (get_array_ctor_var_strlen): Break on inquiry
3121 *trans-expr.c (conv_inquiry): New function.
3122 (gfc_conv_variable): Retain the last typespec to pass to
3123 conv_inquiry on detecting an inquiry ref.
3125 2018-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
3128 * decl.c (verify_bind_c_sym): Improve error message.
3130 2018-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
3133 * gfortran.texi (File format of unformatted sequential files):
3134 Replace random comma with period.
3135 * intrinsic.texi (Intrinsic Procedures): Add FINDLOC to menu.
3136 (FINDLOC): Document.
3137 (MAXLOC): Add refrence to FINDLOC.
3140 2018-10-31 Nathan Sidwell <nathan@acm.org>
3142 * cpp.c (gfc_cpp_init): Adjust cpp_force_token_locations call.
3144 2018-10-31 Martin Liska <mliska@suse.cz>
3146 * trans-decl.c (struct module_hasher): Call htab_hash_string
3147 for s->name and not for s.
3149 2018-10-30 Thomas Koenig <tkoenig@gcc.gnu.org>
3152 * simplify.c (simplify_min_max): Do not convert the type of the
3155 2017-10-28 Thomas Koenig <tkoenig@gcc.gnu.org>
3158 * gfortran.h (gfc_isym_id): Add GFC_ISYM_FINDLOC.
3159 (gfc_check_f): Add f6fl field.
3160 (gfc_simplify_f): Add f6 field.
3161 (gfc_resolve_f): Likewise.
3162 (gfc_type_letter): Add optional logical_equas_int flag.
3163 * check.c (intrinsic_type_check): New function.
3164 (gfc_check_findloc): New function.
3165 * intrinsics.c (gfc_type_letter): If logical_equals_int is
3166 set, act accordingly.
3167 (add_sym_5ml): Reformat comment.
3168 (add_sym_6fl): New function.
3169 (add_functions): Add findloc.
3170 (check_arglist): Add sixth argument, handle it.
3171 (resolve_intrinsic): Likewise.
3172 (check_specific): Handle findloc.
3173 * intrinsic.h (gfc_check_findloc): Add prototype.
3174 (gfc_simplify_findloc): Likewise.
3175 (gfc_resolve_findloc): Likewise.
3176 (MAX_INTRINSIC_ARGS): Adjust.
3177 * iresolve.c (gfc_resolve_findloc): New function.
3178 * simplify.c (gfc_simplify_minmaxloc): Make static.
3179 (simplify_findloc_to_scalar): New function.
3180 (simplify_findloc_nodim): New function.
3181 (simplify_findloc_to_array): New function.
3182 (gfc_simplify_findloc): New function.
3183 (gfc_conv_intrinsic_findloc): New function.
3184 (gfc_conv_intrinsic_function): Handle GFC_ISYM_FINDLOC.
3185 (gfc_is_intrinsic_libcall): Likewise.
3187 2018-10-27 Thomas Koenig <tkoenig@gcc.gnu.org>
3190 * frontend-passes.c (check_locus_code): Add information that
3191 warning about missing location information points to an
3192 inconsisten internal state.
3193 (check_locus_expr): Likewise.
3195 2018-10-25 Jakub Jelinek <jakub@redhat.com>
3198 * openmp.c (gfc_match_omp_clauses): Parse simd, monotonic and
3199 nonmonotonic modifiers regardless of if they have been parsed
3200 already or if the opposite one has. Fix up check whether
3201 comma after modifier should be parsed.
3202 (resolve_omp_clauses): Diagnose schedule modifier restrictions.
3204 2018-10-23 Paul Thomas <pault@gcc.gnu.org>
3207 * frontend-passes.c (get_len_call): New function to generate a
3208 call to intrinsic LEN.
3209 (create_var): Use this to make length expressions for variable
3211 Clean up some white space issues.
3213 2018-10-21 Paul Thomas <pault@gcc.gnu.org>
3216 * trans-expr.c (gfc_trans_pointer_assignment): Set the string
3217 length for array valued deferred length lhs.
3219 2018-10-18 Tobias Burnus <burnus@net-b.de>
3222 * trans-array.c (gfc_is_reallocatable_lhs): Detect allocatable
3225 2018-10-18 Paul Thomas <pault@gcc.gnu.org>
3228 * trans-stmt.c (trans_associate_var): All strings that return
3229 as pointer types can be assigned directly to the associate
3230 name so remove 'attr' and the condition that uses it.
3232 2018-10-18 Paul Thomas <pault@gcc.gnu.org>
3235 * trans-decl.c (gfc_get_symbol_decl): Deal correctly with the
3236 initialization with NULL() of a deferred length pointer.
3238 2018-10-17 Tobias Burnus <burnus@net-b.de>
3241 * resolve.c (resolve_select_type): Use correct variable.
3243 2018-10-17 David Malcolm <dmalcolm@redhat.com>
3245 * Make-lang.in (selftest-fortran): New.
3247 2018-10-17 Paul Thomas <pault@gcc.gnu.org>
3254 * resolve.c (resolve_variable): Fix up expressions with array
3255 associate names, where the parser did not detect that this is
3256 array and there was no array part_ref in the expression.
3258 2018-10-16 Tobias Burnus <burnus@net-b.de>
3261 * trans-array.c (gfc_array_init_size, gfc_array_allocate):
3262 Rename argument e3_is_array_constr to e3_has_nodescriptor
3263 and update comments.
3264 * trans-stmt.c (gfc_trans_allocate): Also fix lower bound
3265 to 1 for nonalloc/nonpointer func results/vars besides
3268 2018-10-16 Tobias Burnus <burnus@net-b.de>
3271 * trans-stmt.c (form_team, change_team, sync_team):
3272 Don't ignore argse.pre/argse.post.
3274 2018-10-15 Paul Thomas <pault@gcc.gnu.org>
3275 Tobias Burnus <burnus@gcc.gnu.org>
3278 * resolve.c (resolve_assoc_var): Add missing array spec for
3279 class associate names.
3280 (resolve_select_type): Handle case where last typed component
3281 of the selector has a different type to the expression.
3282 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Replace
3283 call to gfc_expr_to_initialize with call to gfc_copy_expr.
3284 (gfc_conv_class_to_class): Guard assignment to 'len' field
3285 against case where zero constant is supplied.
3287 2018-10-12 Tobias Burnus <burnus@net-b.de>
3290 * expr.c (gfc_simplify_expr): Avoid simplifying
3291 the 'array' argument to lbound/ubound/lcobound/
3294 2018-10-12 Tobias Burnus <burnus@net-b.de>
3297 * decl.c (get_proc_name): Return with error before
3300 2018-10-11 Tobias Burnus <burnus@net-b.de>
3303 2018-10-09 Tobias Burnus <burnus@net-b.de>
3306 * resolve.c (resolve_ref): Reject nonscalar
3307 substring references.
3309 2018-10-09 David Malcolm <dmalcolm@redhat.com>
3311 * cpp.c (gfc_cpp_init_0): Update for renamings.
3312 (cb_cpp_error): Rename to...
3313 (cb_cpp_diagnostic): ...this, converting level and reason to
3316 2018-10-09 Tobias Burnus <burnus@net-b.de>
3319 * resolve.c (resolve_ref): Reject nonscalar
3320 substring references.
3322 2018-10-09 Paul Thomas <pault@gcc.gnu.org>
3325 * trans-array.c (gfc_get_array_span): Deal with deferred char
3326 array components having a TYPE_MAX_VALUE of zero.
3327 (gfc_array_init_size): Use the hidden string length component
3328 to build the descriptor dtype.
3329 (gfc_array_allocate): Remove the erroneous replacement of the
3330 charlen backend decl with a temporary.
3331 (gfc_conv_expr_descriptor): Use the ss_info string length in
3332 the case of deferred character components.
3333 (gfc_alloc_allocatable_for_assignment): Actually compare the
3334 string lengths for deferred characters. Make sure that kind > 1
3335 is handled correctly. Set the span field of the descriptor.
3336 * trans-intrinsic.c (gfc_conv_intrinsic_len): Remove the stupid
3340 * trans-array.c (gfc_array_allocate): Set the span field for
3341 variable length character arrays.
3343 2018-10-08 Cesar Philippidis <cesar@codesourcery.com>
3345 * expr.c (gfc_check_pointer_assign): Demote "Assignment to
3346 contiguous pointer from non-contiguous target" to a warning.
3348 2018-10-08 Paul Thomas <pault@gcc.gnu.org>
3351 * trans-stmt.c (trans_associate_var): Character associate names
3352 with variable string length do not have to be deferred length
3353 for the string length to be set, if variable.
3355 2018-10-06 Thomas Koenig <tkoenig@gcc.gnu.org>
3358 * gfortran.h (enum arith): Add ARITH_WRONGCONCAT.
3359 * arith.h (gfc_arith_error): Issue error for ARITH_WRONGCONCAT.
3360 (gfc_arith_concat): If the types of op1 and op2 are not
3361 character of if their kinds do not match, issue ARITH_WRONGCONCAT.
3363 2018-10-06 Paul Thomas <pault@gcc.gnu.org>
3366 * resolve.c (resolve_fl_procedure): Include class functions in
3367 the test that elemental function results be scalar.
3369 2018-10-06 Thomas Koenig <tkoenig@gcc.gnu.org>
3372 * simplify.c (gfc_simplify_cshift): Extend size of hs_ex and ss_ex
3373 by one. Set extents one past the array boundaries to zero to avoid
3374 warning with instrumented compiler.
3375 (gfc_simplify_eoshift): Likewise, only for ss_ex.
3377 2018-10-05 Paul Thomas <pault@gcc.gnu.org>
3380 * trans-decl.c (gfc_get_symbol_decl): Make sure that deferred
3381 character length pointer initializer has the right type to fix
3382 problem with deferred_character_24.f90 on big endian.
3384 2018-10-03 Jeff Law <law@redhat.comg>
3386 * trans-types.c (get_typenode_from_name): Moved into gcc/tree.c.
3388 2018-10-01 Paul Thomas <pault@gcc.gnu.org>
3391 * trans-expr.c (gfc_trans_assignment_1): Set the 'identical'
3392 flag in the call to gfc_check_dependency.
3394 2018-09-30 Paul Thomas <pault@gcc.gnu.org>
3397 * trans-array.c (gfc_is_reallocatable_lhs): Correct the problem
3398 introduced by r264358, which prevented components of associate
3399 names from being reallocated on assignment.
3401 2018-09-30 Paul Thomas <pault@gcc.gnu.org>
3405 * trans-array.c (gfc_conv_scalarized_array_ref): If this is a
3406 deferred type and the info->descriptor is present, use the
3408 (gfc_conv_array_ref): Is the se expr is a descriptor type, pass
3409 it as 'decl' rather than the symbol backend_decl.
3410 (gfc_array_allocate): If the se string_length is a component
3411 reference, fix it and use it for the expression string length
3412 if the latter is not a variable type. If it is a variable do
3413 an assignment. Make use of component ref string lengths to set
3414 the descriptor 'span'.
3415 (gfc_conv_expr_descriptor): For pointer assignment, do not set
3416 the span field if gfc_get_array_span returns zero.
3417 * trans.c (get_array_span): If the upper bound a character type
3418 is zero, use the descriptor span if available.
3420 2018-09-30 Paul Thomas <pault@gcc.gnu.org>
3423 * trans-decl.c (gfc_get_symbol_decl): A deferred character
3424 length pointer that is initialized needs the string length to
3425 be initialized as well.
3427 2018-09-29 Paul Thomas <pault@gcc.gnu.org>
3430 * trans-expr.c (gfc_trans_assignment_1): If there is dependency
3431 fix the rse stringlength.
3433 2018-09-25 Martin Liska <mliska@suse.cz>
3436 * decl.c (add_hidden_procptr_result): Simplify condition
3437 as we are in branch witch 'case1 || case2'.
3439 2018-09-25 Martin Liska <mliska@suse.cz>
3441 * trans.c (remove_suffix): Remove
3444 2018-09-24 Thomas Koenig <tkoenig@gcc.gnu.org>
3447 * gfc_conv_procedure_call: Do not add clobber on INTENT(OUT)
3448 for variables in an associate statement.
3450 2018-09-24 Bernhard Reuther-Fischer <aldot@gcc.gnu.org>
3451 Cesar Philippidis <cesar@codesourcery.com>
3453 * openmp.c (resolve_oacc_loop_blocks):
3455 2018-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
3458 * gfc_conv_procedure_call: Do not add clobber on INTENT(OUT)
3459 for variables having the dimension attribute.
3461 2018-09-23 Janne Blomqvist <jb@gcc.gnu.org>
3463 * trans-expr.c (gfc_caf_get_image_index): Do array index
3464 calculations in gfc_array_index_type.
3465 * trans-intrinsic.c (conv_intrinsic_event_query): Likewise.
3466 * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
3467 (gfc_trans_event_post_wait): Likewise.
3469 2018-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
3472 * gfc_conv_procedure_call: Reformat comments slightly. Do not add
3473 clobber on INTENT(OUT) for saved variables.
3475 2018-09-22 Thomas Koenig <tkoenig@gcc.gnu.org>
3478 * trans.h (gfc_conv_expr_reference): Add optional argument
3479 add_clobber to prototype.
3480 (gfc_conv_procedure_call): Set add_clobber argument to
3481 gfc_conv_procedure_reference to true for scalar, INTENT(OUT),
3482 non-pointer, non-allocatable, non-dummy variables whose type
3483 is neither BT_CHARACTER, BT_DERIVED or BT_CLASS, but only if
3484 the procedure is not elemental.
3485 * trans-expr.c (gfc_conv_procedure_reference): Add clobber
3486 statement before call if add_clobber is set.
3488 2018-09-22 Paul Thomas <pault@gcc.gnu.org>
3491 * trans-array.c (gfc_alloc_allocatable_for_assignment): Test
3492 the charlen backend_decl before using the VAR_P macro.
3494 2018-09-21 Paul Thomas <pault@gcc.gnu.org>
3497 * trans-array.c (gfc_alloc_allocatable_for_assignment): If the
3498 rhs has a charlen expression, convert that and use it.
3499 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
3500 assignment of deferred character array vars to a realocatable
3501 lhs should not be added to the exterior block since vector
3502 indices, for example, generate temporaries indexed within the
3505 2018-09-21 Paul Thomas <pault@gcc.gnu.org>
3508 * trans-stmt.c (gfc_trans_allocate): Don't deallocate alloc
3509 components if must_finalize is set for expr3.
3511 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
3512 Kwok Cheung Yeung <kcy@codesourcery.com>
3514 * trans-expr.c (gfc_trans_structure_assign): Ensure that the first
3515 argument of a call to _gfortran_caf_register is of size_type_node.
3516 * trans-intrinsic.c (conv_intrinsic_event_query): Convert computed
3517 index to a size_type_node type.
3518 * trans-stmt.c (gfc_trans_event_post_wait): Likewise.
3520 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
3522 * gfortranspec.c (lang_specific_driver): Handle -r like -nostdlib.
3524 2018-09-20 Janus Weil <janus@gcc.gnu.org>
3526 * gfortran.h (gfc_str_startswith): New macro.
3527 * decl.c (variable_decl, gfc_match_end): Use it.
3528 * iresolve.c (is_trig_resolved): Ditto.
3529 * module.c (load_omp_udrs, read_module): Ditto.
3530 * options.c (gfc_handle_runtime_check_option): Ditto.
3531 * primary.c (match_arg_list_function): Ditto.
3532 * trans-decl.c (gfc_get_symbol_decl): Ditto.
3533 * trans-expr.c (gfc_conv_procedure_call): Ditto.
3534 * interface.c (dtio_op): Replace strncmp by strcmp.
3535 * resolve.c (resolve_actual_arglist, resolve_function): Ditto.
3536 * trans-expr.c (conv_arglist_function): Ditto.
3537 * trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Replace macro
3538 STARTS_WITH by gfc_str_startswith.
3540 2018-09-20 Cesar Philippidis <cesar@codesourcery.com>
3542 * dump-parse-tree.c (show_omp_clauses): Add missing omp list_types
3543 and reorder the switch cases to match the enum in gfortran.h.
3545 2018-09-19 Paul Thomas <pault@gcc.gnu.org>
3548 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
3549 assignment of deferred character intrinsic elemental function
3550 results to a realocatable lhs must not be added to the exterior
3551 block if they are array valued but must go to the loop body.
3553 2018-09-18 Thomas Koenig <tkoenig@gcc.gnu.org>
3556 * gfortran.h (gfc_expr): Add external_blas flag.
3557 * frontend-passes.c (matrix_case): Add case A2TB2T.
3558 (optimize_namespace): Handle flag_external_blas by
3559 calling call_external_blas.
3560 (get_array_inq_function): Add argument okind. If
3561 it is nonzero, use it as the kind of argument
3563 (inline_limit_check): Remove m_case argument, add
3564 limit argument instead. Remove assert about m_case.
3565 Set the limit for inlining from the limit argument.
3566 (matmul_lhs_realloc): Handle case A2TB2T.
3567 (inline_matmul_assign): Handle inline limit for other cases with
3568 two rank-two matrices. Remove no-op calls to inline_limit_check.
3569 (call_external_blas): New function.
3570 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Do not add
3571 argument to external BLAS if external_blas is already set.
3573 2018-09-18 Paul Thomas <pault@gcc.gnu.org>
3576 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
3577 assignment of deferred character elemental function results to
3578 a realocatable lhs must not be added to the exterior block but
3579 must go to the loop body.
3581 2018-09-18 Paul Thomas <pault@gcc.gnu.org>
3584 * trans-array.c (gfc_get_array_span): Try to get the element
3585 length of incomplete types. Return NULL_TREE otherwise.
3586 (gfc_conv_expr_descriptor): Only set the 'span' field if the
3587 above does not return NULL_TREE. Set 'span' field if possible
3588 for all new descriptors.
3590 2018-09-17 Paul Thomas <pault@gcc.gnu.org>
3593 * trans-decl.c (gfc_get_symbol_decl): Flag allocatable, scalar
3594 characters with a variable length expression for deferred init.
3595 (gfc_trans_deferred_vars): Perform the assignment for these
3596 symbols by calling gfc_conv_string_length.
3598 2018-09-17 Paul Thomas <pault@gcc.gnu.org>
3601 * resolve.c (resolve_assoc_var): If the target expression is a
3602 deferred charlen dummy and the associate name shares the
3603 charlen, generate a new one. Make sure that new charlens are in
3604 the namespace list so that they get cleaned up.
3605 * trans-array.c (gfc_is_reallocatable_lhs): Associate names are
3607 * trans-decl.c (gfc_get_symbol_decl): Put deferred character
3608 length dummy and result arrays on the deferred initialization
3609 list so that the variable length arrays can be correctly dealt
3611 * trans-expr.c (gfc_conv_string_length): Return if 'expr' is
3612 NULL rather than ICEing..
3614 2018-09-16 Janus Weil <janus@gcc.gnu.org>
3618 * match.c (gfc_match_assignment): For a polymorphic assignment,
3619 make sure that the vtab for the rhs type is generated.
3621 2018-09-16 Thomas Koenig <tkoenig@gcc.gnu.org>
3624 * frontend-passes.c (B_ERROR): New macro for matmul bounds
3625 checking error messages.
3626 (C_ERROR): Likewise.
3627 (inline_matmul_assign): Reorganize bounds checking, use B_ERROR
3630 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
3632 * trans-array.c (gfc_conv_array_initializer): Remove excess precision
3633 from overlength string initializers.
3635 2018-09-12 Paul Thomas <pault@gcc.gnu.org>
3638 * trans-expr.c (gfc_trans_class_init_assign): Access to
3639 to array elements of the dynamic type requires that the array
3640 reference be added to the class expression and not the _data
3641 component, unlike scalar expressions.
3643 2018-09-11 Janus Weil <janus@gcc.gnu.org>
3646 * resolve.c (resolve_fl_derived): If a type has the 'use_assoc'
3647 attribute, then it was declared in another module, so there should be
3648 no error that it has not been declared.
3650 2018-09-11 Paul Thomas <pault@gcc.gnu.org>
3653 * expr.c (is_subref_array): Add the check of dimensionality for
3654 class, dummy, pointer arrays.
3656 2018-09-11 Janus Weil <janus@gcc.gnu.org>
3659 * expr.c (gfc_is_simply_contiguous): Handle type-bound procedure calls
3660 with non-polymorphic objects.
3662 2018-09-10 Janus Weil <janus@gcc.gnu.org>
3665 * decl.c (match_binding_attributes): Use correct default accessibility
3666 for procedure pointer components.
3668 2018-09-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3670 * simplify.c (gfc_simplify_modulo): Re-arrange code to test whether
3671 'P' is zero and issue an error if it is.
3673 2018-08-31 Paul Thomas <pault@gcc.gnu.org>
3677 * trans-array.c (gfc_conv_scalarized_array_ref): Do not fix
3678 info->descriptor but pass it directly to gfc_build_array_ref.
3679 (gfc_conv_array_ref): Likewise for se->expr.
3680 * trans.c (gfc_build_array_ref): If 'decl' is a COMPONENT_REF
3681 obtain the span field directly from it.
3683 2017-08-28 Paul Thomas <pault@gcc.gnu.org>
3686 * trans-expr.c (gfc_conv_procedure_call): Allocatable class
3687 scalar results being passed to a derived type formal argument
3688 are finalized if possible. Otherwise, rely on existing code for
3689 deallocation. Make the deallocation of allocatable result
3690 components conditional on finalization not taking place. Make
3691 the freeing of data components after finalization conditional
3692 on the data being NULL.
3693 (gfc_trans_arrayfunc_assign): Change the gcc_assert to a
3694 condition to return NULL_TREE.
3695 (gfc_trans_assignment_1): If the assignment is class to class
3696 and the rhs expression must be finalized but the assignment
3697 is not marked as a polymorphic assignment, use the vptr copy
3698 function instead of gfc_trans_scalar_assign.
3701 * trans-expr.c (gfc_conv_expr_reference): Do not add the post
3702 block to the pre block if the expression is to be finalized.
3703 * trans-stmt.c (gfc_trans_allocate): If the expr3 must be
3704 finalized, load the post block into a finalization block and
3705 add it right at the end of the allocation block.
3707 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3710 * error.c (gfc_format_decoder): Update for conversion of
3711 show_caret_p to a tri-state.
3713 2018-08-25 Janus Weil <janus@gcc.gnu.org>
3716 * resolve.c (resolve_transfer): Correctly determine typespec for
3717 generic function calls, in order to throw a proper error.
3719 2018-08-24 Thomas Koenig <tkoenig@gcc.gnu.org>
3722 * frontend-passes.c (var_in_expr_callback): New function.
3723 (var_in_expr): New function.
3724 (traverse_io_block): Use var_in_expr instead of
3725 gfc_check_dependency for checking if the variable depends on the
3726 previous interators.
3728 2018-08-23 Janne Blomqvist <blomqvist.janne@gmail.com>
3730 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Delete
3731 HONOR_SIGNED_ZEROS checks.
3733 2018-08-23 Paul Thomas <pault@gcc.gnu.org>
3736 * resolve.c (resolve_typebound_call): If the TBP is not marked
3737 as a subroutine, check the specific symbol.
3739 2018-08-22 Thomas Koenig <tkoenig@gcc.gnu.org>
3741 * gfortran.texi: Mention that asynchronous I/O does
3742 not work on systems which lack condition variables, such
3745 2018-08-22 Janus Weil <janus@gcc.gnu.org>
3748 * match.c (gfc_match_associate): Improve diagnostics for the ASSOCIATE
3751 2018-08-22 Andrew Benson <abensonca@gmail.com>
3753 * module.c (load_generic_interfaces): Move call to find_symbol()
3754 so that only occurs if actually needed.
3756 2018-08-22 Janus Weil <janus@gcc.gnu.org>
3759 * decl.c (gfc_match_data_decl): Allow allocatable components of
3760 indirectly recursive type.
3761 * resolve.c (resolve_component): Remove two errors messages ...
3762 (resolve_fl_derived): ... and replace them by a new one.
3764 2018-08-21 Janne Blomqvist <jb@gcc.gnu.org>
3766 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Use
3767 MAX_EXPR/MIN_EXPR unconditionally for real arguments.
3768 * gfortran.texi (Compiler Characteristics): Document MAX/MIN
3771 2018-08-21 Nicolas Koenig <koenigni@gcc.gnu.org>
3772 Thomas Koenig <tkoenig@gcc.gnu.org>
3775 * gfortran.texi: Add description of asynchronous I/O.
3776 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
3778 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
3779 st_wait_async and change argument spec from ".X" to ".w".
3780 (gfc_trans_wait): Pass ID argument via reference.
3782 2018-08-16 Nathan Sidwell <nathan@acm.org>
3784 * cpp.c (dump_macro): Use cpp_user_macro_p.
3786 2018-08-14 Janus Weil <janus@gcc.gnu.org>
3789 * interface.c (compare_type): Remove a CLASS/TYPE check.
3790 (compare_type_characteristics): New function that behaves like the old
3792 (gfc_check_dummy_characteristics, gfc_check_result_characteristics):
3793 Call 'compare_type_characteristics' instead of 'compare_type'.
3795 2018-08-12 Paul Thomas <pault@gcc.gnu.org>
3798 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Class array
3799 elements are returned as references to the data element. Get
3800 the class expression by stripping back the references. Use this
3801 for the element size.
3803 2018-08-12 Paul Thomas <pault@gcc.gnu.org>
3806 * resolve.c (resolve_fl_variable_derived): Check if the derived
3807 type is use associated before checking for the host association
3810 2018-08-10 Janus Weil <janus@gcc.gnu.org>
3813 * invoke.texi (frontend-optimize): Mention short-circuiting.
3814 * options.c (gfc_post_options): Disable -ffrontend-optimize with -Og.
3815 * resolve.c (resolve_operator): Warn about short-circuiting only with
3816 -ffrontend-optimize.
3817 * trans-expr.c (gfc_conv_expr_op): Use short-circuiting operators only
3818 with -ffrontend-optimize. Without that flag, make sure that both
3819 operands are evaluated.
3821 2018-08-08 Nathan Sidwell <nathan@acm.org>
3823 * cpp.c (cb_file_change): Use linemap_included_from.
3825 2018-08-07 Cesar Philippidis <cesar@codesourcery.com>
3827 * trans-stmt.h: Remove stale reference to trans-openacc.c.
3829 2018-08-04 Janus Weil <janus@gcc.gnu.org>
3832 * interface.c (gfc_compare_interfaces): Apply additional
3833 distinguishability criteria of F08 to operator interfaces.
3835 2018-07-31 Andre Vieira <andre.simoesdiasvieira@arm.com>
3837 Revert 'AsyncI/O patch committed'
3838 2018-07-25 Nicolas Koenig <koenigni@gcc.gnu.org>
3839 Thomas Koenig <tkoenig@gcc.gnu.org>
3842 * gfortran.texi: Add description of asynchronous I/O.
3843 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
3845 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
3846 st_wait_async and change argument spec from ".X" to ".w".
3847 (gfc_trans_wait): Pass ID argument via reference.
3849 2018-07-25 Nicolas Koenig <koenigni@gcc.gnu.org>
3850 Thomas Koenig <tkoenig@gcc.gnu.org>
3853 * gfortran.texi: Add description of asynchronous I/O.
3854 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
3856 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
3857 st_wait_async and change argument spec from ".X" to ".w".
3858 (gfc_trans_wait): Pass ID argument via reference.
3860 2018-07-20 Martin Sebor <msebor@redhat.com>
3863 * gfortran.h (gfc_handle_option): Change function argument
3865 * options.c (gfc_handle_option): Same.
3867 2018-07-20 Andrew Benson <abenson@carnegiescience.edu>
3869 * gfortran.h (gfc_symbol): Add pointer to next derived type.
3870 (gfc_dt_list, gfc_get_dt_list): Remove.
3871 (gfc_namespace): Replace gfc_dt_list with gfc_symbol.
3872 * parse.c (resolve_all_program_units): Replace gfc_free_dt_list() with
3873 simple nullification of gfc_derived_types.
3874 * resolve.c (resolve_global_procedure): Replace gfc_dt_list with
3876 (add_dt_to_dt_list): Change derived type linked list insertion to
3877 utilize dt_next pointers in gfc_symbol.
3878 * symbol.c (gfc_new_symbol, gfc_free_dt_list, gfc_symbol_done2)
3879 (get_iso_c_binding_dt, generate_isocbinding_symbol): Remove
3880 gfc_free_dt_list as gfc_dt_list is obsoleted. Change derived type
3881 linked list search/insertion to utilize dt_next pointers in gfc_symbol.
3882 * trans-types.c (gfc_get_derived_type): Change derived type linked
3883 list search to utilize dt_next pointers in gfc_symbol.
3885 2018-07-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3887 * trans-intrinsic.c: (gfc_conv_intrinsic_minmax): Emit MIN_MAX_EXPR
3888 or IFN_FMIN/FMAX sequence to calculate the min/max when possible.
3890 2018-07-18 Janus Weil <janus@gcc.gnu.org>
3891 Thomas Koenig <tkoenig@gcc.gnu.org>
3894 * dump-parse-tree.c (show_attr): Add handling of implicit_pure.
3895 * frontend-passes.c (do_warn_function_elimination): Do not warn for
3897 * gfortran.h: Add prototypes for gfc_pure_function and
3898 gfc_implicit_pure_function.
3899 * gfortran.texi: Add chapter on evaluation of logical expressions.
3900 * invoke.texi: Mention that -Wfunction-elimination is implied
3902 * lang.opt: Make -Wextra imply -Wfunction-elimination.
3903 * resolve.c (pure_function): Rename to gfc_pure_function.
3904 (gfc_implicit_pure_function): New function.
3905 (check_pure_function): Use it here.
3906 (impure_function_callback): New function.
3907 (resolve_operator): Call it via gfc_expr_walker.
3909 2018-07-16 Fritz Reese <fritzoreese@gmail.com>
3912 * decl.c (match_old_style_init): Initialize locus of variable expr when
3913 creating a data variable.
3914 (match_clist_expr): Verify array is explicit shape/size before
3915 attempting to allocate constant array constructor.
3917 2018-07-16 Fritz Reese <fritzoreese@gmail.com>
3920 * module.c (mio_component): Set component->loc when loading from module.
3922 2018-07-10 Jakub Jelinek <jakub@redhat.com>
3925 * module.c (omp_declare_simd_clauses): Add LINEAR with _REF, _VAL and
3927 (mio_omp_declare_simd): Save and restore ref, val and uval modifiers
3928 on linear clauses. Initialize n->where to gfc_current_locus.
3930 2018-07-05 Paul Thomas <pault@gcc.gnu.org>
3933 * resolve.c.c (resolve_contained_fntype): Reference to C418 is
3934 in F2008 and not F2003.
3935 (resolve_function): Ditto in error message. Also, exclude
3936 deferred character length results from the error.
3938 2018-07-05 Fritz Reese <fritzoreese@gmail.com>
3942 * expr.c (class_allocatable, class_pointer, comp_allocatable,
3943 comp_pointer): New helpers.
3944 (component_initializer): Generate EXPR_NULL for allocatable or pointer
3945 components. Do not generate initializers for components within BT_CLASS.
3946 Do not assign to comp->initializer.
3947 (gfc_generate_initializer): Use new helpers; move code to generate
3948 EXPR_NULL for class allocatable components into component_initializer().
3950 2018-07-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3953 * trans-decl.c (gfc_process_block_locals): Delete assert and set
3954 saved_local_decls = NULL_TREE.
3956 2018-07-02 Richard Biener <rguenther@suse.de>
3959 * trans-types.c (gfc_get_array_type_bounds): Unshare TYPE_FIELDs
3960 for the distinct type copy.
3962 2018-07-02 Paul Thomas <pault@gcc.gnu.org>
3966 * trans-array.c (structure_alloc_comps): Do not explicitly copy
3967 procedure pointer components.
3969 2018-07-02 Paul Thomas <pault@gcc.gnu.org>
3972 * expr.c : Add a prototype for scalarize_intrinsic_call.
3973 (gfc_simplify_expr): Use scalarize_intrinsic_call for elemental
3974 intrinsic function calls.
3975 (scalarize_intrinsic_call): Add 'init_flag' argument. Check if
3976 the expression or any of the actual argument expressions are
3977 NULL. Before calling gfc_check_init_expr, check 'init_flag'.
3978 Only simplify the scalarized expressions if there are no errors
3980 (gfc_check_init_expr): Set 'init_flag' true in the call to
3981 scalarize_intrinsic_call.
3983 2018-06-28 Fritz Reese <fritzoreese@gmail.com>
3986 * decl.c (gfc_match_type): Refactor and check for PDT declarations.
3988 2018-06-28 Martin Liska <mliska@suse.cz>
3990 * gfortranspec.c: Include opt-suggestions.h.
3992 2018-06-25 Fritz Reese <fritzoreese@gmail.com>
3997 * expr.c (component_initializer): Assign init expr to c->initializer.
3998 (generate_isocbinding_initializer): New.
3999 (gfc_generate_initializer): Call generate_isocbinding_initializer to
4000 generate initializers for c_ptr and c_funptr with -finit-derived.
4002 2018-06-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4005 * interface.c (check_dtio_interface1): Delete assert.
4007 2018-06-22 Paul Thomas <pault@gcc.gnu.org>
4008 Rainer Orth <ro@gcc.gnu.org>
4011 * resolve.c (resolve_contained_fntype): Check for the charlen
4012 before testing the length.
4014 2018-06-21 Paul Thomas <pault@gcc.gnu.org>
4017 * resolve.c (resolve_contained_fntype): Change standard ref.
4018 from F95 to F2003: C418. Correct a spelling error in a comment.
4019 It is an error for an abstract interface to have an assumed
4020 character length result.
4021 * trans-expr.c (gfc_conv_procedure_call): Likewise change the
4024 2018-06-21 Paul Thomas <pault@gcc.gnu.org>
4027 * resolve.c (resolve_ordinary_assign): Force the creation of a
4028 vtable for assignment of non-polymorphic expressions to an
4029 unlimited polymorphic object.
4030 * trans-array.c (gfc_alloc_allocatable_for_assignment): Use the
4031 size of the rhs type for such assignments. Set the dtype, _len
4032 and vptrs appropriately.
4033 * trans-expr.c (gfc_trans_assignment): Force the use of the
4034 _copy function for these assignments.
4036 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4037 Thomas Schwinge <thomas@codesourcery.com>
4038 Cesar Philippidis <cesar@codesourcery.com>
4040 * gfortran.h (gfc_omp_clauses): Add unsigned if_present, finalize
4042 * openmp.c (enum omp_mask2): Remove OMP_CLAUSE_PRESENT_OR_*. Add
4043 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4044 (gfc_match_omp_clauses): Update handling of copy, copyin, copyout,
4045 create, deviceptr, present_of_*. Add support for finalize and
4047 (OACC_PARALLEL_CLAUSES): Remove PRESENT_OR_* clauses.
4048 (OACC_KERNELS_CLAUSES): Likewise.
4049 (OACC_DATA_CLAUSES): Likewise.
4050 (OACC_DECLARE_CLAUSES): Likewise.
4051 (OACC_UPDATE_CLAUSES): Add IF_PRESENT clause.
4052 (OACC_ENTER_DATA_CLAUSES): Remove PRESENT_OR_* clauses.
4053 (OACC_EXIT_DATA_CLAUSES): Add FINALIZE clause.
4054 (gfc_match_oacc_declare): Update to OpenACC 2.5 semantics.
4055 * trans-openmp.c (gfc_trans_omp_clauses): Add support for IF_PRESENT
4058 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
4060 * trans-decl.c (gfc_get_fake_result_decl): Revert latest change.
4062 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
4064 * trans-decl.c (nonlocal_dummy_decl_pset): Delete.
4065 (nonlocal_dummy_decls): Likewise.
4066 (gfc_nonlocal_dummy_array_decl): Likewise.
4067 (gfc_get_symbol_decl): Do not call gfc_nonlocal_dummy_array_decl.
4068 (gfc_get_fake_result_decl): Do not generate a new DECL if simply
4069 reusing the result of a recursive call.
4070 (gfc_generate_function_code): Do not create, insert and destroy
4071 nonlocal_dummy_decls.
4073 2018-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
4076 * array.c (gfc_resolve_character_array_constructor): Avoid NULL
4077 pointer dereference.
4079 2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
4082 * parse.c (decode_oacc_directive): Set gfc_matching_function
4084 (decode_omp_directive): Likewise.
4086 2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
4089 * openmp.c (gfc_match_oacc_wait): Use %C to report error location.
4091 2018-06-12 David Malcolm <dmalcolm@redhat.com>
4094 * misc.c (gfc_closest_fuzzy_match): Update for renaming of
4095 levenshtein_distance to get_edit_distance.
4097 2018-06-12 Steven G. Kargl <kargl@gcc.gnu.org>
4100 * expr.c (gfc_check_assign): Select non-NULL locus.
4102 2018-06-11 Janus Weil <janus@gcc.gnu.org>
4105 * interface.c (compare_ptr_alloc): New function.
4106 (generic_correspondence): Call it.
4108 2018-06-10 Thomas Koenig <tkoenig@gcc.gnu.org>
4110 * gfortran.h (gfc_expr): Add no_bounds_check field.
4111 * frontend-passes.c (get_array_inq_function): Set no_bounds_check
4112 on function and function argument.
4113 (inline_matmul_assign): Set no_bounds_check on zero expression
4114 and on lhs of zero expression.
4115 Also handle A1B2 case if realloc on assigment is active.
4116 * trans-array.c (gfc_conv_array_ref): Don't do range checking
4117 if expr has no_bounds_check set.
4118 (gfc_conv_expr_descriptor): Set no_bounds_check on ss if expr
4120 * trans-expr.c (gfc_trans_assignment_1): Set no_bounds_check
4121 on lss and lss if the corresponding expressions have it set.
4123 2018-06-10 Dominique d'Humieres <dominiq@gcc.gnu.org>
4126 * trans-const.c: Remove include "diagnostic-core.h".
4127 (gfc_conv_constant_to_tree): Replace fatal_error with gcc_unreachable.
4129 2018-06-10 Janus Weil <janus@gcc.gnu.org>
4132 * decl.c (match_attr_spec): Synchronize the DECL_* enum values with the
4133 INTENT_* values from the enum 'sym_intent'. Call 'match_intent_spec'
4134 and remove a TODO note.
4135 * gfortran.h: Add a comment to sym_intent.
4137 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
4140 * resolve.c (resolve_operator): Provide better error message for
4141 derived type entity used in an binary intrinsic numeric operator.
4143 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
4148 * decl.c (gfc_match_char_spec): Use private namespace in attempt to
4149 reduce a charlen to a constant.
4151 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
4154 * data.c (gfc_assign_data_value): Re-arrange code to allow for
4155 an error for double initialization of CHARACTER entities.
4157 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
4160 * symbol.c (gfc_add_volatile): Enforce F2008:C1282 and F2018:C1588.
4162 2018-06-08 Thomas Koenig <tkoenig@gcc.gnu.org>
4165 * trans.h (gfc_ss): Add field no_bounds_check.
4166 * trans-array.c (gfc_conv_ss_startstride): If flag_realloc_lhs and
4167 ss->no_bounds_check is set, do not use runtime checks.
4168 * trans-expr.c (gfc_trans_assignment_1): Set lss->no_bounds_check
4169 for reallocatable lhs.
4171 2018-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
4174 * array.c (match_array_cons_element): NULL() cannot be in an
4177 2018-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
4180 * data.c (create_character_initializer): Return early if type is
4181 incompatible with CHARACTER.
4183 2018-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
4186 * simplify.c (gfc_simplify_mod): Re-arrange code to test whether
4187 'P' is zero and issue an error if it is.
4189 2018-06-06 Thomas Koenig <tkoenig@gcc.gnu.org>
4192 * frontend-passes.c (is_fe_temp): Add prototype.
4193 (realloc_string_callback): Early return for frontend-generated
4196 2018-06-05 Cesar Philippidis <cesar@codesourcery.com>
4200 * openmp.c (gfc_resolve_oacc_declare): Error on functions and
4201 subroutine data clause arguments.
4203 2018-06-04 Steven G. Kargl <kargl@gcc.gnu.org>
4206 * resolve.c (resolve_allocate_deallocate): Check errmsg is default
4209 2018-06-03 Paul Thomas <pault@gcc.gnu.org>
4212 * decl.c (variable_decl): Use gfc_add_type for cray pointees.
4214 2018-06-01 Steven G. Kargl <kargl@gcc.gnu.org>
4217 * check.c (gfc_check_random_init): New function. Check arguments of
4219 * gfortran.h (GFC_ISYM_RANDOM_INIT): New enum token.
4220 * intrinsic.c (add_subroutines): Add RANDOM_INIT to list of
4222 (gfc_check_intrinsic_standard): Introduce Fortran 2018 check.
4223 * intrinsic.h: Add prototypes for gfc_check_random_init and
4224 gfc_resolve_random_init
4225 * intrinsic.texi: Document new intrinsic subprogram.
4226 * iresolve.c (gfc_resolve_random_init): Resolve routine name.
4227 * trans-decl.c: Declare gfor_fndecl_random_init
4228 * trans-intrinsic.c (conv_intrinsic_random_init): New function.
4229 Translate call to RANDOM_INIT.
4230 (gfc_conv_intrinsic_subroutine): Call it.
4231 * trans.h: Declare gfor_fndecl_random_init
4233 2018-05-27 Steven G. Kargl <kargl@gcc.gnu.org>
4235 * decl.c (match_data_constant): Fortran 2018 allows pointer
4236 initialization in a data statement.
4238 2018-05-25 Janus Weil <janus@gcc.gnu.org>
4241 * match.c (gfc_match_block_data): Call gfc_notify_std to warn about
4242 an obsolescent feature in Fortran 2018.
4243 (gfc_match_equivalence): Ditto.
4244 * resolve.c (resolve_common_blocks): Ditto.
4245 (gfc_resolve_forall): Ditto.
4246 * symbol.c (gfc_define_st_label): Ditto.
4248 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
4251 * resolve.c (update_current_proc_array_outer_dependency): Avoid NULL
4252 pointer dereference.
4254 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
4257 * resolve.c (resolve_fl_procedure): Avoid NULL dereference.
4259 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
4262 * decl.c (gfc_match_derived_decl): Fix NULL point dereference.
4264 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
4267 * resolve.c (resolve_sync): Resolve expression before checking for
4270 2018-05-22 Janus Weil <janus@gcc.gnu.org>
4273 * libgfortran.h: Remove the macros GFC_STD_F2008_TS and
4275 * error.c (notify_std_msg): Remove GFC_STD_F2008_TS.
4276 * options.c (set_default_std_flags): Ditto.
4277 (gfc_handle_option): Make -std=f2008ts an alias for -std=f2018.
4278 * array.c (gfc_match_array_spec): Replace GFC_STD_F2008_TS by
4280 * check.c (gfc_check_atomic, gfc_check_event_query,
4281 gfc_check_c_f_pointer, gfc_check_c_f_procpointer, gfc_check_c_funloc,
4282 gfc_check_c_loc, gfc_check_num_images, gfc_check_this_image): Ditto.
4283 * decl.c (gfc_verify_c_interop_param, gfc_match_decl_type_spec): Ditto.
4284 * intrinsic.c (add_functions, add_subroutines,
4285 gfc_check_intrinsic_standard): Ditto.
4286 * iso-c-binding.def: Ditto.
4287 * iso-fortran-env.def: Ditto.
4288 * match.c (gfc_match_event_post, gfc_match_event_wait,
4289 gfc_match_fail_image, gfc_match_form_team, gfc_match_change_team,
4290 gfc_match_end_team, gfc_match_sync_team): Ditto.
4291 * gfortran.texi: Remove mention of -std=f2008ts.
4292 Move TSs into F2018 section.
4293 * invoke.texi: Update documentation of -std=f2008ts.
4295 2018-05-21 Janus Weil <janus@gcc.gnu.org>
4298 * libgfortran.h: New macros GFC_STD_OPT_*.
4299 * error.c (notify_std_msg): New function.
4300 (gfc_notify_std): Adjust such that it can handle combinations of
4301 GFC_STD_* flags in the 'std' argument, not just a single one.
4302 * match.c (match_arithmetic_if, gfc_match_if): Reject arithmetic if
4304 (gfc_match_stopcode): Use GFC_STD_OPT_* macros.
4305 * options.c (set_default_std_flags): Warn for F2018 deleted features
4307 (gfc_handle_option): F2018 deleted features are allowed in earlier
4309 * symbol.c (gfc_define_st_label, gfc_reference_st_label): Reject
4310 nonblock do constructs in Fortran 2018.
4312 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
4315 * resolve.c (flag_fn_result_spec): Use the 'sym' argument to
4316 test for self refs to the function result in the character len
4317 expression. If a self reference is found, emit an error and
4319 (resolve_fntype): Use the function symbol in the calls to the
4322 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
4325 * trans-array.c (gfc_get_array_span): Renamed from
4327 (gfc_conv_expr_descriptor): Change references to above.
4328 * trans-array.h : Add prototype for 'gfc_get_array_span'.
4329 * trans-intrinsic.c (gfc_conv_associated): Add pre and post
4331 * trans-stmt.c (trans_associate_var): If the associate name is
4332 a subref array pointer, use gfc_get_array_span for the span.
4334 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
4337 * match.c (gfc_match_type_spec): Go through the array ref and
4338 decrement 'rank' for every dimension that is an element.
4340 2018-05-19 Paul Thomas <pault@gcc.gnu.org>
4345 * trans-array.c (gfc_alloc_allocatable_for_assignment): Set the
4346 charlen backend_decl of the rhs expr to ss->info->string_length
4347 so that the value in the current scope is used.
4349 2018-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
4352 * gfortran.texi: Clarify documentation for Cray pointer and
4353 assumed-sized array.
4355 2018-05-13 Paul Thomas <pault@gcc.gnu.org>
4358 * trans-types.c (gfc_get_dtype_rank_type): Reorder evaluation
4359 of 'size'. If the element type is a pointer use the size of the
4360 TREE_TYPE of the type, unless it is VOID_TYPE. In this latter
4361 case, set the size to zero.
4363 2018-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
4365 * gfortran.h: Remove prototype.
4366 * symbol.c (gfc_new_undo_checkpoint): Remove unused function.
4368 2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
4371 * expr.c (check_inquiry): Avoid NULL pointer dereference.
4373 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
4376 * check.c (gfc_check_rank): Check that the argument is a data object.
4378 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
4381 * array.c (gfc_resolve_character_array_constructor): Substrings
4382 with upper bound smaller than lower bound are zero length strings.
4384 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
4387 * data.c (gfc_assign_data_value): Check that a data object does
4388 not also have default initialization.
4390 2018-05-10 Marek Polacek <polacek@redhat.com>
4393 * options.c (gfc_post_options): Set main_input_filename.
4395 2018-05-10 Thomas Koenig <tkoenig@gcc.gnu.org>
4398 * intrinsic.texi: Document BACK for MINLOC and MAXLOC.
4400 2018-05-10 Paul Thomas <pault@gcc.gnu.org>
4404 * resolve.c (get_temp_from_expr): The temporary must not have
4405 dummy or intent attributes.
4407 2018-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
4410 * check.c (gfc_check_minmaxloc): Remove error for BACK not being
4411 implemented. Use gfc_logical_4_kind for BACK.
4412 * simplify.c (min_max_choose): Add optional argument back_val.
4414 (simplify_minmaxloc_to_scalar): Add argument back_val. Pass
4415 back_val to min_max_choose.
4416 (simplify_minmaxloc_to_nodim): Likewise.
4417 (simplify_minmaxloc_to_array): Likewise.
4418 (gfc_simplify_minmaxloc): Add argument back, handle it.
4419 Pass back_val to specific simplification functions.
4420 (gfc_simplify_minloc): Remove ATTRIBUTE_UNUSED from argument back,
4421 pass it on to gfc_simplify_minmaxloc.
4422 (gfc_simplify_maxloc): Likewise.
4423 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Adjust
4424 comment. If BACK is true, use greater or equal (or lesser or
4425 equal) insteal of greater (or lesser). Mark the condition of
4426 having found a value which exceeds the limit as unlikely.
4428 2018-05-07 Jeff Law <law@redhat.comg>
4430 * scanner.c (preprocessor_line): Call linemap_add after a line
4431 directive that changes the current filename.
4433 2018-05-06 Andre Vehreschild <vehre@gcc.gnu.org>
4436 * dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
4437 introduced by r259385.
4438 * trans-intrinsic.c (conv_caf_send): Always report a dependency for
4439 same variables in coarray assignments.
4441 2018-05-02 Tom de Vries <tom@codesourcery.com>
4444 * f95-lang.c (DEF_GOACC_BUILTIN_ONLY): Define.
4446 2018-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
4449 * decl.c (gfc_match_char_spec): Check for negative length and set to 0.
4451 2018-04-14 Andre Vehreschild <vehre@gcc.gnu.org>
4455 * dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
4456 during dependency computation. They define no data dependency.
4457 * trans-array.c (conv_array_index_offset): The stride can not be set
4459 * trans-intrinsic.c (conv_caf_send): Add creation of temporary array
4460 for caf_get's result and copying to the array with vectorial
4463 2018-04-14 Thomas Koenig <tkoenig@gcc.gnu.org>
4466 * frontend-passes.c (traverse_io_block): Check for start, end or
4467 stride being defined by an outer implied DO loop.
4469 2018-04-12 Thomas Koenig <tkoenig@gcc.gnu.org>
4473 * trans-stmt.c (gfc_trans_forall_loop): Use annot_expr_ivdep_kind
4474 for annotation and remove dependence on -ftree-parallelize-loops.
4476 2018-04-10 Jakub Jelinek <jakub@redhat.com>
4479 * openmp.c (resolve_omp_do): Remove bogus if (j < i) break;.
4480 (resolve_oacc_nested_loops): Likewise. Formatting fix.
4482 2018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
4485 * trans-stmt.c (gfc_trans_forall_loop): Remove annotation for
4486 parallell processing of DO CONCURRENT -ftree-parallelize-loops
4489 2018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
4492 * resolve.c (resolve_variable): Simplify cases where access to a
4493 parameter array results in a single constant.
4495 2018-04-02 Thomas Koenig <tkoenig@gcc.gnu.org>
4498 * decl.c (variable_decl): If upper or lower bounds simplify
4499 to a constant, use that.
4501 2018-03-30 Paul Thomas <pault@gcc.gnu.org>
4504 * simplify.c (gfc_convert_constant): Handle case of array
4505 constructors within an array that has no iterator and improve
4506 the conciseness of this section of code.
4508 2017-03-30 Thomas Koenig <tkoenig@gcc.gnu.org>
4511 * array.c (gfc_resolve_character_array_constructor): Early
4512 exit for zero-size arrays.
4513 * simplify.c (simplify_transformation_to_array): Exit early
4514 if the result size is zero.
4515 (simplify_minmaxloc_to_array): Likewise.
4517 2018-03-28 Mikael Morin <mikael@gcc.gnu.org>
4520 * symbol.c (gfc_symbol_done_2): Start freeing namespaces
4522 (gfc_free_namespace): Restore assert (revert r258839).
4524 2018-03-28 Jakub Jelinek <jakub@redhat.com>
4526 * gfortran.h (gfc_dt): Rename default_exp field to dec_ext.
4527 * ioparm.def (IOPARM_dt_default_exp): Rename to ...
4528 (IOPARM_dt_dec_ext): ... this.
4529 * trans-io.c (build_dt): Adjust for default_exp renaming to
4530 dec_ext and IOPARM_dt_default_exp renaming to IOPARM_dt_dec_ext.
4531 * io.c (match_io): Likewise.
4533 2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
4536 * frontend-passes.c (gfc_run_passes): Do not run front-end
4537 optimizations if a previous error occurred.
4539 2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
4540 Harald Anlauf <anlauf@gmx.de>
4543 * primary.c (gfc_convert_to_structure_constructor): Check
4544 conformance of argument types in structure constructor.
4546 2018-03-26 Thomas Koenig <tkoenig@gcc.gnu.org>
4549 * io.c: Include constructor.h.
4550 (resolve_tag_format): For a constant character array, concatenate
4551 into a single character expression.
4553 2018-03-25 Seth Johnson <johnsonsr@ornl.gov>
4554 Dominique d'Humieres <dominiq@gcc.gnu.org>
4557 * check.c (gfc_check_c_f_pointer): Allow scalar noninteroperable
4558 scalar derived type with -std=f2003 and -std=f2008.
4560 2018-03-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4561 Dominique d'Humieres <dominiq@gcc.gnu.org>
4564 * symbol.c (gfc_free_namespace): Delete the assert and only if
4565 refs count is equals zero, free the namespace. Otherwise,
4566 something is halfway and other errors will resound.
4568 2018-03-24 Thomas Koenig <tkoenig@gcc.gnu.org>
4571 * expr.c (find_substring_ref): Change types of start, end
4572 and length variables to gfc_charlen_t. Set length to zero
4573 for empty substring.
4575 2018-03-24 Steven G. Kargl <kargl@gcc.gnu.org>
4578 * decl.c (check_function_name): Improved error message
4579 (gfc_match_volatile, gfc_match_asynchronous) Use check_function_name.
4581 2018-03-22 Steven G. Kargl <kargl@gcc.gnu.org>
4584 * decl.c (get_proc_name): If the MODULE prefix appears in interface
4585 body, then it must appear on the contained subroutine or function.
4586 While here, fix nearby mis-indented code.
4588 2018-03-21 Thomas Koenig <tkoenig@gcc.gnu.org>
4589 Harald Anlauf <anlauf@gmx.de>
4592 * trans-types.c (gfc_sym_type): Do not dereference NULL pointer.
4594 2018-03-21 Janne Blomqvist <jb@gcc.gnu.org>
4597 * trans-expr.c (gfc_conv_procedure_call): Convert charlen to
4598 gfc_charlen_type_node when calling procedure.
4600 2018-03-20 Steven G. Kargl <kargl@gcc.gnu.org>
4603 * interface.c (symbol_rank): Remove bogus null pointer check that
4604 crept in when translating a ternary operator into an if-else
4607 2018-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
4610 * simplify.c (gfc_convert_constant): Correctly handle iterators
4611 for type conversion.
4613 2018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
4616 * decl.c (get_proc_name): Check for a subroutine re-defined in
4617 the contain portion of a subroutine. Change language of existing
4618 error message to better describe the issue. While here fix whitespace
4621 2018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
4624 * decl.c (get_proc_name): Catch clash between a procedure statement
4625 and a contained subprogram
4627 2018-03-16 Steven G. Kargl <kargl@gcc.gnu.org>
4630 * decl.c (merge_array_spec): Correct the error condition.
4632 2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
4635 * decl.c (get_proc_name): Check for clash of entry name with
4638 2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
4641 * decl.c (merge_array_spec): Limit the merging to maximum allowed
4642 dimensions, and issue error message if limit is exceeded.
4644 2018-03-13 Steven G. Kargl <kargl@gcc.gnu.org>
4646 * check.c (gfc_check_kill_sub): Remove check for INTEGER(4) or (8).
4647 * intrinsic.c (add_functions): Remove reference to gfc_resolve_kill.
4648 (add_subroutines): Remove reference to gfc_resolve_kill_sub.
4649 * intrinsic.texi: Update documentation.
4650 * iresolve.c (gfc_resolve_kill, gfc_resolve_kill_sub): Remove.
4651 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
4652 gfor_fndecl_kill and gfor_fndecl_kill_sub
4653 * trans-intrinsic.c (conv_intrinsic_kill, conv_intrinsic_kill_sub): new
4655 (gfc_conv_intrinsic_function): Use conv_intrinsic_kill.
4656 (gfc_conv_intrinsic_subroutine): Use conv_intrinsic_kill_sub.
4657 * trans.h: Declare gfor_fndecl_kill and gfor_fndecl_kill_sub.
4659 2018-03-11 Paul Thomas <pault@gcc.gnu.org>
4662 * trans-array.c (structure_alloc_comps): Make sure that the
4663 vptr is copied and that the unlimited polymorphic _len is used
4664 to compute the size to be allocated.
4665 * trans-expr.c (gfc_get_class_array_ref): If unlimited, use the
4666 unlimited polymorphic _len for the offset to the element.
4667 (gfc_copy_class_to_class): Set the new 'unlimited' argument.
4668 * trans.h : Add the boolean 'unlimited' to the prototype.
4670 2018-03-11 Steven G. Kargl <kargl@gcc.gnu.org>
4673 * resolve.c (resolve_fl_procedure): Enforce F2018:C15100.
4675 2018-03-11 Steven G. Kargl <kargls@gcc.gnu.org>
4677 * check.c (gfc_check_kill): Check pid and sig are scalar.
4678 (gfc_check_kill_sub): Restrict kind to 4 and 8.
4679 * intrinsic.c (add_function): Sort keyword list. Add pid and sig
4680 keywords for KILL. Remove redundant *back="back" in favor of the
4681 original *bck="back".
4682 (add_subroutines): Sort keyword list. Add pid and sig keywords
4684 * intrinsic.texi: Fix documentation to consistently use pid and sig.
4685 * iresolve.c (gfc_resolve_kill): Kind can only be 4 or 8. Choose the
4687 (gfc_resolve_rename_sub): Add comment.
4689 2018-03-11 Thomas Koenig <tkoenig@gcc.gnu.org>
4692 * simplify.c (simplify_transformation): Return default result for
4693 empty array argument.
4694 (gfc_simplify_all): Remove special-case handling for zerosize.
4695 (gfc_simplify_any): Likewise.
4696 (gfc_simplify_count): Likewise.
4697 (gfc_simplify_iall): Likewise.
4698 (gfc_simplify_iany): Likewise.
4699 (gfc_simplify_iparity): Likewise.
4700 (gfc_simplify_minval): Likewise.
4701 (gfc_simplify_maxval): Likewise.
4702 (gfc_simplify_norm2): Likewise.
4703 (gfc_simplify_product): Likewise.
4704 (gfc_simplify_sum): Likewise.
4706 2018-03-10 Steven G. Kargl <kargl@gcc.gnu.org>
4709 * arith.c (check_result, eval_intrinsic): If result overflows, pass
4710 the expression up the chain instead of a NULL pointer.
4712 2018-03-07 Steven G. Kargl <kargl@gcc.gnu.org>
4716 * decl.c (gfc_match_char_spec): Try to reduce a charlen to a constant.
4718 2017-03-06 Thomas Koenig <tkoenig@gcc.gnu.org>
4722 * expr.c (simplify_parameter_variable): If p is a size zero array
4723 and not an ARRAY_EXPR insert an empty array constructor and
4725 * gfortran.h: Add prototype for gfc_is_size_zero_array.
4726 * simplify.c (is_size_zero_array): Make non-static and rename into
4727 (gfc_is_size_zero_array): Check for parameter arrays of zero
4728 size by comparing shape and absence of constructor.
4729 (gfc_simplify_all): Use gfc_is_size_zero_array instead of
4731 (gfc_simplify_count): Likewise.
4732 (gfc_simplify_iall): Likewise.
4733 (gfc_simplify_iany): Likewise.
4734 (gfc_simplify_iparity): Likewise.
4735 (gfc_simplify_minval): Likewise.
4736 (gfc_simplify_maxval): Likewise.
4737 (gfc_simplify_product): Likewise.
4738 (gfc_simplify_sum): Likewise.
4740 2018-03-06 Steven G. Kargl <kargl@gcc.gnu.org>
4743 * primary.c (match_sym_complex_part): Give the matcher for an implied
4744 do-loop a chance to run.
4746 2018-03-03 Harald Anlauf <anlauf@gmx.de>
4749 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Do not
4750 dereference NULL pointer.
4752 2018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
4755 * simplify.c (is_size_zero_array): New function to check for size
4757 (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
4758 gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
4759 gfc_simplify_minval, gfc_simplify_maxval, gfc_simplify_norm2,
4760 gfc_simplify_product, gfc_simplify_sum): Use it, and implement
4761 requirements from F2018.
4763 2018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
4766 * simplify.c (gfc_simplify_transfer): Resolve mold.
4768 2018-03-03 Paul Thomas <pault@gcc.gnu.org>
4771 * resolve.c (build_loc_call): Change symtree name from 'loc' to
4774 2018-03-01 Paul Thomas <pault@gcc.gnu.org>
4777 * target-memory.c (gfc_interpret_derived): Assert that BT_VOID
4778 components are caf tokens.
4779 (gfc_target_interpret_expr): Treat BT_VOID expressions as
4782 2018-03-01 Paul Thomas <pault@gcc.gnu.org>
4785 * class.c (class_array_ref_detected): Remove the condition that
4786 there be no reference after the array reference.
4787 (find_intrinsic_vtab): Remove excess whitespace.
4788 * trans-array.c (gfc_conv_scalarized_array_ref): Rename 'tmp'
4789 as 'base and call build_class_array_ref earlier.
4791 2018-02-28 Paul Thomas <pault@gcc.gnu.org>
4794 * trans-stmt.c (trans_associate_var): Make sure that the se
4795 expression is a pointer type before converting it to the symbol
4798 2018-02-25 Steven G. Kargl <kargl@gcc.gnu.org>
4801 * decl.c (variable_decl): Check that an explicit-shape-array with
4802 nonconstant bounds is allowed.
4804 2018-02-25 Paul Thomas <pault@gcc.gnu.org>
4807 * trans-intrinsic.c (gfc_conv_allocated): If the argument se
4808 has a pre block, add it to the expression pre block.
4810 2018-02-25 Thomas Koenig <tkoenig@gcc.gnu.org>
4813 * gfortran.h (gfc_integer_4_kind): Define.
4814 * resolve.c (resolve_select_type): Make sure that the
4815 kind of c->high is gfc_integer_4_kind.
4817 2018-02-24 Steven G. Kargl <kargl@gcc.gnu.org>
4820 * decl.c (gfc_match_data): Check for invalid substring in
4823 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
4825 * intrinsic.texi: Arguments to MATMUL cannot both be rank one.
4827 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
4830 * trans-io.c (transfer_expr): Deal with C_LOC in transfer statement.
4832 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
4835 * interface.c (compare_actual_formal): Issue error if keyword is
4836 used in a statement function.
4838 2018-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4841 * trans-io.c (set_parameter_value_inquire): Adjust range check of
4842 negative unit values for kind=8 units to the kind=4 negative limit.
4844 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
4847 * trans-types.c (gfc_sym_type): Test sym->ns->proc_name before
4848 accessing its components.
4850 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
4853 * trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
4854 before accessing its components.
4856 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
4859 * trans-const.c : Clean up some whitespace issues.
4860 * trans-expr.c (gfc_conv_initializer): If an iso_c_binding
4861 derived type has a kind value of zero, set it to the default
4864 2018-02-23 Janne Blomqvist <jb@gcc.gnu.org>
4867 * trans-decl.c (gfc_build_builtin_function_decls): Add bool
4868 argument to stop and error stop decls.
4869 * trans-stmt.c (gfc_trans_stop): Add false value to argument
4872 2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
4876 * trans-decl.c (gfc_build_builtin_function_decls): Pass
4877 gfc_int8_type node to pause_numeric, size_type_node to
4879 * trans-stmt.c (gfc_trans_pause): Likewise.
4881 2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
4883 * gfortran.texi: Update Coarray API description.
4884 * trans-decl.c (gfc_build_builtin_function_decls): Use size_t for
4885 character lengths, int for exit codes.
4886 (generate_coarray_sym_init): Use size_t for character length.
4887 * trans-intrinsic.c (conv_co_collective): Likewise.
4888 * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
4889 (gfc_trans_event_post_wait): Likewise.
4890 (gfc_trans_sync): Likewise.
4891 (gfc_trans_stop): Use size_t for character lengths, int for exit
4894 2018-02-20 Thomas Koenig <tkoenig@gcc.gnu.org>
4898 * primary.c (gfc_convert_to_structure_constructor):
4899 For a constant string constructor, make sure the length
4902 2018-02-19 Paul Thomas <pault@gcc.gnu.org>
4906 * resolve.c (resolve_assoc_var): Rearrange the logic for the
4907 determination of the character length of associate names. If
4908 the associate name is missing a length expression or the length
4909 expression is not a constant and the target is not a variable,
4910 make the associate name allocatable and deferred length.
4911 * trans-decl.c (gfc_get_symbol_decl): Null the character length
4912 backend_decl for deferred length associate names that are not
4913 variables. Set 'length' to gfc_index_zero_node for character
4914 associate names, whose character length is a PARM_DECL.
4916 2018-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
4919 * frontend-passes.c (traverse_io_block): Remove workaround for
4922 2018-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
4924 * gfortran.texi: Document additional src/dst_type. Fix some typos.
4925 * trans-decl.c (gfc_build_builtin_function_decls): Declare the new
4926 argument of _caf_*_by_ref () with * e { get, send, sendget }.
4927 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Add the type of the
4928 data referenced when generating a call to caf_get_by_ref ().
4929 (conv_caf_send): Same but for caf_send_by_ref () and
4930 caf_sendget_by_ref ().
4932 2018-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4935 * io.c (check_format): Allow FMT_COLON.
4937 2018-02-18 Paul Thomas <pault@gcc.gnu.org>
4940 * trans-array.c (gfc_conv_expr_descriptor): Set parmtype from
4941 the typenode in the case of deferred length characters.
4943 2018-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
4946 * frontend-passes (scalarized_expr): If the expression
4947 is an assumed size array, leave in the last reference
4948 and pass AR_SECTION instead of AR_FULL to gfc_resolve
4949 in order to avoid an error.
4951 2018-02-17 Paul Thomas <pault@gcc.gnu.org>
4954 * resolve.c (resolve_assoc_var): If a non-constant target expr.
4955 has no string length expression, make the associate variable
4956 into a deferred length, allocatable symbol.
4957 * trans-decl.c (gfc_is_reallocatable_lhs): Add and use a ptr to
4959 * trans-stmt.c (trans_associate_var): Null and free scalar
4960 associate names that are allocatable. After assignment, remove
4961 the allocatable attribute to prevent reallocation.
4963 2018-02-16 Jakub Jelinek <jakub@redhat.com>
4966 * trans-openmp.c (gfc_trans_omp_clauses): For OMP_CLAUSE_LINEAR_REF
4967 kind set OMP_CLAUSE_LINEAR_STEP to TYPE_SIZE_UNIT times last_step.
4969 2018-02-16 Dominique d'Humieres <dominiq@gcc.gnu.org>
4972 * decl.c (gfc_get_pdt_instance): Replace '%qs' with %qs.
4974 2018-02-15 Janus Weil <janus@gcc.gnu.org>
4977 * interface.c (check_dtio_arg_TKR_intent): Add a check for character
4980 2018-02-14 Janus Weil <janus@gcc.gnu.org>
4983 * match.c (gfc_match_select_type): Fix check for selector in
4984 SELECT TYPE statement.
4986 2018-02-13 Janus Weil <janus@gcc.gnu.org>
4989 * symbol.c (check_conflict): Reject procedure pointers in common blocks.
4991 2018-02-13 Alastair McKinstry <alastair.mckinstry@sceal.ie>
4992 Janne Blomqvist <jb@gcc.gnu.org>
4994 * module.c (dump_module): Use lbasename to ensure that module
4995 files are reproducible.
4997 2018-02-12 Janus Weil <janus@gcc.gnu.org>
5000 * resolve.c (resolve_component): Fix checks of passed argument in
5001 procedure-pointer components.
5003 2018-02-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
5006 * resolve.c (resolve_formal_arglist): Update error message.
5008 2018-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
5010 * gfortran.texi: Fix typos in documentation of caf_register ().
5011 * trans-array.c (structure_alloc_comps): Only register a component of
5012 a derived typed corray, not of an ultimate component coarray.
5014 2018-02-11 Steven G. Kargl <kargl@gcc.gnu.org>
5018 * interface.c (compare_actual_formal): Add in_statement_function
5019 bool parameter. Skip check of INTENT attribute for statement
5020 functions. Arguments to a statement function cannot be optional,
5021 issue error for missing argument.
5022 (gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
5023 in_statement_function.
5025 2018-02-11 Paul Thomas <pault@gcc.gnu.org>
5028 * trans-expr.c (gfc_conv_derived_to_class): Set the use_offset
5029 flag. If the is a vector subscript or the expression is not a
5030 variable, make the descriptor one-based.
5032 2018-02-10 Paul Thomas <pault@gcc.gnu.org>
5036 * trans-array.c (gfc_array_init_size): Revert the change made
5037 in revision 257356 setting the dtype.
5038 * trans-types.c (gfc_get_dtype): Do not use the cached dtype.
5039 Call gfc_get_dtype_rank_type every time.
5042 * trans-array.c (gfc_conv_expr_descriptor): If the source array
5043 is a descriptor type, use its offset, removing the condition
5044 that is be a class expression.
5046 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
5049 * match.c (gfc_match_deallocate): Check for NULL pointer.
5051 2018-02-07 Thomas Koenig <tkoenig@gcc.gnu.org>
5054 * trans-intrinsic.c (gfc_conv_intrinsic_shape): New function.
5055 (gfc_conv_intrinsic_function): Call it.
5057 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
5060 * match.c (gfc_match_type_spec): If the charlen is non-NULL, then
5061 try to resolve it. While here return early if possible.
5063 2018-02-04 Paul Thomas <pault@gcc.gnu.org>
5066 * trans-decl.c (gfc_get_symbol_decl): Do not finish the decl of
5067 'length' if the symbol charlen backend_decl is an indirect ref.
5069 2018-02-03 Paul Thomas <pault@gcc.gnu.org>
5073 * trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
5074 use gfc_get_dtype_rank_type.
5076 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
5080 * resolve.c (resolve_assoc_var): Generate an error if
5081 target length unknown.
5083 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
5086 * simplify.c (gfc_simplify_repeat): Increase limit for deferring
5087 to runtime, print a warning message.
5089 2018-01-31 Jakub Jelinek <jakub@redhat.com>
5092 * openmp.c (gfc_match_omp_clauses): If all the linear
5093 gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
5094 nor set *head = NULL. Formatting fixes.
5096 2018-01-31 Paul Thomas <pault@gcc.gnu.org>
5099 * trans-expr.c (gfc_conv_procedure_call): If the parm expr is
5100 an address expression passed to an assumed rank dummy, convert
5101 to an indirect reference.
5103 2018-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
5105 * dump-parse-tree.c (write_proc): Use sym_name (which may
5106 be sym->binding_label) instead of sym->name.
5108 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
5110 * trans-const.c (gfc_conv_string_init): Use gfc_charlen_t instead
5113 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
5116 * trans-expr.c (fill_with_spaces): Use memset instead of
5118 (gfc_trans_string_copy): Improve opportunity to use builtins with
5121 2018-01-30 Jakub Jelinek <jakub@redhat.com>
5124 * trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off
5125 to DATA_FIELD's offset rather than OFFSET_FIELD's offset.
5127 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
5130 * array.c (gfc_ref_dimen_size): Whitespace fixes. If stride is
5133 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
5136 * frontend-passes (matmul_to_var_expr): Return early if
5137 in association list.
5138 (inline_matmul_assign): Likewise.
5140 2017-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
5143 * resolve.c (resolve_component): Ensure BIND(C) character
5144 components have length one.
5145 (resolve_symbol): Likewise for variables.
5147 2018-01-27 Jakub Jelinek <jakub@redhat.com>
5150 * decl.c (add_init_expr_to_sym): Ignore initializers for too large
5153 2018-01-26 Damian Rouson <damian@sourceryinstitute.org>
5154 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
5155 Soren Rasmussen <s.c.rasmussen@gmail.com>
5157 Partial support for Fortran 2018 teams features.
5159 * array.c (gfc_match_array_ref): add team attribute in coarray
5161 * check.c (gfc_check_get_team, gfc_check_team_number): add new
5162 functions for get_team and team_number.
5163 * dump-parse-tree.c (show_code_node): add new statements: form team,
5164 change team, end team, and sync team.
5165 * expr.c (gfc_find_team_co): add new function.
5166 * gfortran.h: add new statements.
5167 * intrinsic.c (add_functions): add get_team and team_number functions.
5168 * intrinsic.h: add get_team and team_number prototypes for check,
5169 simplify, and resolve.
5170 * iresolve.c (gfc_resolve_get_team, gfc_resolve_team_number): add new
5172 * iso-fortran-env.def: add the team_type derived type.
5173 * match.c (gfc_match_if, gfc_match_form_team, gfc_match_team_number)
5174 (gfc_match_end_team, gfc_match_sync_team, gfc_match_change_team):
5175 add change team, end team, form team, sync team match and functions.
5176 * match.h: add new prototypes for change team, end team, form team,
5178 * parse.c (decode_statement): add cases for change team, end team,
5179 form team, and sync team.
5180 * resolve.c: add cases for exec form team, change team, end team, and
5182 * simplify.c (gfc_simplify_get_team): add new function for get team.
5183 * st.c (gfc_free_statement): add cases exec for change team, end team,
5184 form team, sync team.
5185 * trans-decl.c (gfor_fndecl_caf_form_team)
5186 (gfor_fndecl_caf_change_team, gfor_fndecl_caf_end_team)
5187 (gfor_fndecl_caf_sync_team, gfor_fndecl_caf_get_team)
5188 (gfor_fndecl_caf_team_number): add functions and definitions.
5189 * trans-intrinsic.c (conv_caf_send, conv_intrinsic_team_number): add
5190 new function and team_type argument support.
5191 * trans-stmt.c (gfc_trans_form_team, gfc_trans_change_team)
5192 (gfc_trans_end_team, gfc_trans_sync_team): add new functions.
5193 * trans-stmt.h: add new prototypes.
5194 * trans-types.c (gfc_get_derived_type): check condition for team_type.
5195 * trans.c (trans_code): new exec cases for form team, change team, end
5196 team, and sync team.
5197 * trans.h: add new prototypes.
5199 2018-01-26 Steven G. Kargl <kargl@gcc.gnu.org>
5202 * simplify.c (compute_dot_product): Initialize result to INTEGER(1) 0
5203 or .false. The summation does the correct type conversion.
5204 (gfc_simplify_dot_product): Special case zero-sized arrays.
5206 2018-25-01 Paul Thomas <pault@gcc.gnu.org>
5209 * array.c (gfc_match_array_ref): If standard earlier than F2008
5210 it is an error if the reference dimension is greater than 7.
5211 libgfortran.h : Increase GFC_MAX_DIMENSIONS to 15. Change the
5212 dtype masks and shifts accordingly.
5213 * trans-array.c (gfc_conv_descriptor_dtype): Use the dtype
5214 type node to check the field.
5215 (gfc_conv_descriptor_dtype): Access the rank field of dtype.
5216 (duplicate_allocatable_coarray): Access the rank field of the
5217 dtype descriptor rather than the dtype itself.
5218 * trans-expr.c (get_scalar_to_descriptor_type): Store the type
5219 of 'scalar' on entry and use its TREE_TYPE if it is ARRAY_TYPE
5221 (gfc_conv_procedure_call): Pass TREE_OPERAND (tmp,0) to
5222 get_scalar_to_descriptor_type if the actual expression is a
5224 (gfc_trans_structure_assign): Assign the rank directly to the
5226 * trans-intrinsic.c (gfc_conv_intrinsic_rank): Cast the result
5227 to default integer kind.
5228 (gfc_conv_intrinsic_sizeof): Obtain the element size from the
5229 'elem_len' field of the dtype.
5230 * trans-io.c (gfc_build_io_library_fndecls): Replace
5231 gfc_int4_type_node with dtype_type_node where necessary.
5232 (transfer_namelist_element): Use gfc_get_dtype_rank_type for
5234 * trans-types.c : Provide 'get_dtype_type_node' to acces the
5235 dtype_type_node and, if necessary, build it.
5236 The maximum size of an array element is now determined by the
5237 maximum value of size_t.
5238 Update the description of the array descriptor, including the
5239 type def for the dtype_type.
5240 (gfc_get_dtype_rank_type): Build a constructor for the dtype.
5241 Distinguish RECORD_TYPEs that are BT_DERIVED or BT_CLASS.
5242 (gfc_get_array_descriptor_base): Change the type of the dtype
5243 field to dtype_type_node.
5244 (gfc_get_array_descr_info): Get the offset to the rank field of
5246 * trans-types.h : Add a prototype for 'get_dtype_type_node ()'.
5247 * trans.h : Define the indices of the dtype fields.
5249 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
5252 * decl.c (gfc_match_derived_decl): If eos not matched, recover
5253 and emit error about garbage after declaration.
5255 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
5258 * trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
5261 2018-01-22 Janne Blomqvist <jb@gcc.gnu.org>
5265 * arith.c (gfc_arith_concat): Use size_t for string length.
5266 (gfc_compare_string): Likewise.
5267 (gfc_compare_with_Cstring): Likewise.
5268 * array.c (gfc_resolve_character_array_constructor): Use
5269 HOST_WIDE_INT, gfc_mpz_get_hwi.
5270 * check.c (gfc_check_fe_runtime_error): Use size_t.
5271 * data.c (create_character_initializer): Use HOST_WIDE_INT,
5273 * decl.c (gfc_set_constant_character_len): Use gfc_charlen_t.
5274 (add_init_expr_to_sym): Use HOST_WIDE_INT.
5275 * expr.c (gfc_build_init_expr): Use HOST_WIDE_INT,
5277 (gfc_apply_init): Likewise.
5278 * match.h (gfc_set_constant_character_len): Update prototype.
5279 * primary.c (match_string_constant): Use size_t.
5280 * resolve.c (resolve_ordinary_assign): Use HOST_WIDE_INT,
5282 * simplify.c (init_result_expr): Likewise.
5283 (gfc_simplify_len_trim): Use size_t.
5284 * target-memory.c (gfc_encode_character): Use size_t.
5285 (gfc_target_encode_expr): Use HOST_WIDE_INT, gfc_mpz_get_hwi.
5286 (interpret_array): Use size_t.
5287 (gfc_interpret_character): Likewise.
5288 * target-memory.h (gfc_encode_character): Update prototype.
5289 (gfc_interpret_character): Likewise.
5290 (gfc_target_interpret_expr): Likewise.
5291 * trans-const.c (gfc_build_string_const): Use size_t for length
5293 (gfc_build_wide_string_const): Likewise.
5294 * trans-const.h (gfc_build_string_const): Likewise.
5295 (gfc_build_wide_string_const): Likewise.
5297 2018-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
5300 * simplify.c (gfc_simplify_matmul): Set return type correctly.
5302 2018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
5305 * simplify.c (gfc_simplify_matmul): Delete bogus assertion.
5307 2018-01-17 Harald Anlauf <anlauf@gmx.de>
5310 * expr.c (add_init_expr_to_sym): Do not dereference NULL pointer.
5312 2018-01-17 Harald Anlauf <anlauf@gmx.de>
5315 * decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.
5317 2018-01-15 Louis Krupp <louis.krupp@zoho.com>
5320 * interface.c (compare_rank): Don't try to retrieve CLASS_DATA
5321 from symbol marked unlimited polymorphic.
5322 * resolve.c (resolve_structure_cons): Likewise.
5323 * misc.c (gfc_typename): Don't dereference derived->components
5326 2018-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
5329 * gfortran.h (gfc_check_f): Rename f4ml to f5ml.
5330 (gfc_logical_4_kind): New macro
5331 * intrinsic.h (gfc_simplify_minloc): Add a gfc_expr *argument.
5332 (gfc_simplify_maxloc): Likewise.
5333 (gfc_resolve_maxloc): Likewise.
5334 (gfc_resolve_minloc): Likewise.
5335 * check.c (gfc_check_minloc_maxloc): Add checking for "back"
5336 argument; also raise error if it is used (for now). Add it
5337 if it isn't present.
5338 * intrinsic.c (add_sym_4ml): Rename to
5339 (add_sym_5ml), adjust for extra argument.
5340 (add_functions): Add "back" constant. Adjust maxloc and minloc
5342 * iresolve.c (gfc_resolve_maxloc): Add back argument. If back is
5343 not of gfc_logical_4_kind, convert.
5344 (gfc_resolve_minloc): Likewise.
5345 * simplify.c (gfc_simplify_minloc): Add back argument.
5346 (gfc_simplify_maxloc): Likewise.
5347 * trans-intinsic.c (gfc_conv_intrinsic_minmaxloc): Rename last
5348 argument to %VAL to ensure passing by value.
5349 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_minmaxloc
5350 also for library calls.
5352 2018-01-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
5355 * resolve.c (resolve_transfer): Delete code looking for 'DT'
5356 format specifiers in format strings. Set formatted to true if a
5357 format string or format label is present.
5358 * trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix
5361 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
5364 * dump-parse-tree.c (get_c_type_name): Remove extra line.
5365 Change for loop to use declaration in for loop. Handle BT_LOGICAL
5367 (write_decl): Add where argument. Fix indentation. Replace
5368 assert with error message. Add typename to warning
5370 (write_type): Adjust locus to call of write_decl.
5371 (write_variable): Likewise.
5372 (write_proc): Likewise. Replace assert with error message.
5374 2018-01-13 Paul Thomas <pault@gcc.gnu.org>
5377 * trans-expr.c (gfc_trans_scalar_assign): Flag is_alloc_lhs if
5378 the rhs expression is neither an elemental nor a conversion
5382 * trans-array.c (is_pointer_array): Remove unconditional return
5383 of false for -fopenmp.
5385 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
5389 * dump-parse-tree.c (write_proc): Always emit closing parenthesis
5392 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
5395 * resolve.c (resolve_allocate_expr): Check for NULL pointer.
5397 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
5400 * resolve.c (resolve_charlen): Check the type of cl->length
5403 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
5406 * trans-array.c (gfc_trans_array_ctor_element): Fix formatting.
5408 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
5411 * trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
5412 LHS type when assigning.
5414 2018-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
5417 * expr.c (gfc_is_simply_contiguous): Check for NULL pointer.
5419 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
5421 * match.c (gfc_match_allocate): Check for NULL pointer.
5423 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
5425 * expr.c (gfc_check_pointer_assign): Fix typo in comment.
5427 2018-01-08 Paul Thomas <pault@gcc.gnu.org>
5430 * decl.c (gfc_get_pdt_instance): If parameterized arrays have
5431 an initializer, convert the kind parameters and add to the
5432 component if the instance.
5433 * trans-array.c (structure_alloc_comps): Add 'is_pdt_type' and
5434 use it with case COPY_ALLOC_COMP. Call 'duplicate_allocatable'
5435 for parameterized arrays. Clean up typos in comments. Convert
5436 parameterized array initializers and copy into the array.
5437 * trans-expr.c (gfc_trans_scalar_assign): Do a deep copy for
5438 parameterized types.
5439 *trans-stmt.c (trans_associate_var): Deallocate associate vars
5440 as necessary, when they are PDT function results for example.
5443 * trans-array.c (structure_alloc_comps): Only compare len parms
5444 when they are declared explicitly.
5446 2018-01-06 Janne Blomqvist <jb@gcc.gnu.org>
5449 * trans-expr.c (gfc_trans_pointer_assignment): fold_convert rhs to
5452 2018-01-05 Janne Blomqvist <jb@gcc.gnu.org>
5456 * array.c (got_charlen): Use gfc_charlen_int_kind.
5457 * class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
5459 (find_intrinsic_vtab): Likewise.
5460 * decl.c (match_char_length): Use gfc_charlen_int_kind.
5461 (add_init_expr_to_sym): Use gfc_charlen_t and gfc_charlen_int_kind.
5462 (gfc_match_implicit): Use gfc_charlen_int_kind.
5463 * dump-parse-tree.c (show_char_const): Use gfc_charlen_t and size_t.
5464 (show_expr): Use HOST_WIDE_INT_PRINT_DEC.
5465 * expr.c (gfc_get_character_expr): Length parameter of type
5467 (gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
5468 (gfc_extract_hwi): New function.
5469 (simplify_const_ref): Make string_len of type gfc_charlen_t.
5470 (gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
5471 * frontend-passes.c (optimize_trim): Use gfc_charlen_int_kind.
5472 * gfortran.h (gfc_mpz_get_hwi): New prototype.
5473 (gfc_mpz_set_hwi): Likewise.
5474 (gfc_charlen_t): New typedef.
5475 (gfc_expr): Use gfc_charlen_t for character lengths.
5476 (gfc_size_kind): New extern variable.
5477 (gfc_extract_hwi): New prototype.
5478 (gfc_get_character_expr): Use gfc_charlen_t for character length.
5479 (gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
5480 * gfortran.texi: Update description of hidden string length argument.
5481 * iresolve.c (check_charlen_present): Use gfc_charlen_int_kind.
5482 (gfc_resolve_char_achar): Likewise.
5483 (gfc_resolve_repeat): Pass string length directly without
5484 temporary, use gfc_charlen_int_kind.
5485 (gfc_resolve_transfer): Use gfc_charlen_int_kind.
5486 * match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
5487 * misc.c (gfc_mpz_get_hwi): New function.
5488 (gfc_mpz_set_hwi): New function.
5489 * module.c (atom_int): Change type from int to HOST_WIDE_INT.
5490 (parse_integer): Don't complain about large integers.
5491 (write_atom): Use HOST_WIDE_INT for integers.
5492 (mio_integer): Handle integer type mismatch.
5493 (mio_hwi): New function.
5494 (mio_intrinsic_op): Use HOST_WIDE_INT.
5495 (mio_array_ref): Likewise.
5496 (mio_expr): Likewise.
5497 * primary.c (match_substring): Use gfc_charlen_int_kind.
5498 * resolve.c (resolve_substring_charlen): Use gfc_charlen_int_kind.
5499 (resolve_character_operator): Likewise.
5500 (resolve_assoc_var): Likewise.
5501 (resolve_select_type): Use HOST_WIDE_INT for charlen, use snprintf.
5502 (resolve_charlen): Use mpz_sgn to determine sign.
5503 * simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
5505 * symbol.c (generate_isocbinding_symbol): Use gfc_charlen_int_kind.
5506 * target-memory.c (size_character): Length argument of type
5508 (gfc_encode_character): Likewise.
5509 (gfc_interpret_character): Use gfc_charlen_t.
5510 * target-memory.h (gfc_encode_character): Modify prototype.
5511 * trans-array.c (gfc_trans_array_ctor_element): Use existing type.
5512 (get_array_ctor_var_strlen): Use gfc_conv_mpz_to_tree_type.
5513 (trans_array_constructor): Use existing type.
5514 (get_array_charlen): Likewise.
5515 * trans-const.c (gfc_conv_mpz_to_tree_type): New function.
5516 * trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
5517 * trans-decl.c (gfc_trans_deferred_vars): Use existing type.
5518 (add_argument_checking): Likewise.
5519 * trans-expr.c (gfc_class_len_or_zero_get): Build const of type
5520 gfc_charlen_type_node.
5521 (gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
5522 4, fold_convert to correct type.
5523 (gfc_conv_class_to_class): Build const of type size_type_node for
5525 (gfc_copy_class_to_class): Likewise.
5526 (gfc_conv_string_length): Use same type in expression.
5527 (gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
5528 (gfc_conv_string_tmp): Make sure len is of the right type.
5529 (gfc_conv_concat_op): Use same type in expression.
5530 (gfc_conv_procedure_call): Likewise.
5531 (fill_with_spaces): Comment out memset() block due to spurious
5532 -Wstringop-overflow warnings.
5533 (gfc_trans_string_copy): Use gfc_charlen_type_node.
5534 (alloc_scalar_allocatable_for_subcomponent_assignment):
5535 fold_convert to right type.
5536 (gfc_trans_subcomponent_assign): Likewise.
5537 (trans_class_vptr_len_assignment): Build const of correct type.
5538 (gfc_trans_pointer_assignment): Likewise.
5539 (alloc_scalar_allocatable_for_assignment): fold_convert to right
5541 (trans_class_assignment): Build const of correct type.
5542 * trans-intrinsic.c (gfc_conv_associated): Likewise.
5543 (gfc_conv_intrinsic_repeat): Do calculation in sizetype.
5544 * trans-io.c (gfc_build_io_library_fndecls): Use
5545 gfc_charlen_type_node for character lengths.
5546 (set_string): Convert to right type in assignment.
5547 * trans-stmt.c (gfc_trans_label_assign): Build const of
5548 gfc_charlen_type_node.
5549 (trans_associate_var): Likewise.
5550 (gfc_trans_character_select): Likewise.
5551 (gfc_trans_allocate): Likewise, don't typecast strlen result.
5552 (gfc_trans_deallocate): Don't typecast strlen result.
5553 * trans-types.c (gfc_size_kind): New variable.
5554 (gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
5555 from size_type_node.
5556 * trans-types.h: Fix comment.
5558 2018-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
5562 * check.c (gfc_check_eoshift): Check for string length and
5563 for conformance of boundary.
5564 * intrinsic.c (add_functions): Add gfc_simplify_eoshift.
5565 * intrinsic.h: Add prototype for gfc_simplify_eoshift.
5566 * simplify.c (gfc_simplify_eoshift): New function.
5568 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5569 Alan Hayward <alan.hayward@arm.com>
5570 David Sherwood <david.sherwood@arm.com>
5572 * trans-types.c (gfc_type_for_mode): Handle MODE_VECTOR_BOOL.
5574 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5575 Alan Hayward <alan.hayward@arm.com>
5576 David Sherwood <david.sherwood@arm.com>
5578 * trans-types.c (gfc_type_for_mode): Check valid_vector_subparts_p.
5580 2018-01-03 Thomas Koenig <tkoenig@gcc.gnu.org>
5583 * check.c (gfc_check_eoshift): Error for missing boundary if array
5584 is not one of the standard types.
5586 2018-01-03 Jakub Jelinek <jakub@redhat.com>
5588 Update copyright years.
5590 * gfortranspec.c (lang_specific_driver): Update copyright notice
5592 * gfc-internals.texi: Bump @copying's copyright year.
5593 * gfortran.texi: Ditto.
5594 * intrinsic.texi: Ditto.
5595 * invoke.texi: Ditto.
5597 2017-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
5600 * intrinsic.c (add_function): Add gfc_simplify_maxloc and
5601 gfc_simplify_minloc to maxloc and minloc, respectively.
5602 * intrinsic.h: Add prototypes for gfc_simplify_minloc
5603 and gfc_simplify_maxloc.
5604 * simplify.c (min_max_chose): Adjust prototype. Modify function
5605 to have a return value which indicates if the extremum was found.
5606 (is_constant_array_expr): Fix typo in comment.
5607 (simplify_minmaxloc_to_scalar): New function.
5608 (simplify_minmaxloc_nodim): New function.
5609 (new_array): New function.
5610 (simplify_minmaxloc_to_array): New function.
5611 (gfc_simplify_minmaxloc): New function.
5612 (simplify_minloc): New function.
5613 (simplify_maxloc): New function.
5615 2018-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
5619 * simplify.c (gfc_simplify_cshift): Re-implement to allow full
5622 2018-01-01 Paul Thomas <pault@gcc.gnu.org>
5625 * resolve.c (resolve_fl_derived0): Add caf_token fields for
5626 allocatable and pointer scalars, when -fcoarray selected.
5627 * trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
5628 field as well as the backend_decl.
5629 (gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
5630 derived types that are not vtypes. Components with caf_token
5631 attribute are pvoid types. For a component requiring it, find
5632 the caf_token field and have the component token field point to
5636 *trans-types.c (gfc_get_array_descriptor_base): Add the token
5637 field to the descriptor even when codimen not set.
5639 Copyright (C) 2018 Free Software Foundation, Inc.
5641 Copying and distribution of this file, with or without modification,
5642 are permitted in any medium without royalty provided the copyright
5643 notice and this notice are preserved.