Commit aad038ca by Aldy Hernandez Committed by Aldy Hernandez

re PR lto/51280 (ICE when lto1 does not have -fgnu-tm and object file uses TM)

        PR lto/51280
        * lto-wrapper.c (run_gcc): Pass -fgnu_tm on.
        (merge_and_complain): Same.

From-SVN: r183303
parent 01ddefeb
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> 2012-01-19 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/50237 PR bootstrap/50237
......
...@@ -403,6 +403,7 @@ merge_and_complain (struct cl_decoded_option **decoded_options, ...@@ -403,6 +403,7 @@ merge_and_complain (struct cl_decoded_option **decoded_options,
case OPT_fpie: case OPT_fpie:
case OPT_fcommon: case OPT_fcommon:
case OPT_fexceptions: case OPT_fexceptions:
case OPT_fgnu_tm:
/* Do what the old LTO code did - collect exactly one option /* Do what the old LTO code did - collect exactly one option
setting per OPT code, we pick the first we encounter. setting per OPT code, we pick the first we encounter.
??? This doesn't make too much sense, but when it doesn't ??? This doesn't make too much sense, but when it doesn't
...@@ -555,6 +556,7 @@ run_gcc (unsigned argc, char *argv[]) ...@@ -555,6 +556,7 @@ run_gcc (unsigned argc, char *argv[])
case OPT_fpie: case OPT_fpie:
case OPT_fcommon: case OPT_fcommon:
case OPT_fexceptions: case OPT_fexceptions:
case OPT_fgnu_tm:
break; break;
default: default:
......
/* { 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;
/* { 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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment