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

            Bug ID: 92085
           Summary: [10 Regression] ICE: tree check: expected class
                    'type', have 'exceptional' (error_mark) in
                    useless_type_conversion_p, at gimple-expr.c:86
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: ice-checking, 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-10.0.0-alpha20191013 snapshot (r276943) ICEs when compiling the following
testcase w/ -O1 -fexceptions -fnon-call-exceptions -ftree-loop-vectorize
-fno-tree-sink --param dse-max-alias-queries-per-store=2 for 64-bit targets:

void
di (int y9, int qw)
{
  if ((int) &y9 != 0)
    {
      int py;
      int **fq = &py;

      while (qw < 1)
        {
          if ((0 < (**fq ? **fq : (**fq = 1))) / (**fq = y9))
            ;

          ++qw;
        }
    }
}

% gcc-10.0.0-alpha20191013 -O1 -fexceptions -fnon-call-exceptions
-ftree-loop-vectorize -fno-tree-sink --param dse-max-alias-queries-per-store=2
-w -c i1ojhzpc.c
during GIMPLE pass: ifcvt
i1ojhzpc.c: In function 'di':
i1ojhzpc.c:2:1: internal compiler error: tree check: expected class 'type',
have 'exceptional' (error_mark) in useless_type_conversion_p, at
gimple-expr.c:86
    2 | di (int y9, int qw)
      | ^~
0x6bf41d tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
       
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191013/work/gcc-10-20191013/gcc/tree.c:9974
0x60d471 tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)
       
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191013/work/gcc-10-20191013/gcc/tree.h:3390
0x60d471 useless_type_conversion_p(tree_node*, tree_node*)
       
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191013/work/gcc-10-20191013/gcc/gimple-expr.c:86
0xcb03fe verify_gimple_assign_ternary
       
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191013/work/gcc-10-20191013/gcc/tree-cfg.c:4176
0xcb03fe verify_gimple_assign
       
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191013/work/gcc-10-20191013/gcc/tree-cfg.c:4618
0xcb03fe verify_gimple_stmt
       
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191013/work/gcc-10-20191013/gcc/tree-cfg.c:4877
0xcb75f6 verify_gimple_in_cfg(function*, bool)
       
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191013/work/gcc-10-20191013/gcc/tree-cfg.c:5363
0xba9f59 execute_function_todo
       
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191013/work/gcc-10-20191013/gcc/passes.c:1983
0xbaada0 do_per_function
       
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191013/work/gcc-10-20191013/gcc/passes.c:1638
0xbaada0 execute_todo
       
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191013/work/gcc-10-20191013/gcc/passes.c:2037

Reply via email to