[Bug c++/94326] g++: error: pack.ii: ‘-fcompare-debug’ failure (length)

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Mar 26 12:31:27 GMT 2020


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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
$ rm -f pr94326.C.*; ./cc1plus -quiet -std=c++11 pr94326.C -Wreturn-local-addr
-da; grep REG_EH_REGION pr94326.C.*
pr94326.C: In instantiation of ‘const int& A< <template-parameter-1-1>
>::m_fn1() [with <template-parameter-1-1> = int]’:
pr94326.C:5:45:   required from ‘void A< <template-parameter-1-1> >::m_fn2(_Kt)
[with _Kt = C; <template-parameter-1-1> = int]’
pr94326.C:12:15:   required from ‘decltype
(((B*)this)->B::_M_t.A<>::m_fn2<_Kt>(p1)) B::m_fn3(_Kt) [with _Kt = C; decltype
(((B*)this)->B::_M_t.A<>::m_fn2<_Kt>(p1)) = void]’
pr94326.C:18:14:   required from here
pr94326.C:2:31: warning: returning reference to temporary [-Wreturn-local-addr]
    2 |   const int &m_fn1() { return 0; }
      |                               ^
$ rm -f pr94326.C.*; ./cc1plus -quiet -std=c++11 pr94326.C
-Wno-return-local-addr -da; grep REG_EH_REGION pr94326.C.*
pr94326.C.236r.expand:     (expr_list:REG_EH_REGION (const_int 0 [0])
pr94326.C.236r.expand:     (expr_list:REG_EH_REGION (const_int 0 [0])
pr94326.C.237r.vregs:     (expr_list:REG_EH_REGION (const_int 0 [0])
pr94326.C.238r.into_cfglayout:     (expr_list:REG_EH_REGION (const_int 0 [0])
pr94326.C.239r.jump:     (expr_list:REG_EH_REGION (const_int 0 [0])
pr94326.C.239r.jump:     (expr_list:REG_EH_REGION (const_int 0 [0])
pr94326.C.251r.reginfo:     (expr_list:REG_EH_REGION (const_int 0 [0])
pr94326.C.274r.outof_cfglayout:     (expr_list:REG_EH_REGION (const_int 0 [0])
pr94326.C.275r.split1:     (expr_list:REG_EH_REGION (const_int 0 [0])
pr94326.C.277r.dfinit:     (expr_list:REG_EH_REGION (const_int 0 [0])
pr94326.C.278r.mode_sw:     (expr_list:REG_EH_REGION (const_int 0 [0])
pr94326.C.279r.asmcons:     (expr_list:REG_EH_REGION (const_int 0 [0])
pr94326.C.284r.ira:            (expr_list:REG_EH_REGION (const_int 0 [0])
pr94326.C.285r.reload:     (expr_list:REG_EH_REGION (const_int 0 [0])
pr94326.C.292r.pro_and_epilogue:     (expr_list:REG_EH_REGION (const_int 0 [0])
pr94326.C.295r.jump2:     (expr_list:REG_EH_REGION (const_int 0 [0])
pr94326.C.306r.split4:     (expr_list:REG_EH_REGION (const_int 0 [0])
pr94326.C.307r.stack:     (expr_list:REG_EH_REGION (const_int 0 [0])
pr94326.C.308r.alignments:     (expr_list:REG_EH_REGION (const_int 0 [0])
pr94326.C.310r.mach:     (expr_list:REG_EH_REGION (const_int 0 [0])
pr94326.C.311r.barriers:     (expr_list:REG_EH_REGION (const_int 0 [0])
pr94326.C.316r.shorten:     (expr_list:REG_EH_REGION (const_int 0 [0])
pr94326.C.317r.nothrow:     (expr_list:REG_EH_REGION (const_int 0 [0])
pr94326.C.318r.dwarf2:     (expr_list:REG_EH_REGION (const_int 0 [0])
pr94326.C.319r.final:     (expr_list:REG_EH_REGION (const_int 0 [0])
pr94326.C.320r.dfinish:     (expr_list:REG_EH_REGION (const_int 0 [0])


More information about the Gcc-bugs mailing list