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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [20001012-2.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run { target fpic } } */
2
/* { dg-options "-O2 -fpic" } */
3
 
4
extern void abort (void);
5
extern void exit (int);
6
 
7
void foo (char *x, const char *y, ...)
8
{
9
}
10
 
11
double bar (const char *x, long y)
12
{
13
  return 0.0;
14
}
15
 
16
typedef __SIZE_TYPE__ size_t;
17
extern size_t strlen (const char *);
18
 
19
double baz (const char *x)
20
{
21
  if (x[0] != '\0')
22
    {
23
      char y[6 + strlen (x)];
24
      foo (y, "FOO", x);
25
      return bar (y, 0);
26
    }
27
 
28
  return (__extension__ ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) { __l: 0x3f800000UL }).__d);
29
}
30
 
31
main ()
32
{
33
  if (baz("") != 1.0)
34
    abort ();
35
  exit (0);
36
}

powered by: WebSVN 2.1.0

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