[Bug c++/71784] [4.9/5/6/7 Regression] ICE on invalid code in push_access_scope, at cp/pt.c:229
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jul 11 14:01:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71784
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ice-on-invalid-code |
CC| |jakub at gcc dot gnu.org,
| |jason at gcc dot gnu.org
Target Milestone|6.2 |4.9.4
Summary|[6/7 Regression] ICE on |[4.9/5/6/7 Regression] ICE
|invalid code in |on invalid code in
|push_access_scope, at |push_access_scope, at
|cp/pt.c:229 |cp/pt.c:229
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
template<typename T> struct A {
template<typename U>
void f(U const&) &;
template<typename U>
void f(U const&) &&;
};
template<typename T>
template<typename U>
void A<T>::f(U const& x) & {}
template<typename T>
template<typename U>
void A<T>::f(U const& x) && {}
template class A<int>;
template void A<int>::f<int>(int const&) &;
template void A<float>::f<int>(int const&) &&;
int main(){
A<int> a;
a.f<int>(2);
A<float>().f<int>(1);
}
ICEs starting with r198843, before it has been rejected (with -std=c++0x), and
indeed this (unlike your #c0) is accepted by clang++ 3.8.
More information about the Gcc-bugs
mailing list