This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/33961] [4.3 regression] gcc 4.3 causes crash valid code to crash
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Oct 2007 17:03:11 -0000
- Subject: [Bug rtl-optimization/33961] [4.3 regression] gcc 4.3 causes crash valid code to crash
- References: <bug-33961-5606@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from rguenth at gcc dot gnu dot org 2007-10-31 17:03 -------
Reduced testcase:
void decode(char *d, int len);
void decode(char *d, int len) {
int i = len - 1;
while(i >= 0) {
d[i];
if(d[i] == 0)
d[i]=' ';
i--;
}
}
int main(int argc, char **argv)
{
decode("this bug is really weird", 24);
}
the store is turned into an unconditional store by the cselim pass, but
this store traps as the 'd' argument is in read-only memory.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |matz at gcc dot gnu dot org
Severity|normal |blocker
Status|UNCONFIRMED |NEW
Component|tree-optimization |rtl-optimization
Ever Confirmed|0 |1
Keywords| |wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2007-10-31 17:03:11
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33961