[PR c++/84702] ICE with default tmpl arg of overload set
[official-gcc.git] / gcc / testsuite / g++.dg / ext / attrib41.C
blob368554a1b1dd5f60e2f6e793ea54034fd2d39ac3
1 // PR c++/45267
2 // { dg-options "-O" }
4 template<typename T> struct Vector {
5   Vector(long long x);
6   inline Vector<T> operator<<(int x) const __attribute__((always_inline));
7 };
8 long long bar (long long);
9 template<> inline Vector<int> Vector<int>::operator<<(int x) const {
10   return bar(x);
12 bool b;
13 int main() {
14   Vector<int> a(1);
15   if ((a << 2), b) {
16     a << 2;
17     throw 1;
18   }