From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0C13C3858CDB; Wed, 1 Mar 2023 10:55:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0C13C3858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677668101; bh=rUKgIasI868Kx+zJZCd6WjLc+S4dlkifvu/g5DAFOmE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nv3rw+ad6ArabDbJwc5JJ09Iy7+B659vHNg8feBBlv9RA8oSBRjv8SoJplQ/1NcC8 ZIEyAfCkYn6BjpW8xWbAp8cKzPmh+LXLBgRjHWWVRO/+60J7PjSIimYFx/CzXszyy6 QBRYzeZNGqxA9qBgcB5UY1HBhx8z1TrpJo1dG6tw= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/108975] Internal compiler error on constexpr variable used as nontype template Date: Wed, 01 Mar 2023 10:54:59 +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: 12.1.0 X-Bugzilla-Keywords: c++-lambda X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: cf_reconfirmed_on keywords bug_status everconfirmed 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=3D108975 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2023-03-01 Keywords|needs-reduction | Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #6 from Andrew Pinski --- Reduced: int h(int); template auto get_derivative_type1() { return 0; } template void generate_kernels1() { const unsigned num_elements =3D 1; constexpr int dim =3D 1; [&](auto index) { using derivative_type =3D decltype(get_derivative_type1()); h(num_elements * 1); }; } void thermal_test() { generate_kernels1(); }=