public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "markus at trippelsdorf dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/44897] -flto + ipa-sra misoptimize sqlite (non-plugin only)
Date: Thu, 10 Mar 2011 16:07:00 -0000	[thread overview]
Message-ID: <bug-44897-4-TwfaMqcCKY@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-44897-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #11 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-03-10 16:07:34 UTC ---
In the Firefox case sqlite3.o gets compiled correctly,
it is libmozsqlite3.so that segfaults when compiled with -flto
and -fprofile-use :

gcc  -Wall -W -Wno-unused -Wpointer-arith -Wcast-align -W -pedantic
-Wno-long-long -march=native -fpermissive -fno-strict-aliasing -pthread -pipe 
-DNDEBUG -DTRIMMED -flto=4 -fwhole-program -fprofile-use -fprofile-correction
-Wcoverage-mismatch -freorder-blocks-and-partition -O3 -fPIC -shared
-Wl,-z,defs -Wl,-h,libmozsqlite3.so -o libmozsqlite3.so  sqlite3.o    
-lpthread -Wl,-O1,--hash-style=gnu,--as-needed,--no-keep-memory  -fprofile-use
-Wl,-rpath-link,/var/tmp/mozilla-central/moz-build-dir/dist/bin
-Wl,-rpath-link,/usr/lib   -ldl

This version runs fine (no -flto):

gcc -Wall -W -Wno-unused -Wpointer-arith -Wcast-align -W -pedantic
-Wno-long-long -march=native -fpermissive -fno-strict-aliasing -pthread -pipe
-DNDEBUG -DTRIMMED -Wcoverage-mismatch -freorder-blocks-and-partition
-fwhole-program -fprofile-use -O3 -fPIC -shared -Wl,-z,defs
-Wl,-h,libmozsqlite3.so -o libmozsqlite3.so sqlite3.o -lpthread
-Wl,-O1,--hash-style=gnu,--as-needed,--no-keep-memory
-Wl,-rpath-link,/var/tmp/mozilla-central/moz-build-dir/dist/bin
-Wl,-rpath-link,/usr/lib -ldl

And this one gives an internal compiler error (only -flto , no -fprofile-use):

gcc -Wall -W -Wno-unused -Wpointer-arith -Wcast-align -W -pedantic
-Wno-long-long -march=native -fpermissive -fno-strict-aliasing -pthread -pipe
-DNDEBUG -DTRIMMED -Wcoverage-mismatch -freorder-blocks-and-partition -flto -O3
-fPIC -shared -Wl,-z,defs -Wl,-h,libmozsqlite3.so -o libmozsqlite3.so sqlite3.o
-lpthread -Wl,-O1,--hash-style=gnu,--as-needed,--no-keep-memory
-Wl,-rpath-link,/var/tmp/mozilla-central/moz-build-dir/dist/bin
-Wl,-rpath-link,/usr/lib -ldl
lto1: internal compiler error: Floating point exception
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: /usr/x86_64-pc-linux-gnu/gcc-bin/4.6.0/gcc returned 1 exit status
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.0/../../../../x86_64-pc-linux-gnu/bin/ld:
fatal error: lto-wrapper failed
collect2: ld returned 1 exit status

(All these commands should be run from: 
./mozilla-central/moz-build-dir/db/sqlite3/src
One can copy the resulting libmozsqlite3.so directly into 
/usr/lib/firefox-4.0b13pre and try to start Firefox, to check
if it's OK or not)


  parent reply	other threads:[~2011-03-10 16:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-44897-4@http.gcc.gnu.org/bugzilla/>
2010-10-02 14:13 ` [Bug tree-optimization/44897] -fwhopr + ipa-sra misoptimize sqlite hubicka at gcc dot gnu.org
2010-12-15  1:51 ` hubicka at gcc dot gnu.org
2011-01-10 15:29 ` hubicka at gcc dot gnu.org
2011-01-10 16:40 ` [Bug tree-optimization/44897] -flto + ipa-sra misoptimize sqlite (non-plugin only) hubicka at gcc dot gnu.org
2011-01-10 22:34 ` hubicka at gcc dot gnu.org
2011-03-10 16:07 ` markus at trippelsdorf dot de [this message]
2011-03-10 16:26 ` hubicka at ucw dot cz
2011-03-10 18:39 ` markus at trippelsdorf dot de
2011-03-10 19:14 ` markus at trippelsdorf dot de
2011-04-03  9:00 ` hubicka at gcc dot gnu.org
2011-05-19  8:42 ` vincenzo.innocente at cern dot ch
2011-05-19  9:24 ` hubicka at ucw dot cz
2011-05-25 12:04 ` hubicka at gcc dot gnu.org
2011-05-25 12:27 ` hubicka at gcc dot gnu.org
2011-06-02  1:13 ` hubicka at gcc dot gnu.org
2011-06-02 16:11 ` markus at trippelsdorf dot de
2011-06-02 21:52 ` hubicka at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-44897-4-TwfaMqcCKY@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).