[Bug c++/12909] New: ambiguity in mangling vector types

jbeulich at novell dot com gcc-bugzilla@gcc.gnu.org
Wed Nov 5 09:49:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12909

           Summary: ambiguity in mangling vector types
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jbeulich at novell dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu

Since only the base type and the fact that it is a vector, but not the number of
elements in it is encoded in the mangling of vector types, vector types with
identical base types but different element counts (e.g. V4SI and V2SI) mangle
the same. Thus the code below passes the compiler successfully, but fails the
assembly stage (Error: symbol `_Z4testU8__vectorj' is already defined):

typedef unsigned __attribute__((__mode__(__V2SI__))) __mm64i;
typedef unsigned __attribute__((__mode__(__V4SI__))) __mm128i;

__mm64i test(__mm64i n) {
	return n;
}

__mm128i test(__mm128i n) {
	return n;
}



More information about the Gcc-bugs mailing list