This is the mail archive of the gcc@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]

RFC: bug in combine


The following demonstrates a bug in combine
(x86 -mtune=pentiumpro -O2):

Attachment: small.c
Description: Text document



The test of f->b comes out as

testl $1048512, 73(%eax)

This is wrong, because 4 bytes starting at 73 goes outside the original object and can
cause a page fault. The change from referencing a word at offset 72 to offset 73
happens in make_extraction in combine, and I propose to fix it thus:


Attachment: diffsa.txt
Description: Text document



Still testing, but I'm a bit concerned this is overkill. Are there targets/situations where
this transformation is useful or even necessary? Comments?

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