https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83634
Bug ID: 83634 Summary: ICE in useless_type_conversion_p, at gimple-expr.c:86 Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: bugzi...@poradnik-webmastera.com Target Milestone: --- [code] void test(unsigned int* ptr) { const int foo = Foo(); const int bar = Bar(); unsigned short n; for (n = foo; n < 100; n += bar) {} } [/code] I was playing with Compiler Explorer (https://godbolt.org/) and got this ICE when compiling code above. g++ version reported by Compiler Explorer is g++ 8.0.0 20171230. [x86-64 gcc (trunk) #1] internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at gimple-expr.c:86