From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 310AF3858D35; Mon, 8 May 2023 16:07:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 310AF3858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683562044; bh=3H+7AsSUKaLGFh5d4QynW2E06WWylszBDDtwnxh4Wp0=; h=From:To:Subject:Date:From; b=HqwoF5WXAVFpnf/RXX29D6r0FDQ/g/TGBjFr2Rs5wKyNnJYowu07yurH1DJ5bt/xu 88RYzT7i3gDyjBOV+BGdmVHEeocg8TyqY0nQzNafNagMVtB/o/xY+dwXPbGWzvA8YH GkMOx0KR7E6I8hIPCMLf+kyDHA6/qU7HmG3dTCec= From: "janezz55 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109775] New: gcc misidentifies a VLA Date: Mon, 08 May 2023 16:07:23 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: janezz55 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 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=3D109775 Bug ID: 109775 Summary: gcc misidentifies a VLA Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: janezz55 at gmail dot com Target Milestone: --- If I compile the example .cpp file: gcc -std=3Dc++20 -Wextra -Wall -Wpedantic add_sub_tests.cpp -o a gcc produces the warning: ../intt.hpp: In member function 'constexpr auto intt::intt< , N, >::naimul(const intt::intt< , N, >&) const': ../intt.hpp:675:24: warning: ISO C++ forbids variable length array 'v_' [-W= vla] 675 | D const pp(D(v_[i]) * o.v_[S - i]); | ^~ But no VLA is involved and clang++ 15 manages to avoid this issue. The example file is here: https://github.com/user1095108/intt/blob/master/tests/add_sub_tests.cpp I believe the bug was present in prior versions of gcc as well.=