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/] [tree-ssa/] [pr44258.c] - Rev 399

Compare with Previous | Blame | View Log

/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-esra-details" } */
 
struct blah
{
  char a[4];
};
 
struct str
{
  struct blah b1;
  char x;
};
 
struct val
{
  char y;
  struct blah b2 __attribute__((packed)); /* { dg-warning "attribute ignored" "" { target { ! or32-*-* } } } */
};
 
union U
{
  struct str str;
  struct val val;
};
 
 
extern struct blah e_b1, e_b2;
extern union U *e_u;
 
int foo (int b)
{
  union U u;
 
  u.str.b1 = e_b1;
  u.val.b2 = e_b2;
  u.str.b1.a[3] = 0;
 
  *e_u = u;
}
 
/* { dg-final { scan-tree-dump-times "Created a replacement" 0 "esra"} } */
/* { dg-final { cleanup-tree-dump "esra" } } */
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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