URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
|
|
// { dg-do compile }
|
// { dg-do compile }
|
|
|
// Copyright (C) 2002 Free Software Foundation, Inc.
|
// Copyright (C) 2002 Free Software Foundation, Inc.
|
// Contributed by Nathan Sidwell 21 Dec 2002
|
// Contributed by Nathan Sidwell 21 Dec 2002
|
|
|
// PR 8572. ICE with templated conversion operators.
|
// PR 8572. ICE with templated conversion operators.
|
|
|
template struct A
|
template struct A
|
{
|
{
|
struct B { };
|
struct B { };
|
operator B* () const;
|
operator B* () const;
|
B *Foo ();
|
B *Foo ();
|
};
|
};
|
|
|
template typename A::B *A::Foo ()
|
template typename A::B *A::Foo ()
|
{
|
{
|
return 0;
|
return 0;
|
}
|
}
|
|
|
template A::operator typename A::B* () const
|
template A::operator typename A::B* () const
|
{
|
{
|
return 0;
|
return 0;
|
}
|
}
|
|
|
void Foo (A &p)
|
void Foo (A &p)
|
{
|
{
|
p.Foo ();
|
p.Foo ();
|
static_cast ::B *> (p);
|
static_cast ::B *> (p);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.