]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR testsuite/52011 (FAIL: gcc.dg/lto/trans-mem-* c_lto_trans-mem-*.o assemble...
authorAldy Hernandez <aldyh@redhat.com>
Fri, 27 Jan 2012 21:53:40 +0000 (21:53 +0000)
committerAldy Hernandez <aldyh@gcc.gnu.org>
Fri, 27 Jan 2012 21:53:40 +0000 (21:53 +0000)
       PR testsuite/52011
        * gcc.dg/lto/trans-mem.h: New file.
        * gcc.dg/lto/trans-mem-2_0.c: Include it.
        * gcc.dg/lto/trans-mem-1_1.c: Same.
        * gcc.dg/lto/trans-mem-4_1.c: Same.
        * gcc.dg/lto/trans-mem-3_1.c: Same.

From-SVN: r183648

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/lto/trans-mem-1_1.c
gcc/testsuite/gcc.dg/lto/trans-mem-2_0.c
gcc/testsuite/gcc.dg/lto/trans-mem-3_1.c
gcc/testsuite/gcc.dg/lto/trans-mem-4_1.c
gcc/testsuite/gcc.dg/lto/trans-mem.h [new file with mode: 0644]

index 7ebce8dd4dedcadca84a2a54926321c2fc749e97..b3cb2338dc4401ef8058f1f1084b744ed3a64b48 100644 (file)
@@ -1,3 +1,12 @@
+2012-01-27  Aldy Hernandez  <aldyh@redhat.com>
+
+       PR testsuite/52011
+       * gcc.dg/lto/trans-mem.h: New file.
+       * gcc.dg/lto/trans-mem-2_0.c: Include it.
+       * gcc.dg/lto/trans-mem-1_1.c: Same.
+       * gcc.dg/lto/trans-mem-4_1.c: Same.
+       * gcc.dg/lto/trans-mem-3_1.c: Same.
+
 2012-01-27  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/52022
index 6dba2527cd8857bb4a8d1aafc408084cbf612833..f49a2626e58558e482b96fad2fd545e02a28e5ff 100644 (file)
@@ -1,10 +1 @@
-#include <stdint.h>
-
-#define noinline __attribute__((noinline,noclone,used))
-
-noinline uint32_t _ITM_beginTransaction(uint32_t a, ...) { asm(""); }
-noinline void _ITM_commitTransaction (void) { asm(""); }
-noinline void _ITM_WU4 (void *a, uint32_t b) { asm(""); }
-noinline void _ITM_WU8 (void *a, uint64_t b) { asm(""); }
-noinline void _ITM_registerTMCloneTable (void) { asm(""); }
-noinline void _ITM_deregisterTMCloneTable (void) { asm(""); }
+#include "trans-mem.h"
index b99c5bf95e93de2cade7c49db5e3b8078725750a..b27060228758f1046a8299fbd70d86210e8dd045 100644 (file)
@@ -2,19 +2,10 @@
 /* { dg-lto-do link } */
 /* { dg-require-effective-target stdint_types } */
 
-#include <stdint.h>
+#include "trans-mem.h"
 
 extern void foobar() __attribute__((transaction_callable));
 
-#define noinline __attribute__((noinline,noclone,used))
-
-noinline uint32_t _ITM_beginTransaction(uint32_t a, ...) { asm(""); }
-noinline void _ITM_commitTransaction (void) { asm(""); }
-noinline void _ITM_WU4 (void *a, uint32_t b) { asm(""); }
-noinline void _ITM_WU8 (void *a, uint64_t b) { asm(""); }
-noinline void _ITM_registerTMCloneTable (void) { asm(""); }
-noinline void _ITM_deregisterTMCloneTable (void) { asm(""); }
-
 main()
 {
   __transaction_relaxed
index 6373ecc12ac955c1d9f4a6303076fa7468781537..4b7f7d7510b1dc73c3eed5464c206f62895bed32 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-options "-fgnu-tm" } */
 
-#include <stdint.h>
+#include "trans-mem.h"
 
 extern int i;
 
@@ -8,12 +8,3 @@ main()
 {
   __transaction_atomic { i = 0; }
 }
-
-#define noinline __attribute__((noinline,noclone,used))
-
-noinline uint32_t _ITM_beginTransaction(uint32_t a, ...) { asm(""); }
-noinline void _ITM_commitTransaction (void) { asm(""); }
-noinline void _ITM_WU4 (void *a, uint32_t b) { asm(""); }
-noinline void _ITM_WU8 (void *a, uint64_t b) { asm(""); }
-noinline void _ITM_registerTMCloneTable (void) { asm(""); }
-noinline void _ITM_deregisterTMCloneTable (void) { asm(""); }
index a377e666605b583d5bfd499a7b614a4b3271d84c..620ce16b8c8bb7a0a2953144e4a56e9273e372a1 100644 (file)
@@ -1,14 +1,6 @@
-#include <stdint.h>
+#include "trans-mem.h"
 
 __attribute__((transaction_safe))
 void foo() 
 {
 }
-
-uint32_t _ITM_beginTransaction(uint32_t prop, ...)
-{
-}
-
-void __builtin__ITM_commitTransaction (void)
-{
-}
diff --git a/gcc/testsuite/gcc.dg/lto/trans-mem.h b/gcc/testsuite/gcc.dg/lto/trans-mem.h
new file mode 100644 (file)
index 0000000..add5a29
--- /dev/null
@@ -0,0 +1,22 @@
+#include <stdint.h>
+
+/* Dummy declarations for common TM supporting functions.  */
+
+/* These must be in sync with both libitm/libitm.h and the TM builtin
+   definitions in gcc/gtm-builtins.def.  */
+
+#define noinline __attribute__((noinline,noclone,used))
+
+#ifdef __i386__
+/* Only for 32-bit x86.  */
+# define ITM_REGPARM   __attribute__((regparm(2)))
+#else
+# define ITM_REGPARM
+#endif
+
+ITM_REGPARM noinline uint32_t _ITM_beginTransaction(uint32_t a, ...) { asm(""); }
+ITM_REGPARM noinline void _ITM_commitTransaction (void) { asm(""); }
+ITM_REGPARM noinline void _ITM_WU4 (void *a, uint32_t b) { asm(""); }
+ITM_REGPARM noinline void _ITM_WU8 (void *a, uint64_t b) { asm(""); }
+noinline void _ITM_registerTMCloneTable (void) { asm(""); }
+noinline void _ITM_deregisterTMCloneTable (void) { asm(""); }