https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82878

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
      Known to work|                            |6.4.1
           Keywords|                            |needs-bisection
   Last reconfirmed|                            |2017-11-07
          Component|c++                         |middle-end
                 CC|                            |trippels at gcc dot gnu.org
     Ever confirmed|0                           |1
            Summary|ICE in assign_temp, at      |[7/8 Regression] ICE in
                   |function.c:968 when using   |assign_temp, at
                   |optimization                |function.c:968 when using
                   |                            |optimization

--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
 % cat fd_array.ii
struct __shared_count {
  ~__shared_count();
};
struct A {
  operator int();
  __shared_count _M_refcount;
};
void fn1() {
  void (*seek)(A) = [](A) { fn1(); };
  A fdp;
  if (auto ffd = fdp)
    seek(ffd);
}

 % g++ -c fd_array.ii -O
during RTL pass: expand
fd_array.ii: In function ‘void fn1()’:
fd_array.ii:9:36: internal compiler error: in assign_temp, at function.c:970
   void (*seek)(A) = [](A) { fn1(); };
                                    ^
0xac2b3e assign_temp(tree_node*, int, int)
        /home/markus/gcc/gcc/function.c:970
0x9272bb initialize_argument_information
        /home/markus/gcc/gcc/calls.c:1820
0x92839a expand_call(tree_node*, rtx_def*, int)
        /home/markus/gcc/gcc/calls.c:3261
0xa5839d expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /home/markus/gcc/gcc/expr.c:10853
0x93f19b expand_expr
        /home/markus/gcc/gcc/expr.h:276
0x93f19b expand_call_stmt
        /home/markus/gcc/gcc/cfgexpand.c:2674
0x93f19b expand_gimple_stmt_1
        /home/markus/gcc/gcc/cfgexpand.c:3608
0x93f19b expand_gimple_stmt
        /home/markus/gcc/gcc/cfgexpand.c:3774
0x9409b7 expand_gimple_basic_block
        /home/markus/gcc/gcc/cfgexpand.c:5779
0x946ed6 execute
        /home/markus/gcc/gcc/cfgexpand.c:6385

Reply via email to