From patchwork Thu Feb 10 23:29:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 51035 Return-Path: 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 6DF433858002 for ; Thu, 10 Feb 2022 23:30:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6DF433858002 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1644535850; bh=YzGyy+GQoylZ0fa+lIHmqCS0NBlReLJde4HeqSmf7mc=; 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=NyXl605lSExLE6O8Eh1T6Lpg7IS81V/AJtSnCM7rdGZ/YmCym1wE0zRL0M6roGKAL YZ1PrjDkyIVITFq1C9XSm960JzEthc2WfFL+ex8fYn/tYuWDQ0xuVL8zvUeK/6MDrt f+oyzDWHa6puHyl5ogXTGBz6BWjYjlJ8IymfcTjM= 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.133.124]) by sourceware.org (Postfix) with ESMTPS id F35123858D1E for ; Thu, 10 Feb 2022 23:30:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F35123858D1E Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-636-oZ7HHICfNXqDI-cEQsg8CQ-1; Thu, 10 Feb 2022 18:30:17 -0500 X-MC-Unique: oZ7HHICfNXqDI-cEQsg8CQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9F5AD1091DA1; Thu, 10 Feb 2022 23:30:16 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.125]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 09E5C519CE; Thu, 10 Feb 2022 23:30:03 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.16.1/8.16.1) with ESMTPS id 21ANU0Ww2177973 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 11 Feb 2022 00:30:01 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.16.1/8.16.1/Submit) id 21ANTxph2177830; Fri, 11 Feb 2022 00:29:59 +0100 Date: Fri, 11 Feb 2022 00:29:59 +0100 To: Richard Biener Subject: testsuite: Fix up g++.dg/warn/Wuninitialized-32.C test for ilp32 [PR104373] Message-ID: <20220210232959.GM2646553@tucnak> References: <20220208070313.8E16013483@imap2.suse-dmz.suse.de> <1920fa5b-2f34-4882-243b-6fdc6ccd8b63@redhat.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Cc: Martin Sebor , gcc-patches@gcc.gnu.org Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" On Thu, Feb 10, 2022 at 10:57:02AM +0100, Richard Biener via Gcc-patches wrote: > > >>> * g++.dg/warn/Wuninitialized-32.C: New testcase. The testcase FAILs whenever size_t is not unsigned long: FAIL: g++.dg/warn/Wuninitialized-32.C -std=c++98 (test for excess errors) Excess errors: .../gcc/testsuite/g++.dg/warn/Wuninitialized-32.C:4:7: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter [-fpermissive] Fixed by using __SIZE_TYPE__ instead of unsigned long. Regtested on x86_64-linux -m32/-m64, committed to trunk as obvious. 2022-02-11 Jakub Jelinek PR tree-optimization/104373 * g++.dg/warn/Wuninitialized-32.C (operator new[]): Use __SIZE_TYPE__ as type of the first argument instead of unsigned long. Jakub --- gcc/testsuite/g++.dg/warn/Wuninitialized-32.C.jj 2022-02-11 00:19:22.376064016 +0100 +++ gcc/testsuite/g++.dg/warn/Wuninitialized-32.C 2022-02-11 00:25:45.194857715 +0100 @@ -1,7 +1,7 @@ // { dg-do compile } // { dg-additional-options "-Wall" } -void* operator new[](unsigned long, void* __p); +void* operator new[](__SIZE_TYPE__, void* __p); struct allocator {