This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/13989] New: C++ method lookup fails for methods returning Altivec types


#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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]