xref: /openbsd-src/gnu/usr.bin/gcc/gcc/testsuite/gcc.dg/20020201-3.c (revision c87b03e512fc05ed6e0222f6fb0ae86264b1d05b)
1 /* This testcase ICEd because a SFmode variable was given a MMX register
2    for which there is no movsf exists.  */
3 /* { dg-do compile { target i?86-*-* } } */
4 /* { dg-options "-O2 -march=i686 -mmmx -fno-strict-aliasing" } */
5 
6 struct A { unsigned int a, b; };
7 
foo(struct A * x,int y,int z)8 void foo (struct A *x, int y, int z)
9 {
10    const float d = 1.0;
11    float e = (float) y + z;
12 
13    x->a = *(unsigned int *) &d;
14    x->b = *(unsigned int *) &e;
15 }
16