This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/77508] New: ICE on valid C++ code: in finish_class_member_access_expr, at cp/typeck.c:2783

            Bug ID: 77508
           Summary: ICE on valid C++ code: in
                    finish_class_member_access_expr, at cp/typeck.c:2783
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot
          Reporter: su at cs dot
  Target Milestone: ---

This is a regression from 6.2. 

$ g++-trunk -v
Using built-in specs.
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 7.0.0 20160906 (experimental) [trunk revision 240004] (GCC)
$ g++-6.2 small.cpp
$ clang++ small.cpp
$ g++-trunk small.cpp
small.cpp: In member function ‘void B<T>::g()’:
small.cpp:10:23: internal compiler error: in finish_class_member_access_expr,
at cp/typeck.c:2783
     this->B::template f < &B < T >::g > ();
0x7e8254 finish_class_member_access_expr(cp_expr, tree_node*, bool, int)
0x79dd04 cp_parser_postfix_dot_deref_expression
0x79b54c cp_parser_postfix_expression
0x799e6c cp_parser_unary_expression
0x7a3d17 cp_parser_cast_expression
0x7a4315 cp_parser_binary_expression
0x7a4c00 cp_parser_assignment_expression
0x7a74f9 cp_parser_expression
0x7a7b1f cp_parser_expression_statement
0x7b645c cp_parser_statement
0x7b73dc cp_parser_statement_seq_opt
0x7b74cf cp_parser_compound_statement
0x7b767f cp_parser_function_body
0x7b767f cp_parser_ctor_initializer_opt_and_function_body
0x7b8121 cp_parser_function_definition_after_declarator
0x7bbf80 cp_parser_late_parsing_for_member
0x796d56 cp_parser_class_specifier_1
0x798679 cp_parser_class_specifier
0x798679 cp_parser_type_specifier
0x7abdf3 cp_parser_decl_specifier_seq
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <> for instructions.


template < typename T > struct A
  template < void (T::*Fn) () > void f () {}

template < typename T > struct B : A < B < T > >
  void g ()
    this->B::template f < &B < T >::g > ();

int main ()
  B < int > b;
  b.g ();
  return 0;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]