------- Comment #5 from rguenth at gcc dot gnu dot org  2008-12-02 13:23 -------
This is const_binop folding -1 >> -130 to zero and fold_binary -1 >> n to -1.

11458       case RSHIFT_EXPR:
11459         /* Optimize -1 >> x for arithmetic right shifts.  */
11460         if (integer_all_onesp (arg0) && !TYPE_UNSIGNED (type))
11461           return omit_one_operand (type, arg0, arg1);
11462         /* ... fall through ...  */

but this is of course only correct if arg1 is >= 0.

I have a patch.


-- 


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

------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to