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

            Bug ID: 83686
           Summary: [8 Regression] ICE (segfault) in determine_visibility
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

seen with r256068 on x86_64-linux-gnu, extracted from building akonadiconsole:

$ cat monitorsmodel.ii
# 8 "" 3
class a {
  b(const &) const;
  int f;
};
template <typename c> d(c) {
  [] { enum {}; };
}
a::b(const &) const {
  auto e = f;
  d(e);
}

$ g++ -std=gnu++11 -c -O0 monitorsmodel.ii
: In instantiation of 'int d(c) [with c = int]':
:17:6:   required from here
:13:13: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.

Program received signal SIGSEGV, Segmentation fault.
0x00000000007194d8 in determine_visibility(tree_node*) ()
(gdb) bt
#0  0x00000000007194d8 in determine_visibility(tree_node*) ()
#1  0x00000000007ace3e in lookup_template_class(tree_node*, tree_node*,
tree_node*, tree_node*, int, int) ()
#2  0x00000000005962d2 in ?? ()
#3  0x00000000007a4c9c in tsubst(tree_node*, tree_node*, int, tree_node*) ()
#4  0x00000000007b41bf in ?? ()
#5  0x00000000007a4fc0 in tsubst(tree_node*, tree_node*, int, tree_node*) ()
#6  0x000000000079f9c3 in ?? ()
#7  0x000000000079f1e6 in ?? ()
#8  0x000000000079f2fc in ?? ()
#9  0x000000000079f2fc in ?? ()
#10 0x00000000007a0fc3 in tsubst_lambda_expr(tree_node*, tree_node*, int,
tree_node*) ()
#11 0x00000000007a2472 in ?? ()
#12 0x000000000079f361 in ?? ()
#13 0x000000000079ed96 in ?? ()
#14 0x000000000079f1e6 in ?? ()
#15 0x000000000079f2fc in ?? ()
#16 0x000000000079d551 in instantiate_decl(tree_node*, bool, bool) ()
#17 0x00000000007b76ec in instantiate_pending_templates(int) ()
#18 0x000000000071cc2c in c_parse_final_cleanups() ()
#19 0x0000000000be025f in ?? ()
#20 0x00000000006b2830 in toplev::main(int, char**) ()
#21 0x00000000006b4b0b in main ()

Reply via email to