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

            Bug ID: 67409
           Summary: tree-cfg.c dereferences a NULL pointer
           Product: gcc
           Version: 5.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zeccav at gmail dot com
  Target Milestone: ---

//g++ 5.2.0 sanitizer detects dereferencing a NULL pointer 
//gcc-5.2.0/gcc/tree-cfg.c:1342:38: runtime error: member access within null
pointer of type 'struct basic_block_def'
//must be compiled with -fpermissive
//pointer bb is null
//source line "tree main_label = label_for_bb[bb->index].label;"
//double check with "gcc_assert(bb);" immediately before
//Target: x86_64-unknown-linux-gnu
void f()
try
  {
    goto l2;
  } catch (...)
  {
  l2:;
  }

Reply via email to