This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/18241] linux kernel loop gets miscompiled
- From: "ak at muc dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Oct 2004 01:07:38 -0000
- Subject: [Bug tree-optimization/18241] linux kernel loop gets miscompiled
- References: <20041031010322.18241.ak@muc.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From ak at muc dot de 2004-10-31 01:07 -------
Created an attachment (id=7440)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7440&action=view)
miscompiled function
Compiled with -O2 -fno-reorder-blocks -mno-redzone -mcmodel=kernel
It crashes eventually in this loop
do {
int idx;
tag_clear(pathp[0].node, tag, pathp[0].offset);
for (idx = 0; idx < (((1UL << 6) + 64 - 1) / 64); idx++) {
if (pathp[0].node->tags[tag][idx])
goto out;
}
pathp--;
} while (pathp[0].node);
when accessing pathp[0].node. I suspect it is overrunning the array on the
stack. With -O0 this crash doesn't happen.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18241