Commit 932b6d61 by Jakub Jelinek Committed by Jakub Jelinek

re PR debug/63328 (c-c++-common/gomp/pr60823-3.c test fails with -fcompare-debug)

	PR debug/63328
	* omp-low.c (ipa_simd_modify_stmt_ops): For debug stmts
	insert a debug source bind stmt setting DEBUG_EXPR_DECL
	instead of a normal gimple assignment stmt.

	* c-c++-common/gomp/pr63328.c: New test.

From-SVN: r215454
parent 1091cf49
2014-09-22 Jakub Jelinek <jakub@redhat.com>
PR debug/63328
* omp-low.c (ipa_simd_modify_stmt_ops): For debug stmts
insert a debug source bind stmt setting DEBUG_EXPR_DECL
instead of a normal gimple assignment stmt.
2014-09-22 James Greenhalgh <james.greenhalgh@arm.com> 2014-09-22 James Greenhalgh <james.greenhalgh@arm.com>
* config/bfin/bfin.md: Fix use of constraints in define_split. * config/bfin/bfin.md: Fix use of constraints in define_split.
...@@ -11717,9 +11717,22 @@ ipa_simd_modify_stmt_ops (tree *tp, int *walk_subtrees, void *data) ...@@ -11717,9 +11717,22 @@ ipa_simd_modify_stmt_ops (tree *tp, int *walk_subtrees, void *data)
if (tp != orig_tp) if (tp != orig_tp)
{ {
repl = build_fold_addr_expr (repl); repl = build_fold_addr_expr (repl);
gimple stmt gimple stmt;
= gimple_build_assign (make_ssa_name (TREE_TYPE (repl), NULL), repl); if (is_gimple_debug (info->stmt))
repl = gimple_assign_lhs (stmt); {
tree vexpr = make_node (DEBUG_EXPR_DECL);
stmt = gimple_build_debug_source_bind (vexpr, repl, NULL);
DECL_ARTIFICIAL (vexpr) = 1;
TREE_TYPE (vexpr) = TREE_TYPE (repl);
DECL_MODE (vexpr) = TYPE_MODE (TREE_TYPE (repl));
repl = vexpr;
}
else
{
stmt = gimple_build_assign (make_ssa_name (TREE_TYPE (repl),
NULL), repl);
repl = gimple_assign_lhs (stmt);
}
gimple_stmt_iterator gsi = gsi_for_stmt (info->stmt); gimple_stmt_iterator gsi = gsi_for_stmt (info->stmt);
gsi_insert_before (&gsi, stmt, GSI_SAME_STMT); gsi_insert_before (&gsi, stmt, GSI_SAME_STMT);
*orig_tp = repl; *orig_tp = repl;
......
2014-09-22 Jakub Jelinek <jakub@redhat.com>
PR debug/63328
* c-c++-common/gomp/pr63328.c: New test.
2014-09-22 Martin Liska <mliska@suse.cz> 2014-09-22 Martin Liska <mliska@suse.cz>
PR lto/63270 PR lto/63270
......
/* PR debug/63328 */
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp-simd -fno-strict-aliasing -fcompare-debug" } */
#include "pr60823-3.c"
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