public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/49059] New: Linking with -flto fails
@ 2011-05-19 11:17 petr.malik at hotmail dot com
  2011-05-19 11:27 ` [Bug lto/49059] " petr.malik at hotmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: petr.malik at hotmail dot com @ 2011-05-19 11:17 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Linking with -flto fails
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: petr.malik@hotmail.com


Hello.

I've been using CCfits library to write data into FITS files.
The code compiles until I turn LTO on, then it fails with:

lto1: internal compiler error: in lto_wpa_write_files, at lto/lto.c:1518
lto-wrapper: g++ returned 1 exit status
/usr/bin/ld: lto-wrapper failed
collect2: ld returned 1 exit status

The problem seems to appear only after invoking writeArrays() on
CCfits::Column.

OS: Ubuntu 11.04 x64 (2.6.38-8-virtual)
GCC: 4.6.0 (also present in 'gcc-4.6-20110506')
GCC compiled with: --with-arch=native --with-tune=native --enable-threads=posix
--with-fpmath=sse --enable-checking --enable-cloog-backend=isl
IDE: Eclipse CDT 7.0.2

**** Build of configuration Release for project lto_ccfits_fail ****

make all 
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
Building file: ../src/Main.cpp
Invoking: GCC C++ Compiler
g++ -I"/home/petmal/Eclipse_Projects/lto_ccfits_fail/include" -O3 -Wall -c
-fmessage-length=0 -flto -save-temps -v -MMD -MP -MF"src/Main.d"
-MT"src/Main.d" -o"src/Main.o" "../src/Main.cpp"
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.6.0/configure --with-arch=native --with-tune=native
--enable-threads=posix --with-fpmath=sse --enable-checking
--enable-cloog-backend=isl
Thread model: posix
gcc version 4.6.0 (GCC) 
COLLECT_GCC_OPTIONS='-I'
'/home/petmal/Eclipse_Projects/lto_ccfits_fail/include' '-O3' '-Wall' '-c'
'-fmessage-length=0' '-flto' '-save-temps' '-v' '-MMD' '-MP' '-MF' 'src/Main.d'
'-MT' 'src/Main.d' '-o' 'src/Main.o' '-shared-libgcc' '-mtune=native'
'-march=native'
 /usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/cc1plus -E -quiet -v -I
/home/petmal/Eclipse_Projects/lto_ccfits_fail/include -MMD src/Main.d -MF
src/Main.d -MP -MT src/Main.d -D_GNU_SOURCE ../src/Main.cpp -march=corei7
-mcx16 -msahf -maes -mpclmul -mpopcnt -msse4.2 --param l1-cache-size=32 --param
l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=corei7 -Wall
-fmessage-length=0 -flto -O3 -fpch-preprocess -o Main.ii
ignoring nonexistent directory
"/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /home/petmal/Eclipse_Projects/lto_ccfits_fail/include

/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0

/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0/x86_64-unknown-linux-gnu

/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0/backward
 /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/include
 /usr/local/include
 /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-I'
'/home/petmal/Eclipse_Projects/lto_ccfits_fail/include' '-O3' '-Wall' '-c'
'-fmessage-length=0' '-flto' '-save-temps' '-v' '-MMD' '-MP' '-MF' 'src/Main.d'
'-MT' 'src/Main.d' '-o' 'src/Main.o' '-shared-libgcc' '-mtune=native'
'-march=native'
 /usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/cc1plus -fpreprocessed
Main.ii -march=corei7 -mcx16 -msahf -maes -mpclmul -mpopcnt -msse4.2 --param
l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096
-mtune=corei7 -quiet -dumpbase Main.cpp -auxbase-strip src/Main.o -O3 -Wall
-version -fmessage-length=0 -flto -o Main.s
GNU C++ (GCC) version 4.6.0 (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.6.0, GMP version 5.0.1, MPFR version 3.0.0, MPC
version 0.8.2
warning: GMP header version 5.0.1 differs from library version 4.3.2.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C++ (GCC) version 4.6.0 (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.6.0, GMP version 5.0.1, MPFR version 3.0.0, MPC
version 0.8.2
warning: GMP header version 5.0.1 differs from library version 4.3.2.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 04a475928a1f5131bc3081e746d72187
COLLECT_GCC_OPTIONS='-I'
'/home/petmal/Eclipse_Projects/lto_ccfits_fail/include' '-O3' '-Wall' '-c'
'-fmessage-length=0' '-flto' '-save-temps' '-v' '-MMD' '-MP' '-MF' 'src/Main.d'
'-MT' 'src/Main.d' '-o' 'src/Main.o' '-shared-libgcc' '-mtune=native'
'-march=native'
 as --64 -o src/Main.o Main.s
COMPILER_PATH=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/:/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/:/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/:/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/:/usr/local/lib/gcc/x86_64-unknown-linux-gnu/
Finished building: ../src/Main.cpp
LIBRARY_PATH=/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/:/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../:/lib/:/usr/lib/

COLLECT_GCC_OPTIONS='-I'
'/home/petmal/Eclipse_Projects/lto_ccfits_fail/include' '-O3' '-Wall' '-c'
'-fmessage-length=0' '-flto' '-save-temps' '-v' '-MMD' '-MP' '-MF' 'src/Main.d'
'-MT' 'src/Main.d' '-o' 'src/Main.o' '-shared-libgcc' '-mtune=native'
'-march=native'
Building target: lto_ccfits_fail
Invoking: GCC C++ Linker
g++ -flto -o"lto_ccfits_fail"  ./src/Main.o   -lCCfits
lto1: internal compiler error: in lto_wpa_write_files, at lto/lto.c:1518
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: g++ returned 1 exit status
/usr/bin/ld: lto-wrapper failed
collect2: ld returned 1 exit status
make: *** [lto_ccfits_fail] Error 1


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

* [Bug lto/49059] Linking with -flto fails
  2011-05-19 11:17 [Bug lto/49059] New: Linking with -flto fails petr.malik at hotmail dot com
@ 2011-05-19 11:27 ` petr.malik at hotmail dot com
  2011-05-19 11:30 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: petr.malik at hotmail dot com @ 2011-05-19 11:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Petr <petr.malik at hotmail dot com> 2011-05-19 10:51:37 UTC ---
