https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105575
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org, | |marxin at gcc dot gnu.org Last reconfirmed| |2022-05-12 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #8 from Martin Liška <marxin at gcc dot gnu.org> --- I can reproduce it on x86_64-linux-gnu where it ends with stack overflow: Program received signal SIGSEGV, Segmentation fault. 0x00000000011795b3 in comp_template_parms_position (t1=0x7fffd2fa9c78, t2=0x7fffd2fb1150) at ../../gcc/cp/typeck.c:1205 1205 if (cxx_dialect >= cxx14 && (is_auto (t1) || is_auto (t2))) (gdb) bt #0 0x00000000011795b3 in comp_template_parms_position (t1=0x7fffd2fa9c78, t2=0x7fffd2fb1150) at ../../gcc/cp/typeck.c:1205 #1 0x0000000001178e83 in structural_comptypes (t1=0x7fffd2fa9c78, t2=0x7fffd2fb1150, strict=0) at ../../gcc/cp/typeck.c:1358 #2 0x00000000012ab40a in comp_template_parms (parms1=<optimized out>, parms2=<optimized out>) at ../../gcc/cp/pt.c:3369 #3 0x0000000001178eb9 in structural_comptypes (t1=0x7fffd2fa9c78, t2=0x7fffd2fb1150, strict=0) at ../../gcc/cp/typeck.c:1361 #4 0x00000000012ab40a in comp_template_parms (parms1=<optimized out>, parms2=<optimized out>) at ../../gcc/cp/pt.c:3369 #5 0x0000000001178eb9 in structural_comptypes (t1=0x7fffd2fa9c78, t2=0x7fffd2fb1150, strict=0) at ../../gcc/cp/typeck.c:1361 #6 0x00000000012ab40a in comp_template_parms (parms1=<optimized out>, parms2=<optimized out>) at ../../gcc/cp/pt.c:3369 #7 0x0000000001178eb9 in structural_comptypes (t1=0x7fffd2fa9c78, t2=0x7fffd2fb1150, strict=0) at ../../gcc/cp/typeck.c:1361 #8 0x00000000012ab40a in comp_template_parms (parms1=<optimized out>, parms2=<optimized out>) at ../../gcc/cp/pt.c:3369 #9 0x0000000001178eb9 in structural_comptypes (t1=0x7fffd2fa9c78, t2=0x7fffd2fb1150, strict=0) at ../../gcc/cp/typeck.c:1361 #10 0x00000000012ab40a in comp_template_parms (parms1=<optimized out>, parms2=<optimized out>) at ../../gcc/cp/pt.c:3369 #11 0x0000000001178eb9 in structural_comptypes (t1=0x7fffd2fa9c78, t2=0x7fffd2fb1150, strict=0) at ../../gcc/cp/typeck.c:1361 #12 0x00000000012ab40a in comp_template_parms (parms1=<optimized out>, parms2=<optimized out>) at ../../gcc/cp/pt.c:3369 #13 0x0000000001178eb9 in structural_comptypes (t1=0x7fffd2fa9c78, t2=0x7fffd2fb1150, strict=0) at ../../gcc/cp/typeck.c:1361 #14 0x00000000012ab40a in comp_template_parms (parms1=<optimized out>, parms2=<optimized out>) at ../../gcc/cp/pt.c:3369 #15 0x0000000001178eb9 in structural_comptypes (t1=0x7fffd2fa9c78, t2=0x7fffd2fb1150, strict=0) at ../../gcc/cp/typeck.c:1361 #16 0x00000000012ab40a in comp_template_parms (parms1=<optimized out>, parms2=<optimized out>) at ../../gcc/cp/pt.c:3369 #17 0x0000000001178eb9 in structural_comptypes (t1=0x7fffd2fa9c78, t2=0x7fffd2fb1150, strict=0) at ../../gcc/cp/typeck.c:1361 #18 0x00000000012ab40a in comp_template_parms (parms1=<optimized out>, parms2=<optimized out>) at ../../gcc/cp/pt.c:3369 #19 0x0000000001178eb9 in structural_comptypes (t1=0x7fffd2fa9c78, t2=0x7fffd2fb1150, strict=0) at ../../gcc/cp/typeck.c:1361 While GCC 12.1 rejects the code with: g++ pipeline.ii -c -std=gnu++17 -c In file included from ../../buildtools/third_party/libc++/trunk/include/__locale:15, from ../../buildtools/third_party/libc++/trunk/include/ios:215, from ../../buildtools/third_party/libc++/trunk/include/ostream:137, from ../../src/common/globals.h:12, from ../../src/compiler/pipeline.h:12, from ../../src/compiler/pipeline.cc:5: ../../buildtools/third_party/libc++/trunk/include/string:742:13: error: anonymous struct with base classes Rejected since r12-2627-g3ead06c1cff8fb42.