public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/41565]  New: -m32 causes an ICE when the object files were compiled with 64bit
@ 2009-10-04  6:41 pinskia at gcc dot gnu dot org
  2009-10-04  9:25 ` [Bug lto/41565] " rguenth at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-10-04  6:41 UTC (permalink / raw)
  To: gcc-bugs

I was playing around with LTO and decided to see what would happen when I
supply -m32 with objects compiled for -m64.

lto1: internal compiler error: in lto_get_pickled_tree, at
lto-streamer-in.c:2423
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

I think this can happen with some makefiles not including CFLAGS on the link
line and manually setting LDFLAGS to include -flto -O2 (though I doubt it
because -m32 is usually a link option too :)).


-- 
           Summary: -m32 causes an ICE when the object files were compiled
                    with 64bit
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org


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


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

* [Bug lto/41565] -m32 causes an ICE when the object files were compiled with 64bit
  2009-10-04  6:41 [Bug lto/41565] New: -m32 causes an ICE when the object files were compiled with 64bit pinskia at gcc dot gnu dot org
@ 2009-10-04  9:25 ` rguenth at gcc dot gnu dot org
  2009-10-04  9:54 ` rguenth at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-10-04  9:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2009-10-04 09:25 -------
Awww.... - we have the concept of user options for this.  See lto-opts.c.

We should somehow include this - but the multilibs do not fit the regular
options scheme really ... :/


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-10-04 09:25:48
               date|                            |


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


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

* [Bug lto/41565] -m32 causes an ICE when the object files were compiled with 64bit
  2009-10-04  6:41 [Bug lto/41565] New: -m32 causes an ICE when the object files were compiled with 64bit pinskia at gcc dot gnu dot org
  2009-10-04  9:25 ` [Bug lto/41565] " rguenth at gcc dot gnu dot org
@ 2009-10-04  9:54 ` rguenth at gcc dot gnu dot org
  2009-10-04  9:58 ` rguenth at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-10-04  9:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2009-10-04 09:54 -------
I'll see if I can fix it.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2009-10-04 09:25:48         |2009-10-04 09:54:07
               date|                            |


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


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

* [Bug lto/41565] -m32 causes an ICE when the object files were compiled with 64bit
  2009-10-04  6:41 [Bug lto/41565] New: -m32 causes an ICE when the object files were compiled with 64bit pinskia at gcc dot gnu dot org
  2009-10-04  9:25 ` [Bug lto/41565] " rguenth at gcc dot gnu dot org
  2009-10-04  9:54 ` rguenth at gcc dot gnu dot org
@ 2009-10-04  9:58 ` rguenth at gcc dot gnu dot org
  2009-10-04 12:17 ` joseph at codesourcery dot com
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-10-04  9:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2009-10-04 09:58 -------
Btw, mixing any flags that change the set of builtin functions also is going
to confuse the streamer a lot.


-- 


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


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

* [Bug lto/41565] -m32 causes an ICE when the object files were compiled with 64bit
  2009-10-04  6:41 [Bug lto/41565] New: -m32 causes an ICE when the object files were compiled with 64bit pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2009-10-04  9:58 ` rguenth at gcc dot gnu dot org
@ 2009-10-04 12:17 ` joseph at codesourcery dot com
  2009-10-05  9:49 ` rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: joseph at codesourcery dot com @ 2009-10-04 12:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from joseph at codesourcery dot com  2009-10-04 12:17 -------
Subject: Re:   New: -m32 causes an ICE when the object files
 were compiled with 64bit

While this case should give a sensible error (not an ICE), linking an 
object built with a 32-bit compiler with no special options and one built 
with a 64-bit compile with -m32 should work with LTO if it would work 
without [*].  So if we cause an error in that case, we should make sure 
there's a PR for fixing it.

[*] This depends on bug 41526 being fixed if the *hosts* differ in 
HOST_BITS_PER_WIDE_INT or HOST_BITS_PER_LONG settings.


-- 


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


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

* [Bug lto/41565] -m32 causes an ICE when the object files were compiled with 64bit
  2009-10-04  6:41 [Bug lto/41565] New: -m32 causes an ICE when the object files were compiled with 64bit pinskia at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2009-10-04 12:17 ` joseph at codesourcery dot com
@ 2009-10-05  9:49 ` rguenth at gcc dot gnu dot org
  2009-10-08 23:06 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-10-05  9:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2009-10-05 09:49 -------
There is one common problem with handling of target options - we do not
properly adjust the flag_var.

But - I cannot reproduce the original problem.  Care to attach a testcase?
I always get linker complaints like

/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: i386
architecture of input file `t.o' is incompatible with i386:x86-64 output
collect2: ld returned 1 exit status


-- 


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


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

* [Bug lto/41565] -m32 causes an ICE when the object files were compiled with 64bit
  2009-10-04  6:41 [Bug lto/41565] New: -m32 causes an ICE when the object files were compiled with 64bit pinskia at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2009-10-05  9:49 ` rguenth at gcc dot gnu dot org
@ 2009-10-08 23:06 ` pinskia at gcc dot gnu dot org
  2009-10-08 23:08 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-10-08 23:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2009-10-08 23:06 -------
