OSDN Git Service

* g++.dg/torture/pr36191.C: Don't run with -fomit-frame-pointer on
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / torture / pr39713.C
1 /* { dg-do compile } */
2
3 template <typename To, typename From>
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<double> (*(unsigned long long *) b);
24 }
25