aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-forwprop.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-11-17 09:57:45 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2006-11-17 09:57:45 +0100
commitc7b38a8574b6b442b78e40256022ce419ca2eb04 (patch)
treea74503e6f86d8e04679e5342ef0f69498c27063f /gcc/tree-ssa-forwprop.c
parent3e0a5abd2145b2302d4f3515bbb2e051becdea7b (diff)
downloadgcc-c7b38a8574b6b442b78e40256022ce419ca2eb04.zip
gcc-c7b38a8574b6b442b78e40256022ce419ca2eb04.tar.gz
gcc-c7b38a8574b6b442b78e40256022ce419ca2eb04.tar.bz2
re PR middle-end/29584 (internal compiler error on optimization)
PR middle-end/29584 * tree-ssa-forwprop.c (simplify_switch_expr): Don't optimize if DEF doesn't have integral type. * gcc.dg/torture/pr29584.c: New test. From-SVN: r118921
Diffstat (limited to 'gcc/tree-ssa-forwprop.c')
-rw-r--r--gcc/tree-ssa-forwprop.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c
index e2c5ed4..a3caf23 100644
--- a/gcc/tree-ssa-forwprop.c
+++ b/gcc/tree-ssa-forwprop.c
@@ -934,7 +934,9 @@ simplify_switch_expr (tree stmt)
need_precision = TYPE_PRECISION (ti);
fail = false;
- if (TYPE_UNSIGNED (to) && !TYPE_UNSIGNED (ti))
+ if (! INTEGRAL_TYPE_P (ti))
+ fail = true;
+ else if (TYPE_UNSIGNED (to) && !TYPE_UNSIGNED (ti))
fail = true;
else if (!TYPE_UNSIGNED (to) && TYPE_UNSIGNED (ti))
need_precision += 1;