This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/44561] using nullptr_t with -flto/-fwhopr causes ICE: tree code 'lang_type' is not supported in gimple streams
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 11 Oct 2010 09:31:00 +0000
- Subject: [Bug c++/44561] using nullptr_t with -flto/-fwhopr causes ICE: tree code 'lang_type' is not supported in gimple streams
- Auto-submitted: auto-generated
- References: <bug-44561-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44561
--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-10-11 09:30:57 UTC ---
New problems.
typedef decltype(nullptr) nullptr_t;
class shared_ptr {
public:
shared_ptr(nullptr_t __p);
};
shared_ptr p = nullptr;
exposes a nullptr constant (INTEGER_CST of LANG_TYPE). Of course
build_int_cst_wide doesn't like this at all. From
cp/decl.c:cxx_init_decl_processing():
nullptr_node = make_node (INTEGER_CST);
TREE_TYPE (nullptr_node) = nullptr_type_node;
:(
One more reason to make NULLPTR_TYPE a regular middle-end tree code.