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]

New execute C torture test


This is a new entry for the C execute torture test.  gcc 3.0.2 fails
it on i686-pc-gnu-linux with -O.  See PR c/4925.

Ian

2001-11-21  Ian Lance Taylor  <ian@airs.com>

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

--- /dev/null	Tue May  5 13:32:27 1998
+++ 20011121-1.c	Wed Nov 21 20:33:53 2001
@@ -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);
+}


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