This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/43560] [4.3 Regression] possible wrong code bug
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Apr 2010 18:24:18 -0000
- Subject: [Bug tree-optimization/43560] [4.3 Regression] possible wrong code bug
- References: <bug-43560-12544@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #14 from jakub at gcc dot gnu dot org 2010-04-09 18:24 -------
Testcase distilled from OO.o that has been also fixed by this bugfix (failed at
-Os). Do we want it for the testsuite too?
struct S
{
int a, b;
char c[10];
};
__attribute__((noinline)) void
test (struct S *x)
{
while (x->b > 1 && x->c[x->b - 1] == '/')
{
x->b--;
x->c[x->b] = '\0';
}
}
const struct S s = { 0, 0, "" };
int
main ()
{
struct S *p;
asm ("" : "=r" (p) : "0" (&s));
test (p);
return 0;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43560