Debian Codegraph @

gcc/testsuite/g++.dg/lto/pr65193_0.C

raw
1 /* { dg-lto-do link } */
2 /* { dg-require-effective-target fpic } */
3 /* { dg-require-effective-target lto_incremental } */
4 /* { dg-lto-options {{-fPIC -r -nostdlib -flto -O2 -g -Wno-return-type}} } */
5
6 void frexp (int, int *);
7 namespace std
8 {
9 int ldexp (int, int);
10 struct A
11 {
12 };
13 template <class T> T get_min_shift_value ();
14 template <class> struct min_shift_initializer
15 {
16 struct B
17 {
18 B () { get_min_shift_value<long double> (); }
19 } static const b;
20 static void
21 m_fn1 ()
22 {
23 b;
24 }
25 };
26 template <class T>
27 const typename min_shift_initializer<T>::B min_shift_initializer<T>::b;
28 template <class T>
29 inline T
30 get_min_shift_value ()
31 {
32 using std::ldexp;
33 static T c = ldexp (0, 0);
34 min_shift_initializer<T>::m_fn1;
35 }
36 template <class T, class Policy>
37 void
38 float_next_imp (T p1, Policy p2)
39 {
40 using std::ldexp;
41 int d;
42 float_next (0, p2);
43 frexp (p1, &d);
44 }
45 template <class T, class Policy>
46 int
47 float_next (const T &p1, Policy &p2)
48 {
49 float_next_imp (p1, p2);
50 }
51 template <class T, class Policy> void float_prior_imp (T, Policy)
52 {
53 get_min_shift_value<T> ();
54 }
55 template <class T, class Policy> int float_prior (T, Policy)
56 {
57 float_prior_imp (static_cast<T> (0), 0);
58 }
59 template <class T, class U, class Policy>
60 void
61 nextafter (T p1, U p2, Policy p3)
62 {
63 p2 ? float_next (0, p3) : float_prior (p1, 0);
64 }
65 long double e;
66 int f;
67 void
68 nextafter ()
69 {
70 nextafter (e, f, A ());
71 }
72 }