Commit b6fed550 by Richard Biener Committed by Richard Biener

re PR tree-optimization/63512 (ICE: error: virtual use of statement not up-to-date)

2014-10-14  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/63512
	* tree-ssa-pre.c (create_expression_by_pieces): Mark stmts
	modified.

	* g++.dg/torture/pr63512.C: New testcase.

From-SVN: r216174
parent 340232b7
2014-10-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/63512
* tree-ssa-pre.c (create_expression_by_pieces): Mark stmts
modified.
2014-10-14 Oleg Endo <olegendo@gcc.gnu.org> 2014-10-14 Oleg Endo <olegendo@gcc.gnu.org>
PR target/63260 PR target/63260
2014-10-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/63512
* g++.dg/torture/pr63512.C: New testcase.
2014-10-14 Oleg Endo <olegendo@gcc.gnu.org> 2014-10-14 Oleg Endo <olegendo@gcc.gnu.org>
PR target/63260 PR target/63260
......
// { dg-do compile }
extern "C" {
void __assert_fail ();
unsigned long strlen (const char *);
}
class A
{
int Data;
int Length;
public:
A (const char *p1) : Data ()
{
p1 ? void() : __assert_fail ();
Length = strlen (p1);
}
};
enum TokenKind
{
semi
};
class B
{
public:
void m_fn1 ();
};
class C
{
void m_fn2 (TokenKind, int, A);
struct D
{
D (int);
B Range;
};
int *m_fn3 (const int &, int &, int **);
};
int a, b;
int *
C::m_fn3 (const int &, int &, int **)
{
D c (0);
if (a)
c.Range.m_fn1 ();
m_fn2 (semi, 0, b ? "" : a ? "alias declaration" : "using declaration");
}
...@@ -2897,6 +2897,7 @@ create_expression_by_pieces (basic_block block, pre_expr expr, ...@@ -2897,6 +2897,7 @@ create_expression_by_pieces (basic_block block, pre_expr expr,
} }
gimple_set_vuse (stmt, BB_LIVE_VOP_ON_EXIT (block)); gimple_set_vuse (stmt, BB_LIVE_VOP_ON_EXIT (block));
gimple_set_modified (stmt, true);
} }
gimple_seq_add_seq (stmts, forced_stmts); gimple_seq_add_seq (stmts, forced_stmts);
} }
...@@ -2904,6 +2905,7 @@ create_expression_by_pieces (basic_block block, pre_expr expr, ...@@ -2904,6 +2905,7 @@ create_expression_by_pieces (basic_block block, pre_expr expr,
name = make_temp_ssa_name (exprtype, NULL, "pretmp"); name = make_temp_ssa_name (exprtype, NULL, "pretmp");
newstmt = gimple_build_assign (name, folded); newstmt = gimple_build_assign (name, folded);
gimple_set_vuse (newstmt, BB_LIVE_VOP_ON_EXIT (block)); gimple_set_vuse (newstmt, BB_LIVE_VOP_ON_EXIT (block));
gimple_set_modified (newstmt, true);
gimple_set_plf (newstmt, NECESSARY, false); gimple_set_plf (newstmt, NECESSARY, false);
gimple_seq_add_stmt (stmts, newstmt); gimple_seq_add_stmt (stmts, newstmt);
......
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