From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 49909 invoked by alias); 5 Apr 2016 19:40:46 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 49898 invoked by uid 89); 5 Apr 2016 19:40:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=target_expr, vectorofint, undetected, vector-of-int X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 05 Apr 2016 19:40:34 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5B61F1E32; Tue, 5 Apr 2016 19:40:33 +0000 (UTC) Received: from [10.10.116.28] (ovpn-116-28.rdu2.redhat.com [10.10.116.28]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u35JeWbi019001; Tue, 5 Apr 2016 15:40:32 -0400 Subject: Re: [C++ PATCH] PR 70501, ICE in verify ctor sanity To: Nathan Sidwell References: <5702A3C5.20103@acm.org> Cc: GCC Patches From: Jason Merrill Message-ID: <570414B0.7090703@redhat.com> Date: Tue, 05 Apr 2016 19:40:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 In-Reply-To: <5702A3C5.20103@acm.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2016-04/txt/msg00258.txt.bz2 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