PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20071018-1.c
blob625e98184d1c9b956cdd566b11c4c7cfb08895f5
1 extern void abort(void);
3 struct foo {
4 int rank;
5 char *name;
6 };
8 struct mem {
9 struct foo *x[4];
12 void __attribute__((noinline)) bar(struct foo **f)
14 *f = __builtin_malloc(sizeof(struct foo));
16 struct foo * __attribute__((noinline, noclone)) foo(int rank)
18 void *x = __builtin_malloc(sizeof(struct mem));
19 struct mem *as = x;
20 struct foo **upper = &as->x[rank * 8 - 5];
21 *upper = 0;
22 bar(upper);
23 return *upper;
26 int main()
28 if (foo(1) == 0)
29 abort ();
30 return 0;