This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/72801] ICE on invalid C++ code with ill-formed class member specialization: tree check: expected class ‘expression’, have ‘type’ (integer_type) in tree_operand_check, at tree.h:3521
- From: "su at cs dot ucdavis.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 04 Aug 2016 03:15:05 +0000
- Subject: [Bug c++/72801] ICE on invalid C++ code with ill-formed class member specialization: tree check: expected class ‘expression’, have ‘type’ (integer_type) in tree_operand_check, at tree.h:3521
- Auto-submitted: auto-generated
- References: <bug-72801-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72801
--- Comment #2 from Zhendong Su <su at cs dot ucdavis.edu> ---
(In reply to Martin Sebor from comment #1)
> I can confirm the ICE but not the regression part. My bisection script
> shows an ICE goes all the way back to 4.3.0. The first revision I have
> access to that crashes is r128126.
Martin, below is what I see:
$ g++-6.1 -c -std=c++11 small.cpp
small.cpp:17:23: error: specializing member ‘B<>::C<int()>::a’ requires
‘template<>’ syntax
template <> const int B <>::template C < int () >::a;
^~~~
$ g++-5.4 -c -std=c++11 small.cpp
small.cpp:17:23: error: specializing member ‘B<>::C<int()>::a’ requires
‘template<>’ syntax
template <> const int B <>::template C < int () >::a;
^
$ g++-4.9 -c -std=c++11 small.cpp
small.cpp:17:23: error: specializing member ‘B<>::C<int()>::a’ requires
‘template<>’ syntax
template <> const int B <>::template C < int () >::a;
^
$