From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 713953858D28; Tue, 13 Sep 2022 18:34:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 713953858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663094097; bh=91lTmTiT8nWlN9X8dYI7rUREvtkcNF7DrtWcbLxa+UA=; h=From:To:Subject:Date:From; b=k0LmEle4KLfHuVwGHfjpDHdlmHKryO6ShjqGZehmsdFnl+yu+PIz0q906xwCbq7af MSDEPlgKqfw4B+32yezU97TPMVe8h84fpHvK3FRpis6POWDbkJeZAUmJE5YEhe1L7z bGFrmsWjzaZYDZfrFmSeh6C1hm/ek7gdb5YCRn9c= From: "kasper93 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106931] New: -Wstringop-overflow false positive Date: Tue, 13 Sep 2022 18:34:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kasper93 at gmail dot com X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: 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=3D106931 Bug ID: 106931 Summary: -Wstringop-overflow false positive Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: kasper93 at gmail dot com Target Milestone: --- Created attachment 53572 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53572&action=3Dedit minimal test case Hello, I noticed increased amount of -Wstringop-overflow warnings on FFmpeg build = with gcc 12.2.0, doesn't happen with gcc 11.3.0. At first glance most of them are bogus and happen only when specific set of compiler flags are used. I minimized one case, see attachment, it is pretty simple. I think gcc shou= ld handle this properly. Happens with this specific command gcc -O3 -fno-tree-vectorize -Wstringop-overflow -c test.c Attached case is minimized cbs_av1.c. For more cases which looks like gcc12 regression you can compile FFmpeg ./configure --enable-lto make Note that lto has to be enabled, without lto it doesn't produce those warni= ngs. I can minimize more cases, but frankly I don't want to spend time minimizin= g it only to see the same pattern at the end. So maybe let's work on this first. Tested with FFmpeg 60d8c2019f Thanks, Kacper=