This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/18631] New: missing error messages passing vectors with -mno-altivec -mabi=altivec
- From: "janis187 at us dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Nov 2004 16:48:05 -0000
- Subject: [Bug target/18631] New: missing error messages passing vectors with -mno-altivec -mabi=altivec
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The AltiVec variant of the PowerPC 64-bit ABI specifies that types that
map to hardware vectors are passed in vector registers. 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. For this code:
typedef int __attribute__((vector_size(16))) vec;
extern vec v1;
vec ret (void) { return v1; }
void pass (vec v) { v1 = v; }
GCC 3.4.3 with -mno-altivec -mabi=altivec gives:
bug.c: In function `ret':
bug.c:3: error: Cannot return value in vector register because altivec
instructions are disabled, use -maltivec to enable them.
bug.c: In function `pass':
bug.c:4: error: Cannot pass argument in vector register because altivec
instructions are disabled, use -maltivec to enable them.
Mainline GCC no longer gives these errors, starting with this patch
from Paolo Bonzini on July 22:
http://gcc.gnu.org/ml/gcc-cvs/2004-07/msg01111.html
At the time the checks are made for the error message, the type of the
argument or return value is TImode, not a vector type.
This is a regression from 3.4 compilers.
--
Summary: missing error messages passing vectors with -mno-altivec
-mabi=altivec
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: janis187 at us dot ibm dot com
CC: bonzini at gcc dot gnu dot org,gcc-bugs at gcc dot gnu
dot org
GCC target triplet: powerpc*-*-linux*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18631