This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] A new test.


Hi,

Attached is a patch to add a new test, which used to fail on h8300
port.  Committed.

Kazu Hirata

2002-01-27  Kazu Hirata  <kazu@hxi.com>

	* gcc.c-torture/execute/20020127-1.c: New test.

Index: 20020127-1.c
===================================================================
RCS file: 20020127-1.c
diff -N 20020127-1.c
--- /dev/null	Tue May  5 13:32:27 1998
+++ 20020127-1.c	Sun Jan 27 14:00:49 2002
@@ -0,0 +1,22 @@
+/* This used to fail on h8300.  */
+
+extern void abort (void);
+extern void exit (int);
+
+unsigned long
+foo (unsigned long n)
+{
+  return (~n >> 3) & 1;
+}
+
+int
+main ()
+{
+  if (foo (1 << 3) != 0)
+    abort ();
+
+  if (foo (0) != 1)
+    abort ();
+
+  exit (0);
+}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]