aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>2000-04-12 16:35:14 +0000
committerJeff Law <law@gcc.gnu.org>2000-04-12 10:35:14 -0600
commitd0158d40e4bab013830642c7ad31ba4201bb5f10 (patch)
treef0ba4ec69887d24cf9e1fc096231d916ad5d655f /gcc
parent46feb4ab1ee92e403f55ff5647670443c4cf26bd (diff)
downloadgcc-d0158d40e4bab013830642c7ad31ba4201bb5f10.zip
gcc-d0158d40e4bab013830642c7ad31ba4201bb5f10.tar.gz
gcc-d0158d40e4bab013830642c7ad31ba4201bb5f10.tar.bz2
* gcc.c-torture/execute/20000412-3.c: New test.
From-SVN: r33117
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20000412-3.c32
2 files changed, 33 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index ea5adcf..9c20507 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,6 @@
Wed Apr 12 10:25:08 2000 Jeffrey A Law (law@cygnus.com)
+ * gcc.c-torture/execute/20000412-3.c: New test.
* gcc.c-torture/compile/20000412-1.c: New test.
* gcc.c-torture/execute/20000412-2.c: New test.
diff --git a/gcc/testsuite/gcc.c-torture/execute/20000412-3.c b/gcc/testsuite/gcc.c-torture/execute/20000412-3.c
new file mode 100644
index 0000000..a5cb3ee
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20000412-3.c
@@ -0,0 +1,32 @@
+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];
+}
+