gcc/testsuite/g++.dg/torture/pr33134.C
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2" } */ |
| 3 | |
| 4 | /* Used to crash in VRP. */ |
| 5 | /* Testcase by Martin Michlmayr <[email protected]> */ |
| 6 | |
| 7 | class FXObject; |
| 8 | class FXStream |
| 9 | { |
| 10 | public:FXStream (const FXObject *cont = __null); |
| 11 | FXStream & operator<< (const unsigned char &v); |
| 12 | }; |
| 13 | |
| 14 | bool fxsaveGIF (FXStream &store) |
| 15 | { |
| 16 | int bitsperpixel; |
| 17 | unsigned char c1; |
| 18 | c1 = 0x80; |
| 19 | c1 |= (bitsperpixel - 1) << 4; |
| 20 | store << c1; |
| 21 | return true; |
| 22 | } |