OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [ext/] [inline1.C] - Rev 328

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.