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

            Bug ID: 89283
           Summary: [8/9 Regression] ICE: Segmentation fault (in
                    stmt_could_throw_1_p)
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Keywords: EH, ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-9.0.0-alpha20190210 snapshot (r268755) ICEs when compiling the following
testcase containing a call of function w/ returns_twice attribute:

__attribute__ ((returns_twice)) int
zn (void);

int
sz (int i0)
{
  return zn ();
  return zn () < i0 + 2;
}

% gcc-9.0.0-alpha20190210 -fexceptions -fnon-call-exceptions -c vhkmslon.c      
during GIMPLE pass: cfg
vhkmslon.c: In function 'sz':
vhkmslon.c:5:1: internal compiler error: Segmentation fault
    5 | sz (int i0)
      | ^~
0xd6f9bf crash_signal
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190210/work/gcc-9-20190210/gcc/toplev.c:326
0xdd1f38 stmt_could_throw_1_p
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190210/work/gcc-9-20190210/gcc/tree-eh.c:2819
0xdd1f38 stmt_could_throw_p(function*, gimple*)
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190210/work/gcc-9-20190210/gcc/tree-eh.c:2884
0xdd21b4 stmt_could_throw_p(function*, gimple*)
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190210/work/gcc-9-20190210/gcc/tree-eh.c:2856
0xdd21b4 stmt_can_throw_internal(function*, gimple*)
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190210/work/gcc-9-20190210/gcc/tree-eh.c:2948
0xdb539f gimple_verify_flow_info
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190210/work/gcc-9-20190210/gcc/tree-cfg.c:5541
0x91778c verify_flow_info()
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190210/work/gcc-9-20190210/gcc/cfghooks.c:263
0xdc1774 checking_verify_flow_info
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190210/work/gcc-9-20190210/gcc/cfghooks.h:198
0xdc1774 cleanup_tree_cfg_noloop
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190210/work/gcc-9-20190210/gcc/tree-cfgcleanup.c:938
0xdc1774 cleanup_tree_cfg()
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190210/work/gcc-9-20190210/gcc/tree-cfgcleanup.c:989
0xdbcede execute_build_cfg
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190210/work/gcc-9-20190210/gcc/tree-cfg.c:415
0xdbcede execute
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190210/work/gcc-9-20190210/gcc/tree-cfg.c:444

I'm not sure whether it is a duplicate of PR89280.

Reply via email to