Message ID | Y1AkY7V2xil5Wpub@tucnak |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp416946wrs; Wed, 19 Oct 2022 09:24:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6NZkpEdwYyet6wsLpvHB0uJ6PT0RAy9udIOmGWc3TLsqvTEEnernznwor31qKG5C0CligW X-Received: by 2002:a17:907:783:b0:76e:f290:8b5 with SMTP id xd3-20020a170907078300b0076ef29008b5mr7704262ejb.395.1666196685754; Wed, 19 Oct 2022 09:24:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666196685; cv=none; d=google.com; s=arc-20160816; b=q6qwBMusjAtmYu5oyzySTligrPAr40veEZTEQkvjE4oFGA0+n6tzG79micNl7hNjba Bd1qQEh78I78CRRtnqTSYw6LTgTqfd0EawV58Z7ZcVhiT2ad0AZLlTzhZ/Chw/h2DaeX mL/NAXMSnQwiXz1f+ENVIT09FEd994cCU3rR9aWQKEM9UDYxOS5fbKjsQ483+jvJqFXs mV1KAYejHpqsGrTsYe5nvLa/cKPbdQ2d4AMAakv+bhDbAOjX5nIvhQ8n8ve0mBHoRHnG HD3IAYmu+ufZNX1O1/YFcfajvWOPxv/zo241GpvhWNaBEGhJjM/AKrvQUfNDuRohfQaZ Y5uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :content-disposition:in-reply-to:mime-version:references:message-id :subject:to:date:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=ANu8EYolPV1L9/XlcfELwvy19E/DIalBzzi/qGhv45Y=; b=RMp5iP8jWnsCcgTSp1RCweyniMc2PjsEt2y8x29alK3N4prdLgL7jTnXwlClmqbq4S gNSYf3He5H9wM8Xae94epe4LLkBrYinRoYd/WSTeK32v+ASecaE09fRDmlRErnqRyZiv jL9p5UiNR0V7YrYXvjym437KVr5PXq9U+vydZYwChc/ICw7Np6cfwdtYU0U+dFmdrwnG FLNeV3HISFtzg/2D1v76pt8PxrCK7sjRNWkfbpqZtBH33g6TMQe9dlTsqRPTTu27S+FM JA0Eo+5cK3dkHFdC5NYd2GR8Uyq3JMnHTDdRb0osaYriTmDTQYU8u78ljwKJQWSsvm24 jHiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=f1rWfR+p; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id cs17-20020a170906dc9100b007848e6eaef1si8847151ejc.733.2022.10.19.09.24.45 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Oct 2022 09:24:45 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=f1rWfR+p; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 24EFC3857348 for <ouuuleilei@gmail.com>; Wed, 19 Oct 2022 16:24:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 24EFC3857348 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666196652; bh=ANu8EYolPV1L9/XlcfELwvy19E/DIalBzzi/qGhv45Y=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=f1rWfR+p30yoBYEGPBSFN1TtxKgoGfUQEERnm3WTv2NIK+ALyZ1uHdLYRNzXl3a64 JvR8hFjHmi5L2WS/rMvbIjw374d9YMXXBIwNdX+L0PSAIfOYC5kuPz8qpbtIdQa7xA jMLAxNuoA7XjQ6/CIAsHC4afQh3hccVWi5WIxnqA= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 38DDC385742B for <gcc-patches@gcc.gnu.org>; Wed, 19 Oct 2022 16:23:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 38DDC385742B Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-59-I2E-MtQDMFKZvY2HPrOZOg-1; Wed, 19 Oct 2022 12:23:03 -0400 X-MC-Unique: I2E-MtQDMFKZvY2HPrOZOg-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2CD71803D49; Wed, 19 Oct 2022 16:23:03 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.193.252]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DC1ED492B05; Wed, 19 Oct 2022 16:23:02 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 29JGN0kF3963356 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 19 Oct 2022 18:23:00 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 29JGMxkm3963355; Wed, 19 Oct 2022 18:22:59 +0200 Date: Wed, 19 Oct 2022 18:22:59 +0200 To: Joseph Myers <joseph@codesourcery.com> Subject: [PATCH] testsuite: Fix up c2x-enum-1.c for 32-bit arches [PR107311] Message-ID: <Y1AkY7V2xil5Wpub@tucnak> References: <alpine.DEB.2.22.394.2210181407500.2354457@digraph.polyomino.org.uk> <Y089Dk5CirY1WlZJ@tucnak> <alpine.DEB.2.22.394.2210191456300.7558@digraph.polyomino.org.uk> MIME-Version: 1.0 In-Reply-To: <alpine.DEB.2.22.394.2210191456300.7558@digraph.polyomino.org.uk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Jakub Jelinek via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Jakub Jelinek <jakub@redhat.com> Cc: gcc-patches@gcc.gnu.org Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747133855755335463?= X-GMAIL-MSGID: =?utf-8?q?1747133855755335463?= |
Series |
testsuite: Fix up c2x-enum-1.c for 32-bit arches [PR107311]
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Jakub Jelinek
Oct. 19, 2022, 4:22 p.m. UTC
Hi! On Wed, Oct 19, 2022 at 02:57:59PM +0000, Joseph Myers wrote: > I think the type checked for e5a should be conditional on __LONG_MAX__ > > __INT_MAX__; everything else there should be OK regardless. So like this? Tested on x86_64-linux with -m32 and -m64, ok for trunk? 2022-10-19 Jakub Jelinek <jakub@redhat.com> PR c/107311 * gcc.dg/c2x-enum-1.c (enum e5): Expect e5a type inside of enum to be int rather than long if long isn't wider than int. Jakub
Comments
On Wed, 19 Oct 2022, Jakub Jelinek wrote: > Hi! > > On Wed, Oct 19, 2022 at 02:57:59PM +0000, Joseph Myers wrote: > > I think the type checked for e5a should be conditional on __LONG_MAX__ > > > __INT_MAX__; everything else there should be OK regardless. > > So like this? > Tested on x86_64-linux with -m32 and -m64, ok for trunk? > > 2022-10-19 Jakub Jelinek <jakub@redhat.com> > > PR c/107311 > * gcc.dg/c2x-enum-1.c (enum e5): Expect e5a type inside of > enum to be int rather than long if long isn't wider than int. OK.
--- gcc/testsuite/gcc.dg/c2x-enum-1.c.jj 2022-10-19 01:15:21.025186231 +0200 +++ gcc/testsuite/gcc.dg/c2x-enum-1.c 2022-10-19 18:19:45.215215713 +0200 @@ -82,7 +82,12 @@ enum e5 { e5a = __LONG_MAX__, e5b, e5c, e5d = ((typeof (e5b)) -1) < 0, e5e = (unsigned long) -1, e5f, e5g = ((typeof (e5e)) -1) > 0, - TYPE_CHECK (e5a, long), TYPE_CHECK (e5e, unsigned long) }; +#if __LONG_MAX__ > __INT_MAX__ + TYPE_CHECK (e5a, long), +#else + TYPE_CHECK (e5a, int), +#endif + TYPE_CHECK (e5e, unsigned long) }; extern enum e5 e5v; extern typeof (e5a) e5v; extern typeof (e5b) e5v;