[Bug c/24756] New: pointer arithmetic on ia32 uses signed divide

2005-11-09 Thread j3p0uk at hotmail dot com
x 7.2 2.96-118.7.2)" -- Summary: pointer arithmetic on ia32 uses signed divide Product: gcc Version: 2.96 (redhat) Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu do

[Bug c/24756] pointer arithmetic on ia32 uses signed divide

2005-11-09 Thread j3p0uk at hotmail dot com
--- Comment #1 from j3p0uk at hotmail dot com 2005-11-09 14:51 --- Created an attachment (id=10186) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10186&action=view) Test source (.i) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24756

[Bug c/24756] pointer arithmetic on ia32 uses signed divide

2005-11-09 Thread j3p0uk at hotmail dot com
--- Comment #4 from j3p0uk at hotmail dot com 2005-11-09 17:25 --- The test case was a simple test case where I tried to show the mathematical behaviour in as simple a way as possible. The reason I thought that this may be a bug is because the behaviour on a 64-bit system is different

[Bug c/24756] pointer arithmetic on ia32 uses signed divide

2005-11-10 Thread j3p0uk at hotmail dot com
--- Comment #6 from j3p0uk at hotmail dot com 2005-11-10 13:49 --- I was not intending to show a correct fix for the problem, my simple test program was merely intended to show that given sufficient distance between 2 pointers the result from ptr_a - ptr_b can be incorrect. I am not

[Bug c/24756] pointer arithmetic on ia32 uses signed divide

2005-11-10 Thread j3p0uk at hotmail dot com
--- Comment #7 from j3p0uk at hotmail dot com 2005-11-10 13:54 --- Created an attachment (id=10201) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10201&action=view) More correct test program Here is a test program designed to show the problem more clearly. When run the

[Bug c/24756] pointer arithmetic on ia32 uses signed divide

2005-11-10 Thread j3p0uk at hotmail dot com
--- Comment #9 from j3p0uk at hotmail dot com 2005-11-10 14:02 --- Sorry - I don't mean to pester you, I would just like to clarify your final point. What you are saying is that: Pointer arithmetic is only valid on elements of the same array that are adjacent, and that any other