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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [20001117-1.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-O2 -finstrument-functions" } */
3
 
4
extern void abort (void);
5
extern void exit (int);
6
 
7
double
8
foo (double a, double b)
9
{
10
  double c;
11
  if (0.0 < a)
12
    c = a;
13
  else if (b > 0.0)
14
    c = 0.0;
15
  else
16
    return 0;
17
  return 2.0 * (b - c);
18
}
19
 
20
int main ()
21
{
22
  if (foo (1.0, 4.0) != 6.0)
23
    abort ();
24
  exit (0);
25
}
26
 
27
/* Abort on non-NULL CALL_SITE to ensure that __builtin_return_address
28
   was expanded properly.  */
29
void __attribute__((no_instrument_function))
30
__cyg_profile_func_enter(void *this_fn, void *call_site)
31
{
32
  if (call_site == (void *)0)
33
    abort ();
34
}
35
 
36
void __attribute__((no_instrument_function))
37
__cyg_profile_func_exit(void *this_fn, void *call_site)
38
{
39
  if (call_site == (void *)0)
40
    abort ();
41
}
42
 

powered by: WebSVN 2.1.0

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