[Sun C++ 5.9] ICE during overload selection
-------------------------------------------

                 Key: STDCXX-1003
                 URL: https://issues.apache.org/jira/browse/STDCXX-1003
             Project: C++ Standard Library
          Issue Type: Bug
          Components: External
         Environment: SunOS marbles 5.10 Generic_118855-33 i86pc i386 i86pc
CC: Sun C++ 5.9 SunOS_i386 Patch 124864-01 2007/07/25
            Reporter: Travis Vitek


{noformat}
$ cat t.cpp && CC t.cpp
template <class B, class D>
struct __is_base_of
{
    struct __no  { };
    struct __yes { __no __pad [2]; };

    template <class T>
    static __yes __is (const volatile D&, T);
    static __no  __is (const volatile B&, int);

    struct __nest
    {
        operator const volatile B& () const;
        operator const volatile D& ();
    };

    enum { value =
        sizeof (__yes) == sizeof (__is (__nest (), 0))
    };
};

extern "C" int printf (const char*, ...);

struct B { };
struct D : B { };

int main ( int argc, char * argv [ ] )
{
#define test(X) printf ("%s = %d\n", #X, X)

    test ((__is_base_of<B, D>::value));
    test ((__is_base_of<B, B>::value));
    test ((__is_base_of<D, D>::value));

    return 0;
}
 >> Assertion:   (../lnk/tmplmatchargs.cc, line 193)
    while processing t.cpp at line 32.
{noformat}

Filed with Sun as bug 
[#6728467|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6728467].


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to