From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2470 invoked by alias); 28 Jan 2019 17:29:13 -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 2459 invoked by uid 89); 28 Jan 2019 17:29:13 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= 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, 28 Jan 2019 17:29:12 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ED5227F41D; Mon, 28 Jan 2019 17:29:10 +0000 (UTC) Received: from redhat.com (unknown [10.20.4.51]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5CC605C25D; Mon, 28 Jan 2019 17:29:10 +0000 (UTC) Date: Mon, 28 Jan 2019 18:11:00 -0000 From: Marek Polacek To: Jason Merrill Cc: Christophe Lyon , Tim Song , GCC Patches Subject: Re: C++ PATCH for c++/89024 - ICE with incomplete enum type Message-ID: <20190128172908.GU26714@redhat.com> References: <20190124191614.GG26714@redhat.com> <20190125170957.GL26714@redhat.com> <8fb80442-9bbc-38fa-5b87-3aa940284fad@redhat.com> <20190125232227.GQ26714@redhat.com> <20190128153959.GS26714@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-SW-Source: 2019-01/txt/msg01617.txt.bz2 On Mon, Jan 28, 2019 at 11:55:21AM -0500, Jason Merrill wrote: > > > The new test fails on arm-eabi (with newlib, but passes on on arm*linux*): > > > FAIL: g++.dg/cpp0x/enum37.C -std=c++14 (test for excess errors) > > > FAIL: g++.dg/cpp0x/enum37.C -std=c++17 (test for excess errors) > > > > > > The log says: > > > /gcc/testsuite/g++.dg/cpp0x/enum37.C:24:41: error: aggregate > > > 'same s2' has incomplete type and cannot > > > be defined > > I imagine that this is because arm-eabi defaults to -fshort-enums; you > can check for this in the testsuite with { target short_enums }. Indeed, I wasn't aware of this. > > Clearly the additional checking I added won't fly; Jason, can I commit > > this? > > > > Tested on x86_64-linux, ok for trunk? > > > > 2019-01-28 Marek Polacek > > > > * g++.dg/cpp0x/enum37.C: Remove a check. > > I'd prefer to make the check conditional. In which case, this. I think it's better than making the whole test conditional on short_enums. Tested on x86_64-linux, ok for trunk? 2019-01-28 Marek Polacek * g++.dg/cpp0x/enum37.C: Add dg-error. diff --git gcc/testsuite/g++.dg/cpp0x/enum37.C gcc/testsuite/g++.dg/cpp0x/enum37.C index 6aa3d4015d7..b67720d5ea0 100644 --- gcc/testsuite/g++.dg/cpp0x/enum37.C +++ gcc/testsuite/g++.dg/cpp0x/enum37.C @@ -21,4 +21,4 @@ enum E { }; same s; -same s2; +same s2; // { dg-error "incomplete type" "" { target short_enums } }