I ran into this again, this time on powerpc-linux-gnu when I forgot to include
-maltivec on the link line.


-- 


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


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

* [Bug lto/41565] -m32 causes an ICE when the object files were compiled with 64bit
  2009-10-04  6:41 [Bug lto/41565] New: -m32 causes an ICE when the object files were compiled with 64bit pinskia at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2009-10-08 23:06 ` pinskia at gcc dot gnu dot org
@ 2009-10-08 23:08 ` pinskia at gcc dot gnu dot org
  2009-10-13 12:42 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-10-08 23:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pinskia at gcc dot gnu dot org  2009-10-08 23:08 -------
Oh -maltivec is even weirder than -m32 as it does not change the ABI (well it
does but not with respect non vector arguments and such) but I should be able
to compile some files with -maltivec and some without.  Note the -maltivec case
shows up in real code already.  Think mpeg players.


-- 


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


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

* [Bug lto/41565] -m32 causes an ICE when the object files were compiled with 64bit
  2009-10-04  6:41 [Bug lto/41565] New: -m32 causes an ICE when the object files were compiled with 64bit pinskia at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2009-10-08 23:08 ` pinskia at gcc dot gnu dot org
@ 2009-10-13 12:42 ` rguenth at gcc dot gnu dot org
  2009-10-13 12:43 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-10-13 12:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from rguenth at gcc dot gnu dot org  2009-10-13 12:42 -------
Subject: Bug 41565

Author: rguenth
Date: Tue Oct 13 12:42:30 2009
New Revision: 152705

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152705
Log:
2009-10-13  Richard Guenther  <rguenther@suse.de>

        PR lto/41565
        * opts.c (handle_option): Split out code to handle setting
        the options flag var ...
        (set_option): ... here.
        * opts.h (set_option): Declare.
        * lto-opts.c (register_user_option_p): Include -fexceptions
        and all position independent code variants.
        (handle_common_option): Remove.
        (lto_reissue_options): Use set_option.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/lto-opts.c
    trunk/gcc/opts.c
    trunk/gcc/opts.h


-- 


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


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

* [Bug lto/41565] -m32 causes an ICE when the object files were compiled with 64bit
  2009-10-04  6:41 [Bug lto/41565] New: -m32 causes an ICE when the object files were compiled with 64bit pinskia at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2009-10-13 12:42 ` rguenth at gcc dot gnu dot org
@ 2009-10-13 12:43 ` rguenth at gcc dot gnu dot org
  2009-10-13 22:36 ` pinskia at gcc dot gnu dot org
  2009-10-13 22:41 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-10-13 12:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from rguenth at gcc dot gnu dot org  2009-10-13 12:43 -------
Still no testcase for the original report.  Target options in general should
be fixed now.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |WAITING


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


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

* [Bug lto/41565] -m32 causes an ICE when the object files were compiled with 64bit
  2009-10-04  6:41 [Bug lto/41565] New: -m32 causes an ICE when the object files were compiled with 64bit pinskia at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2009-10-13 12:43 ` rguenth at gcc dot gnu dot org
@ 2009-10-13 22:36 ` pinskia at gcc dot gnu dot org
  2009-10-13 22:41 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-10-13 22:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from pinskia at gcc dot gnu dot org  2009-10-13 22:35 -------
Oh the ICE only happens for the -m32/-m64 case only when invoking lto1
directly.


-- 


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


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

* [Bug lto/41565] -m32 causes an ICE when the object files were compiled with 64bit
  2009-10-04  6:41 [Bug lto/41565] New: -m32 causes an ICE when the object files were compiled with 64bit pinskia at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2009-10-13 22:36 ` pinskia at gcc dot gnu dot org
@ 2009-10-13 22:41 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-10-13 22:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from pinskia at gcc dot gnu dot org  2009-10-13 22:40 -------
Simple testcase for powerpc64.
int main(void){ return 0; }
--- CUT --
gcc  t.c -flto -c -m64     
/home/apinski/gcc-mainline/libexec/gcc/powerpc64-unknown-linux-gnu/4.5.0/lto1
t.o  -m32

--- CUT ---
I have not tried after the patch though.


-- 


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


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

end of thread, other threads:[~2009-10-13 22:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-04  6:41 [Bug lto/41565] New: -m32 causes an ICE when the object files were compiled with 64bit pinskia at gcc dot gnu dot org
2009-10-04  9:25 ` [Bug lto/41565] " rguenth at gcc dot gnu dot org
2009-10-04  9:54 ` rguenth at gcc dot gnu dot org
2009-10-04  9:58 ` rguenth at gcc dot gnu dot org
2009-10-04 12:17 ` joseph at codesourcery dot com
2009-10-05  9:49 ` rguenth at gcc dot gnu dot org
2009-10-08 23:06 ` pinskia at gcc dot gnu dot org
2009-10-08 23:08 ` pinskia at gcc dot gnu dot org
2009-10-13 12:42 ` rguenth at gcc dot gnu dot org
2009-10-13 12:43 ` rguenth at gcc dot gnu dot org
2009-10-13 22:36 ` pinskia at gcc dot gnu dot org
2009-10-13 22:41 ` 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).