public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/51280] New: ICE when lto1 does not have -fgnu-tm and object file uses TM
@ 2011-11-23  5:09 patrick.marlier at gmail dot com
  2011-11-23 19:28 ` [Bug lto/51280] " patrick.marlier at gmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: patrick.marlier at gmail dot com @ 2011-11-23  5:09 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51280

             Bug #: 51280
           Summary: ICE when lto1 does not have -fgnu-tm and object file
                    uses TM
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: patrick.marlier@gmail.com
                CC: aldyh@gcc.gnu.org, dnovillo@gcc.gnu.org,
                    rguenth@gcc.gnu.org, rth@gcc.gnu.org,
                    torvald@gcc.gnu.org


LTO should display a error message to indicate that gnu-tm is not enabled and
not ICE.

lto1: internal compiler error: in streamer_get_builtin_tree, at
tree-streamer-in.c:1056
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

1051      if (fclass == BUILT_IN_NORMAL)
1052        {
1053          if (fcode >= END_BUILTINS)
1054            fatal_error ("machine independent builtin code out of range");
1055          result = builtin_decl_explicit (fcode);
1056          gcc_assert (result);
1057        }

(gdb) p fcode
$2 = BUILT_IN_TM_COMMIT

(gdb) bt
#0  fancy_abort (file=0x12b2168 "../../trunk/gcc/tree-streamer-in.c",
line=1056, function=0x12b2250 "streamer_get_builtin_tree")
    at ../../trunk/gcc/diagnostic.c:899
#1  0x0000000000c4f5ea in streamer_get_builtin_tree (ib=0x7fffffffd760,
data_in=0x1a273d0) at ../../trunk/gcc/tree-streamer-in.c:1056
#2  0x00000000008b5aeb in lto_input_tree (ib=0x7fffffffd760, data_in=0x1a273d0)
at ../../trunk/gcc/lto-streamer-in.c:1148
#3  0x00000000004b052a in lto_read_decls (decl_data=0x7ffff69b9000,
data=0x1a36970, resolutions=0x1a26320) at ../../trunk/gcc/lto/lto.c:902
#4  0x00000000004b0e25 in lto_file_finalize (file_data=0x7ffff69b9000,
file=0x19944a0) at ../../trunk/gcc/lto/lto.c:1140
#5  0x00000000004b0e72 in lto_create_files_from_ids (file=0x19944a0,
file_data=0x7ffff69b9000, count=0x7fffffffd8ec) at
../../trunk/gcc/lto/lto.c:1150
#6  0x00000000004b0f8b in lto_file_read (file=0x19944a0,
resolution_file=0x1a25460, count=0x7fffffffd8ec) at
../../trunk/gcc/lto/lto.c:1190
#7  0x00000000004b8095 in read_cgraph_and_symbols (nfiles=1, fnames=0x19af0f0)
at ../../trunk/gcc/lto/lto.c:2591
#8  0x00000000004b87da in lto_main () at ../../trunk/gcc/lto/lto.c:2905
#9  0x00000000009ffe99 in compile_file () at ../../trunk/gcc/toplev.c:565
#10 0x0000000000a021a9 in do_compile () at ../../trunk/gcc/toplev.c:1931
#11 0x0000000000a02314 in toplev_main (argc=17, argv=0x197d2e0) at
../../trunk/gcc/toplev.c:2007
#12 0x00000000004bb7c4 in main (argc=17, argv=0x7fffffffda68) at
../../trunk/gcc/main.c:36


To reproduce, compile file with transactions and lto, and link without -flto.

Patrick.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug lto/51280] ICE when lto1 does not have -fgnu-tm and object file uses TM
  2011-11-23  5:09 [Bug lto/51280] New: ICE when lto1 does not have -fgnu-tm and object file uses TM patrick.marlier at gmail dot com
@ 2011-11-23 19:28 ` patrick.marlier at gmail dot com
  2011-12-09 18:16 ` aldyh at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: patrick.marlier at gmail dot com @ 2011-11-23 19:28 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51280

--- Comment #1 from Patrick Marlier <patrick.marlier at gmail dot com> 2011-11-23 18:53:04 UTC ---
Created attachment 25904
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25904
testcase

Of course this bug also affect openMP.
(see testcase)


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug lto/51280] ICE when lto1 does not have -fgnu-tm and object file uses TM
  2011-11-23  5:09 [Bug lto/51280] New: ICE when lto1 does not have -fgnu-tm and object file uses TM patrick.marlier at gmail dot com
  2011-11-23 19:28 ` [Bug lto/51280] " patrick.marlier at gmail dot com
