URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [ipa-sra-2.c] - Rev 297
Compare with Previous | Blame | View Log
struct big { int data[1000000]; }; struct small { int data[10]; }; union both { struct big big; struct small small; }; extern void *calloc (__SIZE_TYPE__, __SIZE_TYPE__); extern void free (void *); static int __attribute__((noinline)) foo (int fail, union both *agg) { int r; if (fail) r = agg->big.data[999999]; else r = agg->small.data[0]; return r; } int main (int argc, char *argv[]) { union both *agg = calloc (1, sizeof (struct small)); int r; r = foo ((argc > 2000), agg); free (agg); return r; }