This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/68724] New: ice in unify, at cp/pt.c:19902
- From: "regehr at cs dot utah.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 05 Dec 2015 18:36:01 +0000
- Subject: [Bug c++/68724] New: ice in unify, at cp/pt.c:19902
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68724
Bug ID: 68724
Summary: ice in unify, at cp/pt.c:19902
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: regehr at cs dot utah.edu
Target Milestone: ---
ICE on invalid code
$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/home/regehr/z/compiler-install/gcc-r231259-install/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/regehr/z/compiler-source/gcc/configure
--prefix=/home/regehr/z/compiler-install/gcc-r231259-install
--disable-bootstrap --disable-multilib --enable-languages=c,c++
Thread model: posix
gcc version 6.0.0 20151204 (experimental) (GCC)
$ cat hello.cpp
template <typename _Tp, _Tp> struct integral_constant {
} struct : integral_constant < bool, true {
} template <typename _Tp> struct integral_constant < bool, __is_enum(_Tp) {
$ g++ -std=c++11 hello.cpp -w
hello.cpp:2:1: error: expected â;â after struct definition
} struct : integral_constant < bool, true {
^
hello.cpp:2:12: error: parse error in template argument list
} struct : integral_constant < bool, true {
^~~~~~~~~~~~~~~~~
hello.cpp:3:1: error: expected â;â after struct definition
} template <typename _Tp> struct integral_constant < bool, __is_enum(_Tp) {
^
hello.cpp:3:1: error: abstract declarator â<anonymous struct>â used as
declaration
hello.cpp:3:34: error: parse error in template argument list
} template <typename _Tp> struct integral_constant < bool, __is_enum(_Tp) {
^~~~~~~~~~~~~~~~~
hello.cpp:3:34: error: template argument â__is_enum(_Tp)â involves template
parameter(s)
hello.cpp:3:34: internal compiler error: in unify, at cp/pt.c:19902
0x644f9a unify
/home/regehr/z/compiler-source/gcc/gcc/cp/pt.c:19902
0x644c45 unify
/home/regehr/z/compiler-source/gcc/gcc/cp/pt.c:19703
0x64759e get_partial_spec_bindings
/home/regehr/z/compiler-source/gcc/gcc/cp/pt.c:20466
0x63ef8b most_specialized_partial_spec
/home/regehr/z/compiler-source/gcc/gcc/cp/pt.c:20735
0x64aa17 process_partial_specialization
/home/regehr/z/compiler-source/gcc/gcc/cp/pt.c:4694
0x64bddf push_template_decl_real(tree_node*, bool)
/home/regehr/z/compiler-source/gcc/gcc/cp/pt.c:5214
0x64f2b6 push_template_decl
/home/regehr/z/compiler-source/gcc/gcc/cp/pt.c:5455
0x64f2b6 maybe_process_partial_specialization(tree_node*)
/home/regehr/z/compiler-source/gcc/gcc/cp/pt.c:961
0x6c6fd4 cp_parser_class_head
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:21401
0x6c6fd4 cp_parser_class_specifier_1
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:20785
0x6c85d9 cp_parser_class_specifier
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:21081
0x6c85d9 cp_parser_type_specifier
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:15391
0x6e568b cp_parser_decl_specifier_seq
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:12343
0x6f2c13 cp_parser_single_declaration
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:25207
0x6f2fea cp_parser_template_declaration_after_parameters
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:24903
0x6f3c14 cp_parser_explicit_template_declaration
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:25134
0x6f3c14 cp_parser_template_declaration_after_export
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:25152
0x6fde39 cp_parser_declaration
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:11710
0x6fc24d cp_parser_declaration_seq_opt
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:11632
0x6fc598 cp_parser_translation_unit
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:4189
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.