Created attachment 24288
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24288
Preprocessed source.


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

* [Bug lto/49059] Linking with -flto fails
  2011-05-19 11:17 [Bug lto/49059] New: Linking with -flto fails petr.malik at hotmail dot com
  2011-05-19 11:27 ` [Bug lto/49059] " petr.malik at hotmail dot com
@ 2011-05-19 11:30 ` rguenth at gcc dot gnu.org
  2011-05-19 15:57 ` petr.malik at hotmail dot com
  2012-05-07 12:36 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-05-19 11:30 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-19 11:15:19 UTC ---
If you do not add --enable-checking the error will vanish.  The check is for
optimality of partitioning and asserts that no partition is empty.

*** This bug has been marked as a duplicate of bug 48246 ***


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

* [Bug lto/49059] Linking with -flto fails
  2011-05-19 11:17 [Bug lto/49059] New: Linking with -flto fails petr.malik at hotmail dot com
  2011-05-19 11:27 ` [Bug lto/49059] " petr.malik at hotmail dot com
  2011-05-19 11:30 ` rguenth at gcc dot gnu.org
@ 2011-05-19 15:57 ` petr.malik at hotmail dot com
  2012-05-07 12:36 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: petr.malik at hotmail dot com @ 2011-05-19 15:57 UTC (permalink / raw)
  To: gcc-bugs

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

Petr <petr.malik at hotmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|DUPLICATE                   |

--- Comment #3 from Petr <petr.malik at hotmail dot com> 2011-05-19 15:04:03 UTC ---
(In reply to comment #2)
> If you do not add --enable-checking the error will vanish.  The check is for
> optimality of partitioning and asserts that no partition is empty.
> 
> *** This bug has been marked as a duplicate of bug 48246 ***

I removed the '--enable-checking' switch and reconfigured GCC 4.6.0, then
compiled my app with this 'new' version, but with the same success as before...


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

* [Bug lto/49059] Linking with -flto fails
  2011-05-19 11:17 [Bug lto/49059] New: Linking with -flto fails petr.malik at hotmail dot com
                   ` (2 preceding siblings ...)
  2011-05-19 15:57 ` petr.malik at hotmail dot com
@ 2012-05-07 12:36 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-07 12:36 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

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

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-07 12:34:39 UTC ---
Works for me as stated.


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

end of thread, other threads:[~2012-05-07 12:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-19 11:17 [Bug lto/49059] New: Linking with -flto fails petr.malik at hotmail dot com
2011-05-19 11:27 ` [Bug lto/49059] " petr.malik at hotmail dot com
2011-05-19 11:30 ` rguenth at gcc dot gnu.org
2011-05-19 15:57 ` petr.malik at hotmail dot com
2012-05-07 12:36 ` rguenth 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).