Commit f93bc6f5 by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/38104 (ICE segmentation fault (with -O3 when deref a…

re PR tree-optimization/38104 (ICE segmentation fault  (with -O3 when deref a NULL pointer in the code??))

	PR tree-optimization/38104
	* gimplify.c (gimple_regimplify_operands): Add referenced vars
	before calling mark_symbols_for_renaming, not after it.

	* g++.dg/tree-ssa/pr38104.C: New test.

From-SVN: r141857
parent 87deeba6
2008-11-14 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/38104
* gimplify.c (gimple_regimplify_operands): Add referenced vars
before calling mark_symbols_for_renaming, not after it.
2008-11-14 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/sh.h (OPTIMIZATION_OPTIONS): Revert last change.
......
......@@ -7566,6 +7566,10 @@ gimple_regimplify_operands (gimple stmt, gimple_stmt_iterator *gsi_p)
break;
}
if (gimple_referenced_vars (cfun))
for (t = gimplify_ctxp->temps; t ; t = TREE_CHAIN (t))
add_referenced_var (t);
if (!gimple_seq_empty_p (pre))
{
if (gimple_in_ssa_p (cfun))
......@@ -7580,10 +7584,6 @@ gimple_regimplify_operands (gimple stmt, gimple_stmt_iterator *gsi_p)
if (post_stmt)
gsi_insert_after (gsi_p, post_stmt, GSI_NEW_STMT);
if (gimple_referenced_vars (cfun))
for (t = gimplify_ctxp->temps; t ; t = TREE_CHAIN (t))
add_referenced_var (t);
pop_gimplify_context (NULL);
}
......
2008-11-14 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/38104
* g++.dg/tree-ssa/pr38104.C: New test.
2008-11-14 Kaz Kojima <kkojima@gcc.gnu.org>
* gcc.target/sh/pr37514.c: Remove.
......
// PR tree-optimization/38104
// { dg-do compile }
// { dg-options "-O3" }
struct S { int foo; };
void f0 ();
void
f1 (struct S s)
{
f0 ();
}
void
f2 ()
{
f1 (*(struct S *) (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