PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20020215-1.c
blobf1f46d57d088892444693e263b104d3773b8f3a4
1 /* Test failed on an architecture that:
3 - had 16-bit registers,
4 - passed 64-bit structures in registers,
5 - only allowed SImode values in even numbered registers.
7 Before reload, s.i2 in foo() was represented as:
9 (subreg:SI (reg:DI 0) 2)
11 find_dummy_reload would return (reg:SI 1) for the subreg reload,
12 despite that not being a valid register. */
14 struct s
16 short i1;
17 long i2;
18 short i3;
21 struct s foo (struct s s)
23 s.i2++;
24 return s;
27 int main ()
29 struct s s = foo ((struct s) { 1000, 2000L, 3000 });
30 if (s.i1 != 1000 || s.i2 != 2001L || s.i3 != 3000)
31 abort ();
32 exit (0);