aboutsummaryrefslogtreecommitdiff
path: root/gcc/convert.c
diff options
context:
space:
mode:
authorChristian Bruel <christian.bruel@st.com>2012-04-19 09:06:53 +0000
committerChristian Bruel <christian.bruel@st.com>2012-04-19 09:06:53 +0000
commitdd9892be45d0e1cf914b0cc1d6095143a7bb4145 (patch)
treea89d5ad3ac4390a00e23584ee2bc15d40c7f3d1a /gcc/convert.c
parentf1f9851ad6435ed7cdc8c1b2f6ce3083cc3fd74e (diff)
Fix #52283 error: case label does not reduce to an integer constant
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@186586 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/convert.c')
-rw-r--r--gcc/convert.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/gcc/convert.c b/gcc/convert.c
index 8ff2e9a825a..5e6b09e0654 100644
--- a/gcc/convert.c
+++ b/gcc/convert.c
@@ -537,7 +537,6 @@ convert_to_integer (tree type, tree expr)
else if (outprec >= inprec)
{
enum tree_code code;
- tree tem;
/* If the precision of the EXPR's type is K bits and the
destination mode has more bits, and the sign is changing,
@@ -555,13 +554,7 @@ convert_to_integer (tree type, tree expr)
else
code = NOP_EXPR;
- tem = fold_unary (code, type, expr);
- if (tem)
- return tem;
-
- tem = build1 (code, type, expr);
- TREE_NO_WARNING (tem) = 1;
- return tem;
+ return fold_build1 (code, type, expr);
}
/* If TYPE is an enumeral type or a type with a precision less