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; 9+ 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] 9+ messages in thread
* [Bug lto/44965] lto option code breaks file format with each added option 2010-07-16 23:06 [Bug lto/44965] New: lto option code breaks file format with each added option andi-gcc at firstfloor dot org @ 2010-07-16 23:08 ` andi-gcc at firstfloor dot org 2010-07-16 23:52 ` pinskia at gcc dot gnu dot org ` (2 subsequent siblings) 3 siblings, 0 replies; 9+ messages in thread From: andi-gcc at firstfloor dot org @ 2010-07-16 23:08 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from andi-gcc at firstfloor dot org 2010-07-16 23:07 ------- One way to solve this would be to use a hash of the option table as a version number. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44965 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/44965] lto option code breaks file format with each added option 2010-07-16 23:06 [Bug lto/44965] New: lto option code breaks file format with each added option 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 3 siblings, 0 replies; 9+ messages in thread From: pinskia at gcc dot gnu dot org @ 2010-07-16 23:52 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from pinskia at gcc dot gnu dot org 2010-07-16 23:52 ------- Really it is kinda expected that for development versions, lto file format is going to be unstable. Now crashing is not the right thing to do. Doing a hash is not going to work either I think. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44965 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/44965] lto option code breaks file format with each added option 2010-07-16 23:06 [Bug lto/44965] New: lto option code breaks file format with each added option 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 3 siblings, 0 replies; 9+ messages in thread From: andi-gcc at firstfloor dot org @ 2010-07-16 23:58 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from andi-gcc at firstfloor dot org 2010-07-16 23:58 ------- It's not only development versions, options can change between minor releases Also I don't think LTO_major/minor is always increased anyways. Why should a hash over the option table not work? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44965 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/44965] lto option code breaks file format with each added option 2010-07-16 23:06 [Bug lto/44965] New: lto option code breaks file format with each added option andi-gcc at firstfloor dot org ` (2 preceding siblings ...) 2010-07-16 23:58 ` andi-gcc at firstfloor dot org @ 2010-07-17 0:04 ` pinskia at gcc dot gnu dot org 3 siblings, 0 replies; 9+ messages in thread From: pinskia at gcc dot gnu dot org @ 2010-07-17 0:04 UTC (permalink / raw) To: gcc-bugs ------- Comment #4 from pinskia at gcc dot gnu dot org 2010-07-17 00:04 ------- (In reply to comment #3) > It's not only development versions, options can change between minor releases > Also I don't think LTO_major/minor is always increased anyways. I think we should just store out the GCC version. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44965 ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <bug-44965-4@http.gcc.gnu.org/bugzilla/>]
* [Bug lto/44965] lto option code breaks file format with each added option [not found] <bug-44965-4@http.gcc.gnu.org/bugzilla/> @ 2011-11-02 14:55 ` rguenth at gcc dot gnu.org 2011-11-03 14:47 ` rguenth at gcc dot gnu.org ` (2 subsequent siblings) 3 siblings, 0 replies; 9+ messages in thread From: rguenth at gcc dot gnu.org @ 2011-11-02 14:55 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44965 Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2011-11-02 AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org |gnu.org | Ever Confirmed|0 |1 --- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-11-02 14:54:23 UTC --- I have a patch. ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/44965] lto option code breaks file format with each added option [not found] <bug-44965-4@http.gcc.gnu.org/bugzilla/> 2011-11-02 14:55 ` 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 3 siblings, 0 replies; 9+ messages in thread From: rguenth at gcc dot gnu.org @ 2011-11-03 14:47 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44965 --- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-11-03 14:46:40 UTC --- Author: rguenth Date: Thu Nov 3 14:46:26 2011 New Revision: 180827 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180827 Log: 2011-11-03 Richard Guenther <rguenther@suse.de> PR lto/44965 * lto-opts.c: Re-implement. * lto-streamer.h (lto_register_user_option): Remove. (lto_read_file_options): Likewise. (lto_reissue_options): Likewise. (lto_clear_user_options): Likewise. (lto_clear_file_options): Likewise. * opts-global.c (post_handling_callback): Remove. (set_default_handlers): Do not set post_handling_callback. (decode_options): Remove LTO specific code. * lto-wrapper.c (merge_and_complain): New function. (run_gcc): Read all input file options and prepend a merged set before the linker driver options. * gcc.c (driver_post_handling_callback): Remove. (set_option_handlers): Do not set post_handling_callback. * opts-common.c (handle_option): Do not call post_handling_callback. * opts.h (struct cl_option_handlers): Remove post_handling_callback. lto/ * lto-lang.c (lto_post_options): Do not read file options. * lto.c (lto_read_all_file_options): Remove. (lto_init): Call lto_set_in_hooks here. Modified: trunk/gcc/ChangeLog trunk/gcc/gcc.c trunk/gcc/lto-opts.c trunk/gcc/lto-streamer.h trunk/gcc/lto-wrapper.c trunk/gcc/lto/ChangeLog trunk/gcc/lto/lto-lang.c trunk/gcc/lto/lto.c trunk/gcc/opts-common.c trunk/gcc/opts-global.c trunk/gcc/opts.h ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/44965] lto option code breaks file format with each added option [not found] <bug-44965-4@http.gcc.gnu.org/bugzilla/> 2011-11-02 14:55 ` 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 3 siblings, 0 replies; 9+ messages in thread From: rguenth at gcc dot gnu.org @ 2011-11-03 15:07 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44965 Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED Target Milestone|--- |4.7.0 --- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-11-03 15:06:45 UTC --- Fixed for 4.7. ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/44965] lto option code breaks file format with each added option [not found] <bug-44965-4@http.gcc.gnu.org/bugzilla/> ` (2 preceding siblings ...) 2011-11-03 15:07 ` rguenth at gcc dot gnu.org @ 2012-01-10 15:06 ` rguenth at gcc dot gnu.org 3 siblings, 0 replies; 9+ messages in thread From: rguenth at gcc dot gnu.org @ 2012-01-10 15:06 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44965 Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |edwintorok at gmail dot com --- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-10 15:05:16 UTC --- *** Bug 49677 has been marked as a duplicate of this bug. *** ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-01-10 15:06 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-07-16 23:06 [Bug lto/44965] New: lto option code breaks file format with each added option 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 [not found] <bug-44965-4@http.gcc.gnu.org/bugzilla/> 2011-11-02 14:55 ` 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
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).