From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailrelay.tugraz.at (mailrelay.tugraz.at [129.27.2.202]) by sourceware.org (Postfix) with ESMTPS id 9EB683858C35 for ; Mon, 27 Nov 2023 15:54:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9EB683858C35 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=tugraz.at Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tugraz.at ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9EB683858C35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=129.27.2.202 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701100461; cv=none; b=Qc6I8Oa5O76cy5sfZIZZrLOJXUCW5u9AR4cOd0QnVkRM44Eg0VG1rKTYeoHzOcnq+lxZuHLG/zD4u+3OypGOolw2QgViAvbrHkjiyC2vz9KNv3RzZRY88lZ7SwwIqJ/eH1JplsufQ+2StOtKANXLI+MmnX6dYmjm9X6D8+wd3fQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701100461; c=relaxed/simple; bh=1vVOksUPZsXYfA78uRT32mUFcPvQV4F/KVeWmW7H/Zg=; h=DKIM-Signature:Message-ID:Subject:From:To:Date:MIME-Version; b=QiJzMzBvoJJ5Sf6B7bRcoMhxCn1w+SlZRlKAIdNSqrLc7laG9J3Ht3+ZxKieAcLBFzTn0oixqZte6OmkL+bXRsFCYPieVXtjGNR0r/1o8b8g1QIPJgFJZ3CavzobBlnwRFBOzjlUOTXFL3TR+f+z3K+XZYmr1UJZ/hHXVJyGSNI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from [192.168.0.221] (84-115-221-205.cable.dynamic.surfer.at [84.115.221.205]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4Sf9BG2T2Zz3wcP; Mon, 27 Nov 2023 16:54:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1701100454; bh=pTpCbLOdXx/MolTw+p2l5WYzPyzGDfrW6fXEy/1lk5A=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=cmirPlhWD1jwtY7f+ejszDZWeF3vKlxaXhMITfW9JIgzMCqdLs+Zd12N5ttTsvu7s Noe/TKzDd6LVuwNJRVK5H7NnQ/PGYviUL1UKRQs8FPYWzdfKiOFJxY9pQphvsS2Cm5 0QDds99MQVrrirnDZQBBCNCxV3ji5hb/4KnNHbno= Message-ID: <8f1e8fc04828bb659c6a06fc756a03076f2c43ea.camel@tugraz.at> Subject: Re: Ping: [PATCH] Fix PR112419 From: Martin Uecker To: Jeff Law , Hans-Peter Nilsson , gcc-patches@gcc.gnu.org Cc: richard.guenther@gmail.com Date: Mon, 27 Nov 2023 16:54:13 +0100 In-Reply-To: <38d42164-10ef-42a1-9175-62c37c7c5f8e@gmail.com> References: <20231107035835.7BC31203F2@pchp3.se.axis.com> <1e832537-f6e7-4599-8b35-6710f79b2a46@gmail.com> <20231116042406.B834320432@pchp3.se.axis.com> <20231123170511.04C0720427@pchp3.se.axis.com> <38d42164-10ef-42a1-9175-62c37c7c5f8e@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4-2 MIME-Version: 1.0 X-TUG-Backscatter-control: G/VXY7/6zeyuAY/PU2/0qw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116 X-Spam-Status: No, score=-9.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_NUMSUBJECT,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Am Montag, dem 27.11.2023 um 08:36 -0700 schrieb Jeff Law: >=20 > On 11/23/23 10:05, Hans-Peter Nilsson wrote: > > > From: Hans-Peter Nilsson > > > Date: Thu, 16 Nov 2023 05:24:06 +0100 > > >=20 > > > > From: Martin Uecker > > > > Date: Tue, 07 Nov 2023 06:56:25 +0100 > > >=20 > > > > Am Montag, dem 06.11.2023 um 21:01 -0700 schrieb Jeff Law: > > > > >=20 > > > > > On 11/6/23 20:58, Hans-Peter Nilsson wrote: > > > > > > This patch caused a testsuite regression: there's now an > > > > > > "excess error" failure for gcc.dg/Wnonnull-4.c for 32-bit > > > > > > targets (and 64-bit targets testing with a "-m32" option) > > > > > > after your r14-5115-g6e9ee44d96e5. It's logged as PR112419. > > > > > It caused failures for just about every target ;( Presumably it = worked > > > > > on x86_64... > > > >=20 > > > > I do not think this is a true regression > > > > just a problem with the test on 32-bit which somehow surfaced > > > > due to the change. > > > >=20 > > > > The excess error is: > > > >=20 > > > > FAIL: gcc.dg/Wnonnull-4.c (test for excess errors) > > > > Excess errors: > > > > /home/tcwg-buildslave/workspace/tcwg_gnu_6/abe/snapshots/gcc.git~ma= ster/gcc/testsuite/gcc.dg/Wnonnull-4.c:144:3: warning: 'fda_n_5' specified = size 4294967256 exceeds maximum object size > > > > 2147483647 [-Wstringop-overflow=3D] > > > >=20 > > > > I think the warning was suppressed before due to the other (nonnull= ) > > > > warning which I removed in this case. > > > >=20 > > > > I think the simple fix might be to to turn off -Wstringop-overflow. > > >=20 > > > No, that trigs many of the dg-warnings that are tested. > > >=20 > > > (I didn't pay attention to the actual warning messages and > > > tried to pursue that at first.) > > >=20 > > > Maybe think it's best to actually expect the warning, like > > > so. > > >=20 > > > Maintainers of 16-bit targets will have to address their > > > concerns separately. For example, they may choose to not > > > run the test at all. > > >=20 > > > Ok to commit? > > >=20 > > > Subject: [PATCH] gcc.dg/Wnonnull-4.c: Handle new overflow warning for= 32-bit targets [PR112419] > > >=20 > > > PR testsuite/112419 > > > * gcc.dg/Wnonnull-4.c (test_fda_n_5): Expect warning for exceeding > > > maximum object size for 32-bit targets. > > > --- > > > gcc/testsuite/gcc.dg/Wnonnull-4.c | 1 + > > > 1 file changed, 1 insertion(+) > > >=20 > > > diff --git a/gcc/testsuite/gcc.dg/Wnonnull-4.c b/gcc/testsuite/gcc.dg= /Wnonnull-4.c > > > index 1f14fbba45df..d63e76da70a2 100644 > > > --- a/gcc/testsuite/gcc.dg/Wnonnull-4.c > > > +++ b/gcc/testsuite/gcc.dg/Wnonnull-4.c > > > @@ -142,6 +142,7 @@ void test_fda_n_5 (int r_m1) > > > T ( 1); // { dg-bogus "argument 2 of variable length ar= ray 'double\\\[n]\\\[5]' is null but the corresponding bound argument 1 val= ue is 1" } > > > T ( 9); // { dg-bogus "argument 2 of variable length ar= ray 'double\\\[n]\\\[5]' is null but the corresponding bound argument 1 val= ue is 9" } > > > T (max); // { dg-bogus "argument 2 of variable length ar= ray 'double\\\[n]\\\[5]' is null but the corresponding bound argument 1 val= ue is \\d+" } > > > +// { dg-warning "size 4294967256 exceeds maximum object size" "" { t= arget ilp32 } .-1 } > > > } > Unfortunately I think we need to go back to the original issue that=20 > Martin (I think) dismissed. >=20 > Specifically, this is a regression. It's very clear that prior to the= =20 > patch in question there was no diagnostic about the size of the=20 > requested memory allocation and after the patch in question we get the= =20 > "exceeds maximum object size" diagnostic. >=20 > Now one explanation could be that the diagnostic is warranted and it was= =20 > a bug that the diagnostic hadn't been emitted prior to Martin's patch.= =20 > In this case some kind of dg-blah is warranted, but I don't think anyone= =20 > has made this argument. >=20 I believe the warning is correct but was suppressed before. My plan was to split up the test case in one which is for -Wstringop-overflow and one which is for -Wnonnull and then one could turn off the -Wstringop-overflow for the tests which are actually for -Wnonnull. But adding the dg-blah would certainly be simpler. Martin