Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/ext/attrib41.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 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 } |