aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2012-04-20 18:12:55 +0200
committerUros Bizjak <uros@gcc.gnu.org>2012-04-20 18:12:55 +0200
commita3a5e559af68fd9941aa4426466361fff84b3dbe (patch)
tree71ecc4544308f384b6230947bd2e93476cd4d29c /gcc
parent1f36f7b30b1ff55b0062f9d75d449d88a59ddd82 (diff)
downloadgcc-a3a5e559af68fd9941aa4426466361fff84b3dbe.zip
gcc-a3a5e559af68fd9941aa4426466361fff84b3dbe.tar.gz
gcc-a3a5e559af68fd9941aa4426466361fff84b3dbe.tar.bz2
test_passing_unions.c: Avoid undefined array access.
* gcc.target/x86_64/abi/avx/test_passing_unions.c: Avoid undefined array access. * gcc.target/x86_64/abi/avx/test_passing_structs.c: Likewise. From-SVN: r186629
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_structs.c2
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_unions.c6
3 files changed, 10 insertions, 4 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e8d4f0d..33646ee 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2012-04-20 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/x86_64/abi/avx/test_passing_unions.c: Avoid undefined
+ array access.
+ * gcc.target/x86_64/abi/avx/test_passing_structs.c: Likewise.
+
2012-04-20 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR rtl-optimization/44214
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_structs.c b/gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_structs.c
index 9a8f71d..7dbf6a5 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_structs.c
+++ b/gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_structs.c
@@ -53,7 +53,7 @@ avx_test (void)
clear_struct_registers;
for (i = 0; i < 8; i++)
- fregs.ymm0._m256[i] = m256s[i].x;
+ (&fregs.ymm0)[i]._m256[0] = m256s[i].x;
num_fregs = 8;
WRAP_CALL (check_struct_passing1)(m256s[0], m256s[1], m256s[2], m256s[3],
m256s[4], m256s[5], m256s[6], m256s[7]);
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_unions.c b/gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_unions.c
index f83209b..127dd5f 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_unions.c
+++ b/gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_unions.c
@@ -113,7 +113,7 @@ avx_test (void)
clear_struct_registers;
for (i = 0; i < 8; i++)
- fregs.ymm0._m256[i] = u1[i].x;
+ (&fregs.ymm0)[i]._m256[0] = u1[i].x;
num_fregs = 8;
check_union_passing1(u1[0], u1[1], u1[2], u1[3],
u1[4], u1[5], u1[6], u1[7]);
@@ -122,7 +122,7 @@ avx_test (void)
for (i = 0; i < 8; i++)
{
u2[i].x = u1[i].x;
- fregs.ymm0._m256[i] = u2[i].x;
+ (&fregs.ymm0)[i]._m256[0] = u2[i].x;
}
num_fregs = 8;
check_union_passing2(u2[0], u2[1], u2[2], u2[3],
@@ -132,7 +132,7 @@ avx_test (void)
for (i = 0; i < 8; i++)
{
u3[i].x = u1[i].x;
- fregs.ymm0._m256[i] = u3[i].x;
+ (&fregs.ymm0)[i]._m256[0] = u3[i].x;
}
num_fregs = 8;
check_union_passing3(u3[0], u3[1], u3[2], u3[3],