URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.dg/] [ext/] [inline1.C] - Rev 301
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do compile }
// { dg-options "-O" }
// Make sure inlined non-outlined functions aren't marked weak.
// We'd get a ".weak xyzzy" annotation trigged by the second declaration.
// { dg-final { scan-assembler-not "weak\[^ \t\]*\[ \t\]_?xyzzy" } }
// The next check isn't really part of the actual test, just to make
// sure there's no outline-copy of xyzzy, because if that really
// happened, it *should* be marked linkonce or perhaps weak.
// { dg-final { scan-assembler-not "xyzzy" } }
extern int x;
extern void foo(void);
extern void bar(void);
extern "C" inline int xyzzy(int a)
{
foo();
return a + x;
}
extern "C" int xyzzy(int);
extern inline int plugh(int c)
{
return xyzzy (c);
}
int y;
void doit(int b)
{
y = xyzzy (b) + plugh (b);
}
Go to most recent revision | Compare with Previous | Blame | View Log