OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.oliva/] [ext1.C] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
// { dg-do run  }
2
// { dg-options "" }
3
// Copyright (C) 1999 Free Software Foundation
4
 
5
// by Alexandre Oliva 
6
// simplified from bug report by Michael Rosenbruch 
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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.