@ 2011-12-09 18:16 ` aldyh at gcc dot gnu.org
  2011-12-10  3:57 ` patrick.marlier at gmail dot com
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: aldyh at gcc dot gnu.org @ 2011-12-09 18:16 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51280

--- Comment #2 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2011-12-09 18:13:47 UTC ---
I can't reproduce this:

houston:/build/t/gcc$ cat b.c
int main()
{
  return  __builtin_omp_get_thread_num();
}

houston:/build/t/gcc$ ./xgcc -B./ -c  -fgnu-tm -flto b.c -o b.o
houston:/build/t/gcc$ ./xgcc -B./   b.o -L
/usr/lib/gcc/x86_64-redhat-linux/4.6.2/ -lgomp
houston:/build/t/gcc$ ./a.out
houston:/build/t/gcc$ 

I've tried various other variations, but I can't reproduce.  Please clarify.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug lto/51280] ICE when lto1 does not have -fgnu-tm and object file uses TM
  2011-11-23  5:09 [Bug lto/51280] New: ICE when lto1 does not have -fgnu-tm and object file uses TM patrick.marlier at gmail dot com
  2011-11-23 19:28 ` [Bug lto/51280] " patrick.marlier at gmail dot com
  2011-12-09 18:16 ` aldyh at gcc dot gnu.org
@ 2011-12-10  3:57 ` patrick.marlier at gmail dot com
  2011-12-10  9:39 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: patrick.marlier at gmail dot com @ 2011-12-10  3:57 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51280

--- Comment #3 from Patrick Marlier <patrick.marlier at gmail dot com> 2011-12-10 03:35:38 UTC ---
Created attachment 26040
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26040
testcase for gnu-tm

Well, I don't know why I can't reproduce it for openmp. I will try to have a
look at it next week.
At least, attached the testcase for trans-mem.

$ ./xgcc -B. -fgnu-tm -flto -c lto.c -o lto.o
$ ./xgcc -B. -flto -o lto lto.o
lto1: internal compiler error: in streamer_get_builtin_tree, at
tree-streamer-in.c:1056
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: ./xgcc returned 1 exit status
/usr/bin/ld: lto-wrapper failed
collect2: error: ld returned 1 exit status

Patrick.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug lto/51280] ICE when lto1 does not have -fgnu-tm and object file uses TM
  2011-11-23  5:09 [Bug lto/51280] New: ICE when lto1 does not have -fgnu-tm and object file uses TM patrick.marlier at gmail dot com
                   ` (2 preceding siblings ...)
  2011-12-10  3:57 ` patrick.marlier at gmail dot com
@ 2011-12-10  9:39 ` jakub at gcc dot gnu.org
  2011-12-31 23:54 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-10  9:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51280

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-10 09:24:44 UTC ---
For OpenMP it shouldn't be a problem, all the 3 OpenMP passes (part of
gimplification, omplower and ompexp) are before LTO streaming, flag_openmp
isn't used afterwards, so the only effect of not using -fopenmp for lto phase
will be that -lgomp won't be added automatically.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug lto/51280] ICE when lto1 does not have -fgnu-tm and object file uses TM
  2011-11-23  5:09 [Bug lto/51280] New: ICE when lto1 does not have -fgnu-tm and object file uses TM patrick.marlier at gmail dot com
                   ` (3 preceding siblings ...)
  2011-12-10  9:39 ` jakub at gcc dot gnu.org
