public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/87923] ICE in gfc_widechar_to_char, at fortran/scanner.c:198
Date: Thu, 09 Apr 2020 21:47:24 +0000	[thread overview]
Message-ID: <bug-87923-4-cSZRu57Zjh@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-87923-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87923

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Fritz Reese <foreese@gcc.gnu.org>:

https://gcc.gnu.org/g:44facdb79f2d96ea8f5f93cfd440b3d0351d9bdb

commit r10-7670-g44facdb79f2d96ea8f5f93cfd440b3d0351d9bdb
Author: Fritz Reese <foreese@gcc.gnu.org>
Date:   Thu Apr 9 16:55:44 2020 -0400

    PR fortran/87923 -- fix ICE when resolving I/O tags and simplify io.c

    2020-04-06  Fritz Reese  <foreese@gcc.gnu.org>

    This patch reorganizes I/O checking code. Checks which were done in the
    matching phase which do not affect the match result are moved to the
    resolution phase. Checks which were duplicated in both the matching phase
    and resolution phase have been reduced to one check in the resolution
phase.

    Another section of code which used a global async_io_dt flag to check for
    and assign the asynchronous attribute to variables used in asynchronous I/O
    has been simplified.

    Furthermore, this patch improves error reporting and expands test coverage
    of I/O tags:

     - "TAG must be an initialization expression" reported by io.c
       (check_io_constraints) is replaced with an error from expr.c
       (gfc_reduce_init_expr) indicating _why_ the expression is not a valid
       initialization expression.

     - Several distinct error messages regarding the check for scalar
       + character + default kind have been unified to one message reported by
       resolve_tag or check_*_constraints.

    gcc/fortran/ChangeLog:

    2020-04-09  Fritz Reese  <foreese@gcc.gnu.org>

            PR fortran/87923
            * gfortran.h (gfc_resolve_open, gfc_resolve_close): Add
            locus parameter.
            (gfc_resolve_dt): Add code parameter.
            * io.c (async_io_dt, check_char_variable, is_char_type): Removed.
            (resolve_tag_format): Add locus to error message regarding
            zero-sized array in FORMAT tag.
            (check_open_constraints, check_close_constraints): New functions
            called at resolution time.
            (gfc_match_open, gfc_match_close, match_io): Move checks which
don't
            affect the match result to new functions check_open_constraints,
            check_close_constraints, check_io_constraints.
            (gfc_resolve_open, gfc_resolve_close): Call new functions
            check_open_constraints, check_close_constraints after all tags have
            been independently resolved.  Remove duplicate constraints which
are
            already verified by resolve_tag. Explicitly pass locus to all error
            reports.
            (compare_to_allowed_values): Add locus parameter and provide
            explicit locus all error reports.
            (match_open_element, match_close_element, match_file_element,
            match_dt_element, match_inquire_element): Remove redundant special
            cases for ASYNCHRONOUS and IOMSG tags.
            (gfc_resolve_dt): Remove redundant special case for format
            expression.  Call check_io_constraints, forwarding an I/O list as
            the io_code parameter if present.
            (check_io_constraints): Change return type to bool. Pass explicit
            locus to error reports. Move generic checks after tag-specific
            checks, since errors are no longer buffered.  Move simplification
of
            format string to match_io.  Remove redundant checks which are
            verified by resolve_tag.  Remove usage of async_io_dt flag and
            explicitly mark symbols used in asynchronous I/O with the
            asynchronous attribute.
            * resolve.c (resolve_transfer, resolve_fl_namelist): Remove checks
            for async_io_dt flag. This is now done in io.c
            (check_io_constraints).
            (gfc_resolve_code): Pass code locus to gfc_resolve_open,
            gfc_resolve_close, gfc_resolve_dt.

    gcc/testsuite/ChangeLog:

    2020-04-09  Fritz Reese  <foreese@gcc.gnu.org>

            PR fortran/87923
            * gfortran.dg/f2003_io_8.f03: Fix expected error messages.
            * gfortran.dg/io_constraints_8.f90: Likewise.
            * gfortran.dg/iomsg_2.f90: Likewise.
            * gfortran.dg/pr66725.f90: Likewise.
            * gfortran.dg/pr88205.f90: Likewise.
            * gfortran.dg/write_check4.f90: Likewise.
            * gfortran.dg/asynchronous_5.f03: New test.
            * gfortran.dg/io_constraints_15.f90: Likewise.
            * gfortran.dg/io_constraints_16.f90: Likewise.
            * gfortran.dg/io_constraints_17.f90: Likewise.
            * gfortran.dg/io_constraints_18.f90: Likewise.
            * gfortran.dg/io_tags_1.f90: Likewise.
            * gfortran.dg/io_tags_10.f90: Likewise.
            * gfortran.dg/io_tags_2.f90: Likewise.
            * gfortran.dg/io_tags_3.f90: Likewise.
            * gfortran.dg/io_tags_4.f90: Likewise.
            * gfortran.dg/io_tags_5.f90: Likewise.
            * gfortran.dg/io_tags_6.f90: Likewise.
            * gfortran.dg/io_tags_7.f90: Likewise.
            * gfortran.dg/io_tags_8.f90: Likewise.
            * gfortran.dg/io_tags_9.f90: Likewise.
            * gfortran.dg/write_check5.f90: Likewise.

  parent reply	other threads:[~2020-04-09 21:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-87923-4@http.gcc.gnu.org/bugzilla/>
2020-04-06 17:42 ` foreese at gcc dot gnu.org
2020-04-09 21:47 ` cvs-commit at gcc dot gnu.org [this message]
2020-04-09 21:47 ` foreese at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-87923-4-cSZRu57Zjh@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).