1 /* Copyright (C) 2002 Free Software Foundation.
3 Test that optimizing ((c>=1) && (c<=127)) into (signed char)c < 0
4 doesn't cause any problems for the compiler and behaves correctly.
6 Written by Roger Sayle, 8th May 2002. */
10 extern void abort (void);
13 testc (unsigned char c
, int ok
)
15 if ((c
>=1) && (c
<=SCHAR_MAX
))
24 tests (unsigned short s
, int ok
)
26 if ((s
>=1) && (s
<=SHRT_MAX
))
35 testi (unsigned int i
, int ok
)
37 if ((i
>=1) && (i
<=INT_MAX
))
46 testl (unsigned long l
, int ok
)
48 if ((l
>=1) && (l
<=LONG_MAX
))
62 testc (SCHAR_MAX
+1, 0);
68 tests (SHRT_MAX
+1, 0);
74 testi (INT_MAX
+1U, 0);
80 testl (LONG_MAX
+1UL, 0);