2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / torture / pr60609.C
blob9ddec0b601da24406b879baba240e2e9c6c3425f
1 /* { dg-do assemble } */
3 class exception
5 };
6 class bad_alloc:exception
8 };
9 class logic_error:exception
12 class domain_error:logic_error
15 class invalid_argument:logic_error
18 class length_error:logic_error
21 class overflow_error:exception
24 typedef int mpz_t[];
25 template < class > class __gmp_expr;
26 template <> class __gmp_expr < mpz_t >
28     ~__gmp_expr ();
31 class PIP_Solution_Node;
32 class internal_exception
34     ~internal_exception ();
36 class not_an_integer:internal_exception
39 class not_a_variable:internal_exception
42 class not_an_optimization_mode:internal_exception
45 class not_a_bounded_integer_type_width:internal_exception
48 class not_a_bounded_integer_type_representation:internal_exception
51 class not_a_bounded_integer_type_overflow:internal_exception
54 class not_a_complexity_class:internal_exception
57 class not_a_control_parameter_name:internal_exception
60 class not_a_control_parameter_value:internal_exception
63 class not_a_pip_problem_control_parameter_name:internal_exception
66 class not_a_pip_problem_control_parameter_value:internal_exception
69 class not_a_relation:internal_exception
72 class ppl_handle_mismatch:internal_exception
75 class timeout_exception
77     ~timeout_exception ();
79 class deterministic_timeout_exception:timeout_exception
82 void __assert_fail (const char *, const char *, int, int *)
83 __attribute__ ((__noreturn__));
84 void PL_get_pointer (void *);
85 int Prolog_is_address ();
86 inline int
87 Prolog_get_address (void **p1)
89     Prolog_is_address ()? static_cast <
90     void >(0) : __assert_fail ("Prolog_is_address", "./swi_cfli.hh", 0, 0);
91     PL_get_pointer (p1);
92     return 0;
95 class non_linear:internal_exception
98 class not_unsigned_integer:internal_exception
101 class not_universe_or_empty:internal_exception
104 class not_a_nil_terminated_list:internal_exception
107 class PPL_integer_out_of_range
109     __gmp_expr < mpz_t > n;
111 void handle_exception ();
112 template < typename T > T * term_to_handle (int, const char *)
114     if (Prolog_is_address ())
115     {
116         void *p;
117         Prolog_get_address (&p);
118         return static_cast < T * >(0);
119     }
120     throw;
123 void
124 ppl_new_MIP_Problem_from_MIP_Problem ()
127     term_to_handle < int >(0, "ppl_new_MIP_Problem_from_MIP_Problem/2");
130 catch (exception &)
135 ppl_PIP_Tree_Node_parametric_values ()
137     try
138     {
139         PIP_Solution_Node *a = term_to_handle < PIP_Solution_Node > (0, 0);
140         (void)a;
141         return 1;
142     }
143     catch (internal_exception &)
144     {
145     }
146     catch (not_unsigned_integer &)
147     {
148         handle_exception ();
149     }
150     catch (non_linear &)
151     {
152         handle_exception ();
153     }
154     catch (not_a_variable &)
155     {
156         handle_exception ();
157     }
158     catch (not_an_integer &)
159     {
160         handle_exception ();
161     }
162     catch (ppl_handle_mismatch &)
163     {
164         handle_exception ();
165     }
166     catch (not_an_optimization_mode &)
167     {
168         handle_exception ();
169     }
170     catch (not_a_complexity_class &)
171     {
172         handle_exception ();
173     }
174     catch (not_a_bounded_integer_type_width &)
175     {
176         handle_exception ();
177     }
178     catch (not_a_bounded_integer_type_representation &)
179     {
180         handle_exception ();
181     }
182     catch (not_a_bounded_integer_type_overflow &)
183     {
184         handle_exception ();
185     }
186     catch (not_a_control_parameter_name &)
187     {
188         handle_exception ();
189     }
190     catch (not_a_control_parameter_value &)
191     {
192         handle_exception ();
193     }
194     catch (not_a_pip_problem_control_parameter_name &)
195     {
196         handle_exception ();
197     }
198     catch (not_a_pip_problem_control_parameter_value &)
199     {
200         handle_exception ();
201     }
202     catch (not_universe_or_empty &)
203     {
204         handle_exception ();
205     }
206     catch (not_a_relation &)
207     {
208         handle_exception ();
209     }
210     catch (not_a_nil_terminated_list &)
211     {
212         handle_exception ();
213     }
214     catch (PPL_integer_out_of_range &)
215     {
216         handle_exception ();
217     }
218     catch (int &)
219     {
220     } catch (timeout_exception &)
221     {
222         handle_exception ();
223     } catch (deterministic_timeout_exception &)
224     {
225         handle_exception ();
226     } catch (overflow_error &)
227     {
228         handle_exception ();
229     } catch (domain_error &)
230     {
231         handle_exception ();
232     } catch (length_error &)
233     {
234         handle_exception ();
235     } catch (invalid_argument &)
236     {
237         handle_exception ();
238     } catch (logic_error &)
239     {
240         handle_exception ();
241     } catch (bad_alloc &)
242     {
243         handle_exception ();
244     } catch (exception &)
245     {
246         handle_exception ();
247     } catch ( ...)
248     {
249         handle_exception ();
250     }
251     return 0;