From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 93135 invoked by alias); 17 Dec 2018 18:58:57 -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 92789 invoked by uid 89); 17 Dec 2018 18:58:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=sk:maybe_c, Hx-languages-length:989, thusly, H*MI:sk:2018120 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 ESMTP; Mon, 17 Dec 2018 18:58:55 +0000 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4484889AF6 for ; Mon, 17 Dec 2018 18:58:54 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-117-214.ams2.redhat.com [10.36.117.214]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DCD1D101E5A5; Mon, 17 Dec 2018 18:58:53 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id wBHIwpqx028029; Mon, 17 Dec 2018 19:58:52 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id wBHIwoH8028028; Mon, 17 Dec 2018 19:58:50 +0100 Date: Mon, 17 Dec 2018 18:58:00 -0000 From: Jakub Jelinek To: Jason Merrill Cc: gcc-patches@gcc.gnu.org Subject: Patch ping (was Re: [C++ PATCH] Fix ICE with offsetof-like initializer (PR c++/88410)) Message-ID: <20181217185850.GD23305@tucnak> Reply-To: Jakub Jelinek References: <20181209110506.GV12380@tucnak> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181209110506.GV12380@tucnak> User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg01246.txt.bz2 Hi! On Sun, Dec 09, 2018 at 12:05:06PM +0100, Jakub Jelinek wrote: > The following testcase ICEs starting with my change to move offsetof-like > expression handling from the parsing to cp_fold - if the base expression > is not INTEGER_CST, but a constant VAR_DECL initialized with INTEGER_CST, > then we don't fold it as offsetof-like expression and as we use recursive > cp_fold only on functions, not initializers, we don't fold that VAR_DECL in > there into INTEGER_CST and the middle-end ICEs on it trying to fold it. > > Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for > trunk? > > 2018-12-09 Jakub Jelinek > > PR c++/88410 > * cp-gimplify.c (cp_fold) : For offsetof-like folding, > call maybe_constant_value on val to see if it is INTEGER_CST. > > * g++.dg/cpp0x/pr88410.C: New test. I'd like to ping this patch. Thanks. Jakub