Debian Codegraph @

gcc/testsuite/g++.target/powerpc/pr90259.C

raw
1 /* { dg-require-effective-target long_double_ibm128 } */
2 /* { dg-options "-O2 -ffloat-store -fgcse -fnon-call-exceptions -fno-forward-propagate -fno-omit-frame-pointer -fstack-protector-all" } */
3 /* { dg-add-options long_double_ibm128 } */
4
5 /* Verify there is no ICE. */
6
7 template <int a> struct b
8 {
9 static constexpr int c = a;
10 };
11 template <bool a> using d = b<a>;
12 struct e
13 {
14 int f;
15 int
16 g ()
17 {
18 return __builtin_ceil (f / (long double) h);
19 }
20 float h;
21 };
22 template <typename, typename> using k = d<!bool ()>;
23 template <typename> class n
24 {
25 public:
26 e ae;
27 void af ();
28 };
29 template <typename l>
30 void
31 n<l>::af ()
32 {
33 ae.g ();
34 }
35 template <bool> using m = int;
36 template <typename ag, typename ah, typename ai = m<k<ag, ah>::c>>
37 using aj = n<ai>;
38 struct o
39 {
40 void
41 af ()
42 {
43 al.af ();
44 }
45 aj<int, int> al;
46 };
47 template <typename> class am;
48 template <typename i> class ao
49 {
50 protected:
51 static i *ap (int);
52 };
53 template <typename, typename> class p;
54 template <typename ar, typename i, typename... j> class p<ar (j...), i> : ao<i>
55 {
56 public:
57 static ar
58 as (const int &p1, j...)
59 {
60 (*ao<i>::ap (p1)) (j ()...);
61 }
62 };
63 template <typename ar, typename... j> class am<ar (j...)>
64 {
65 template <typename, typename> using av = int;
66
67 public:
68 template <typename i, typename = av<d<!bool ()>, void>,
69 typename = av<i, void>>
70 am (i);
71 using aw = ar (*) (const int &, j...);
72 aw ax;
73 };
74 template <typename ar, typename... j>
75 template <typename i, typename, typename>
76 am<ar (j...)>::am (i)
77 {
78 ax = p<ar (j...), i>::as;
79 }
80 struct G
81 {
82 void ba (am<void (o)>);
83 };
84 struct q
85 {
86 q ()
87 {
88 G a;
89 a.ba (r ());
90 }
91 struct r
92 {
93 void
94 operator() (o p1)
95 try
96 {
97 p1.af ();
98 }
99 catch (int)
100 {
101 }
102 };
103 } s;