diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-11-17 08:57:45 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2006-11-17 08:57:45 +0000 |
commit | ed70cbafb656532d26bda9ed86e22e103744c8e0 (patch) | |
tree | a74503e6f86d8e04679e5342ef0f69498c27063f /gcc/tree-ssa-forwprop.c | |
parent | c5e734ddd4102e96d20e0af25f7276addd389fca (diff) |
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.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@118921 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-forwprop.c')
-rw-r--r-- | gcc/tree-ssa-forwprop.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index e2c5ed48e70..a3caf235062 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; |