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

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).