aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2006-01-24 16:27:44 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2006-01-24 08:27:44 -0800
commit0b63b11283593b7b914c2b364dae245fb1aad955 (patch)
treebd7ba29ceba9087f28f32300cd213adb307ed71e
parent46852b9b37e04b195dd55ae34f6befea3a1f9b82 (diff)
downloadgcc-0b63b11283593b7b914c2b364dae245fb1aad955.zip
gcc-0b63b11283593b7b914c2b364dae245fb1aad955.tar.gz
gcc-0b63b11283593b7b914c2b364dae245fb1aad955.tar.bz2
re PR tree-optimization/25860 (ice with -g -O2 -fPIC)
2006-01-24 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/25860 * tree-ssa-pre.c (phi_translate): Return NULL for AGGREGATE_TYPE's. 2006-01-24 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/25860 * gcc.c-torture/compile/pr25860.c: New test. From-SVN: r110175
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr25860.c20
-rw-r--r--gcc/tree-ssa-pre.c3
4 files changed, 33 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3eeb33f8..2132888 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2006-01-24 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR tree-opt/25860
+ * tree-ssa-pre.c (phi_translate): Return NULL
+ for AGGREGATE_TYPE's.
+
2006-01-24 Zack Weinberg <zackw@panix.com>
* genautomata.c (process_state_for_insn_equiv_partition):
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 3434543..b44c815 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2006-01-24 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR tree-opt/25860
+ * gcc.c-torture/compile/pr25860.c: New test.
+
2006-01-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/25552
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr25860.c b/gcc/testsuite/gcc.c-torture/compile/pr25860.c
new file mode 100644
index 0000000..033b567
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr25860.c
@@ -0,0 +1,20 @@
+/* We used to ICE because PRE would try to PRE the load of *Note from the
+ loop. */
+
+struct g
+{
+ int i;
+};
+struct f
+{
+ struct g i;
+};
+int GSM_RingNoteGetFullDuration(struct g)__attribute__((const));
+void savewav(struct f *gg)
+{
+ struct g *Note;
+ long i = 0,j,length=0;
+ Note = &gg->i;
+ for (j=0;j<GSM_RingNoteGetFullDuration(*Note);j++)
+ ;
+}
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index a695e90..ebc40cf 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -1159,7 +1159,8 @@ phi_translate (tree expr, value_set_t set, basic_block pred,
VEC (tree, gc) * oldvuses = NULL;
VEC (tree, gc) * newvuses = NULL;
- if (TREE_CODE (expr) != INDIRECT_REF)
+ if (TREE_CODE (expr) != INDIRECT_REF
+ || AGGREGATE_TYPE_P (TREE_TYPE (expr)))
return NULL;
newop1 = phi_translate (find_leader (set, oldop1),