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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [expr/] [cond1.C] - Blame information for rev 825

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do run }
2
 
3
// Copyright (C) 2001 Free Software Foundation, Inc.
4
// Contributed by Nathan Sidwell 17 Oct 2002 
5
 
6
// PR 7209. We didn't SAVE_EXPR in the right place
7
 
8
char a[2][1][16]={
9
  {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
10
  {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}};
11
 
12
int f() {return 0;}
13
 
14
char * Foo (int d)
15
{
16
  char *c1;
17
 
18
  c1=a[d==0 ? 0 : 1][f()];
19
 
20
  return c1;
21
}
22
 
23
int main ()
24
{
25
  if (Foo (0) != (void *)a)
26
    return 1;
27
  return 0;
28
}

powered by: WebSVN 2.1.0

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