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 |
// { dg-do compile }
|
// { dg-do compile }
|
struct f
|
struct f
|
{
|
{
|
inline f(void);
|
inline f(void);
|
inline void f1(void);
|
inline void f1(void);
|
int a;
|
int a;
|
};
|
};
|
|
|
inline __attribute__((always_inline)) f::f(void)
|
inline __attribute__((always_inline)) f::f(void)
|
{
|
{
|
a++;
|
a++;
|
}
|
}
|
|
|
inline __attribute__((always_inline)) void f::f1(void)
|
inline __attribute__((always_inline)) void f::f1(void)
|
{
|
{
|
a++;
|
a++;
|
}
|
}
|
|
|
void g(void)
|
void g(void)
|
{
|
{
|
f a, b, c, d;
|
f a, b, c, d;
|
a.f1();
|
a.f1();
|
}
|
}
|
|
|
// f::f() should be inlined even at -O0
|
// f::f() should be inlined even at -O0
|
// { dg-final { scan-assembler-not "_ZN1fC1Ev" } }
|
// { dg-final { scan-assembler-not "_ZN1fC1Ev" } }
|
// Likewise for f::f1()
|
// Likewise for f::f1()
|
// { dg-final { scan-assembler-not "_ZN1f2f1Ev" } }
|
// { dg-final { scan-assembler-not "_ZN1f2f1Ev" } }
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.