public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/44965]  New: lto option code breaks file format with each added option
@ 2010-07-16 23:06 andi-gcc at firstfloor dot org
  2010-07-16 23:08 ` [Bug lto/44965] " andi-gcc at firstfloor dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: andi-gcc at firstfloor dot org @ 2010-07-16 23:06 UTC (permalink / raw)
  To: gcc-bugs

Had the following problem happen:

Create a LTO build of a program with a gcc git checkout
Update to a slightly newer checkout
The new checkout had one option in fortran more added
Continue compiling the program without make clean with the new compiler
LTO link failed with this assert failing:

392 else if (o->type == CL_COMMON) 
393    gcc_assert (option->flag_var);

I think what happened is that the lto-opts code wrote the option
indexes into the object files and with the compiler update and the
new option they all shifted and become different. In my case the assert
happened
because it was trying to set a fortran specific option in a C
build.

There's some version checking in the lto-opts code

memset (&header, 0, sizeof (header));
  header.lto_header.major_version = LTO_major_version;
  header.lto_header.minor_version = LTO_minor_version;
  header.lto_header.section_type = LTO_section_opts;

but LTO_major/minor seems to be always just 1/0, so of course
didn't catch this.


-- 
           Summary: lto option code breaks file format with each added
                    option
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: andi-gcc at firstfloor dot org
  GCC host triplet: x86_64-linux


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


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

end of thread, other threads:[~2012-01-10 15:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-44965-4@http.gcc.gnu.org/bugzilla/>
2011-11-02 14:55 ` [Bug lto/44965] lto option code breaks file format with each added option rguenth at gcc dot gnu.org
2011-11-03 14:47 ` rguenth at gcc dot gnu.org
2011-11-03 15:07 ` rguenth at gcc dot gnu.org
2012-01-10 15:06 ` rguenth at gcc dot gnu.org
2010-07-16 23:06 [Bug lto/44965] New: " andi-gcc at firstfloor dot org
2010-07-16 23:08 ` [Bug lto/44965] " andi-gcc at firstfloor dot org
2010-07-16 23:52 ` pinskia at gcc dot gnu dot org
2010-07-16 23:58 ` andi-gcc at firstfloor dot org
2010-07-17  0:04 ` pinskia at gcc dot gnu dot 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).