Commit 0d9b0371 by Richard Guenther Committed by Richard Biener

re PR tree-optimization/42685 ("-fcompare-debug failure" with "-O1 -funroll-loops" (2))

2010-01-26  Richard Guenther  <rguenther@suse.de>

	PR rtl-optimization/42685
	* web.c (web_main): Ignore DEBUG_INSNs.

	* gcc.dg/pr42685.c: New testcase.
	* g++.dg/other/pr42685.C: Likewise.

From-SVN: r156252
parent 7a241624
2010-01-26 Richard Guenther <rguenther@suse.de>
PR rtl-optimization/42685
* web.c (web_main): Ignore DEBUG_INSNs.
2010-01-26 Joern Rennecke <amylaar@spamcop.net>
* doc/tm.texi (TARGET_HANDLE_C_OPTION): Explain arguments.
......
2010-01-26 Richard Guenther <rguenther@suse.de>
PR rtl-optimization/42685
* gcc.dg/pr42685.c: New testcase.
* g++.dg/other/pr42685.C: Likewise.
2010-01-26 Richard Guenther <rguenther@suse.de>
PR middle-end/42806
* g++.dg/other/pr42806.C: New testcase.
......
// { dg-do compile }
// { dg-options "-O -funroll-loops -fcompare-debug" }
void Remap(int n, int *src, int *dst, int *map)
{
do {
int i = *src;
if (i != 0) *dst = map[i];
} while (--n != 0);
}
/* { dg-do compile } */
/* { dg-options "-O -funroll-loops -fcompare-debug" } */
struct S {
int i;
};
extern void baz(int);
static inline void bar(struct S *s)
{
baz(s->i);
}
void foo(int *w, int cond, struct S *s)
{
int i, n = 0;
while (*w++ != 0) n++;
for (i = 0; i < n; i++)
if (cond == 0)
bar(s + i);
}
......@@ -298,7 +298,7 @@ web_main (void)
FOR_BB_INSNS (bb, insn)
{
unsigned int uid = INSN_UID (insn);
if (INSN_P (insn))
if (NONDEBUG_INSN_P (insn))
{
df_ref *use_rec;
for (use_rec = DF_INSN_UID_USES (uid); *use_rec; use_rec++)
......@@ -326,7 +326,7 @@ web_main (void)
FOR_BB_INSNS (bb, insn)
{
unsigned int uid = INSN_UID (insn);
if (INSN_P (insn))
if (NONDEBUG_INSN_P (insn))
{
df_ref *use_rec;
for (use_rec = DF_INSN_UID_USES (uid); *use_rec; use_rec++)
......@@ -350,7 +350,7 @@ web_main (void)
FOR_BB_INSNS (bb, insn)
{
unsigned int uid = INSN_UID (insn);
if (INSN_P (insn))
if (NONDEBUG_INSN_P (insn))
{
df_ref *use_rec;
df_ref *def_rec;
......
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