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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [lto/] [20110201-1_0.c] - Blame information for rev 774

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-lto-do run } */
2
/* { dg-lto-options { { -O0 -flto } } } */
3
/* { dg-extra-ld-options "-O2 -ffast-math -fuse-linker-plugin" } */
4
/* { dg-require-linker-plugin "" } */
5
 
6
/* We require a linker plugin because otherwise we'd need to link
7
   against libm which we are not sure here has cabs on all targets.
8
   This is because collect2 invokes ld on the -O0 object code
9
   which does not have folded cabs.  */
10
 
11
double cabs(_Complex double);
12
double __attribute__((used))
13
foo (_Complex double x, int b)
14
{
15
  if (b)
16
    x = 0;
17
  return cabs(x);
18
}
19
 
20
/* We provide a dummy sqrt to avoid link failures on targets that do not
21
   expand sqrt inline.  Note that we do not link against libm in order
22
   to ensure cabs is not satisfied by the library, but must be folded.  */
23
double __attribute__((used))
24
sqrt (double x)
25
{
26
  return x;
27
}
28
 
29
int main() { return 0; }

powered by: WebSVN 2.1.0

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