[Bug c++/93639] [c++2a] Segfault on non type template parameter and consteval (master)

2020-04-10 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93639

Marek Polacek  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED
 CC||mpolacek at gcc dot gnu.org

--- Comment #5 from Marek Polacek  ---
Dup.

*** This bug has been marked as a duplicate of bug 93383 ***

[Bug c++/93639] [c++2a] Segfault on non type template parameter and consteval (master)

2020-02-13 Thread raphael.grimm at kit dot edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93639

--- Comment #4 from raphael grimm  ---
Created attachment 47835
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47835=edit
reduced to 11 lines and no includes

http://coliru.stacked-crooked.com/a/be3bbfdf6a59b45e

on g++ (GCC) 9.2.0

output:

main.cpp:8:26: internal compiler error: Segmentation fault
8 | using type = B;
  |  ^
0xb5c5ff crash_signal
../.././gcc/toplev.c:326
0x5cb5c3 resolve_args
../.././gcc/cp/call.c:4350
0x5da0c7 build_new_function_call(tree_node*, vec**, int)
../.././gcc/cp/call.c:4469
0x6bbeaf do_class_deduction
../.././gcc/cp/pt.c:27497
0x6bbeaf do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int)
../.././gcc/cp/pt.c:27556
0x6c492d convert_template_argument
../.././gcc/cp/pt.c:8086
0x6c492d convert_template_argument
../.././gcc/cp/pt.c:7859
0x6cf795 coerce_template_parms
../.././gcc/cp/pt.c:8589
0x6d0b2a lookup_template_class_1
../.././gcc/cp/pt.c:9399
0x6d0b2a lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
../.././gcc/cp/pt.c:9769
0x6ebe5d finish_template_type(tree_node*, tree_node*, int)
../.././gcc/cp/semantics.c:3312
0x6929c5 cp_parser_template_id
../.././gcc/cp/parser.c:16481
0x692b07 cp_parser_class_name
../.././gcc/cp/parser.c:23276
0x695790 cp_parser_qualifying_entity
../.././gcc/cp/parser.c:6696
0x695790 cp_parser_nested_name_specifier_opt
../.././gcc/cp/parser.c:6382
0x6931f5 cp_parser_simple_type_specifier
../.././gcc/cp/parser.c:17839
0x68a1a5 cp_parser_type_specifier
../.././gcc/cp/parser.c:17507
0x69d118 cp_parser_type_specifier_seq
../.././gcc/cp/parser.c:21985
0x69a4b4 cp_parser_type_id_1
../.././gcc/cp/parser.c:21814
0x69e902 cp_parser_type_id
../.././gcc/cp/parser.c:21893
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug c++/93639] [c++2a] Segfault on non type template parameter and consteval (master)

2020-02-10 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93639

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2020-02-10
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #3 from Marek Polacek  ---
Confirmed.

G++ 7 ICEs too with -std=c++17, so not caused by consteval.

[Bug c++/93639] [c++2a] Segfault on non type template parameter and consteval (master)

2020-02-09 Thread raphael.grimm at kit dot edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93639

--- Comment #2 from raphael grimm  ---
Created attachment 47804
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47804=edit
more minimal example also causing this error

test.cpp:23:28: internal compiler error: Segmentation fault
   23 | using type = a;
  |^
0xc8980f crash_signal
/home/raphael/repos/build-gcc/gcc/gcc/toplev.c:328
0x673d73 resolve_args(vec*, int)
/home/raphael/repos/build-gcc/gcc/gcc/cp/call.c:4431
0x78513c do_class_deduction
/home/raphael/repos/build-gcc/gcc/gcc/cp/pt.c:28599
0x78513c do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int)
/home/raphael/repos/build-gcc/gcc/gcc/cp/pt.c:28732
0x7865cd convert_template_argument
/home/raphael/repos/build-gcc/gcc/gcc/cp/pt.c:8309
0x798db7 convert_template_argument
/home/raphael/repos/build-gcc/gcc/gcc/cp/pt.c:8082
0x798db7 coerce_template_parms
/home/raphael/repos/build-gcc/gcc/gcc/cp/pt.c:8813
0x79cbd9 lookup_template_class_1
/home/raphael/repos/build-gcc/gcc/gcc/cp/pt.c:9668
0x79dedc lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
/home/raphael/repos/build-gcc/gcc/gcc/cp/pt.c:10040
0x7b925d finish_template_type(tree_node*, tree_node*, int)
/home/raphael/repos/build-gcc/gcc/gcc/cp/semantics.c:3407
0x762265 cp_parser_template_id
/home/raphael/repos/build-gcc/gcc/gcc/cp/parser.c:16681
0x7624b7 cp_parser_class_name
/home/raphael/repos/build-gcc/gcc/gcc/cp/parser.c:23618
0x75f2e1 cp_parser_qualifying_entity
/home/raphael/repos/build-gcc/gcc/gcc/cp/parser.c:6738
0x75f2e1 cp_parser_nested_name_specifier_opt
/home/raphael/repos/build-gcc/gcc/gcc/cp/parser.c:6410
0x71 cp_parser_simple_type_specifier
/home/raphael/repos/build-gcc/gcc/gcc/cp/parser.c:18076
0x74d46c cp_parser_type_specifier
/home/raphael/repos/build-gcc/gcc/gcc/cp/parser.c:17734
0x760af2 cp_parser_type_specifier_seq
/home/raphael/repos/build-gcc/gcc/gcc/cp/parser.c:22307
0x75adb4 cp_parser_type_id_1
/home/raphael/repos/build-gcc/gcc/gcc/cp/parser.c:22124
0x75bf58 cp_parser_type_id
/home/raphael/repos/build-gcc/gcc/gcc/cp/parser.c:22203
0x75bf58 cp_parser_alias_declaration
/home/raphael/repos/build-gcc/gcc/gcc/cp/parser.c:19949
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug c++/93639] [c++2a] Segfault on non type template parameter and consteval (master)

2020-02-09 Thread raphael.grimm at kit dot edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93639

--- Comment #1 from raphael grimm  ---
Created attachment 47803
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47803=edit
ii file