https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115060

--- Comment #3 from Feng Xue <fxue at os dot amperecomputing.com> ---
Linaro reported a regression:
https://linaro.atlassian.net/browse/GNU-1226

Actually, this is not, but exposes a new bug in
vect_look_through_possible_promotion. The function fails to figure out root
definition if casts involves more than two promotions with sign change as:

long a = (long)b;       // promotion cast
 -> int b = (int)c;     // promotion cast, sign change
   -> unsigned short c = ...;

For this case, the function thinks the 2nd cast has different sign as the 1st,
so stop looking through, while "unsigned short -> integer" is a nature sign
extension.
  • [Bug tree-optimization/115... cvs-commit at gcc dot gnu.org via Gcc-bugs
    • [Bug tree-optimizatio... fxue at os dot amperecomputing.com via Gcc-bugs

Reply via email to