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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [max-1.c] - Blame information for rev 328

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

Line No. Rev Author Line
1 298 jeremybenn
/* PR middle-end/18548 */
2
/* Test case reduced by Andrew Pinski <pinskia@physics.uc.edu> */
3
/* { dg-do run } */
4
/* { dg-options "-O1 " } */
5
/* Option -fno-tree-lrs removed By Andrew MacLeod since it is no longer
6
   supported in the compiler beginning with GCC 4.3.  */
7
/* m32c has varying sized pointers */
8
/* { dg-skip-if "" { "m32c-*-*" } { "*" } { "-mcpu=m32c" "-mcpu=m32cm" } } */
9
 
10
/* Kludge to make it signed. */
11
#define unsigned signed
12
__extension__ typedef __SIZE_TYPE__ ssize_t;
13
#undef unsigned
14
 
15
extern void abort (void);
16
 
17
ssize_t fff[10];
18
 
19
void f(ssize_t a, ssize_t b)
20
{
21
  ssize_t crcc = b;
22
  ssize_t d = *((ssize_t*)(a+1));
23
  int i;
24
 
25
  a = d >= b? d:b;
26
 
27
 
28
  for(i=0;i<10;i++)
29
   fff[i] = a;
30
}
31
 
32
/* The variable a cannot be a local variable as we get better aliasing
33
   now and decide that the store to a is dead.  The better aliasing comes
34
   from better representation of pointer arithmetic. */
35
ssize_t a = 10;
36
int main(void)
37
{
38
  int i;
39
  f((ssize_t)(&a)-1,0);
40
  for(i = 0;i<10;i++)
41
   if (fff[i]!=10)
42
    abort ();
43
  return 0;
44
}
45
 

powered by: WebSVN 2.1.0

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