Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.oliva/ext1.C

raw
1 // { dg-do run }
2 // { dg-options "" }
3 // Copyright (C) 1999 Free Software Foundation
4
5 // by Alexandre Oliva <[email protected]>
6 // simplified from bug report by Michael Rosenbruch <[email protected]>
7
8
9 extern "C" void abort();
10
11 int main () {
12 char x[1];
13 char *y = x ? /* implicit x */ : 0;
14 /* For some reason, the array x is copied twice, and y points to the
15 second copy (the first is never used). If x is explicit, no copy
16 is created, and the program succeeds. */
17 if (x != y)
18 abort();
19 }