From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 86E4B3858C53; Fri, 26 Jan 2024 16:58:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 86E4B3858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706288291; bh=8NGEPi3yPs5xpjrmSp4MKI0bgJMDRKeEdl/sxEHT8qs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=O98bRygsxuZN7bQnHI2yJGpxPR7KuXmjuzsvuHhaSP1B0oHEB0oNlq6qAR0f9EoNr I4XgSx7UtHlvAXTHGnvDisJzi3aM7R2GORQjqvU+5vLmWyocS91esj0zKNwJBSmCWY LtPkrHgXVqSNWb/c7MeJoM+XRqFa5laAAYWgEvO4= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113620] ICE with missing "typename" and -std=c++20 Date: Fri, 26 Jan 2024 16:58:10 +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: 13.2.1 X-Bugzilla-Keywords: ice-on-valid-code 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: keywords cf_known_to_fail 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=3D113620 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|ice-on-invalid-code |ice-on-valid-code Known to fail| |5.1.0 --- Comment #2 from Andrew Pinski --- (In reply to Xi Ruoyao from comment #1) > With -std=3Dc++17 it's fine: >=20 > t1.c:19:5: error: need 'typename' before 'DEF::TYP' because 'DEF' is a > dependent scope > 19 | DEF::TYP r=3DDEF::INIT; > | ^~~ > | typename Note once you add the typename (which is optional in C++20 by the way), the= ICE is back in C++11 mode even. This has been ICEing from at least GCC 5.1.0.=