public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Erotavlas_turbo@libero.it" <Erotavlas_turbo@libero.it>
To: gcc-help@gcc.gnu.org
Subject: Behaviour of GCC with flto probably bug
Date: Sat, 01 Feb 2014 16:17:00 -0000	[thread overview]
Message-ID: <1443552043.5919731391271466620.JavaMail.actor@webmail14> (raw)

Hi,

I noticed the following behaviour of GCC. If I compile with gcc 4.8.1 (Ubuntu 
12.04 64 bit) a code made up of several source files and I use the flag -flto 
to produce a set of object files. Then if I link in another system with older 
version of gcc (4.7.x or 4.6.x) and without -flto all works well. Otherwise, if 
I use -flto I get this error: 

lto1: fatal error: LTO_tags out of range: Range is 0 to 361, value is 15872
compilation terminated.
lto-wrapper: g++ returned 1 exit status
/usr/bin/ld: lto-wrapper failed
collect2: error: ld returned 1 exit status

So is not allowed to compile with one version and flto options and link with 
an old version?

Then if I try to link in another machine with Debian 7 64 bit and gcc-4.8.1 
with this command:

g++ -O3 -march=native -mtune=native -flto /home/user/lib.a -L/usr/local/lib -
llibrary1 -lpthread -lz -o dva

I get lto1: internal compiler error: in lto_tag_to_tree_code, at lto-streamer.
h:924
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
lto-wrapper: g++ returned 1 exit status
/usr/bin/ld: lto-wrapper failed
collect2: error: ld returned 1 exit status

Is it a bug?

Thank you



             reply	other threads:[~2014-02-01 16:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-01 16:17 Erotavlas_turbo [this message]
2014-02-01 16:24 ` Florian Weimer

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=1443552043.5919731391271466620.JavaMail.actor@webmail14 \
    --to=erotavlas_turbo@libero.it \
    --cc=gcc-help@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).