https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97378
Bug ID: 97378 Summary: [11 Regression] ICE in tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.c:87 sincer11-3685-gfcae5121154d1c33 Product: gcc Version: 10.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org Target Milestone: --- The following fails: $ cat acc-branch.f90 program openacc_clause_validity real(8) :: a(256) do i = 1, N return end do do i = 1, N if(i == N-1) THEN end if end do do i = 1, N end do end program openacc_clause_validity $ gfortran acc-branch.f90 -fno-tree-forwprop -ftree-vrp -O during GIMPLE pass: evrp acc-branch.f90:12:0: 12 | end program openacc_clause_validity | internal compiler error: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.c:87 0x739d90 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) /home/marxin/Programming/gcc/gcc/tree.c:9779 0x67650f tree_class_check(tree_node*, tree_code_class, char const*, int, char const*) /home/marxin/Programming/gcc/gcc/tree.h:3426 0x67650f useless_type_conversion_p(tree_node*, tree_node*) /home/marxin/Programming/gcc/gcc/gimple-expr.c:87 0xe676f4 verify_gimple_assign_binary /home/marxin/Programming/gcc/gcc/tree-cfg.c:4147 0xe78301 verify_gimple_in_cfg(function*, bool) /home/marxin/Programming/gcc/gcc/tree-cfg.c:5418 0xd5e50f execute_function_todo /home/marxin/Programming/gcc/gcc/passes.c:1992 0xd5f35c do_per_function /home/marxin/Programming/gcc/gcc/passes.c:1640 0xd5f35c execute_todo /home/marxin/Programming/gcc/gcc/passes.c:2046 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.