Commit f101882a by Jakub Jelinek Committed by Jakub Jelinek

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

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

From-SVN: r158220
parent 675c873b
2010-04-12 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/43560
* gcc.c-torture/execute/pr43560.c: New test.
2010-04-12 Eric Botcazou <ebotcazou@adacore.com> 2010-04-12 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/aggr13.adb: New test. * gnat.dg/aggr13.adb: New test.
......
/* 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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment