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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [max-1.c] - Blame information for rev 149

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

Line No. Rev Author Line
1 149 jeremybenn
/* PR middle-end/18548 */
2
/* Test case reduced by Andrew Pinski <pinskia@physics.uc.edu> */
3
/* { dg-do run } */
4
/* { dg-options "-O1 -fno-tree-lrs" } */
5
/* m32c has varying sized pointers */
6
/* { dg-skip-if "" { "m32c-*-*" } { "*" } { "-mcpu=m32c" "-mcpu=m32cm" } } */
7
 
8
extern void abort (void);
9
 
10
long fff[10];
11
 
12
void f(long a, long b)
13
{
14
  long crcc = b;
15
  long d = *((long*)(a+1));
16
  int i;
17
 
18
  a = d >= b? d:b;
19
 
20
 
21
  for(i=0;i<10;i++)
22
   fff[i] = a;
23
}
24
 
25
int main(void)
26
{
27
  int i;
28
  long a = 10;
29
  f((long)(&a)-1,0);
30
  for(i = 0;i<10;i++)
31
   if (fff[i]!=10)
32
    abort ();
33
  return 0;
34
}
35
 

powered by: WebSVN 2.1.0

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