[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
su at cs dot ucdavis.edu
gcc-bugzilla@gcc.gnu.org
Thu Aug 4 03:17:00 GMT 2016
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;
^
$
More information about the Gcc-bugs
mailing list