]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/misaligned-expand-1.c
replace ISL with isl
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / misaligned-expand-1.c
CommitLineData
0a1c20dc
MJ
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
7extern void abort ();
8
9typedef unsigned int myint __attribute__((aligned(1)));
10
11unsigned int
12foo (myint *p)
13{
14 return *p;
15}
16
216c92c9 17#define cst (int) 0xdeadbeef
0a1c20dc
MJ
18#define NUM 8
19
20struct blah
21{
22 char c;
23 myint i[NUM];
24};
25
26struct blah g;
27
28int
29main (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}