2016-12-21 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / 20020517-1.c
blob74c6b3e6eab516675bfb51d9255f7595e5f77b8d
1 /* This testcase caused ICE in do_SUBST on IA-32, because 0xf6 constant
2 was not sign-extended for QImode. */
3 /* { dg-do run } */
4 /* { dg-options "-O2" } */
5 /* { dg-options "-O2 -mtune=i686" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
7 #include <limits.h>
9 void abort (void);
10 void exit (int);
12 void foo (void)
14 int i;
15 char *p;
17 p = (char *) &i;
18 *p = -10;
19 if (* (unsigned char *) p != 0x100 - 10)
20 abort ();
23 int main (void)
25 if (UCHAR_MAX == 255)
26 foo ();
27 exit (0);