diff --git a/gcc/real.h b/gcc/real.h
index 1310ace37f2278ccd4e3787fedb0e64f5f2de685..3e691ff436ac825ff27bd40fdd46e7c63bb40d29 100644
--- a/gcc/real.h
+++ b/gcc/real.h
@@ -128,7 +128,8 @@ extern double (atof) ();
 
 #ifndef REAL_VALUE_TRUNCATE
 #define REAL_VALUE_TRUNCATE(mode, x) \
- (GET_MODE_BITSIZE (mode) == GET_MODE_BITSIZE (SFmode) ? (float) (x) : (x))
+ (GET_MODE_BITSIZE (mode) == sizeof (float) * HOST_BITS_PER_CHAR	\
+  ? (float) (x) : (x))
 #endif
 
 /* Determine whether a floating-point value X is infinite. */