* expmed.c (flip_storage_order): Deal with complex modes specially.
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / pr42614.c
blobd3680539bdceb29dd5b21e726850461b975fca70
1 extern void *malloc(__SIZE_TYPE__);
2 extern void abort(void);
3 extern void free(void *);
5 typedef struct SEntry
7 unsigned char num;
8 } TEntry;
10 typedef struct STable
12 TEntry data[2];
13 } TTable;
15 TTable *init ()
17 return malloc(sizeof(TTable));
20 void
21 expect_func (int a, unsigned char *b) __attribute__ ((noinline));
23 static inline void
24 inlined_wrong (TEntry *entry_p, int flag);
26 void
27 inlined_wrong (TEntry *entry_p, int flag)
29 unsigned char index;
30 entry_p->num = 0;
32 if (flag == 0)
33 abort();
35 for (index = 0; index < 1; index++)
36 entry_p->num++;
38 if (!entry_p->num)
40 abort();
44 void
45 expect_func (int a, unsigned char *b)
47 if (abs ((a == 0)))
48 abort ();
49 if (abs ((b == 0)))
50 abort ();
53 int
54 main ()
56 unsigned char index = 0;
57 TTable *table_p = init();
58 TEntry work;
60 inlined_wrong (&(table_p->data[1]), 1);
61 expect_func (1, &index);
62 inlined_wrong (&work, 1);
64 free (table_p);
66 return 0;