+#if !defined(ASM_OUTPUT_CONSTRUCTOR) || !defined(ASM_OUTPUT_DESTRUCTOR)
+extern tree static_ctors;
+extern tree static_dtors;
+
+static tree start_cdtor PARAMS ((int));
+static void finish_cdtor PARAMS ((tree));
+
+static tree
+start_cdtor (method_type)
+ int method_type;
+{
+ tree fnname = get_file_function_name (method_type);
+ tree void_list_node_1 = build_tree_list (NULL_TREE, void_type_node);
+ tree body;
+
+ start_function (void_list_node_1,
+ build_nt (CALL_EXPR, fnname,
+ tree_cons (NULL_TREE, NULL_TREE, void_list_node_1),
+ NULL_TREE),
+ NULL_TREE, NULL_TREE);
+ store_parm_decls ();
+
+ current_function_cannot_inline
+ = "static constructors and destructors cannot be inlined";
+
+ body = c_begin_compound_stmt ();
+
+ pushlevel (0);
+ clear_last_expr ();
+ add_scope_stmt (/*begin_p=*/1, /*partial_p=*/0);
+
+ return body;
+}
+
+static void
+finish_cdtor (body)
+ tree body;
+{
+ tree scope;
+ tree block;
+
+ scope = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0);
+ block = poplevel (0, 0, 0);
+ SCOPE_STMT_BLOCK (TREE_PURPOSE (scope)) = block;
+ SCOPE_STMT_BLOCK (TREE_VALUE (scope)) = block;
+
+ RECHAIN_STMTS (body, COMPOUND_BODY (body));
+
+ finish_function (0);
+}
+#endif
+