* [Bug c++/44561] using nullptr_t with -flto/-fwhopr causes ICE: tree code 'lang_type' is not supported in gimple streams
[not found] <bug-44561-4@http.gcc.gnu.org/bugzilla/>
@ 2010-09-27 16:39 ` rguenth at gcc dot gnu.org
2010-10-10 13:31 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-09-27 16:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44561
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-09-27 11:10:21 UTC ---
*** Bug 45789 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/44561] using nullptr_t with -flto/-fwhopr causes ICE: tree code 'lang_type' is not supported in gimple streams
[not found] <bug-44561-4@http.gcc.gnu.org/bugzilla/>
2010-09-27 16:39 ` rguenth at gcc dot gnu.org
@ 2010-10-10 13:31 ` rguenth at gcc dot gnu.org
2010-10-10 13:53 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-10-10 13:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44561
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-10-10 13:31:30 UTC ---
This btw fails nearly all libstdc++ tests when built with -flto. Jason, is
there no way to avoid lang_type to leak into the middle-end like this?
Why do we need to use lang_type for nullptr and cannot use void * with
some lang-specific flag?
This really breaks LTO badly for 4.6, so if it cannot be resolved in the FE
I guess I'll just drop all lang_type nodes at streaming time replacing
them with ptr_type_node (ugh).
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/44561] using nullptr_t with -flto/-fwhopr causes ICE: tree code 'lang_type' is not supported in gimple streams
[not found] <bug-44561-4@http.gcc.gnu.org/bugzilla/>
2010-09-27 16:39 ` rguenth at gcc dot gnu.org
2010-10-10 13:31 ` rguenth at gcc dot gnu.org
@ 2010-10-10 13:53 ` rguenth at gcc dot gnu.org
2010-10-10 20:54 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-10-10 13:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44561
--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-10-10 13:53:08 UTC ---
Another way to handle it in LTO would be to simply stream LANG_TYPE, assuming
it must be completely opaque to the rest of the compiler anyway. Probably
better than the ptr_type_node idea. I will give that a try if no other ideas
pop up.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/44561] using nullptr_t with -flto/-fwhopr causes ICE: tree code 'lang_type' is not supported in gimple streams
[not found] <bug-44561-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2010-10-10 13:53 ` rguenth at gcc dot gnu.org
@ 2010-10-10 20:54 ` rguenth at gcc dot gnu.org
2010-10-11 9:31 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-10-10 20:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44561
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org
|gnu.org |
--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-10-10 20:54:25 UTC ---
I have a patch.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/44561] using nullptr_t with -flto/-fwhopr causes ICE: tree code 'lang_type' is not supported in gimple streams
[not found] <bug-44561-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2010-10-10 20:54 ` rguenth at gcc dot gnu.org
@ 2010-10-11 9:31 ` rguenth at gcc dot gnu.org
2010-10-11 9:51 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-10-11 9:31 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/44561] using nullptr_t with -flto/-fwhopr causes ICE: tree code 'lang_type' is not supported in gimple streams
[not found] <bug-44561-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2010-10-11 9:31 ` rguenth at gcc dot gnu.org
@ 2010-10-11 9:51 ` rguenth at gcc dot gnu.org
2010-10-14 12:00 ` rguenth at gcc dot gnu.org
2010-10-14 12:02 ` rguenth at gcc dot gnu.org
7 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-10-11 9:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44561
--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-10-11 09:51:19 UTC ---
Created attachment 22014
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22014
WIP patch
Work-in-progress for the just-stream-lang-type idea. Adding odd LANG_TYPE
handling to the middle-end in various places.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/44561] using nullptr_t with -flto/-fwhopr causes ICE: tree code 'lang_type' is not supported in gimple streams
[not found] <bug-44561-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2010-10-11 9:51 ` rguenth at gcc dot gnu.org
@ 2010-10-14 12:00 ` rguenth at gcc dot gnu.org
2010-10-14 12:02 ` rguenth at gcc dot gnu.org
7 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-10-14 12:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44561
--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-10-14 11:59:50 UTC ---
Author: rguenth
Date: Thu Oct 14 11:59:47 2010
New Revision: 165462
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=165462
Log:
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.
Added:
trunk/gcc/testsuite/g++.dg/lto/20101010-3_0.C
trunk/gcc/testsuite/g++.dg/lto/20101010-4_0.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/decl.c
trunk/gcc/cp/error.c
trunk/gcc/cp/mangle.c
trunk/gcc/cp/name-lookup.c
trunk/gcc/cp/pt.c
trunk/gcc/cp/rtti.c
trunk/gcc/dbxout.c
trunk/gcc/dwarf2out.c
trunk/gcc/gimple.c
trunk/gcc/sdbout.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree.c
trunk/gcc/tree.def
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/44561] using nullptr_t with -flto/-fwhopr causes ICE: tree code 'lang_type' is not supported in gimple streams
[not found] <bug-44561-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2010-10-14 12:00 ` rguenth at gcc dot gnu.org
@ 2010-10-14 12:02 ` rguenth at gcc dot gnu.org
7 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-10-14 12:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44561
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.6.0
--- Comment #9 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-10-14 12:02:34 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 10+ messages in thread