This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/36227] [4.3/4.4 Regression] POINTER_PLUS folding introduces undefined overflow



------- Comment #5 from rguenth at gcc dot gnu dot org  2008-05-13 14:13 -------
Only the theoretical problem remains.  We still fold

  (unsigned long)ptr + (unsigned long)i

to

  (unsigned long)(ptr + (unsigned long)i)

where the inner POINTER_PLUS_EXPR now may invoke undefined behavior on
overflow.

No testcase is known where that results in a wrong-code bug.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|rguenth at gcc dot gnu dot  |unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]