This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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


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;
                       ^
$

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]