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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [ext/] [inline1.C] - Blame information for rev 715

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
// { dg-options "-O" }
3
// Make sure inlined non-outlined functions aren't marked weak.
4
// We'd get a ".weak xyzzy" annotation trigged by the second declaration.
5
 
6
// { dg-final { scan-assembler-not "weak\[^ \t\]*\[ \t\]_?xyzzy" } }
7
 
8
// The next check isn't really part of the actual test, just to make
9
// sure there's no outline-copy of xyzzy, because if that really
10
// happened, it *should* be marked linkonce or perhaps weak.
11
// { dg-final { scan-assembler-not "xyzzy" } }
12
 
13
extern int x;
14
extern void foo(void);
15
extern void bar(void);
16
 
17
extern "C" inline int xyzzy(int a)
18
{
19
  foo();
20
  return a + x;
21
}
22
 
23
extern "C" int xyzzy(int);
24
 
25
extern inline int plugh(int c)
26
{
27
  return xyzzy (c);
28
}
29
 
30
int y;
31
void doit(int b)
32
{
33
  y = xyzzy (b) + plugh (b);
34
}

powered by: WebSVN 2.1.0

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