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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr39713.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
/* { dg-do compile } */
2
 
3
template 
4
static inline To
5
bitwise_cast (From from)
6
{
7
  union
8
    {
9
      From f;
10
      To t;
11
    } u;
12
  u.f = from;
13
  return u.t;
14
}
15
 
16
extern void foo (unsigned char *);
17
 
18
double
19
bar ()
20
{
21
  unsigned char b[sizeof (unsigned long long)];
22
  foo (b);
23
  return bitwise_cast (*(unsigned long long *) b);
24
}
25
 

powered by: WebSVN 2.1.0

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