From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3E3E63858417; Thu, 30 Nov 2023 23:20:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3E3E63858417 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701386406; bh=V3PVwZs3yCr8s+7AFqI+IZp2PISAf98rTfEbv5phQ+k=; h=From:To:Subject:Date:From; b=cVyu+o8lh3AA8wYmHWamspGB6sp0U6UXc+e3jP1ArRRXDOxITCyXJPPQ7NwFj7GGB kMozse6qIfzuUHAqa1SF1APQj/Uoa4TNIQSY0WxntDxKo2Hw33ykL8M7z8CRmCTyUm sCa16XMYAywQzaaHVttwc9RjOahE7r6lnw35uOgI= From: "magnus.hegdahl at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/112795] New: [C++>=14] ICE pragma GCC unroll (n) cxx_eval_constant_expression Date: Thu, 30 Nov 2023 23:20:05 +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: 8.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: magnus.hegdahl 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=3D112795 Bug ID: 112795 Summary: [C++>=3D14] ICE pragma GCC unroll (n) cxx_eval_constant_expression Product: gcc Version: 8.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: magnus.hegdahl at gmail dot com Target Milestone: --- Compiling the following code with GCC >=3D 8.1 (when #pragma GCC unroll was added), and -std=3Dc++14 or higher results in an internal compiler error: ``` constexpr int n =3D 1; template void f() { #pragma GCC unroll(n) for (int i =3D 0; i !=3D n; ++i) { } } ``` It does not fail if f is not a template, if n is not parenthesized, or if u= sing -std=3Dc++11.=