https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102563
Bug ID: 102563 Summary: ice during GIMPLE pass: vrp-thread Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- For this C source code: int _bdf_parse_glyphs_bp; long _bdf_parse_glyphs_nibbles; void _bdf_parse_glyphs_p() { long p_2; _bdf_parse_glyphs_nibbles = p_2 << 1; for (; 0 < _bdf_parse_glyphs_nibbles;) if (1 < _bdf_parse_glyphs_nibbles) _bdf_parse_glyphs_bp = _bdf_parse_glyphs_p; } compiled by recent gcc trunk and compiler flag -O2, does this: $ /home/dcb/gcc/results/bin/gcc -c -O2 bug762.c bug762.c: In function ‘_bdf_parse_glyphs_p’: bug762.c:12:28: warning: assignment to ‘int’ from ‘void (*)()’ makes integer from pointer without a cast [-Wint-conversion] 12 | _bdf_parse_glyphs_bp = _bdf_parse_glyphs_p; | ^ during GIMPLE pass: vrp-thread bug762.c:4:6: internal compiler error: in upper_bound, at value-range.h:531 4 | void _bdf_parse_glyphs_p() | ^~~~~~~~~~~~~~~~~~~ 0x1b7a732 irange::upper_bound() const ../../trunk.git/gcc/value-range.h:531 The bug first seems to occur sometime between git hash 6de9f0c13b27c343 and 5f02854189405771.