public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13989] New: C++ method lookup fails for methods returning Altivec types
@ 2004-02-03  4:01 tjw at omnigroup dot com
  2004-02-03  4:21 ` [Bug c++/13989] C++ method lookup fails for methods returning vector types (because of attribute) pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: tjw at omnigroup dot com @ 2004-02-03  4:01 UTC (permalink / raw)
  To: gcc-bugs

#include <altivec.h>

class Constants {
    vector unsigned int _pack0;
public:
    Constants() {
        _pack0 = (vector unsigned int){0xdeadbeef, 0xabababab, 0x55555555, 0x12345678};
    };

    inline vector unsigned int deadbeef(void) const {
        return vec_splat(_pack0, 0);
    };
};

vector unsigned int const_deadbeef(Constants &C)
{
    return C.deadbeef();
}


Fails to build with:

% $PREFIX/bin/g++ -maltivec -c -Wall av.cpp -o av.o
av.cpp: In function `unsigned int __vector__ const_deadbeef(Constants&)':
av.cpp:17: error: no matching function for call to `Constants::deadbeef()'
av.cpp:10: note: candidates are: unsigned int __vector__ Constants::deadbeef(const Constants*)

-- 
           Summary: C++ method lookup fails for methods returning Altivec
                    types
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tjw at omnigroup dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-apple-darwin7.2.0
  GCC host triplet: powerpc-apple-darwin7.2.0
GCC target triplet: powerpc-apple-darwin7.2.0


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


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

* [Bug c++/13989] C++ method lookup fails for methods returning vector types (because of attribute)
  2004-02-03  4:01 [Bug c++/13989] New: C++ method lookup fails for methods returning Altivec types tjw at omnigroup dot com
@ 2004-02-03  4:21 ` pinskia at gcc dot gnu dot org
  2004-02-03  4:23 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-03  4:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-03 04:21 -------
Confirmed, a shorter and self contained testcase, resummarizing as this is target independent:
#define vector __attribute__((vector_size(16)))
struct Constants {
    inline vector unsigned int deadbeef(void) const {
        return (vector unsigned int){0xdeadbeef, 0xabababab, 0x55555555, 0x12345678};
    };
};
vector unsigned int const_deadbeef(Constants &C)
{
    return C.deadbeef();
}

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
  GCC build triplet|powerpc-apple-darwin7.2.0   |
   GCC host triplet|powerpc-apple-darwin7.2.0   |
 GCC target triplet|powerpc-apple-darwin7.2.0   |
           Keywords|                            |rejects-valid
      Known to fail|                            |3.4.0 3.3.1 3.5.0
   Last reconfirmed|0000-00-00 00:00:00         |2004-02-03 04:21:33
               date|                            |
            Summary|C++ method lookup fails for |C++ method lookup fails for
                   |methods returning Altivec   |methods returning vector
                   |types                       |types (because of attribute)


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


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

* [Bug c++/13989] C++ method lookup fails for methods returning vector types (because of attribute)
  2004-02-03  4:01 [Bug c++/13989] New: C++ method lookup fails for methods returning Altivec types tjw at omnigroup dot com
  2004-02-03  4:21 ` [Bug c++/13989] C++ method lookup fails for methods returning vector types (because of attribute) pinskia at gcc dot gnu dot org
@ 2004-02-03  4:23 ` pinskia at gcc dot gnu dot org
  2004-06-18  4:15 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-03  4:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-03 04:23 -------
I am almost sure that the problem which causes PR 9844 also causes this bug.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |9844


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


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

* [Bug c++/13989] C++ method lookup fails for methods returning vector types (because of attribute)
  2004-02-03  4:01 [Bug c++/13989] New: C++ method lookup fails for methods returning Altivec types tjw at omnigroup dot com
  2004-02-03  4:21 ` [Bug c++/13989] C++ method lookup fails for methods returning vector types (because of attribute) pinskia at gcc dot gnu dot org
  2004-02-03  4:23 ` pinskia at gcc dot gnu dot org
