remove unused files
[platform/upstream/gcc48.git] / gcc / testsuite / gcc.dg / misaligned-expand-1.c
1 /* Test that expand can generate correct loads of misaligned data even on
2    strict alignment platforms.  */
3
4 /* { dg-do run } */
5 /* { dg-options "-O0" } */
6
7 extern void abort ();
8
9 typedef unsigned int myint __attribute__((aligned(1)));
10
11 unsigned int
12 foo (myint *p)
13 {
14   return *p;
15 }
16
17 #define cst (int) 0xdeadbeef
18 #define NUM 8
19
20 struct blah
21 {
22   char c;
23   myint i[NUM];
24 };
25
26 struct blah g;
27
28 int
29 main (int argc, char **argv)
30 {
31   int i, k;
32   for (k = 0; k < NUM; k++)
33     {
34       g.i[k] = cst;
35       i = foo (&g.i[k]);
36
37       if (i != cst)
38         abort ();
39     }
40   return 0;
41 }