URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 301 |
Rev 384 |
// Contributed by Dodji Seketeli
|
// Contributed by Dodji Seketeli
|
// Origin PR debug/30161
|
// Origin PR debug/30161
|
// { dg-options "-g -dA -fno-merge-debug-strings" }
|
// { dg-options "-g -dA -fno-merge-debug-strings" }
|
// { dg-final { scan-assembler-times "DW_TAG_GNU_template_template_param" 2 } }
|
// { dg-final { scan-assembler-times "DW_TAG_GNU_template_template_param" 2 } }
|
// { dg-final { scan-assembler-times "\"vector.0\".*?DW_AT_GNU_template_name" 1 } }
|
// { dg-final { scan-assembler-times "\"vector.0\".*?DW_AT_GNU_template_name" 1 } }
|
// { dg-final { scan-assembler-times ".ascii \"U.0\".*?DW_AT_name" 1 } }
|
// { dg-final { scan-assembler-times ".ascii \"U.0\".*?DW_AT_name" 1 } }
|
|
|
template
|
template
|
struct vector_base
|
struct vector_base
|
{
|
{
|
T tab[3 + 1];
|
T tab[3 + 1];
|
static int get_sizeof_t()
|
static int get_sizeof_t()
|
{
|
{
|
return sizeof (tab);
|
return sizeof (tab);
|
}
|
}
|
};
|
};
|
|
|
template
|
template
|
struct vector : public vector_base
|
struct vector : public vector_base
|
{
|
{
|
static int get_sizeof_t()
|
static int get_sizeof_t()
|
{
|
{
|
return sizeof (T);
|
return sizeof (T);
|
}
|
}
|
T member1;
|
T member1;
|
T member2;
|
T member2;
|
};
|
};
|
|
|
template class U>
|
template class U>
|
struct bar
|
struct bar
|
{
|
{
|
int foo()
|
int foo()
|
{
|
{
|
return U::get_sizeof_t ();
|
return U::get_sizeof_t ();
|
}
|
}
|
};
|
};
|
|
|
|
|
int
|
int
|
foo_func ()
|
foo_func ()
|
{
|
{
|
bar b;
|
bar b;
|
return b.foo ();
|
return b.foo ();
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.