[Bug c++/113170] ICE: Segfault (template template parameter, alias template, default template argument)

2023-12-31 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113170

Andrew Pinski  changed:

   What|Removed |Added

   Keywords|ice-on-invalid-code |

--- Comment #3 from Andrew Pinski  ---
I am not 100% sure this is valid or not; I suspect it is not valid but 
MSVC looks like goes into an similar infinite recusion too.

While clang errors out:
```
:11:8: error: template template argument has different template
parameters than its corresponding template template parameter
   11 | SS ss;
  |^
:6:1: note: too many template parameters in template template argument
6 | template typename TT = SSS>
  | ^~~~
:8:10: note: previous template template parameter is here
8 | template typename TT = S, typename T = int>
  |  ^~
```

But that error message seems wrong.

[Bug c++/113170] ICE: Segfault (template template parameter, alias template, default template argument)

2023-12-31 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113170

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
   Keywords||ice-on-invalid-code
   Last reconfirmed||2023-12-31

--- Comment #2 from Andrew Pinski  ---
```
#5  0x00c4dd6b in coerce_template_parms (parms=0x773097f8,
args=0x76ba4800, in_decl=0x0, complain=0, require_all_args=true) at
../../gcc/cp/pt.cc:9115
#6  0x00c74bdb in coerce_template_template_parms (parm_tmpl=, arg_tmpl=, complain=0, in_decl=0x0, outer_args=) at ../../gcc/cp/pt.cc:8211
#7  0x00c4c375 in convert_template_argument (parm=0x77fb7180,
arg=0x77fb7100, args=0x76ba5898, complain=0, i=1, in_decl=0x0) at
../../gcc/cp/pt.cc:8653
#8  0x00c4e294 in coerce_template_parms (parms=0x77309af0,
args=0x76ba47e0, in_decl=0x0, complain=0, require_all_args=true) at
../../gcc/tree.h:3613
#9  0x00c74bdb in coerce_template_template_parms (parm_tmpl=, arg_tmpl=, complain=0, in_decl=0x0, outer_args=) at ../../gcc/cp/pt.cc:8211
#10 0x00c4c375 in convert_template_argument (parm=0x77fb7080,
arg=0x77fb7200, args=0x76ba5870, complain=0, i=1, in_decl=0x0) at
../../gcc/cp/pt.cc:8653
#11 0x00c4e294 in coerce_template_parms (parms=0x773097f8,
args=0x76ba47c0, in_decl=0x0, complain=0, require_all_args=true) at
../../gcc/tree.h:3613
#12 0x00c74bdb in coerce_template_template_parms (parm_tmpl=, arg_tmpl=, complain=0, in_decl=0x0, outer_args=) at ../../gcc/cp/pt.cc:8211
#13 0x00c4c375 in convert_template_argument (parm=0x77fb7180,
arg=0x77fb7100, args=0x76ba5848, complain=0, i=1, in_decl=0x0) at
../../gcc/cp/pt.cc:8653
#14 0x00c4e294 in coerce_template_parms (parms=0x77309af0,
args=0x76ba47a0, in_decl=0x0, complain=0, require_all_args=true) at
../../gcc/tree.h:3613
#15 0x00c74bdb in coerce_template_template_parms (parm_tmpl=, arg_tmpl=, complain=0, in_decl=0x0, outer_args=) at ../../gcc/cp/pt.cc:8211
#16 0x00c4c375 in convert_template_argument (parm=0x77fb7080,
arg=0x77fb7200, args=0x76ba5820, complain=0, i=1, in_decl=0x0) at
../../gcc/cp/pt.cc:8653
#17 0x00c4e294 in coerce_template_parms (parms=0x773097f8,
args=0x76ba4780, in_decl=0x0, complain=0, require_all_args=true) at
../../gcc/tree.h:3613
#18 0x00c74bdb in coerce_template_template_parms (parm_tmpl=, arg_tmpl=, complain=0, in_decl=0x0, outer_args=) at ../../gcc/cp/pt.cc:8211
#19 0x00c4c375 in convert_template_argument (parm=0x77fb7180,
arg=0x77fb7100, args=0x76ba57f8, complain=0, i=1, in_decl=0x0) at
../../gcc/cp/pt.cc:8653
#20 0x00c4e294 in coerce_template_parms (parms=0x77309af0,
args=0x76ba4760, in_decl=0x0, complain=0, require_all_args=true) at
../../gcc/tree.h:3613
#21 0x00c74bdb in coerce_template_template_parms (parm_tmpl=, arg_tmpl=, complain=0, in_decl=0x0, outer_args=) at ../../gcc/cp/pt.cc:8211
#22 0x00c4c375 in convert_template_argument (parm=0x77fb7080,
arg=0x77fb7200, args=0x76ba57d0, complain=0, i=1, in_decl=0x0) at
../../gcc/cp/pt.cc:8653
#23 0x00c4e294 in coerce_template_parms (parms=0x773097f8,
args=0x76ba4740, in_decl=0x0, complain=0, require_all_args=true) at
../../gcc/tree.h:3613
#24 0x00c74bdb in coerce_template_template_parms (parm_tmpl=, arg_tmpl=, complain=0, in_decl=0x0, outer_args=) at ../../gcc/cp/pt.cc:8211
#25 0x00c4c375 in convert_template_argument (parm=0x77fb7180,
arg=0x77fb7100, args=0x76ba57a8, complain=0, i=1, in_decl=0x0) at
../../gcc/cp/pt.cc:8653
#26 0x00c4e294 in coerce_template_parms (parms=0x77309af0,
args=0x76ba4720, in_decl=0x0, complain=0, require_all_args=true) at
../../gcc/tree.h:3613
#27 0x00c74bdb in coerce_template_template_parms (parm_tmpl=, arg_tmpl=, complain=0, in_decl=0x0, outer_args=) at ../../gcc/cp/pt.cc:8211
#28 0x00c4c375 in convert_template_argument (parm=0x77fb7080,
arg=0x77fb7200, args=0x76ba5780, complain=0, i=1, in_decl=0x0) at
../../gcc/cp/pt.cc:8653
#29 0x00c4e294 in coerce_template_parms (parms=0x773097f8,
args=0x76ba4700, in_decl=0x0, complain=0, require_all_args=true) at
../../gcc/tree.h:3613
#30 0x00c74bdb in coerce_template_template_parms (parm_tmpl=, arg_tmpl=, complain=0, in_decl=0x0, outer_args=) at ../../gcc/cp/pt.cc:8211
#31 0x00c4c375 in convert_template_argument (parm=0x77fb7180,
arg=0x77fb7100, args=0x76ba5758, complain=0, i=1, in_decl=0x0) at
../../gcc/cp/pt.cc:8653
#32 0x00c4e294 in coerce_template_parms (parms=0x77309af0,
args=0x76ba46e0, in_decl=0x0, complain=0, require_all_args=true) at
../../gcc/tree.h:361

[Bug c++/113170] ICE: Segfault (template template parameter, alias template, default template argument)

2023-12-29 Thread iamkirkezz at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113170

--- Comment #1 from Kirkezz  ---
I was experimenting with the template template parameters, and ICE occured.