Commit a3a5e559 by Uros Bizjak Committed by Uros Bizjak

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
parent 1f36f7b3
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
......
......@@ -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]);
......
......@@ -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],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment