[Bug c++/97536] [concepts] parser segfault for concept defined in function template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97536 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |11.0
[Bug c++/97536] [concepts] parser segfault for concept defined in function template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97536 Marek Polacek changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #4 from Marek Polacek --- Fixed in GCC 11.
[Bug c++/97536] [concepts] parser segfault for concept defined in function template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97536 --- Comment #3 from CVS Commits --- The master branch has been updated by Marek Polacek : https://gcc.gnu.org/g:29d8838c5ecaf70ce552fea7639ec1f34adb2e04 commit r11-8252-g29d8838c5ecaf70ce552fea7639ec1f34adb2e04 Author: Marek Polacek Date: Mon Apr 19 16:21:46 2021 -0400 c++: ICE with concept defined in function [PR97536] This is an ICE-on-invalid, but I keep seeing it when reducing code so I'd like to fix it. We crash on template void forward() { concept C = true; } which breaks two requirements: [temp.concept]/1: A concept is a template ... [temp.concept]/3: A concept-definition shall inhabit a namespace scope. This patch adds a test that exercises broken code and fixes the ICE by checking that a concept-definition is defined at namespace scope. gcc/cp/ChangeLog: PR c++/97536 * decl.c (grokvardecl): Given an error when a concept is not defined at namespace scope. gcc/testsuite/ChangeLog: PR c++/97536 * g++.dg/concepts/diagnostic16.C: New test.
[Bug c++/97536] [concepts] parser segfault for concept defined in function template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97536 Marek Polacek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org --- Comment #2 from Marek Polacek --- Still present, just hit this with template void forward() { concept C = true; } Let me take a look then...
[Bug c++/97536] [concepts] parser segfault for concept defined in function template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97536 Marek Polacek changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED |NEW CC||mpolacek at gcc dot gnu.org Last reconfirmed||2020-10-26 --- Comment #1 from Marek Polacek --- Confirmed.