* gcc.dg/20020201-3.c: New test.
authorJakub Jelinek <jakub@redhat.com>
Sat, 2 Feb 2002 09:22:00 +0000 (10:22 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sat, 2 Feb 2002 09:22:00 +0000 (10:22 +0100)
From-SVN: r49437

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/20020201-3.c [new file with mode: 0644]

index c58eb79..13dd94e 100644 (file)
@@ -2,6 +2,8 @@
 
        * gcc.dg/20020201-2.c: New test.
 
+       * gcc.dg/20020201-3.c: New test.
+
 2002-02-02  Neil Booth  <neil@daikokuya.demon.co.uk>
 
        * gcc.dg/bitfld-1.c: Update.
diff --git a/gcc/testsuite/gcc.dg/20020201-3.c b/gcc/testsuite/gcc.dg/20020201-3.c
new file mode 100644 (file)
index 0000000..67e9a8a
--- /dev/null
@@ -0,0 +1,15 @@
+/* This testcase ICEd because a SFmode variable was given a MMX register
+   for which there is no movsf exists.  */
+/* { dg-do compile { target i?86-*-* } } */
+/* { dg-options "-O2 -march=i686 -mmmx -fno-strict-aliasing" } */
+
+struct A { unsigned int a, b; };
+
+void foo (struct A *x, int y, int z)
+{
+   const float d = 1.0;
+   float e = (float) y + z;
+
+   x->a = *(unsigned int *) &d;
+   x->b = *(unsigned int *) &e;
+}