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 |
// Handle dllimport attribute for functions declared inline.
|
// Handle dllimport attribute for functions declared inline.
|
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} }
|
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} }
|
// { dg-options { -W } }
|
// { dg-options { -W } }
|
|
|
inline __attribute__((dllimport)) void bar() { } // { dg-warning "inline" }
|
inline __attribute__((dllimport)) void bar() { } // { dg-warning "inline" }
|
|
|
struct __attribute__ ((dllimport)) Blah
|
struct __attribute__ ((dllimport)) Blah
|
{
|
{
|
void in_blah () { } // Don't warn if member declared inline in class definition.
|
void in_blah () { } // Don't warn if member declared inline in class definition.
|
void out_blah ();
|
void out_blah ();
|
};
|
};
|
|
|
inline void Blah::out_blah(){ } // Don't warn for inline override of external declaration
|
inline void Blah::out_blah(){ } // Don't warn for inline override of external declaration
|
|
|
void use_inlines()
|
void use_inlines()
|
{
|
{
|
Blah aBlah;
|
Blah aBlah;
|
bar();
|
bar();
|
aBlah.in_blah ();
|
aBlah.in_blah ();
|
aBlah.out_blah ();
|
aBlah.out_blah ();
|
}
|
}
|
|
|
// { dg-final { scan-assembler-not "__imp__" } }
|
// { dg-final { scan-assembler-not "__imp__" } }
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.