* gcc.c-torture/compile/20000511-1.c: New test.
authorJeffrey A Law <law@cygnus.com>
Fri, 12 May 2000 01:05:59 +0000 (01:05 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 12 May 2000 01:05:59 +0000 (19:05 -0600)
From-SVN: r33867

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/20000511-1.c [new file with mode: 0644]

index fc9c841be6e031a912923fcb86467b778de2b821..735b1f81e8094e865c7c37a29ead1f19575276da 100644 (file)
@@ -1,5 +1,6 @@
 Thu May 11 19:02:43 2000  Jeffrey A Law  (law@cygnus.com)
 
+       * gcc.c-torture/compile/20000511-1.c: New test.
        * g77.f-torture/compile/20000511-1.f: New test.
        * g77.f-torture/compile/20000511-2.f: New test.
 
diff --git a/gcc/testsuite/gcc.c-torture/compile/20000511-1.c b/gcc/testsuite/gcc.c-torture/compile/20000511-1.c
new file mode 100644 (file)
index 0000000..11c1315
--- /dev/null
@@ -0,0 +1,31 @@
+typedef struct {
+  char y;
+  char x[32];
+} X;
+
+int z (void)
+{
+  X xxx;
+  xxx.x[0] =
+  xxx.x[31] = '0';
+  xxx.y = 0xf;
+  return f (xxx, xxx);
+}
+
+int main (void)
+{
+  int val;
+
+  val = z ();
+  if (val != 0x60)
+    abort ();
+  exit (0);
+}
+
+int f(X x, X y)
+{
+  if (x.y != y.y)
+    return 'F';
+
+  return x.x[0] + y.x[0];
+}