From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 24E293858D39; Tue, 28 Mar 2023 07:07:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 24E293858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679987223; bh=IeBphIp/snX+T7G8eNPHPb+C/7ZnYILxyA3nuxtywoM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=a4ajcYjI7eWV3Ah55lapmtXhzIPESwOOCjFYVE2y/lMtWDnl1EadYt/Ju6p7Zh9yc W+StgzFE/Dh0WS06HURRoSTOq+xJap5n7c5NAoMaWY54mdEGDsTkMbk/3sIKMWf2OF JqVzNtCMA6aE2XN4EcDfSFu+o8SyP+WFiKYr7V5Y= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyB0cmVlLW9wdGltaXphdGlvbi8xMDkyOThdIHdhcm5pbmc6?= =?UTF-8?B?IGFycmF5IHN1YnNjcmlwdCDigJguLi7igJkgaXMgcGFydGx5IG91dHNpZGUg?= =?UTF-8?B?YXJyYXkgYm91bmRzIG9mIOKAmC4uLuKAmQ==?= Date: Tue, 28 Mar 2023 07:07:02 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: component everconfirmed keywords bug_status blocked cf_reconfirmed_on Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109298 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Component|c |tree-optimization Ever confirmed|0 |1 Keywords| |diagnostic Status|UNCONFIRMED |NEW Blocks| |56456 Last reconfirmed| |2023-03-28 --- Comment #1 from Richard Biener --- Confirmed. [local count: 1073741824]: packet_4 =3D __builtin_malloc (40); _1 =3D &packet_4->data; __builtin_memcpy (_1, buf_5(D), 36); _7 =3D MEM[(struct ib_rmpp_mad *)packet_4 + 4B].class; return _7; the issue is that rmpp_mad->class is considered a dereference of rmpp_mad where ib_rmpp_mad doesn't fit in the allocation. The wording of the diagnostic is just very confusing here. How the fix to the driver should look like probably depends on the actual source - for the reduced testcase the allocation/copying doesn't make sense while for the actual driver it probably does. As said above, the diagnostic wording could be improved, so confirmed. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D56456 [Bug 56456] [meta-bug] bogus/missing -Warray-bounds=