URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 816 |
Rev 826 |
/* { dg-do run } */
|
/* { dg-do run } */
|
/* { dg-options "-fdump-tree-alias" } */
|
/* { dg-options "-fdump-tree-alias" } */
|
/* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
|
/* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
|
|
|
int *p;
|
int *p;
|
void __attribute__((noinline,noclone))
|
void __attribute__((noinline,noclone))
|
bar (void)
|
bar (void)
|
{
|
{
|
*p = 1;
|
*p = 1;
|
}
|
}
|
int __attribute__((noinline,noclone))
|
int __attribute__((noinline,noclone))
|
foo (__SIZE_TYPE__ addr)
|
foo (__SIZE_TYPE__ addr)
|
{
|
{
|
int i;
|
int i;
|
/* q points to ANYTHING */
|
/* q points to ANYTHING */
|
int **q = (int **)addr;
|
int **q = (int **)addr;
|
/* this store needs to cause i to escape */
|
/* this store needs to cause i to escape */
|
*q = &i;
|
*q = &i;
|
i = 0;
|
i = 0;
|
/* and thus be clobbered by this function call */
|
/* and thus be clobbered by this function call */
|
bar ();
|
bar ();
|
return i;
|
return i;
|
}
|
}
|
extern void abort (void);
|
extern void abort (void);
|
int
|
int
|
main()
|
main()
|
{
|
{
|
if (foo ((__SIZE_TYPE__)&p) != 1)
|
if (foo ((__SIZE_TYPE__)&p) != 1)
|
abort ();
|
abort ();
|
return 0;
|
return 0;
|
}
|
}
|
|
|
/* { dg-final { scan-tree-dump "ESCAPED = { ESCAPED NONLOCAL i }" "alias" } } */
|
/* { dg-final { scan-tree-dump "ESCAPED = { ESCAPED NONLOCAL i }" "alias" } } */
|
/* { dg-final { cleanup-tree-dump "alias" } } */
|
/* { dg-final { cleanup-tree-dump "alias" } } */
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.