URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
// { dg-do run }
|
// { dg-do run }
|
|
|
// Copyright (C) 2001 Free Software Foundation, Inc.
|
// Copyright (C) 2001 Free Software Foundation, Inc.
|
// Contributed by Nathan Sidwell 17 Oct 2002
|
// Contributed by Nathan Sidwell 17 Oct 2002
|
|
|
// PR 7676. We didn't notice template members were different.
|
// PR 7676. We didn't notice template members were different.
|
|
|
struct foo
|
struct foo
|
{
|
{
|
template
|
template
|
int bar() {return 1;}
|
int bar() {return 1;}
|
|
|
template
|
template
|
int bar() {return 2;}
|
int bar() {return 2;}
|
|
|
};
|
};
|
|
|
struct baz : foo
|
struct baz : foo
|
{
|
{
|
using foo::bar;
|
using foo::bar;
|
template
|
template
|
int bar () {return 3;}
|
int bar () {return 3;}
|
};
|
};
|
|
|
int main ()
|
int main ()
|
{
|
{
|
baz b;
|
baz b;
|
foo f;
|
foo f;
|
|
|
if (f.bar<1> () != 2)
|
if (f.bar<1> () != 2)
|
return 1;
|
return 1;
|
if (f.bar () != 1)
|
if (f.bar () != 1)
|
return 2;
|
return 2;
|
|
|
if (b.bar<1> () != 3)
|
if (b.bar<1> () != 3)
|
return 1;
|
return 1;
|
if (b.bar () != 1)
|
if (b.bar () != 1)
|
return 2;
|
return 2;
|
|
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.