diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.brendan/code-gen2.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.brendan/code-gen2.C | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/code-gen2.C b/gcc/testsuite/g++.old-deja/g++.brendan/code-gen2.C new file mode 100644 index 00000000000..133755e894d --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.brendan/code-gen2.C @@ -0,0 +1,18 @@ +// GROUPS passed code-generation +// Check that declarations with initializations are executed +// correctly. + +extern "C" void printf (char *, ...); + +int main () +{ + char buff[40] ; + char *tmp = &buff[0]; // also fails for char *tmp = buff; + + if ((unsigned int) tmp != (unsigned int) &buff[0]) + printf ("FAIL\n"); + else + printf ("PASS\n"); + + return 0; +} |