aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2001-11-25 06:30:44 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2001-11-25 06:30:44 +0000
commitcbfd0e9eed9f1840a18a2d67bbf77962839aa9d2 (patch)
tree02062d554b7222b48e13ccf13292d05e2834c880 /gcc/testsuite
parent2dbbe435fe16ecf0bca1e5f5b97374d41e233b29 (diff)
downloadgcc-cbfd0e9eed9f1840a18a2d67bbf77962839aa9d2.zip
gcc-cbfd0e9eed9f1840a18a2d67bbf77962839aa9d2.tar.gz
gcc-cbfd0e9eed9f1840a18a2d67bbf77962839aa9d2.tar.bz2
* gcc.c-torture/execute/20011121-1.c: New test.
From-SVN: r47309
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20011121-1.c19
2 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 0e5fb3c..885d091 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2001-11-24 Ian Lance Taylor <ian@airs.com>
+
+ * gcc.c-torture/execute/20011121-1.c: New test.
+
Fri Nov 23 15:55:44 2001 Jeffrey A Law (law@cygnus.com)
* gcc.c-torture/execute/ieee/20011123-1.c: New test.
diff --git a/gcc/testsuite/gcc.c-torture/execute/20011121-1.c b/gcc/testsuite/gcc.c-torture/execute/20011121-1.c
new file mode 100644
index 0000000..3e3d03a
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20011121-1.c
@@ -0,0 +1,19 @@
+struct s
+{
+ int i[18];
+ char f;
+ char b[2];
+};
+
+struct s s1;
+
+int
+main()
+{
+ struct s s2;
+ s2.b[0] = 100;
+ __builtin_memcpy(&s2, &s1, ((unsigned int) &((struct s *)0)->b));
+ if (s2.b[0] != 100)
+ abort();
+ exit(0);
+}