--- /dev/null
+// { dg-do compile }
+// { dg-require-effective-target c++11 }
+
+inline namespace __cxx11 {}
+typedef int size_t;
+class MessageAuthenticationCode;
+class __uniq_ptr_impl {
+ struct _Ptr {
+ using type = MessageAuthenticationCode *;
+ };
+public:
+ using pointer = _Ptr::type;
+};
+class unique_ptr {
+public:
+ using pointer = __uniq_ptr_impl::pointer;
+ unique_ptr(pointer);
+};
+namespace __cxx11 {
+class basic_string {
+public:
+ basic_string(char *);
+ ~basic_string();
+};
+} // namespace __cxx11
+class MessageAuthenticationCode {};
+class SCAN_Name {
+public:
+ SCAN_Name(basic_string);
+ size_t arg_as_integer();
+};
+class SipHash : public MessageAuthenticationCode {
+public:
+ SipHash(size_t c, size_t d) : m_C(c), m_D(d) {}
+ size_t m_C, m_D;
+};
+void create(basic_string algo_spec, char *s) {
+ basic_string provider = s;
+ SCAN_Name req(algo_spec);
+ unique_ptr(new SipHash(req.arg_as_integer(), req.arg_as_integer()));
+}
{
gimple_stmt_iterator gsi;
if (gimple_code (insert_after->stmt) == GIMPLE_PHI)
- gsi = gsi_after_labels (gimple_bb (insert_after->stmt));
+ {
+ gsi = gsi_after_labels (gimple_bb (insert_after->stmt));
+ gsi_insert_seq_before (&gsi, ctor_seq,
+ GSI_CONTINUE_LINKING);
+ }
else if (!stmt_ends_bb_p (insert_after->stmt))
- gsi = gsi_for_stmt (insert_after->stmt);
+ {
+ gsi = gsi_for_stmt (insert_after->stmt);
+ gsi_insert_seq_after (&gsi, ctor_seq,
+ GSI_CONTINUE_LINKING);
+ }
else
{
/* When we want to insert after a def where the
edge. */
edge e = find_fallthru_edge
(gimple_bb (insert_after->stmt)->succs);
- gcc_assert (single_pred_p (e->dest));
- gsi = gsi_after_labels (e->dest);
+ basic_block new_bb
+ = gsi_insert_seq_on_edge_immediate (e, ctor_seq);
+ gcc_assert (!new_bb);
}
- gsi_insert_seq_after (&gsi, ctor_seq,
- GSI_CONTINUE_LINKING);
}
else
vinfo->insert_seq_on_entry (NULL, ctor_seq);