@ 2011-12-31 23:54 ` pinskia at gcc dot gnu.org
  2012-01-16 13:25 ` aldyh at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-31 23:54 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51280

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-12-31
     Ever Confirmed|0                           |1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug lto/51280] ICE when lto1 does not have -fgnu-tm and object file uses TM
  2011-11-23  5:09 [Bug lto/51280] New: ICE when lto1 does not have -fgnu-tm and object file uses TM patrick.marlier at gmail dot com
                   ` (4 preceding siblings ...)
  2011-12-31 23:54 ` pinskia at gcc dot gnu.org
@ 2012-01-16 13:25 ` aldyh at gcc dot gnu.org
  2012-01-19 14:23 ` aldyh at gcc dot gnu.org
  2012-01-19 14:23 ` aldyh at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: aldyh at gcc dot gnu.org @ 2012-01-16 13:25 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51280

--- Comment #5 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2012-01-16 13:20:56 UTC ---
Ok, reproduced as below.  -flto was missing from the link line.

houston:/build/t2/gcc$ ./xgcc -B./ -c  -fgnu-tm -flto -c  a.c -o
a.ohouston:/build/t2/gcc$ ./xgcc -B./ a.o -flto -L
../x86_64-unknown-linux-gnu/libitm/.libs/ -litm
lto1: internal compiler error: in streamer_get_builtin_tree, at
tree-streamer-in.c:1077
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: ./xgcc returned 1 exit status
/usr/bin/ld: lto-wrapper failed
collect2: error: ld returned 1 exit status
houston:/build/t2/gcc$


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug lto/51280] ICE when lto1 does not have -fgnu-tm and object file uses TM
  2011-11-23  5:09 [Bug lto/51280] New: ICE when lto1 does not have -fgnu-tm and object file uses TM patrick.marlier at gmail dot com
                   ` (6 preceding siblings ...)
  2012-01-19 14:23 ` aldyh at gcc dot gnu.org
@ 2012-01-19 14:23 ` aldyh at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: aldyh at gcc dot gnu.org @ 2012-01-19 14:23 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51280

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #7 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2012-01-19 13:58:41 UTC ---
fixed


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug lto/51280] ICE when lto1 does not have -fgnu-tm and object file uses TM
  2011-11-23  5:09 [Bug lto/51280] New: ICE when lto1 does not have -fgnu-tm and object file uses TM patrick.marlier at gmail dot com
                   ` (5 preceding siblings ...)
  2012-01-16 13:25 ` aldyh at gcc dot gnu.org
@ 2012-01-19 14:23 ` aldyh at gcc dot gnu.org
  2012-01-19 14:23 ` aldyh at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: aldyh at gcc dot gnu.org @ 2012-01-19 14:23 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51280

--- Comment #6 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2012-01-19 13:57:12 UTC ---
Author: aldyh
Date: Thu Jan 19 13:57:04 2012
New Revision: 183303

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183303
Log:
        PR lto/51280
        * lto-wrapper.c (run_gcc): Pass -fgnu_tm on.
        (merge_and_complain): Same.


Added:
    trunk/gcc/testsuite/gcc.dg/lto/trans-mem-3_0.c
    trunk/gcc/testsuite/gcc.dg/lto/trans-mem-3_1.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/lto-wrapper.c


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-01-19 14:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-23  5:09 [Bug lto/51280] New: ICE when lto1 does not have -fgnu-tm and object file uses TM patrick.marlier at gmail dot com
2011-11-23 19:28 ` [Bug lto/51280] " patrick.marlier at gmail dot com
2011-12-09 18:16 ` aldyh at gcc dot gnu.org
2011-12-10  3:57 ` patrick.marlier at gmail dot com
2011-12-10  9:39 ` jakub at gcc dot gnu.org
2011-12-31 23:54 ` pinskia at gcc dot gnu.org
2012-01-16 13:25 ` aldyh at gcc dot gnu.org
2012-01-19 14:23 ` aldyh at gcc dot gnu.org
2012-01-19 14:23 ` aldyh at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).