]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
This commit was manufactured by cvs2svn to create branch
authorNo Author <no-author@gcc.gnu.org>
Thu, 23 May 2002 08:14:35 +0000 (08:14 +0000)
committerNo Author <no-author@gcc.gnu.org>
Thu, 23 May 2002 08:14:35 +0000 (08:14 +0000)
'gcc-3_1-branch'.

From-SVN: r53776

gcc/testsuite/gcc.dg/20020517-1.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.dg/20020517-1.c b/gcc/testsuite/gcc.dg/20020517-1.c
new file mode 100644 (file)
index 0000000..04386d8
--- /dev/null
@@ -0,0 +1,28 @@
+/* This testcase caused ICE in do_SUBST on IA-32, because 0xf6 constant
+   was not sign-extended for QImode.  */
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+/* { dg-options "-O2 -mcpu=i686" { target i?86-*-* } } */
+
+#include <limits.h>
+
+void abort (void);
+void exit (int);
+
+void foo (void)
+{
+  int i;
+  char *p;
+
+  p = (char *) &i;
+  *p = -10;
+  if (* (unsigned char *) p != 0x100 - 10)
+    abort ();
+}
+
+int main (void)
+{
+  if (UCHAR_MAX == 255)
+    foo ();
+  exit (0);
+}