From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 410B33858429; Thu, 30 Nov 2023 23:34:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 410B33858429 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701387240; bh=gjhrJ72ywBAx4u9wXhrH4qp0qxotmxPTL7ZErdlD49s=; h=From:To:Subject:Date:In-Reply-To:References:From; b=g3+B0bum9MHgB0unNQRsqMhFKXUSIfq9b0zh+RPShrWkKhB5LAKouI9KlfMdbG7TU G5L+/UdDIAWHzueCHVB0SvHH8N0jNqEw/CE/Wt+OhxEm/2VnGyXjG/+E3DCnxUIG1J b9DyJqqjz4+9fuS+Q4wHmYOuE2bNJKNdSXLkiFAM= From: "magnus.hegdahl at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/112795] [C++>=14] ICE pragma GCC unroll (n) cxx_eval_constant_expression Date: Thu, 30 Nov 2023 23:34:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed 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: 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=3D112795 --- Comment #1 from Magnus Hokland Hegdahl --- Full output: // Target: x86_64-pc-linux-gnu // Configured with: /build/gcc/src/gcc/configure --enable-languages=3Dada,c,c++,d,fortran,go,lto,objc,obj-c++ --enable-boots= trap --prefix=3D/usr --libdir=3D/usr/lib --libexecdir=3D/usr/lib --mandir=3D/usr= /share/man --infodir=3D/usr/share/info --with-bugurl=3Dhttps://bugs.archlinux.org/ --with-build-config=3Dbootstrap-lto --with-linker-hash-style=3Dgnu --with-system-zlib --enable-__cxa_atexit --enable-cet=3Dauto --enable-checking=3Drelease --enable-clocale=3Dgnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-obj= ect --enable-libstdcxx-backtrace --enable-link-serialization=3D1 --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=3Dposix --disable-libssp --disable-libstdc= xx-pch --disable-werror // Thread model: posix // Supported LTO compression algorithms: zlib zstd // gcc version 13.2.1 20230801 (GCC)=20 //=20 // mwe.cpp: In function =E2=80=98void f()=E2=80=99: // mwe.cpp:5:21: internal compiler error: in cxx_eval_constant_expression, = at cp/constexpr.cc:7619 // 5 | #pragma GCC unroll(n) // | ^ // 0x1ad33c8 internal_error(char const*, ...) // ???:0 // 0x6b7b63 fancy_abort(char const*, int, char const*) // ???:0 // 0x711364 maybe_constant_value(tree_node*, tree_node*, mce_value) // ???:0 // 0x9443d0 c_common_parse_file() // ???:0 // Please submit a full bug report, with preprocessed source. // Please include the complete backtrace with any bug report. // See for instructions. // /usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/cc1plus -quiet -D_GNU_SOURCE mwe= .cpp -quiet -dumpbase mwe.cpp -dumpbase-ext .cpp -mtune=3Dgeneric -march=3Dx86-6= 4 -Wall -Wextra -Wpedantic -freport-bug -o - -frandom-seed=3D0 -fdump-noaddr # 0 "mwe.cpp" # 0 "" # 0 "" # 1 "/usr/include/stdc-predef.h" 1 3 4 # 0 "" 2 # 1 "mwe.cpp" constexpr int n =3D 1; template void f() { #pragma GCC unroll(n) for (int i =3D 0; i !=3D n; ++i) { } }=