From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31965 invoked by alias); 17 Dec 2018 21:00:00 -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 31952 invoked by uid 89); 17 Dec 2018 20:59:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=Hx-spam-relays-external:209.85.160.196, H*RU:209.85.160.196 X-HELO: mail-qt1-f196.google.com Received: from mail-qt1-f196.google.com (HELO mail-qt1-f196.google.com) (209.85.160.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Dec 2018 20:59:58 +0000 Received: by mail-qt1-f196.google.com with SMTP id e5so15735726qtr.12 for ; Mon, 17 Dec 2018 12:59:58 -0800 (PST) Return-Path: Received: from [192.168.1.149] (209-6-216-142.s141.c3-0.smr-cbr1.sbo-smr.ma.cable.rcncustomer.com. [209.6.216.142]) by smtp.gmail.com with ESMTPSA id v57sm10411778qtv.80.2018.12.17.12.59.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Dec 2018 12:59:55 -0800 (PST) Subject: Re: [C++ PATCH] Fix ICE with offsetof-like initializer (PR c++/88410) To: Jakub Jelinek Cc: gcc-patches@gcc.gnu.org References: <20181209110506.GV12380@tucnak> From: Jason Merrill Message-ID: <0f3942c2-f961-e25f-1b09-9d93b301297a@redhat.com> Date: Mon, 17 Dec 2018 21:00:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: <20181209110506.GV12380@tucnak> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg01255.txt.bz2 On 12/9/18 6:05 AM, Jakub Jelinek wrote: > Hi! > > 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? OK. Jason