From: Jason Merrill <jason@redhat.com>
To: Nathan Sidwell <nathan@acm.org>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [C++ PATCH] PR 70501, ICE in verify ctor sanity
Date: Tue, 05 Apr 2016 19:40:00 -0000 [thread overview]
Message-ID: <570414B0.7090703@redhat.com> (raw)
In-Reply-To: <5702A3C5.20103@acm.org>
On 04/04/2016 01:26 PM, Nathan Sidwell wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70501
>
> This fixes 70501. The cause is an omission in typeck when converting a
> scalar operand to a vector. We use build_vector_from_val, which can
> return a CONSTRUCTOR. We fail to wrap that CONSTRUCTOR in a TARGET_EXPR.
>
> The ICE arises because at the point we meet that CONSTRUCTOR during the
> constexpr processing, the currently active object under construction is
> that for the result of the <= operator, which has type vector-of-bool,
> rather than vector-of-int. (thus this problem arises in other vector
> ops, but mostly undetected because the result type is the same as the
> operand type)
It's not clear to me that we really need a TARGET_EXPR for vector
values. Since one element of a vector can't refer to another, we don't
need the ctx->ctor handling. Perhaps we should handle vectors like we
do PMF types in cxx_eval_bare_aggregate?
Jason
next prev parent reply other threads:[~2016-04-05 19:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-04 17:26 Nathan Sidwell
2016-04-05 19:40 ` Jason Merrill [this message]
2016-04-05 21:21 ` Nathan Sidwell
2016-04-06 14:49 ` Jason Merrill
2016-04-06 15:07 ` Nathan Sidwell
2016-04-07 15:18 ` Nathan Sidwell
2016-04-12 15:11 ` Jason Merrill
2016-04-12 19:41 ` [committed] Add PR c++/70571 testcase Jakub Jelinek
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=570414B0.7090703@redhat.com \
--to=jason@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=nathan@acm.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).