aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2010-02-03 15:42:35 -0500
committerJason Merrill <jason@gcc.gnu.org>2010-02-03 15:42:35 -0500
commitabfe01cec91fae69bb05700bf6a53f41a64fd15c (patch)
treef8b4a568a621bd1d216e238d04ed36cb854f1bc4 /gcc
parent07738b87c4273fcfd97bf40940fe4f26ea555292 (diff)
downloadgcc-abfe01cec91fae69bb05700bf6a53f41a64fd15c.zip
gcc-abfe01cec91fae69bb05700bf6a53f41a64fd15c.tar.gz
gcc-abfe01cec91fae69bb05700bf6a53f41a64fd15c.tar.bz2
re PR c++/12909 (ambiguity in mangling vector types)
PR c++/12909 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling. From-SVN: r156481
Diffstat (limited to 'gcc')
-rw-r--r--gcc/common.opt8
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/mangle.c11
-rw-r--r--gcc/testsuite/ChangeLog3
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle36.C9
5 files changed, 35 insertions, 2 deletions
diff --git a/gcc/common.opt b/gcc/common.opt
index 6e369e5..a4358b5 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -266,7 +266,13 @@ Common Separate
;
; 1: The version of the ABI first used in G++ 3.2.
;
-; 2: The version of the ABI first used in G++ 3.4.
+; 2: The version of the ABI first used in G++ 3.4 (and current default).
+;
+; 3: The version of the ABI that fixes the missing underscore
+; in template non-type arguments of pointer type.
+;
+; 4: The version of the ABI that introduces unambiguous mangling of
+; vector types.
;
; Additional positive integers will be assigned as new versions of
; the ABI become the default version of the ABI.
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index b122aec..c3b1bdc 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2010-02-03 Jason Merrill <jason@redhat.com>
+
+ PR c++/12909
+ * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
+ -fabi-version=4.
+
2010-02-02 Jason Merrill <jason@redhat.com>
PR c++/41090
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index c14f5b7..37293f1 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -1850,7 +1850,16 @@ write_type (tree type)
break;
case VECTOR_TYPE:
- write_string ("U8__vector");
+ if (abi_version_at_least (4))
+ {
+ write_string ("Dv");
+ /* Non-constant vector size would be encoded with
+ _ expression, but we don't support that yet. */
+ write_unsigned_number (TYPE_VECTOR_SUBPARTS (type));
+ write_char ('_');
+ }
+ else
+ write_string ("U8__vector");
write_type (TREE_TYPE (type));
break;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 2244bb8..0c849b9 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,8 @@
2010-02-03 Jason Merrill <jason@redhat.com>
+ PR c++/12909
+ * g++.dg/abi/mangle36.C: New.
+
PR c++/35652
* g++.dg/warn/string1.C: New.
diff --git a/gcc/testsuite/g++.dg/abi/mangle36.C b/gcc/testsuite/g++.dg/abi/mangle36.C
new file mode 100644
index 0000000..aaace65
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/mangle36.C
@@ -0,0 +1,9 @@
+// PR c++/41959
+// { dg-do compile { target i?86-*-* x86_64-*-* } }
+// { dg-options "-mavx -fabi-version=4" }
+// { dg-final { scan-assembler "_Z1fDv4_f" } }
+// { dg-final { scan-assembler "_Z1fDv8_f" } }
+
+#include <x86intrin.h>
+void f(__m128) { }
+void f(__m256) { }