PATCH: PR c++/43375: [4.5 Regression] ICE during compiling SSE code

H.J. Lu hongjiu.lu@intel.com
Tue Mar 16 14:01:00 GMT 2010


Hi,

We shouildn't emit an alias if DECL_LANG_SPECIFIC is NULL.  OK for
trunk?

Thanks.


H.J.
--
gcc/cp/

2010-03-16  H.J. Lu  <hongjiu.lu@intel.com>

	PR c++/43375
	* mangle.c (mangle_decl): Don't emit an alias if
	DECL_LANG_SPECIFIC is NULL.

gcc/testsuite/

2010-03-16  H.J. Lu  <hongjiu.lu@intel.com>

	PR c++/43375
	* g++.dg/abi/mangle42.C: New.

Index: cp/mangle.c
===================================================================
--- cp/mangle.c	(revision 157458)
+++ cp/mangle.c	(working copy)
@@ -3071,6 +3071,9 @@ mangle_decl (const tree decl)
 	inform (DECL_SOURCE_LOCATION (decl), "-fabi-version=4 (or =0) "
 		"avoids this error with a change in vector mangling");
 
+      if (DECL_LANG_SPECIFIC (decl) == NULL)
+	return;
+
 #ifdef ASM_OUTPUT_DEF
       save_ver = flag_abi_version;
       flag_abi_version = 0;
--- /dev/null	2010-03-10 06:57:34.571824327 -0800
+++ testsuite/g++.dg/abi/mangle42.C	2010-03-16 06:45:15.000000000 -0700
@@ -0,0 +1,12 @@
+// PR c++/43375
+// { dg-do compile { target i?86-*-* x86_64-*-* } }
+// { dg-options "-msse2 -std=gnu++0x" }
+
+typedef float __v4sf __attribute__ ((__vector_size__ (16)));
+typedef int __v4si __attribute__ ((__vector_size__ (16)));
+__v4sf my_asin(__v4sf x)
+{
+  static const __v4si g_Mask{ 0x7fffffff, 0x00000000, 0x7fffffff,
+0x7fffffff };
+  return __builtin_ia32_andnps ((__v4sf) g_Mask, x);
+}



More information about the Gcc-patches mailing list