public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: Paolo Carlini <paolo.carlini@oracle.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [C++ Patch] PR 84632 ("[8 Regression] internal compiler error: tree check: expected record_type or union_type or qual_union_type, have array_type in reduced_constant_expression_p...")
Date: Thu, 22 Mar 2018 18:11:00 -0000	[thread overview]
Message-ID: <CADzB+2m6KxXsqFau5KjqHkewBGEFsTTqyAw+1WQ+XiMqn8AmCA@mail.gmail.com> (raw)
In-Reply-To: <8a93abd6-69ae-4ff5-5332-eb8791d492f1@oracle.com>

On Thu, Mar 22, 2018 at 4:05 AM, Paolo Carlini <paolo.carlini@oracle.com> wrote:
> Hi,
>
> yesterday I figured out that this issue is in fact orthogonal to possible
> improvements to maybe_deduce_size_from_array_init, indeed it happens also
> when we are not deducing the size. The testcase is very similar to that
> recently submitted for c++/78345, which led Jason to add the bit of
> additional checking around the middle of build_aggr_init. Since we did
> already have a similar check a bit earlier - not requiring the computation
> of from_array - I added one for VAR_DECLs too in the same place and
> tweaked/improved a bit the error message in the process (a few greps
> revealed that we don't seem to have any other generic error message using
> the form "bad ..."), consistently with the diagnostic that we already
> provide for, eg, a simple
>
>     int a[2] = a;
>
> FYI, I must also add that entire testsuite doesn't have a test triggering
> the existing TREE_CODE (init) == TREE_LIST check, and failed so far to
> construct one... (many such issues are normally catched by digest_init).
> Tested x86_64-linux.

That whole block is there to support this sort of initialization, as
an ancient extension.  Since it isn't generally allowed, and is
causing trouble, let's remove it and reject anything that isn't an
initializer list.

Jason

  reply	other threads:[~2018-03-22 18:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-22  8:12 Paolo Carlini
2018-03-22 18:11 ` Jason Merrill [this message]
2018-03-22 19:04   ` Paolo Carlini
2018-03-22 21:19     ` Paolo Carlini
2018-03-22 21:30       ` Jason Merrill
2018-03-22 21:39         ` Paolo Carlini
2018-03-22 22:26           ` Paolo Carlini
2018-03-22 22:35             ` Jason Merrill
2018-03-23 10:48               ` Paolo Carlini
2018-03-23 12:45                 ` Jason Merrill
2018-03-26 10:30                   ` Paolo Carlini
2018-03-26 17:17                     ` Jason Merrill
2018-03-26 18:25                       ` Paolo Carlini
2018-03-26 18:33                         ` Jason Merrill

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=CADzB+2m6KxXsqFau5KjqHkewBGEFsTTqyAw+1WQ+XiMqn8AmCA@mail.gmail.com \
    --to=jason@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=paolo.carlini@oracle.com \
    /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).