diff options
| author | Jakub Jelinek <jakub@redhat.com> | 2006-11-17 09:57:45 +0100 |
|---|---|---|
| committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2006-11-17 09:57:45 +0100 |
| commit | c7b38a8574b6b442b78e40256022ce419ca2eb04 (patch) | |
| tree | a74503e6f86d8e04679e5342ef0f69498c27063f /gcc/tree-ssa-forwprop.c | |
| parent | 3e0a5abd2145b2302d4f3515bbb2e051becdea7b (diff) | |
| download | gcc-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.c | 4 |
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; |
