Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.old-deja/g++.oliva/ext1.C @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // { dg-do run } |
2 // { dg-options "" } | |
3 // Copyright (C) 1999 Free Software Foundation | |
4 | |
5 // by Alexandre Oliva <oliva@dcc.unicamp.br> | |
6 // simplified from bug report by Michael Rosenbruch <Rosenbruch@bfw-online.de> | |
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 } |