Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/20020227-1.c

raw
1 /* This testcase failed on mmix-knuth-mmixware. Problem was with storing
2 to an unaligned mem:SC, gcc tried doing it by parts from a (concat:SC
3 (reg:SF 293) (reg:SF 294)). */
4
5 void abort (void);
6 void exit (int);
7
8 typedef __complex__ float cf;
9 struct x { char c; cf f; } __attribute__ ((__packed__));
10 extern void f2 (struct x*);
11 extern void f1 (void);
12 int
13 main (void)
14 {
15 f1 ();
16 exit (0);
17 }
18
19 void
20 f1 (void)
21 {
22 struct x s;
23 s.f = 1;
24 s.c = 42;
25 f2 (&s);
26 }
27
28 void
29 f2 (struct x *y)
30 {
31 if (y->f != 1 || y->c != 42)
32 abort ();
33 }