| Message ID | Y2pCbby26nP6ipNf@tucnak |
|---|---|
| State | New |
| Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EA1373858C2D for <patchwork@sourceware.org>; Tue, 8 Nov 2022 11:50:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EA1373858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667908242; bh=jQKr2SW1WQiA+QJZWaeyjwT/lQrwEFR5ZRPoImBcCso=; h=Date:To:Cc:Subject:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=gFsuzxCG/H7mSnv1IDTQJ20y1CdFQ788tDBjHyFVpsOrThiVuwGvGkCrcCxIBj0Nb 4qQ2sHv252pcSVIHFbBLEFdwT6x+ooIhXd5/yAwz+mL6evl7SH89nirGtXvIJesKNl Yw7Tk6kG6aGzZBzSN8wLwS7v5nHuHe94/aLRfKTw= 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 DC88F3858416 for <gcc-patches@gcc.gnu.org>; Tue, 8 Nov 2022 11:50:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DC88F3858416 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-27-9KnFtTD9N2OPnr0iielPbQ-1; Tue, 08 Nov 2022 06:50:10 -0500 X-MC-Unique: 9KnFtTD9N2OPnr0iielPbQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 25A7C101CC67 for <gcc-patches@gcc.gnu.org>; Tue, 8 Nov 2022 11:50:10 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.193.252]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CF8D14EA47; Tue, 8 Nov 2022 11:50:09 +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 2A8Bo6J62242149 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 8 Nov 2022 12:50:06 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 2A8Bo6Tv2242148; Tue, 8 Nov 2022 12:50:06 +0100 Date: Tue, 8 Nov 2022 12:50:05 +0100 To: Aldy Hernandez <aldyh@redhat.com> Cc: GCC patches <gcc-patches@gcc.gnu.org>, Andrew MacLeod <amacleod@redhat.com> Subject: [PATCH] testsuite: Fix up pr107541.c test Message-ID: <Y2pCbby26nP6ipNf@tucnak> References: <20221107114238.663927-1-aldyh@redhat.com> MIME-Version: 1.0 In-Reply-To: <20221107114238.663927-1-aldyh@redhat.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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.5 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> Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
| Series |
testsuite: Fix up pr107541.c test
|
|
Commit Message
Jakub Jelinek
Nov. 8, 2022, 11:50 a.m. UTC
On Mon, Nov 07, 2022 at 12:42:38PM +0100, Aldy Hernandez via Gcc-patches wrote:
> * gcc.dg/tree-ssa/pr107541.c: New test.
The test fails when long is 32-bit rather than 64-bit (say x86_64 with
RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} tree-ssa.exp=pr107541.c'
).
I've tweaked it to use long long so it passes even on the 32-bit
targets, and added an early out for weirdo targets because I think
the test assumes the usual 1/2/4/8 bytes sizes for char/short/int/long long.
Tested on x86_64-linux, ok for trunk?
2022-11-08 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/107541
* gcc.dg/tree-ssa/pr107541.c (c): Use long long type rather than long.
(main): Punt if sizeof short isn't 2, or int 4, or long long 8.
Jakub
Comments
On 11/8/22 04:50, Jakub Jelinek via Gcc-patches wrote: > On Mon, Nov 07, 2022 at 12:42:38PM +0100, Aldy Hernandez via Gcc-patches wrote: >> * gcc.dg/tree-ssa/pr107541.c: New test. > The test fails when long is 32-bit rather than 64-bit (say x86_64 with > RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} tree-ssa.exp=pr107541.c' > ). > I've tweaked it to use long long so it passes even on the 32-bit > targets, and added an early out for weirdo targets because I think > the test assumes the usual 1/2/4/8 bytes sizes for char/short/int/long long. > > Tested on x86_64-linux, ok for trunk? > > 2022-11-08 Jakub Jelinek <jakub@redhat.com> > > PR tree-optimization/107541 > * gcc.dg/tree-ssa/pr107541.c (c): Use long long type rather than long. > (main): Punt if sizeof short isn't 2, or int 4, or long long 8. OK jeff
--- gcc/testsuite/gcc.dg/tree-ssa/pr107541.c.jj 2022-11-07 15:12:24.519022064 +0100 +++ gcc/testsuite/gcc.dg/tree-ssa/pr107541.c 2022-11-08 12:45:12.926718243 +0100 @@ -3,9 +3,11 @@ unsigned char a = 1; char b, e; -long c; +long long c; short d; int main() { + if (sizeof (short) != 2 || sizeof (int) != 4 || sizeof (long long) != 8) + return 0; a = ~(1 && a); c = ~((~a / 8 | -2) & 11007578330939886389LLU); e = -c;