https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85450
Bug ID: 85450 Summary: ICE: invalid types in nop conversion during GIMPLE pass: ompexp Product: gcc Version: 8.0.1 Status: UNCONFIRMED Keywords: openmp Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org CC: jakub at gcc dot gnu.org Target Milestone: --- I see Running target unix//-m32 FAIL: libgomp.c/for-3.c (internal compiler error) FAIL: libgomp.c/for-3.c (test for excess errors) UNRESOLVED: libgomp.c/for-3.c compilation failed to produce executable FAIL: libgomp.c/for-5.c (internal compiler error) FAIL: libgomp.c/for-5.c (test for excess errors) UNRESOLVED: libgomp.c/for-5.c compilation failed to produce executable FAIL: libgomp.c/for-6.c (internal compiler error) FAIL: libgomp.c/for-6.c (test for excess errors) UNRESOLVED: libgomp.c/for-6.c compilation failed to produce executable FAIL: libgomp.c++/for-11.C (internal compiler error) FAIL: libgomp.c++/for-11.C (test for excess errors) UNRESOLVED: libgomp.c++/for-11.C compilation failed to produce executable FAIL: libgomp.c++/for-13.C (internal compiler error) FAIL: libgomp.c++/for-13.C (test for excess errors) UNRESOLVED: libgomp.c++/for-13.C compilation failed to produce executable FAIL: libgomp.c++/for-14.C (internal compiler error) FAIL: libgomp.c++/for-14.C (test for excess errors) UNRESOLVED: libgomp.c++/for-14.C compilation failed to produce executable with the following fix for the r177828 change: Index: gcc/tree-cfg.c =================================================================== --- gcc/tree-cfg.c (revision 259457) +++ gcc/tree-cfg.c (working copy) @@ -3842,7 +3842,7 @@ verify_gimple_assign_unary (gassign *stm || (POINTER_TYPE_P (rhs1_type) && INTEGRAL_TYPE_P (lhs_type) && (TYPE_PRECISION (rhs1_type) >= TYPE_PRECISION (lhs_type) - || ptrofftype_p (sizetype)))) + || ptrofftype_p (lhs_type)))) return false; /* Allow conversion from integral to offset type and vice versa. */ One example is /space/rguenther/src/svn/trunk/libgomp/testsuite/libgomp.c/for-2.h: In function 'f13_dpf_guided32':^M /space/rguenther/src/svn/trunk/libgomp/testsuite/libgomp.c/for-2.h:193:10: error: invalid types in nop conversion^M long long unsigned int^M int[1500] *^M D.13174 = (long long unsigned int) D.13222;^M so we're casting a 32bit pointer to a 64bit int which we don't allow since we do not know how to extend the pointer at the GIMPLE level (we really don't want to use POINTERS_EXTEND_UNSIGNED there but rely on TYPE_UNSIGNED). The question is what the ompexp code wants here anyway. The fix is to do an intermediate conversion to a pointer-sized integral type.