gcc/testsuite/g++.old-deja/g++.brendan/code-gen2.C
raw| 1 | // { dg-do run } |
| 2 | // GROUPS passed code-generation |
| 3 | // Check that declarations with initializations are executed |
| 4 | // correctly. |
| 5 | |
| 6 | extern "C" int printf (const char *, ...); |
| 7 | |
| 8 | int main () |
| 9 | { |
| 10 | char buff[40] ; |
| 11 | char *tmp = &buff[0]; // also fails for char *tmp = buff; |
| 12 | |
| 13 | if ((__SIZE_TYPE__) tmp != (__SIZE_TYPE__) &buff[0]) |
| 14 | { printf ("FAIL\n"); return 1; } |
| 15 | else |
| 16 | printf ("PASS\n"); |
| 17 | |
| 18 | return 0; |
| 19 | } |