public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/58647] New: [4.7/4.8/4.9 Regression] ICE with function pointer @ 2013-10-06 20:44 reichelt at gcc dot gnu.org 2013-10-06 21:08 ` [Bug c++/58647] " paolo.carlini at oracle dot com ` (5 more replies) 0 siblings, 6 replies; 7+ messages in thread From: reichelt at gcc dot gnu.org @ 2013-10-06 20:44 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58647 Bug ID: 58647 Summary: [4.7/4.8/4.9 Regression] ICE with function pointer 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 valid code snippet triggers an ICE since GCC 4.7.0 only if compiled with "-std=c++11". Without this option the code compiles fine. ====================================== struct A { static void foo(); }; template<typename> void bar() { A().foo; } ====================================== bug.cc: In function 'void bar()': bug.cc:8:10: internal compiler error: tree check: expected tree that contains 'decl common' structure, have 'baselink' in cxx_eval_component_reference, at cp/semantics.c:7145 A().foo; ^ 0xcd96a7 tree_contains_struct_check_failed(tree_node const*, tree_node_structure_enum, char const*, int, char const*) ../../gcc/gcc/tree.c:9348 0x6c55d9 contains_struct_check ../../gcc/gcc/tree.h:2723 0x6c55d9 cxx_eval_component_reference ../../gcc/gcc/cp/semantics.c:7145 0x6c55d9 cxx_eval_constant_expression ../../gcc/gcc/cp/semantics.c:8094 0x6c7036 cxx_eval_outermost_constant_expr ../../gcc/gcc/cp/semantics.c:8217 0x6c9cab maybe_constant_value(tree_node*) ../../gcc/gcc/cp/semantics.c:8327 0x59da21 build_non_dependent_expr(tree_node*) ../../gcc/gcc/cp/pt.c:20960 0x6acbf0 finish_expr_stmt(tree_node*) ../../gcc/gcc/cp/semantics.c:627 0x63d167 cp_parser_statement ../../gcc/gcc/cp/parser.c:9280 0x63e452 cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:9552 0x63e596 cp_parser_compound_statement ../../gcc/gcc/cp/parser.c:9506 0x64f95b cp_parser_function_body ../../gcc/gcc/cp/parser.c:18328 0x64f95b cp_parser_ctor_initializer_opt_and_function_body ../../gcc/gcc/cp/parser.c:18364 0x6509af cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:22351 0x6516d5 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/gcc/cp/parser.c:22272 0x6516d5 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16357 0x651fd4 cp_parser_single_declaration ../../gcc/gcc/cp/parser.c:22665 0x654be8 cp_parser_template_declaration_after_export ../../gcc/gcc/cp/parser.c:22467 0x65c9d9 cp_parser_declaration ../../gcc/gcc/cp/parser.c:10737 0x65b5aa cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10659 Please submit a full bug report, [etc.] ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/58647] [4.7/4.8/4.9 Regression] ICE with function pointer 2013-10-06 20:44 [Bug c++/58647] New: [4.7/4.8/4.9 Regression] ICE with function pointer reichelt at gcc dot gnu.org @ 2013-10-06 21:08 ` paolo.carlini at oracle dot com 2013-10-10 11:57 ` rguenth at gcc dot gnu.org ` (4 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: paolo.carlini at oracle dot com @ 2013-10-06 21:08 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58647 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P2 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/58647] [4.7/4.8/4.9 Regression] ICE with function pointer 2013-10-06 20:44 [Bug c++/58647] New: [4.7/4.8/4.9 Regression] ICE with function pointer reichelt at gcc dot gnu.org 2013-10-06 21:08 ` [Bug c++/58647] " paolo.carlini at oracle dot com @ 2013-10-10 11:57 ` rguenth at gcc dot gnu.org 2013-10-20 16:08 ` paolo.carlini at oracle dot com ` (3 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: rguenth at gcc dot gnu.org @ 2013-10-10 11:57 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58647 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |4.7.4 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/58647] [4.7/4.8/4.9 Regression] ICE with function pointer 2013-10-06 20:44 [Bug c++/58647] New: [4.7/4.8/4.9 Regression] ICE with function pointer reichelt at gcc dot gnu.org 2013-10-06 21:08 ` [Bug c++/58647] " paolo.carlini at oracle dot com 2013-10-10 11:57 ` rguenth at gcc dot gnu.org @ 2013-10-20 16:08 ` paolo.carlini at oracle dot com 2013-10-23 0:19 ` paolo.carlini at oracle dot com ` (2 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: paolo.carlini at oracle dot com @ 2013-10-20 16:08 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58647 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2013-10-20 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> --- Mine. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/58647] [4.7/4.8/4.9 Regression] ICE with function pointer 2013-10-06 20:44 [Bug c++/58647] New: [4.7/4.8/4.9 Regression] ICE with function pointer reichelt at gcc dot gnu.org ` (2 preceding siblings ...) 2013-10-20 16:08 ` paolo.carlini at oracle dot com @ 2013-10-23 0:19 ` paolo.carlini at oracle dot com 2013-11-27 15:55 ` paolo at gcc dot gnu.org 2013-11-27 15:59 ` [Bug c++/58647] [4.7/4.8 " paolo.carlini at oracle dot com 5 siblings, 0 replies; 7+ messages in thread From: paolo.carlini at oracle dot com @ 2013-10-23 0:19 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58647 --- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> --- Pending patch here: http://gcc.gnu.org/ml/gcc-patches/2013-10/msg01659.html (alternately the check could be inside cxx_eval_component_reference itself) ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/58647] [4.7/4.8/4.9 Regression] ICE with function pointer 2013-10-06 20:44 [Bug c++/58647] New: [4.7/4.8/4.9 Regression] ICE with function pointer reichelt at gcc dot gnu.org ` (3 preceding siblings ...) 2013-10-23 0:19 ` paolo.carlini at oracle dot com @ 2013-11-27 15:55 ` paolo at gcc dot gnu.org 2013-11-27 15:59 ` [Bug c++/58647] [4.7/4.8 " paolo.carlini at oracle dot com 5 siblings, 0 replies; 7+ messages in thread From: paolo at gcc dot gnu.org @ 2013-11-27 15:55 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58647 --- Comment #3 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> --- Author: paolo Date: Wed Nov 27 15:55:18 2013 New Revision: 205449 URL: http://gcc.gnu.org/viewcvs?rev=205449&root=gcc&view=rev Log: /cp 2013-11-27 Paolo Carlini <paolo.carlini@oracle.com> PR c++/58647 * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]): Handle function COMPONENT_REFs. /testsuite 2013-11-27 Paolo Carlini <paolo.carlini@oracle.com> PR c++/58647 * g++.dg/parse/crash66.C: New. Added: trunk/gcc/testsuite/g++.dg/parse/crash66.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/semantics.c trunk/gcc/testsuite/ChangeLog ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/58647] [4.7/4.8 Regression] ICE with function pointer 2013-10-06 20:44 [Bug c++/58647] New: [4.7/4.8/4.9 Regression] ICE with function pointer reichelt at gcc dot gnu.org ` (4 preceding siblings ...) 2013-11-27 15:55 ` paolo at gcc dot gnu.org @ 2013-11-27 15:59 ` paolo.carlini at oracle dot com 5 siblings, 0 replies; 7+ messages in thread From: paolo.carlini at oracle dot com @ 2013-11-27 15:59 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58647 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED Target Milestone|4.7.4 |4.9.0 Summary|[4.7/4.8/4.9 Regression] |[4.7/4.8 Regression] ICE |ICE with function pointer |with function pointer --- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> --- Fixed for 4.9.0. The issue doesn't affect release mode, thus I'm not fiddling with the release branches. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-11-27 15:59 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-10-06 20:44 [Bug c++/58647] New: [4.7/4.8/4.9 Regression] ICE with function pointer reichelt at gcc dot gnu.org 2013-10-06 21:08 ` [Bug c++/58647] " paolo.carlini at oracle dot com 2013-10-10 11:57 ` rguenth at gcc dot gnu.org 2013-10-20 16:08 ` paolo.carlini at oracle dot com 2013-10-23 0:19 ` paolo.carlini at oracle dot com 2013-11-27 15:55 ` paolo at gcc dot gnu.org 2013-11-27 15:59 ` [Bug c++/58647] [4.7/4.8 " paolo.carlini at oracle dot com
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).