diff options
author | Kyrylo Tkachov <kyrylo.tkachov@arm.com> | 2017-07-04 15:19:30 +0000 |
---|---|---|
committer | Kyrylo Tkachov <ktkachov@gcc.gnu.org> | 2017-07-04 15:19:30 +0000 |
commit | a4187dab5248cb42781fa6b2f57b95214c4f8b03 (patch) | |
tree | 310ea9d605948ad95674b68d4a99d9ea310e4723 /gcc/fixed-value.c | |
parent | 5006165236a38c35040a76e676a7ba134e71aa67 (diff) | |
download | gcc-a4187dab5248cb42781fa6b2f57b95214c4f8b03.zip gcc-a4187dab5248cb42781fa6b2f57b95214c4f8b03.tar.gz gcc-a4187dab5248cb42781fa6b2f57b95214c4f8b03.tar.bz2 |
[AArch64] Fix strict aliasing issue in gcc.target/aarch64/simd/vminmaxnm_1.c
While doing some unrelated work the gcc.target/aarch64/simd/vminmaxnm_1.c testcase started failing for me.
Upon investigation it turns out that it breaks the C strict aliasing rules in the CHECK macro by casting
a pointer to an incompatible type and dereferencing it. GCC even warns about it if compiled with -Wstrict-aliasing.
This patch fixes the testcase by making it use memcmp to compare the vector elements.
This avoids the undefined behaviour.
The testcase still passes on trunk.
* gcc.target/aarch64/simd/vminmaxnm_1.c: Fix strict aliasing issues.
From-SVN: r249972
Diffstat (limited to 'gcc/fixed-value.c')
0 files changed, 0 insertions, 0 deletions