aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-04-01 23:13:29 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2011-04-01 23:13:29 +0200
commit19228b93eacef5d8661c5d5a82272d42a82e0e26 (patch)
treefeaee55ecf6450268c89a7644e7055c18ceee503 /gcc/testsuite/gcc.target
parent88cb339e2fc095381098658177b8600ee151c58f (diff)
downloadgcc-19228b93eacef5d8661c5d5a82272d42a82e0e26.zip
gcc-19228b93eacef5d8661c5d5a82272d42a82e0e26.tar.gz
gcc-19228b93eacef5d8661c5d5a82272d42a82e0e26.tar.bz2
re PR middle-end/48335 (ICE in convert_move)
PR middle-end/48335 * expr.c (expand_assignment): Handle all possibilities if TO_RTX is CONCAT. * expmed.c (store_bit_field_1): Avoid trying to create invalid SUBREGs. (store_split_bit_field): If SUBREG_REG (op0) or op0 itself has smaller mode than word, return it for offset 0 and const0_rtx for out-of-bounds stores. If word is const0_rtx, skip it. * gcc.c-torture/compile/pr48335-1.c: New test. * gcc.dg/pr48335-1.c: New test. * gcc.dg/pr48335-2.c: New test. * gcc.dg/pr48335-3.c: New test. * gcc.dg/pr48335-4.c: New test. * gcc.dg/pr48335-5.c: New test. * gcc.dg/pr48335-6.c: New test. * gcc.dg/pr48335-7.c: New test. * gcc.dg/pr48335-8.c: New test. * gcc.target/i386/pr48335-1.c: New test. From-SVN: r171855
Diffstat (limited to 'gcc/testsuite/gcc.target')
-rw-r--r--gcc/testsuite/gcc.target/i386/pr48335-1.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pr48335-1.c b/gcc/testsuite/gcc.target/i386/pr48335-1.c
new file mode 100644
index 0000000..08c5284
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr48335-1.c
@@ -0,0 +1,32 @@
+/* PR middle-end/48335 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-tree-sra -msse2" } */
+
+#include <emmintrin.h>
+
+typedef __float128 T __attribute__((may_alias));
+
+struct S
+{
+ _Complex double d __attribute__((aligned (16)));
+};
+
+void bar (struct S);
+
+void
+f1 (T x)
+{
+ struct S s;
+ *(T *) &s.d = x;
+ __real__ s.d *= 7.0;
+ bar (s);
+}
+
+void
+f2 (__m128d x)
+{
+ struct S s;
+ _mm_store_pd ((double *) &s.d, x);
+ __real__ s.d *= 7.0;
+ bar (s);
+}