------- Additional Comments From janis187 at us dot ibm dot com 2004-11-24 16:53 ------- Oops, in the submission I said "There used to be error messages for passing vectors by value or returning vectors from functions if AltiVec support was on but the non-AltiVec ABI was used." That should be: There used to be error messages ... if AltiVec support was not on and the AltiVec ABI was used.
The AltiVec ABI says that vectors that map to hardware vectors are passed in vector registers. That variant of the ABI is the default but can be turned off with -mabi=no-altivec, which is useful for binary compatibility with modules that will be used on multiple types of PowerPC-64 hardware. The ABI doesn't cover generic vectors that don't map to hardware vectors, but GCC passes them by reference for either variant of the ABI. It probably doesn't specifically cover the case of generic vectors that map to hardware vectors when AltiVec support isn't enabled, but that seems surprising enough that it ought to continue to be an error. I personally think it ought to be an error to pass any synthetic vector by value unless it is specifically covered by the ABI, but that's another mess that no one wants to touch. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18631