aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2008-10-02 13:11:12 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2008-10-02 13:11:12 +0000
commit0d17b70a0a09f15f0465de7d8717d5eba8d224d2 (patch)
tree9867bc513626917fe695346fc25c27c99428db23 /gcc
parent068450d0454b04398fdb5763ac182fe2c0582e5a (diff)
downloadgcc-0d17b70a0a09f15f0465de7d8717d5eba8d224d2.zip
gcc-0d17b70a0a09f15f0465de7d8717d5eba8d224d2.tar.gz
gcc-0d17b70a0a09f15f0465de7d8717d5eba8d224d2.tar.bz2
re PR middle-end/37713 (ice for legal code with -O3 on 20080926)
2008-10-02 Richard Guenther <rguenther@suse.de> PR middle-end/37713 * tree-ssa.c (useless_type_conversion_p_1): For COMPLEX_TYPE and VECTOR_TYPE recurse with useless_type_conversion_p which properly handles void pointer conversion. * gcc.c-torture/compile/pr37713.c: New testcase. From-SVN: r140832
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr37713.c10
-rw-r--r--gcc/tree-ssa.c8
4 files changed, 26 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 52fe4dc..e46778d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2008-10-02 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/37713
+ * tree-ssa.c (useless_type_conversion_p_1): For COMPLEX_TYPE
+ and VECTOR_TYPE recurse with useless_type_conversion_p which
+ properly handles void pointer conversion.
+
2008-10-02 Danny Smith <dannysmith@users.sourceforge.net>
PR target/37528
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index f661afd..b19e946 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2008-10-02 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/37713
+ * gcc.c-torture/compile/pr37713.c: New testcase.
+
2008-10-01 Andrew Pinski <andrew_pinski@playstation.sony.com>
* gcc.target/powerpc/altivec-cell-1.c: New test.
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr37713.c b/gcc/testsuite/gcc.c-torture/compile/pr37713.c
new file mode 100644
index 0000000..04b4394
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr37713.c
@@ -0,0 +1,10 @@
+void add_opush(void)
+{
+ unsigned char formats[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0xff };
+ void *dtds[sizeof(formats)];
+ unsigned int i;
+ unsigned char dtd = 0x08;
+ for (i = 0; i < sizeof(formats); i++)
+ dtds[i] = &dtd;
+ sdp_seq_alloc(dtds);
+}
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index 073e129..c53c528 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -1159,15 +1159,15 @@ useless_type_conversion_p_1 (tree outer_type, tree inner_type)
/* Recurse for complex types. */
else if (TREE_CODE (inner_type) == COMPLEX_TYPE
&& TREE_CODE (outer_type) == COMPLEX_TYPE)
- return useless_type_conversion_p_1 (TREE_TYPE (outer_type),
- TREE_TYPE (inner_type));
+ return useless_type_conversion_p (TREE_TYPE (outer_type),
+ TREE_TYPE (inner_type));
/* Recurse for vector types with the same number of subparts. */
else if (TREE_CODE (inner_type) == VECTOR_TYPE
&& TREE_CODE (outer_type) == VECTOR_TYPE
&& TYPE_PRECISION (inner_type) == TYPE_PRECISION (outer_type))
- return useless_type_conversion_p_1 (TREE_TYPE (outer_type),
- TREE_TYPE (inner_type));
+ return useless_type_conversion_p (TREE_TYPE (outer_type),
+ TREE_TYPE (inner_type));
/* For aggregates we may need to fall back to structural equality
checks. */