public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/58665] New: [4.9 Regression] ICE with using incomplete struct @ 2013-10-08 21:22 reichelt at gcc dot gnu.org 2013-10-08 21:48 ` [Bug c++/58665] " paolo.carlini at oracle dot com ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: reichelt at gcc dot gnu.org @ 2013-10-08 21:22 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58665 Bug ID: 58665 Summary: [4.9 Regression] ICE with using incomplete struct Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet triggers an ICE on trunk: ============================ struct A; template<int> struct B { static void foo(A) {} }; void bar() { B<0>::foo(A()); } ============================ bug.cc: In static member function 'static void B<<anonymous> >::foo(A)': bug.cc:5:19: error: '<anonymous>' has incomplete type static void foo(A) {} ^ bug.cc:1:8: error: forward declaration of 'struct A' struct A; ^ bug.cc: In function 'void bar()': bug.cc:10:15: error: invalid use of incomplete type 'struct A' B<0>::foo(A()); ^ bug.cc:1:8: error: forward declaration of 'struct A' struct A; ^ bug.cc: In instantiation of 'static void B<<anonymous> >::foo(A) [with int <anonymous> = 0]': bug.cc:10:9: required from here bug.cc:5:15: internal compiler error: tree check: expected tree that contains 'decl minimal' structure, have 'error_mark' in regenerate_decl_from_template, at cp/pt.c:18839 static void foo(A) {} ^ 0xcd9947 tree_contains_struct_check_failed(tree_node const*, tree_node_structure_enum, char const*, int, char const*) ../../gcc/gcc/tree.c:9348 0x5a04ff contains_struct_check ../../gcc/gcc/tree.h:2723 0x5a04ff regenerate_decl_from_template ../../gcc/gcc/cp/pt.c:18839 0x5a04ff instantiate_decl(tree_node*, int, bool) ../../gcc/gcc/cp/pt.c:19303 0x5dc53f instantiate_pending_templates(int) ../../gcc/gcc/cp/pt.c:19495 0x617966 cp_write_global_declarations() ../../gcc/gcc/cp/decl2.c:4065 Please submit a full bug report, [etc.] The ICE appeared between 4.9.0-20131004 and 4.9.0-20131005. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/58665] [4.9 Regression] ICE with using incomplete struct 2013-10-08 21:22 [Bug c++/58665] New: [4.9 Regression] ICE with using incomplete struct reichelt at gcc dot gnu.org @ 2013-10-08 21:48 ` paolo.carlini at oracle dot com 2013-10-08 21:54 ` paolo.carlini at oracle dot com 2013-10-08 21:54 ` paolo at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: paolo.carlini at oracle dot com @ 2013-10-08 21:48 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58665 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2013-10-08 Assignee|unassigned at gcc dot gnu.org |paolo.carlini at oracle dot com Ever confirmed|0 |1 --- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> --- I'm fixing this by reverting the fix for PR58448. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/58665] [4.9 Regression] ICE with using incomplete struct 2013-10-08 21:22 [Bug c++/58665] New: [4.9 Regression] ICE with using incomplete struct reichelt at gcc dot gnu.org 2013-10-08 21:48 ` [Bug c++/58665] " paolo.carlini at oracle dot com @ 2013-10-08 21:54 ` paolo.carlini at oracle dot com 2013-10-08 21:54 ` paolo at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: paolo.carlini at oracle dot com @ 2013-10-08 21:54 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58665 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED Target Milestone|--- |4.9.0 --- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> --- Done. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/58665] [4.9 Regression] ICE with using incomplete struct 2013-10-08 21:22 [Bug c++/58665] New: [4.9 Regression] ICE with using incomplete struct reichelt at gcc dot gnu.org 2013-10-08 21:48 ` [Bug c++/58665] " paolo.carlini at oracle dot com 2013-10-08 21:54 ` paolo.carlini at oracle dot com @ 2013-10-08 21:54 ` paolo at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: paolo at gcc dot gnu.org @ 2013-10-08 21:54 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58665 --- Comment #2 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> --- Author: paolo Date: Tue Oct 8 21:54:06 2013 New Revision: 203288 URL: http://gcc.gnu.org/viewcvs?rev=203288&root=gcc&view=rev Log: /cp 2013-10-08 Paolo Carlini <paolo.carlini@oracle.com> PR c++/58665 Revert: 2013-10-04 Paolo Carlini <paolo.carlini@oracle.com> PR c++/58448 * pt.c (tsubst): Use error_operand_p on parameter t. /testsuite 2013-10-08 Paolo Carlini <paolo.carlini@oracle.com> PR c++/58665 Revert: 2013-10-04 Paolo Carlini <paolo.carlini@oracle.com> PR c++/58448 * g++.dg/template/crash117.C: New. Removed: trunk/gcc/testsuite/g++.dg/template/crash117.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/pt.c trunk/gcc/testsuite/ChangeLog ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-10-08 21:54 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-10-08 21:22 [Bug c++/58665] New: [4.9 Regression] ICE with using incomplete struct reichelt at gcc dot gnu.org 2013-10-08 21:48 ` [Bug c++/58665] " paolo.carlini at oracle dot com 2013-10-08 21:54 ` paolo.carlini at oracle dot com 2013-10-08 21:54 ` paolo at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).