re PR tree-optimization/43560 (possible wrong code bug)

PR tree-optimization/43560
	* gcc.c-torture/execute/pr43560.c: New test.

From-SVN: r158222
This commit is contained in:
Jakub Jelinek 2010-04-12 12:25:11 +02:00 committed by Jakub Jelinek
parent 390ff82c49
commit 0cc7389cbd
2 changed files with 33 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2010-04-12 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/43560
* gcc.c-torture/execute/pr43560.c: New test.
2010-04-10 Jie Zhang <jie@codesourcery.com>
PR target/43417

View File

@ -0,0 +1,28 @@
/* PR tree-optimization/43560 */
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;
}