aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2016-05-03 12:06:19 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2016-05-03 12:06:19 +0000
commit381cdae49785fc4b1941a6b37bad3e8c6f3f428d (patch)
tree8bc819891d359849868f63dae660e41900fd0d61 /gcc/testsuite
parent31ed166586451e3955d0da9c7931c71da968eee4 (diff)
downloadgcc-381cdae49785fc4b1941a6b37bad3e8c6f3f428d.zip
gcc-381cdae49785fc4b1941a6b37bad3e8c6f3f428d.tar.gz
gcc-381cdae49785fc4b1941a6b37bad3e8c6f3f428d.tar.bz2
gimplify.h (get_initialized_tmp_var): Add allow_ssa parameter default true.
2016-05-03 Richard Biener <rguenther@suse.de> * gimplify.h (get_initialized_tmp_var): Add allow_ssa parameter default true. (gimplify_arg): Likewise. * gimplify.c (gimplify_expr): Add overload with allow_ssa parameter, re-writing the result to a decl if required. (internal_get_tmp_var): Add allow_ssa parameter and override into_ssa with it. (get_formal_tmp_var): Adjust. (get_initialized_tmp_var): Add allow_ssa parameter. (gimplify_arg): Add allow_ssa parameter and avoid generating SSA names for the result false. (gimplify_call_expr): If the call may return twice do not gimplify parameters into SSA. (prepare_gimple_addressable): Do not allow an SSA name as temporary. (gimplify_modify_expr): Adjust assert. For noreturn calls with a SSA name LHS adjust its def. (gimplify_save_expr): Do not allow an SSA name as save-expr result. (gimplify_one_sizepos): Do not allow an SSA name as a sizepos. (gimplify_body): Init GIMPLE SSA data structures and gimplify into-SSA. (gimplify_scan_omp_clauses): Make sure OMP_CLAUSE_SIZE is not an SSA name. Likewise for OMP_CLAUSE_REDUCTION operands. (gimplify_omp_for): Likewise for OMP_CLAUSE_DECL. Likewise for OMP_FOR_COND, OMP_FOR_INCR and OMP_CLAUSE_LINEAR_STEP. (optimize_target_teams): Do not allow SSA names for clause operands. (gimplify_expr): Likewise for where we mark the result addressable. * passes.def (pass_init_datastructures): Remove. * tree-into-ssa.c (mark_def_sites): Ignore existing SSA names. (rewrite_stmt): Likewise. * tree-inline.c (initialize_cfun): Properly transfer SSA state. (replace_locals_op): Replace SSA names. (copy_gimple_seq_and_replace_locals): Init src_cfun. * gimple-low.c (lower_builtin_setjmp): Deal with SSA. * cgraph.c (release_function_body): Free CFG annotations only when we have a CFG. Simplify. * gimple-fold.c (gimplify_and_update_call_from_tree): Use force_gimple_operand instead of get_initialized_tmp_var. * tree-pass.h (make_pass_init_datastructures): Remove. * tree-ssa.c (execute_init_datastructures): Remove. (pass_data_init_datastructures): Likewise. (class pass_init_datastructures): Likewise. (make_pass_init_datastructures): Likewise. * omp-low.c (create_omp_child_function): Init SSA data structures. (grid_expand_target_grid_body): Likewise. * tree-cfg.c (move_block_to_fn): Double-check the DEF is an SSA name before adding it to names_to_release. (remove_bb): Always release SSA defs. * tree-ssa-ccp.c (get_default_value): Check SSA_NAME_VAR before dereferencing it. * cgraphunit.c (init_lowered_empty_function): Always int SSA data structures. * tree-ssanames.c (release_defs): Remove assert that we are in SSA form. * trans-mem.c (diagnose_tm_1): Handle SSA name function. c-family/ * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not allow call args to gimplify to SSA names. * gcc.dg/pr30172-1.c: Adjust. * gcc.dg/pr63743.c: Likewise. * gcc.dg/tm/pr51696.c: Likewise. * c-c++-common/tm/safe-1.c: Likewise. * gcc.dg/tree-prof/val-prof-3.c: Likewise. * gcc.dg/plugin/self-assign-test-1.c: XFAIL case that needs CSE. * g++.dg/plugin/self-assign-test-1.C: Likewise. * g++.dg/plugin/self-assign-test-2.C: Likewise. From-SVN: r235817
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog11
-rw-r--r--gcc/testsuite/c-c++-common/tm/safe-1.c12
-rw-r--r--gcc/testsuite/g++.dg/plugin/self-assign-test-1.C2
-rw-r--r--gcc/testsuite/g++.dg/plugin/self-assign-test-2.C2
-rw-r--r--gcc/testsuite/gcc.dg/fold-perm.c8
-rw-r--r--gcc/testsuite/gcc.dg/plugin/self-assign-test-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr30172-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/pr63743.c3
-rw-r--r--gcc/testsuite/gcc.dg/tm/pr51696.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/val-prof-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/forwprop-28.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-43.c5
12 files changed, 33 insertions, 22 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7a89868..2ccbfa6 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,14 @@
+2016-05-03 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/pr30172-1.c: Adjust.
+ * gcc.dg/pr63743.c: Likewise.
+ * gcc.dg/tm/pr51696.c: Likewise.
+ * c-c++-common/tm/safe-1.c: Likewise.
+ * gcc.dg/tree-prof/val-prof-3.c: Likewise.
+ * gcc.dg/plugin/self-assign-test-1.c: XFAIL case that needs CSE.
+ * g++.dg/plugin/self-assign-test-1.C: Likewise.
+ * g++.dg/plugin/self-assign-test-2.C: Likewise.
+
2016-05-03 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/70467
diff --git a/gcc/testsuite/c-c++-common/tm/safe-1.c b/gcc/testsuite/c-c++-common/tm/safe-1.c
index b2a4353..4a81a78 100644
--- a/gcc/testsuite/c-c++-common/tm/safe-1.c
+++ b/gcc/testsuite/c-c++-common/tm/safe-1.c
@@ -35,9 +35,9 @@ foo(void)
/* tu(); */
(*ps)();
- (*pc)(); /* { dg-error "unsafe function call" } */
- (*pi)(); /* { dg-error "unsafe function call" } */
- (*pu)(); /* { dg-error "unsafe function call" } */
+ (*pc)(); /* { dg-error "unsafe indirect function call" } */
+ (*pi)(); /* { dg-error "unsafe indirect function call" } */
+ (*pu)(); /* { dg-error "unsafe indirect function call" } */
asm(""); /* { dg-error "asm not allowed" } */
asm("" : "=g"(i)); /* { dg-error "asm not allowed" } */
@@ -57,10 +57,10 @@ bar(void)
tm();
(*ps)();
- (*pc)(); /* { dg-error "unsafe function call" } */
- (*pi)(); /* { dg-error "unsafe function call" } */
+ (*pc)(); /* { dg-error "unsafe indirect function call" } */
+ (*pi)(); /* { dg-error "unsafe indirect function call" } */
(*pm)();
- (*pu)(); /* { dg-error "unsafe function call" } */
+ (*pu)(); /* { dg-error "unsafe indirect function call" } */
asm(""); /* { dg-error "asm not allowed" } */
asm("" : "=g"(i)); /* { dg-error "asm not allowed" } */
diff --git a/gcc/testsuite/g++.dg/plugin/self-assign-test-1.C b/gcc/testsuite/g++.dg/plugin/self-assign-test-1.C
index 607381f..95d39dd 100644
--- a/gcc/testsuite/g++.dg/plugin/self-assign-test-1.C
+++ b/gcc/testsuite/g++.dg/plugin/self-assign-test-1.C
@@ -44,7 +44,7 @@ int func()
foo = foo; // { dg-warning "assigned to itself" }
foo.setA(5);
bar_array[3].c_ = bar_array[3].c_; // { dg-warning "assigned to itself" }
- bar_array[x+g].b_ = bar_array[x+g].b_; // { dg-warning "self-assignment detected" }
+ bar_array[x+g].b_ = bar_array[x+g].b_; // { dg-warning "self-assignment detected" "" { xfail *-*-* } }
y = x;
x = y;
}
diff --git a/gcc/testsuite/g++.dg/plugin/self-assign-test-2.C b/gcc/testsuite/g++.dg/plugin/self-assign-test-2.C
index 35e1fb8..da963c4 100644
--- a/gcc/testsuite/g++.dg/plugin/self-assign-test-2.C
+++ b/gcc/testsuite/g++.dg/plugin/self-assign-test-2.C
@@ -44,7 +44,7 @@ int func()
foo = foo; // { dg-bogus "assigned to itself" }
foo.setA(5);
bar_array[3].c_ = bar_array[3].c_; // { dg-warning "assigned to itself" }
- bar_array[x+g].b_ = bar_array[x+g].b_; // { dg-warning "self-assignment detected" }
+ bar_array[x+g].b_ = bar_array[x+g].b_; // { dg-warning "self-assignment detected" "" { xfail *-*-* } }
y = x;
x = y;
}
diff --git a/gcc/testsuite/gcc.dg/fold-perm.c b/gcc/testsuite/gcc.dg/fold-perm.c
index 9cfc2db..0fa050e 100644
--- a/gcc/testsuite/gcc.dg/fold-perm.c
+++ b/gcc/testsuite/gcc.dg/fold-perm.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-ccp1" } */
+/* { dg-options "-O -fdump-tree-fre1" } */
typedef int veci __attribute__ ((vector_size (4 * sizeof (int))));
@@ -14,6 +14,6 @@ void fun (veci *f, veci *g, veci *h, veci *i)
*f = __builtin_shuffle (*f, *g, n);
}
-/* { dg-final { scan-tree-dump "VEC_PERM_EXPR.*{ 3, 3, 0, 2 }" "ccp1" } } */
-/* { dg-final { scan-tree-dump "VEC_PERM_EXPR.*{ 1, 1, 3, 2 }" "ccp1" } } */
-/* { dg-final { scan-tree-dump-times "VEC_PERM_EXPR" 2 "ccp1" } } */
+/* { dg-final { scan-tree-dump "VEC_PERM_EXPR.*{ 3, 3, 0, 2 }" "fre1" } } */
+/* { dg-final { scan-tree-dump "VEC_PERM_EXPR.*{ 1, 1, 3, 2 }" "fre1" } } */
+/* { dg-final { scan-tree-dump-times "VEC_PERM_EXPR" 2 "fre1" } } */
diff --git a/gcc/testsuite/gcc.dg/plugin/self-assign-test-1.c b/gcc/testsuite/gcc.dg/plugin/self-assign-test-1.c
index f6dc524..28c14dd 100644
--- a/gcc/testsuite/gcc.dg/plugin/self-assign-test-1.c
+++ b/gcc/testsuite/gcc.dg/plugin/self-assign-test-1.c
@@ -16,7 +16,7 @@ int main()
static int y;
struct Bar b_array[5];
- b_array[x+g].b_ = b_array[x+g].b_; /* { dg-warning "self-assignment detected" } */
+ b_array[x+g].b_ = b_array[x+g].b_; /* { dg-warning "self-assignment detected" "" { xfail *-*-* } } */
g = g; /* { dg-warning "assigned to itself" } */
y = y; /* { dg-warning "assigned to itself" } */
bar->b_ = bar->b_; /* { dg-warning "assigned to itself" } */
diff --git a/gcc/testsuite/gcc.dg/pr30172-1.c b/gcc/testsuite/gcc.dg/pr30172-1.c
index 015b558..ee6efde 100644
--- a/gcc/testsuite/gcc.dg/pr30172-1.c
+++ b/gcc/testsuite/gcc.dg/pr30172-1.c
@@ -10,5 +10,5 @@ _Complex double test5 (double x, double y) { return (x + y * 1.i) * -1.i; }
/* { dg-final { scan-tree-dump "COMPLEX_EXPR <x, 1.0e\\+0>" "gimple" } } */
/* { dg-final { scan-tree-dump "COMPLEX_EXPR <1.0e\\+0, x>" "gimple" } } */
/* { dg-final { scan-tree-dump "COMPLEX_EXPR <x, y>" "gimple" } } */
-/* { dg-final { scan-tree-dump "D.* = -y;\n.*COMPLEX_EXPR <D.*, x>" "gimple" } } */
-/* { dg-final { scan-tree-dump "D.* = -x;\n.*COMPLEX_EXPR <y, D.*>" "gimple" } } */
+/* { dg-final { scan-tree-dump " = -y;\n.*COMPLEX_EXPR <\[^,\]*, x>" "gimple" } } */
+/* { dg-final { scan-tree-dump " = -x;\n.*COMPLEX_EXPR <y, " "gimple" } } */
diff --git a/gcc/testsuite/gcc.dg/pr63743.c b/gcc/testsuite/gcc.dg/pr63743.c
index 635ac38..ba492b9 100644
--- a/gcc/testsuite/gcc.dg/pr63743.c
+++ b/gcc/testsuite/gcc.dg/pr63743.c
@@ -4,7 +4,8 @@
double
libcall_dep (double x, double y)
{
- return x * (x + y);
+ double tem = x + y;
+ return x * tem;
}
/* { dg-final { scan-rtl-dump-times "Swap operands" 1 "expand" } } */
diff --git a/gcc/testsuite/gcc.dg/tm/pr51696.c b/gcc/testsuite/gcc.dg/tm/pr51696.c
index 02ee3f5..e39c6ca 100644
--- a/gcc/testsuite/gcc.dg/tm/pr51696.c
+++ b/gcc/testsuite/gcc.dg/tm/pr51696.c
@@ -10,5 +10,5 @@ static void (*compare)();
__attribute__((transaction_safe))
static void func () {
listPtr->compare(); /* { dg-error "unsafe indirect function call" } */
- compare(); /* { dg-error "unsafe function call" } */
+ compare(); /* { dg-error "unsafe indirect function call" } */
}
diff --git a/gcc/testsuite/gcc.dg/tree-prof/val-prof-3.c b/gcc/testsuite/gcc.dg/tree-prof/val-prof-3.c
index 6da88a8..9a600c3 100644
--- a/gcc/testsuite/gcc.dg/tree-prof/val-prof-3.c
+++ b/gcc/testsuite/gcc.dg/tree-prof/val-prof-3.c
@@ -27,5 +27,5 @@ main ()
/* { dg-final-use { scan-ipa-dump "Mod subtract transformation on insn" "profile" } } */
/* This is part of code checking that n is greater than the divisor so we are sure that it
didn't get optimized out. */
-/* { dg-final-use { scan-tree-dump "if \\(n_\[0-9\]* \\>" "optimized"} } */
+/* { dg-final-use { scan-tree-dump "if \\(_\[0-9\]* \\< n_\[0-9\]*" "optimized"} } */
/* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-28.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-28.c
index a566f1e..1dabd39 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-28.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-28.c
@@ -84,5 +84,5 @@ test_8 (int code)
the negated code == 22 compare to code != 22 first. It turns out if
we do that we even generate better code on x86 at least. */
-/* { dg-final { scan-tree-dump-times "simplified to if \\\(\[^ ]* <" 4 "forwprop1"} } */
+/* { dg-final { scan-tree-dump-times "simplified to if \\\(\[^ ]* \[<>\]" 4 "forwprop1"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-43.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-43.c
index 1a83766..89cddcd 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-43.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-43.c
@@ -1,6 +1,6 @@
/* PR tree-optimization/64193 */
/* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-fre1-details" } */
+/* { dg-options "-O -fdump-tree-fre1" } */
double T,T2,E1[5];
int J;
@@ -24,5 +24,4 @@ L10:
/* We should remove 15 dead loads and some related stmts, fully propagating
their replacements with exactly 4 loads and 4 stores from/to E remaining. */
-/* { dg-final { scan-tree-dump-times "Removing dead stmt" 19 "fre1" } } */
-/* { dg-final { scan-tree-dump-not "Not changing value number" "fre1" } } */
+/* { dg-final { scan-tree-dump-times "MEM" 8 "fre1" } } */