* g++.old-deja/g++.other/addrof1.C: New test.
authorRichard Henderson <rth@cygnus.com>
Fri, 2 Oct 1998 21:56:53 +0000 (14:56 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 2 Oct 1998 21:56:53 +0000 (14:56 -0700)
From-SVN: r22768

gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.other/addrof1.C [new file with mode: 0644]

index 1231df27c1d24194e8b5ec2b037524cacbfd19e1..48e914e2d6bbbaaae78240b79b16c3dae99faea6 100644 (file)
@@ -1,3 +1,7 @@
+Fri Oct  2 21:55:58 1998  Richard Henderson  <rth@cygnus.com>
+
+       * g++.old-deja/g++.other/addrof1.C: New test.
+
 Thu Oct  1 19:05:20 1998  Jeffrey A Law  (law@cygnus.com)
 
        * gcc.c-torture/compile/981001-2.c: New test.
diff --git a/gcc/testsuite/g++.old-deja/g++.other/addrof1.C b/gcc/testsuite/g++.old-deja/g++.other/addrof1.C
new file mode 100644 (file)
index 0000000..b4d55f6
--- /dev/null
@@ -0,0 +1,30 @@
+typedef struct st {
+        unsigned char   a;
+        unsigned char   b;
+        unsigned char   c;
+        unsigned char   d;
+} __attribute__((aligned(4))) st;
+
+void testme(int, int, int);
+
+static inline void
+stupid_func(st s)
+{
+        testme(s.a, s.b, s.c);
+}
+
+int main()
+{
+        st s;
+
+        s.a = s.b = s.c = 216;
+        stupid_func(s);
+
+        return 0;
+}    
+
+void testme(int a, int b, int c)
+{
+  if (a != 216 || b != 216 || c != 216)
+    abort();
+}