@ 2004-06-18  4:15 ` pinskia at gcc dot gnu dot org
  2004-09-23 18:23 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-18  4:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-18 04:15 -------
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-06/msg01467.html>.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


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


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

* [Bug c++/13989] C++ method lookup fails for methods returning vector types (because of attribute)
  2004-02-03  4:01 [Bug c++/13989] New: C++ method lookup fails for methods returning Altivec types tjw at omnigroup dot com
                   ` (2 preceding siblings ...)
  2004-06-18  4:15 ` pinskia at gcc dot gnu dot org
@ 2004-09-23 18:23 ` cvs-commit at gcc dot gnu dot org
  2004-09-23 18:26 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-23 18:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-09-23 18:22 -------
Subject: Bug 13989

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	fjahanian@gcc.gnu.org	2004-09-23 18:22:27

Modified files:
	gcc            : ChangeLog tree.c 
	gcc/config/rs6000: rs6000.c 
	gcc/cp         : cvt.c decl.c parser.c 
Added files:
	gcc/testsuite/g++.dg/ext: attribute-test-1.C attribute-test-2.C 
	                          attribute-test-3.C attribute-test-4.C 

Log message:
	PR c++/9844, PR c++/13989
	Reviewed by Mark Mitchel.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5587&r2=2.5588
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree.c.diff?cvsroot=gcc&r1=1.434&r2=1.435
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.c.diff?cvsroot=gcc&r1=1.714&r2=1.715
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cvt.c.diff?cvsroot=gcc&r1=1.164&r2=1.165
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1303&r2=1.1304
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.253&r2=1.254
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/attribute-test-1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/attribute-test-2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/attribute-test-3.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/attribute-test-4.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug c++/13989] C++ method lookup fails for methods returning vector types (because of attribute)
  2004-02-03  4:01 [Bug c++/13989] New: C++ method lookup fails for methods returning Altivec types tjw at omnigroup dot com
                   ` (4 preceding siblings ...)
  2004-09-23 18:26 ` pinskia at gcc dot gnu dot org
@ 2004-09-23 18:26 ` pinskia at gcc dot gnu dot org
  2004-09-23 18:27 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-23 18:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-23 18:26 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug c++/13989] C++ method lookup fails for methods returning vector types (because of attribute)
  2004-02-03  4:01 [Bug c++/13989] New: C++ method lookup fails for methods returning Altivec types tjw at omnigroup dot com
                   ` (3 preceding siblings ...)
  2004-09-23 18:23 ` cvs-commit at gcc dot gnu dot org
@ 2004-09-23 18:26 ` pinskia at gcc dot gnu dot org
  2004-09-23 18:26 ` pinskia at gcc dot gnu dot org
  2004-09-23 18:27 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-23 18:26 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 13989 depends on bug 9844, which changed state.

Bug 9844 Summary: Segmentation fault using function with return value with attribute for mode
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9844

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

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


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

* [Bug c++/13989] C++ method lookup fails for methods returning vector types (because of attribute)
  2004-02-03  4:01 [Bug c++/13989] New: C++ method lookup fails for methods returning Altivec types tjw at omnigroup dot com
                   ` (5 preceding siblings ...)
  2004-09-23 18:26 ` pinskia at gcc dot gnu dot org
@ 2004-09-23 18:27 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-23 18:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-23 18:27 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.0


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


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

end of thread, other threads:[~2004-09-23 18:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-03  4:01 [Bug c++/13989] New: C++ method lookup fails for methods returning Altivec types tjw at omnigroup dot com
2004-02-03  4:21 ` [Bug c++/13989] C++ method lookup fails for methods returning vector types (because of attribute) pinskia at gcc dot gnu dot org
2004-02-03  4:23 ` pinskia at gcc dot gnu dot org
2004-06-18  4:15 ` pinskia at gcc dot gnu dot org
2004-09-23 18:23 ` cvs-commit at gcc dot gnu dot org
2004-09-23 18:26 ` pinskia at gcc dot gnu dot org
2004-09-23 18:26 ` pinskia at gcc dot gnu dot org
2004-09-23 18:27 ` pinskia 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).