diff options
author | Richard Guenther <rguenther@suse.de> | 2010-10-14 11:59:47 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-10-14 11:59:47 +0000 |
commit | 1e85e7204d437c3e0fd2aea6996ad7820c5913ee (patch) | |
tree | 4a7d9fe94ac20b96bfc133ea6e4ddea9e9aeaede /gcc/cp/decl.c | |
parent | a16ced220ff332c70645ad5f9ad2e247f5a50581 (diff) | |
download | gcc-1e85e7204d437c3e0fd2aea6996ad7820c5913ee.zip gcc-1e85e7204d437c3e0fd2aea6996ad7820c5913ee.tar.gz gcc-1e85e7204d437c3e0fd2aea6996ad7820c5913ee.tar.bz2 |
re PR c++/44561 (using nullptr_t with -flto/-fwhopr causes ICE: tree code 'lang_type' is not supported in gimple streams)
2010-10-14 Richard Guenther <rguenther@suse.de>
PR lto/44561
* tree.def (NULLPTR_TYPE): New tree code.
* dbxout.c (dbxout_type): Handle NULLPTR_TYPE.
* dwarf2out.c (is_base_type): Likewise.
(gen_type_die_with_usage): Likewise.
* sdbout.c (plain_type_1): Likewise.
* tree.c (build_int_cst_wide): Likewise.
* gimple.c (gimple_types_compatible_p_1): NULLPTR_TYPE types
are equal.
cp/
* cp-tree.h (NULLPTR_TYPE_P): Adjust.
* decl.c (cxx_init_decl_processing): Build a NULLPTR_TYPE node,
use build_int_cst.
* error.c (dump_type): Handle NULLPTR_TYPE.
(dump_type_prefix): Likewise.
(dump_type_suffix): Likewise.
* mangle.c (write_type): Likewise.
* name-lookup.c (arg_assoc_type): Likewise.
* rtti.c (typeinfo_in_lib_p): Likewise.
* pt.c (tsubst): Likewise.
* g++.dg/lto/20101010-3_0.C: New testcase.
* g++.dg/lto/20101010-4_0.C: Likewise.
From-SVN: r165462
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 7fcfb8b..55e231b 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -3552,15 +3552,14 @@ cxx_init_decl_processing (void) global_delete_fndecl = push_cp_library_fn (DELETE_EXPR, deltype); push_cp_library_fn (VEC_DELETE_EXPR, deltype); - nullptr_type_node = make_node (LANG_TYPE); + nullptr_type_node = make_node (NULLPTR_TYPE); TYPE_SIZE (nullptr_type_node) = bitsize_int (GET_MODE_BITSIZE (ptr_mode)); TYPE_SIZE_UNIT (nullptr_type_node) = size_int (GET_MODE_SIZE (ptr_mode)); TYPE_UNSIGNED (nullptr_type_node) = 1; TYPE_PRECISION (nullptr_type_node) = GET_MODE_BITSIZE (ptr_mode); SET_TYPE_MODE (nullptr_type_node, Pmode); record_builtin_type (RID_MAX, "decltype(nullptr)", nullptr_type_node); - nullptr_node = make_node (INTEGER_CST); - TREE_TYPE (nullptr_node) = nullptr_type_node; + nullptr_node = build_int_cst (nullptr_type_node, 0); } abort_fndecl |