[Bug tree-optimization/50729] [4.7 Regression] Silent code gen fault: Value range propagation seems to propagate values across narrowing/widening

amylaar at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Nov 19 02:05:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50729

--- Comment #8 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> 2011-11-19 00:03:56 UTC ---
More specifically, the problem appears when innerop has a different signedness
than middleop, and the value range of middleop is such that the topmost bit
of a double_int is used.
E.g. the full value range of a 64 bit long long with 32 bit HOST_WIDE_INT,
or a 128 bit integer type with a 64 bit HOST_WIDE_INT.

OTOH both the old and the new test will reject some simplifications that
would be OK when considering a narrow finaltype, and/or same-size
signed/unsigned conversion.

The basic problem is that when a signedness change happens, we are no longer
necessarily considering a single range, but possibly two.



More information about the Gcc-bugs mailing list