public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/18631] New: missing error messages passing vectors with -mno-altivec -mabi=altivec
@ 2004-11-23 16:48 janis187 at us dot ibm dot com
  2004-11-24  6:18 ` [Bug target/18631] [4.0 Regression] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: janis187 at us dot ibm dot com @ 2004-11-23 16:48 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-09-27 15:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-23 16:48 [Bug target/18631] New: missing error messages passing vectors with -mno-altivec -mabi=altivec janis187 at us dot ibm dot com
2004-11-24  6:18 ` [Bug target/18631] [4.0 Regression] " pinskia at gcc dot gnu dot org
2004-11-24 16:53 ` janis187 at us dot ibm dot com
2005-04-21  4:57 ` [Bug target/18631] [4.0/4.1 " mmitchel at gcc dot gnu dot org
2005-07-08  1:36 ` mmitchel at gcc dot gnu dot org
2005-09-27 16:01 ` mmitchel at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).