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]

PATCH: Add testcases for PRs 47727/47372/47715


Hi,

I checkd in this patch to add testcases for PRs 47727/47372/47715.

H.J.
--
Index: gcc.dg/pr47372-2.c
===================================================================
--- gcc.dg/pr47372-2.c	(revision 0)
+++ gcc.dg/pr47372-2.c	(revision 0)
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target fpic } */
+/* { dg-options "-O2 -fPIC -g" } */
+
+typedef unsigned short ush;
+typedef ush Pos;
+extern ush prev[];
+void fill_window( unsigned more, unsigned m)
+{
+    unsigned n;
+    for (n = 0; n < (unsigned)(1<<15); n++) {
+      (prev+0x8000)[n] = (Pos)(m >= 0x8000 ? m-0x8000 : 0);
+    }
+    for (n = 0; n < 0x8000; n++) {
+      prev[n] = (Pos)(m >= 0x8000 ? m-0x8000 : 0);
+    }
+}
Index: gcc.dg/tls/pr47715-5.c
===================================================================
--- gcc.dg/tls/pr47715-5.c	(revision 0)
+++ gcc.dg/tls/pr47715-5.c	(revision 0)
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-require-effective-target tls } */
+
+extern __thread int __libc_errno __attribute__ ((tls_model ("initial-exec")));
+;
+int *
+__errno_location (void)
+{
+  return &__libc_errno;
+}
Index: gcc.dg/pr47727.c
===================================================================
--- gcc.dg/pr47727.c	(revision 0)
+++ gcc.dg/pr47727.c	(revision 0)
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef void (*func_ptr) (void);
+static func_ptr __CTOR_END__[1] = { (func_ptr) 0 };
+static void __attribute__((used))
+__do_global_ctors_aux (void)
+{
+  func_ptr *p;
+  for (p = __CTOR_END__ - 1; *p != (func_ptr) -1; p--)
+    (*p) ();
+}
Index: gcc.dg/pr47372-1.c
===================================================================
--- gcc.dg/pr47372-1.c	(revision 0)
+++ gcc.dg/pr47372-1.c	(revision 0)
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target fpic } */
+/* { dg-options "-O2 -fPIC -g" } */
+
+typedef struct FILE FILE;
+int _fwalk(int (*)(FILE *));
+int __sflush(FILE *);
+int
+fflush(FILE *fp)
+{
+  return (_fwalk(__sflush));
+}
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 177512)
+++ ChangeLog	(working copy)
@@ -1,5 +1,14 @@
 2011-08-06  H.J. Lu  <hongjiu.lu@intel.com>
 
+	PR middle-end/47727
+	* gcc.dg/pr47727.c: New.
+
+	PR target/47372
+	* gcc.dg/pr47372-1.c: New.
+	* gcc.dg/pr47372-2.c: Likewise.
+
+2011-08-06  H.J. Lu  <hongjiu.lu@intel.com>
+
 	PR middle-end/47449
 	* gcc.target/i386/pr47449.c: New.
 
@@ -17,6 +26,7 @@
 	* gcc.dg/tls/pr47715-2.c: Likewise.
 	* gcc.dg/tls/pr47715-3.c: Likewise.
 	* gcc.dg/tls/pr47715-4.c: Likewise.
+	* gcc.dg/tls/pr47715-5.c: Likewise.
 
 2011-08-06  Nicola Pero  <nicola.pero@meta-innovation.com>
 


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