Debian Codegraph @

gcc/testsuite/g++.dg/ext/attrib41.C

raw
1 // PR c++/45267
2 // { dg-options "-O" }
3
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);
11 }
12 bool b;
13 int main() {
14 Vector<int> a(1);
15 if ((a << 2), b) {
16 a << 2;
17 throw 1;
18 }
19 }