This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PR87054] fix unaligned access


On Sep 18, 2018, Richard Biener <rguenther@suse.de> wrote:

>> +# ifdef __SSE__
>> +#  define T __int128

Rainer reported this didn't work on 32-bit x86 with SSE enabled.
Here's a patch that fixes it.  Ok to install?  Tested on x86_64,
including such combinations as -m32, -m32/-msse, and -m32/-mno-sse.


[PR87054] adjust testcase for 32-bit x86

From: Alexandre Oliva <oliva@adacore.com>

The test assumed __int128 to be available whenever __SSE__ was
defined, but this assumption doesn't hold on 32-bit x86.  Fixed.

for  gcc/testsuite/ChangeLog

	PR middle-end/87054
	* gcc.dg/pr87054.c: Adjust for no __int128 on x86.
---
 gcc/testsuite/gcc.dg/pr87054.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/pr87054.c b/gcc/testsuite/gcc.dg/pr87054.c
index 4ca2b62d2c7c9..3cb3b7dac6586 100644
--- a/gcc/testsuite/gcc.dg/pr87054.c
+++ b/gcc/testsuite/gcc.dg/pr87054.c
@@ -2,7 +2,7 @@
 // { dg-options "-O2" }
 
 #ifndef T
-# ifdef __SSE__
+# if __SIZEOF_INT128__ && defined __SSE__
 #  define T __int128
 # else
 #  define T long


-- 
Alexandre Oliva, freedom fighter   https://FSFLA.org/blogs/lxo
Be the change, be Free!         FSF Latin America board member
GNU Toolchain Engineer                Free Software Evangelist


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]