https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98297
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Note, the testcase FAILs on the 8 branch, the emitted error is different. $ gcc-9/obj28/gcc/cc1plus -quiet -std=c++11 /tmp/pr98297.C -o /tmp/pr98297.s /tmp/pr98297.C:5:1: warning: ‘b’ attribute directive ignored [-Wattributes] 5 | a <int>; // { dg-error "does not declare anything" } | ^~~~~~~ /tmp/pr98297.C:5:1: error: declaration does not declare anything [-fpermissive] $ gcc-8/obj32/gcc/cc1plus -quiet -std=c++11 /tmp/pr98297.C -o /tmp/pr98297.s /tmp/pr98297.C:5:1: warning: ‘b’ attribute directive ignored [-Wattributes] a <int>; // { dg-error "does not declare anything" } ^~~~~~~ /tmp/pr98297.C:5:1: error: name of class shadows template template parameter ‘a’ $ gcc-8/obj30/gcc/cc1plus -quiet -std=c++11 /tmp/pr98297.C -o /tmp/pr98297.s /tmp/pr98297.C:5:1: internal compiler error: Segmentation fault a <int>; // { dg-error "does not declare anything" } ^~~~~~~ gcc-8/obj30 is 5 months old snapshot which expectedly ICEs, but the middle error is different from what the test expects.