URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [explicit57.C] - Rev 716
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do run }
extern "C" void abort ();
int a = 0;
template <class T> void f ();
template <class T> void g ()
{
if (a)
abort ();
}
template <> void g<char> ()
{
}
template <class T> class C
{
public:
void ff () { f<T> (); }
void gg () { g<T> (); }
};
template <class T> void f ()
{
if (a)
abort ();
}
template <> void f<char> ()
{
}
int main ()
{
C<int> c;
c.ff();
c.gg();
a = 1;
C<char> d;
d.ff();
d.gg();
}
Go to most recent revision | Compare with Previous | Blame | View Log