Bug 21862 - strength reduction uses signed comparisons for pointers
Summary: strength reduction uses signed comparisons for pointers
Status: RESOLVED DUPLICATE of bug 16052
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 3.4.4
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-01 13:10 UTC by Jakub Jelinek
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host:
Target: i386-linux
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
testcase (726 bytes, patch)
2005-06-01 13:10 UTC, Jakub Jelinek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Jelinek 2005-06-01 13:10:26 UTC
The attached testcase fails on i386-linux (as well as x86_64-linux -m32).
It computes the p + (MAP_LEN / 0x100) * 0x100 end pointer, but instead of
doing unsigned comparison on the pointers, it does a signed one,
which obviously doesn't work if the pointer has topmost bit set.
Comment 1 Jakub Jelinek 2005-06-01 13:10:59 UTC
Created attachment 9007 [details]
testcase
Comment 2 Andrew Pinski 2005-06-01 13:18:38 UTC
This is a known bug, see gcc.c-torture/execute/loop-2e.c.
This is a dup of bug 16052.

*** This bug has been marked as a duplicate of 16052 ***