PR lto/51280
* lto-wrapper.c (run_gcc): Pass -fgnu_tm on.
(merge_and_complain): Same.
From-SVN: r183303
+2012-01-19 Aldy Hernandez <aldyh@redhat.com>
+
+ PR lto/51280
+ * lto-wrapper.c (run_gcc): Pass -fgnu_tm on.
+ (merge_and_complain): Same.
+
2012-01-19 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/50237
case OPT_fpie:
case OPT_fcommon:
case OPT_fexceptions:
+ case OPT_fgnu_tm:
/* Do what the old LTO code did - collect exactly one option
setting per OPT code, we pick the first we encounter.
??? This doesn't make too much sense, but when it doesn't
case OPT_fpie:
case OPT_fcommon:
case OPT_fexceptions:
+ case OPT_fgnu_tm:
break;
default:
--- /dev/null
+/* { dg-lto-options {{-flto}} } */
+/* { dg-lto-do link } */
+
+/* Test that we can build one object file with -fgnu-tm
+ (trans-mem-3_1.c), but do the final link of all objects without
+ -fgnu-tm. */
+
+int i;
--- /dev/null
+/* { dg-options "-fgnu-tm" } */
+
+extern int i;
+
+main()
+{
+ __transaction_atomic { i = 0; }
+}
+
+#define dummy(func) \
+ __attribute__((noinline,noclone,used)) void func() { asm (""); }
+
+dummy(_ITM_beginTransaction)
+dummy(_ITM_commitTransaction)
+dummy(_ITM_WU4)
+dummy(_ITM_WU8)
+dummy(_ITM_registerTMCloneTable)
+dummy(_ITM_deregisterTMCloneTable)