URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 298 |
Rev 384 |
/* { dg-options "-O3 -fno-inline -fipa-type-escape -fdump-ipa-all -fipa-struct-reorg -fwhole-program -combine" } */
|
/* { dg-options "-O3 -fno-inline -fipa-type-escape -fdump-ipa-all -fipa-struct-reorg -fwhole-program -combine" } */
|
/* { dg-do compile } */
|
/* { dg-do compile } */
|
/* { dg-do run } */
|
/* { dg-do run } */
|
|
|
#include <stdlib.h>
|
#include <stdlib.h>
|
|
|
struct S { int a; struct V *b; };
|
struct S { int a; struct V *b; };
|
typedef struct { int c; } T;
|
typedef struct { int c; } T;
|
typedef struct { int d; int e; } U;
|
typedef struct { int d; int e; } U;
|
|
|
void *
|
void *
|
fn (void *x)
|
fn (void *x)
|
{
|
{
|
return x;
|
return x;
|
}
|
}
|
|
|
int
|
int
|
foo (struct S *s)
|
foo (struct S *s)
|
{
|
{
|
T x;
|
T x;
|
|
|
T y = *(T *)fn (&x);
|
T y = *(T *)fn (&x);
|
return y.c;
|
return y.c;
|
}
|
}
|
|
|
int
|
int
|
bar (struct S *s)
|
bar (struct S *s)
|
{
|
{
|
U x;
|
U x;
|
|
|
U y = *(U *)fn (&x);
|
U y = *(U *)fn (&x);
|
return y.d + s->a;
|
return y.d + s->a;
|
}
|
}
|
|
|
int
|
int
|
main ()
|
main ()
|
{
|
{
|
struct S s;
|
struct S s;
|
|
|
foo(&s) + bar (&s);
|
foo(&s) + bar (&s);
|
|
|
return 0;
|
return 0;
|
}
|
}
|
|
|
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
/* { dg-final { scan-ipa-dump "No structures to transform" "ipa_struct_reorg" { xfail { "avr-*-*" } } } } */
|
/* { dg-final { scan-ipa-dump "No structures to transform" "ipa_struct_reorg" { xfail { "avr-*-*" } } } } */
|
/* { dg-final { cleanup-ipa-dump "*" } } */
|
/* { dg-final { cleanup-ipa-dump "*" } } */
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.