gcc/testsuite/g++.dg/torture/pr33819.C
raw| 1 | /* { dg-do run } */ |
| 2 | |
| 3 | class s |
| 4 | { |
| 5 | public: |
| 6 | s(long long aa) : a(aa), i1(0) { } |
| 7 | long long id() const { return (this->a << 16) >> 16; } |
| 8 | bool operator< (s sv) { return this->a < sv.id(); } |
| 9 | private: |
| 10 | long long a : 48; |
| 11 | int i1 : 16; |
| 12 | }; |
| 13 | s g(1); |
| 14 | extern "C" void abort (void); |
| 15 | int |
| 16 | main(int, char**) |
| 17 | { |
| 18 | if (g < (1LL << 38) - 1) |
| 19 | return 0; |
| 20 | abort (); |
| 21 | } |
| 22 |