[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-02-03 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #35 from Jakub Jelinek jakub at gcc dot gnu.org 2011-02-03 
10:49:09 UTC ---
Author: jakub
Date: Thu Feb  3 10:49:06 2011
New Revision: 169785

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169785
Log:
PR lto/47274
* lto-streamer-out.c (write_symbol): When writing kind and visibility,
copy them into a unsigned char variable and pass address of it to
lto_output_data_stream.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/lto-streamer-out.c


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-02-03 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #36 from Jakub Jelinek jakub at gcc dot gnu.org 2011-02-03 
10:58:56 UTC ---
I guess the remaining two places could use sizeof, but the question is whether
we can portably use uint32_t in lto-streamer-out.c (lto-plugin uses it, but
nothing in gcc/*).  So perhaps it could use unsigned int instead of uint32_t
for the slot no (or int).
And lto-plugin
  memcpy (entry-size, p, sizeof (uint64_t));
  p += 8;

  memcpy (aux-slot, p, sizeof (uint32_t));
  p += 4;
could increment by the sizeof too.  Anyway, I'm not aware of any sizeof (int)
!= 4 host gcc would support, so I consider this bug fixed.


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-02-02 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #31 from Jakub Jelinek jakub at gcc dot gnu.org 2011-02-02 
16:07:14 UTC ---
Created attachment 23217
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=23217
gcc46-pr47274.patch

I think it is fairly obvious where the bug is (though haven't tried to
reproduce it).  Passing address of a 32-bit enum variable and outputting from
it the first byte obviously will DTRT only on little endian hosts.


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-02-02 Thread sch...@linux-m68k.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #32 from Andreas Schwab sch...@linux-m68k.org 2011-02-02 16:42:05 
UTC ---
Similar (dormant) problem with slot_num.


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-02-02 Thread sch...@linux-m68k.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #33 from Andreas Schwab sch...@linux-m68k.org 2011-02-02 16:47:54 
UTC ---
All other calls to lto_output_data_stream use sizeof, so this should probably
do as well.


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-02-02 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #34 from Jakub Jelinek jakub at gcc dot gnu.org 2011-02-02 
16:57:26 UTC ---
Isn't the format of that section mandated by lto-plugin though?


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-02-01 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #29 from Jan Hubicka hubicka at ucw dot cz 2011-02-01 18:17:36 
UTC ---
 And here are the IR symtabs (I built a cross GCC just far enough to get the
 liblto_plugin):
 
 $ ./obj/binutils/.libs/nm-new.exe --plugin 
 ./obj-xgcc/lto-plugin/.libs/cyglto_p
 lugin-0.dll *.o
 
 abs-1-lib.o:
  T abs
  T abs_called
  T inside_main
 
 abs-1.o:
  T abs
  T abs_called
  T main_test
 
 main.o:
  T inside_main
  T main
  T main_test
 

Hmm, this seems like some very lowlevel bug in the streaming (endianity issue
or so) since they way
visibilities are derrived is actually quite target independent.  I will look
into it day after tomorrow
unless somebody beats me.

Thanks,
Honza


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-02-01 Thread davek at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #30 from Dave Korn davek at gcc dot gnu.org 2011-02-01 19:17:04 
UTC ---
*** Bug 47287 has been marked as a duplicate of this bug. ***


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-31 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

Jan Hubicka hubicka at gcc dot gnu.org changed:

   What|Removed |Added

 CC||dave.korn.cygwin at gmail
   ||dot com

--- Comment #21 from Jan Hubicka hubicka at gcc dot gnu.org 2011-01-31 
17:07:35 UTC ---
Thanks.  Looking at compilation time callgraphs, they are all as expected.
At link time however, the resolution info seems however all wrong.
That results in wrong merging. Not only for vars, but also for functions:

main_test/7(-1) @0x4045f5b0 (asm: main_test) prevailing_def_ironly
  called by: main/6 (1.00 per call) 
  calls: 
  References: 
  Refering this function:

main_test/0(-1) @0x4045f000 (asm: main_test) analyzed 19 time, 12 benefit 13
size, 4 benefit externally_visible finalized inlinable
  called by: 
  calls: abort/1 abort/1 abs/2 (1.00 per call) 
  References:  var:abs_called (read)
  Refering this function: 

The first node is main_test comming from main.c, the second is one comming from
abd-1.c defining the function.

The problem is that first one is defined as prevailing_def_ironly while it is
not an definition, just use of the symbol. Correct would be to have
PREVAILING_DEF_IRONLY on the second and PREEMTED_IR on the first. 
We probably should add sanity check that functions with PREVAILING_DEFs are
always analyzed and vars finalized.

As observer by Richard, it comes from resolution file already:
abs-1.o 3
70 262910e5 PREEMPTED_IR main_test
main.o 3
76 e5772d37 PREVAILING_DEF_IRONLY main_test
should be the other way around

I am quite convinced that we are seeing GNU LD bug and adding Dave Korn to CC
thus. 

The other alternative would be that lto symbol table is output incorrectly at
compilation time. You might try to experiment with NM's plugin support to try
to dump LTO symbol table of main.o. I never tried it myself as I never really
needed to dump LTO symbol table, but it should be supported now.

But given that the code in write_symbol is quite straighforward:
  if (DECL_EXTERNAL (t))
{ 
  if (DECL_WEAK (t))
kind = GCCPK_WEAKUNDEF;
  else
kind = GCCPK_UNDEF;
}
  else
{ 
  if (DECL_WEAK (t))
kind = GCCPK_WEAKDEF;
  else if (DECL_COMMON (t))
kind = GCCPK_COMMON;
  else
kind = GCCPK_DEF;

  /* When something is defined, it should have node attached.  */
  gcc_assert (alias || TREE_CODE (t) != VAR_DECL
  || varpool_get_node (t)-finalized);
  gcc_assert (alias || TREE_CODE (t) != FUNCTION_DECL
  || (cgraph_get_node (t)
   cgraph_get_node (t)-analyzed));
}
(kind should be GCCPK_UNDEF for main_test in main.o)
I would not expect bug to be on symbol streaming side.


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-31 Thread davek at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

Dave Korn davek at gcc dot gnu.org changed:

   What|Removed |Added

 CC||davek at gcc dot gnu.org

--- Comment #22 from Dave Korn davek at gcc dot gnu.org 2011-01-31 17:22:55 
UTC ---
(In reply to comment #21)

 The problem is that first one is defined as prevailing_def_ironly while it is
 not an definition, just use of the symbol. Correct would be to have
 PREVAILING_DEF_IRONLY on the second and PREEMTED_IR on the first. 
 We probably should add sanity check that functions with PREVAILING_DEFs are
 always analyzed and vars finalized.
 
 As observer by Richard, it comes from resolution file already:
 abs-1.o 3
 70 262910e5 PREEMPTED_IR main_test
 main.o 3
 76 e5772d37 PREVAILING_DEF_IRONLY main_test
 should be the other way around
 
 I am quite convinced that we are seeing GNU LD bug and adding Dave Korn to CC
 thus. 

  Looking into it.


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-31 Thread davek at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #23 from Dave Korn davek at gcc dot gnu.org 2011-01-31 18:53:30 
UTC ---
(In reply to comment #21)

 The problem is that first one is defined as prevailing_def_ironly while it is
 not an definition, just use of the symbol. Correct would be to have
 PREVAILING_DEF_IRONLY on the second and PREEMTED_IR on the first. 
 We probably should add sanity check that functions with PREVAILING_DEFs are
 always analyzed and vars finalized.
 
 As observer by Richard, it comes from resolution file already:
 abs-1.o 3
 70 262910e5 PREEMPTED_IR main_test
 main.o 3
 76 e5772d37 PREVAILING_DEF_IRONLY main_test
 should be the other way around

  Why would you expect to see PREEMPTED_IR?  There is only one definition of
main_test; I would expect RESOLVED_IR.  Rather than swapped, aren't they just
plain wrong?

 I am quite convinced that we are seeing GNU LD bug and adding Dave Korn to CC
 thus. 

  I also think you must be seeing a bug in LD, but haven't reproduced it yet;
on both x86_64-linux and i686-cygwin I get the same correct resolution file:

davek@gcc10:~/binutils/obj-gcc/gcc/pr47274$ cat *.res
3
abs-1.o 2
79 7d1d28a3 PREVAILING_DEF_IRONLY main_test
93 7d1d28a3 PREVAILING_DEF_IRONLY abs_called
abs-1-lib.o 2
110 4db0e4c5 RESOLVED_IR inside_main
112 4db0e4c5 RESOLVED_IR abs_called
main.o 4
79 8cf841f3 PREVAILING_DEF main
85 8cf841f3 PREVAILING_DEF_IRONLY link_error
89 8cf841f3 RESOLVED_IR main_test
99 8cf841f3 PREVAILING_DEF_IRONLY inside_main

  What endian-ness are the ppc and hppa targets?


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-31 Thread dave at hiauly1 dot hia.nrc.ca
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #24 from dave at hiauly1 dot hia.nrc.ca 2011-01-31 19:35:15 UTC ---
   What endian-ness are the ppc and hppa targets?

hppa is big.  I believe ppc is also big.

Dave


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-31 Thread davek at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #25 from Dave Korn davek at gcc dot gnu.org 2011-01-31 19:40:52 
UTC ---
(In reply to comment #24)
What endian-ness are the ppc and hppa targets?
 
 hppa is big.  I believe ppc is also big.
 
 Dave

  Probably the first time this code has been tested on a big endian machine. 
Maybe some field's being read wrong out of the symbols or something.

  If one of you could try the whole thing with --save-temps -v -Wl,-v
-Wl,--verbose, and attach the various .o and @ arg files (some of which still
get left in /tmp) and the log of the build output, I may be able to run far
enough through the link with just a cross binutils to get to the symbol
resolution stage and debug it.


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-31 Thread dave at hiauly1 dot hia.nrc.ca
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #26 from dave at hiauly1 dot hia.nrc.ca 2011-02-01 00:27:21 UTC ---
On Mon, 31 Jan 2011, davek at gcc dot gnu.org wrote:

   If one of you could try the whole thing with --save-temps -v -Wl,-v
 -Wl,--verbose, and attach the various .o and @ arg files (some of which still
 get left in /tmp) and the log of the build output, I may be able to run far
 enough through the link with just a cross binutils to get to the symbol
 resolution stage and debug it.

Attached.

Dave


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-31 Thread dave at hiauly1 dot hia.nrc.ca
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #27 from dave at hiauly1 dot hia.nrc.ca 2011-02-01 00:37:22 UTC ---
On Mon, 31 Jan 2011, davek at gcc dot gnu.org wrote:

   If one of you could try the whole thing with --save-temps -v -Wl,-v
 -Wl,--verbose, and attach the various .o and @ arg files (some of which still
 get left in /tmp) and the log of the build output, I may be able to run far
 enough through the link with just a cross binutils to get to the symbol
 resolution stage and debug it.

Oh, I just remembered that ld/12402 was probably introduced by the
change that introduced plugin support for ld.

Dave


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-31 Thread davek at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #28 from Dave Korn davek at gcc dot gnu.org 2011-02-01 06:59:58 
UTC ---
It looks like the problem is much earlier than the linker; it looks like the IR
symtabs in the input object files are being generated incorrectly.  Here are
the real symbol tables:

$ ./obj/binutils/.libs/nm-new.exe *.o

abs-1-lib.o:
0001 C __gnu_lto_v1
 U abort
 T abs
 U abs_called
 U inside_main
0024 T labs

abs-1.o:
0001 C __gnu_lto_v1
 U abort
 U abs
 B abs_called
 T main_test

main.o:
0001 C __gnu_lto_v1
0004 C inside_main
 T main
 U main_test


And here are the IR symtabs (I built a cross GCC just far enough to get the
liblto_plugin):

$ ./obj/binutils/.libs/nm-new.exe --plugin ./obj-xgcc/lto-plugin/.libs/cyglto_p
lugin-0.dll *.o

abs-1-lib.o:
 T abs
 T abs_called
 T inside_main

abs-1.o:
 T abs
 T abs_called
 T main_test

main.o:
 T inside_main
 T main
 T main_test

To confirm that the symtabs really are wrong in the object files, rather than
that the plugin is misreading them, here's a binary dump from one:

$ ./obj/binutils/.libs/objdump.exe -h abs-1-lib.o

abs-1-lib.o: file format elf32-hppa-linux

Sections:
Idx Name  Size  VMA   LMA   File off  Algn
  0 .text 0058      0034  2**2
  CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
  1 .data       008c  2**0
  CONTENTS, ALLOC, LOAD, DATA
  2 .bss        008c  2**0
  ALLOC
  3 .gnu.lto_.jmpfuncs.29f392e1 0019      008c  2**0
  CONTENTS, READONLY, EXCLUDE
  4 .gnu.lto_.pureconst.29f392e1 0016      00a5  2**0
  CONTENTS, READONLY, EXCLUDE
  5 .gnu.lto_abs.29f392e1 0192      00bb  2**0
  CONTENTS, READONLY, EXCLUDE
  6 .gnu.lto_labs.29f392e1 0189      024d  2**0
  CONTENTS, READONLY, EXCLUDE
  7 .gnu.lto_.cgraph.29f392e1 003c      03d6  2**0
  CONTENTS, READONLY, EXCLUDE
  8 .gnu.lto_.vars.29f392e1 0018      0412  2**0
  CONTENTS, READONLY, EXCLUDE
  9 .gnu.lto_.refs.29f392e1 001b      042a  2**0
  CONTENTS, READONLY, EXCLUDE
 10 .gnu.lto_.statics.29f392e1 0014      0445  2**0
  CONTENTS, READONLY, EXCLUDE
 11 .gnu.lto_.decls.29f392e1 02ab      0459  2**0
  CONTENTS, READONLY, EXCLUDE
 12 .gnu.lto_.symtab.29f392e1 0048      0704  2**0
  CONTENTS, READONLY, EXCLUDE
 13 .gnu.lto_.opts 0012      074c  2**0
  CONTENTS, READONLY, EXCLUDE
 14 .PARISC.unwind 0020      0760  2**2
  CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
 15 .comment  0042      0780  2**0
  CONTENTS, READONLY

$ ./obj/binutils/.libs/objcopy.exe -j .gnu.lto_.symtab.29f392e1 abs-1-lib.o sym
s-abs-1-lib.o

$ ./obj/binutils/.libs/objdump.exe -s syms-abs-1-lib.o

syms-abs-1-lib.o: file format elf32-hppa-linux

Contents of section .gnu.lto_.symtab.29f392e1:
  61627300     abs.
 0010 4669 6e736964 655f6d61 696e  ..Finside_main..
 0020    00656162  .eab
 0030 735f6361 6c6c6564    s_called
 0040  0067...g

  The format of the IR symtab entries is: 
(variable-length) NUL-terminated name
(variable-length) NUL-terminated comdat group
(1 byte) symbol kind from LDPK_ enumeration
(1 byte) symbol visibility from LDPV_ enumeration
(8 bytes) 64-bit symbol size
(4 bytes) 32-bits symbol aux info.

  As you can see, this symtab claims that abs-1-lib.o defines inside_main

  61627300     abs.
 0010 4669 6e736964 655f6d61 696e  ..Finside_main..
\/ \/\/\/\/ \/\/\/\/ \/\/\/\/
name++ +
comdat-+
 0020    00656162  .eab
  \/\/
kind--+ +   0 = LDPK_DEF
vis-+   0 = LDPV_DEFAULT
 0030 735f6361 6c6c6564    s_called
 0040  0067...g


So the problem is that the object files are being written incorrectly in the
first place, I think.  Indeed, the contents of abs-1-lib.s look that way:

.section.gnu.lto_.symtab.29f392e1,,@progbits
.stringzabs
.stringz
.stringz
.stringz
.stringz
.stringz
.stringz

[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-27 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #17 from Jan Hubicka hubicka at gcc dot gnu.org 2011-01-27 
15:51:54 UTC ---
You uploaded the cgraph files from local compilation.main_test is not called in
abs-1.c

I need to see the dump from merging, too.
They gets name of one of the .o files when -save-temps is used.
I.e.
./xgcc -B ./ -O2 abs-1-lib.c abs-1.c m.c -fdump-ipa-cgraph -save-temps -flto
gets me the dump in abs-1-lib.o.000i.cgraph

Honza


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-27 Thread dave at hiauly1 dot hia.nrc.ca
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #18 from dave at hiauly1 dot hia.nrc.ca 2011-01-27 17:07:34 UTC ---
On Thu, 27 Jan 2011, hubicka at gcc dot gnu.org wrote:

 I need to see the dump from merging, too.
 They gets name of one of the .o files when -save-temps is used.
 I.e.
 ./xgcc -B ./ -O2 abs-1-lib.c abs-1.c m.c -fdump-ipa-cgraph -save-temps -flto
 gets me the dump in abs-1-lib.o.000i.cgraph

It seems the ICE occurs before the merge files are generated:

Reading specs from /home2/dave/gcc-4.6/objdir/gcc/specs
COLLECT_GCC=/home2/dave/gcc-4.6/objdir/gcc/xgcc
COLLECT_LTO_WRAPPER=/home2/dave/gcc-4.6/objdir/gcc/lto-wrapper
Target: hppa-linux
Configured with: ../gcc/configure --with-gnu-as --with-gnu-ld --enable-shared
--enable-nls --prefix=/home2/dave/opt/gnu/gcc/gcc-4.6.0
--with-local-prefix=/home2/dave/opt/gnu --enable-threads=posix
--enable-__cxa_atexit --build=hppa-linux --enable-clocale=gnu
--enable-java-gc=boehm --enable-java-awt=xlib
--enable-languages=c,c++,objc,fortran,obj-c++,java,ada
Thread model: posix
gcc version 4.6.0 20110126 (experimental) [trunk revision 169296] (GCC) 
COLLECT_GCC_OPTIONS='-B' '/home2/dave/gcc-4.6/objdir/gcc/' '-w' '-O2' '-flto'
'-fno-builtin-abs' '-o' '/home2/dave/gcc-4.6/objdir/gcc/testsuite/gcc/abs-1.x7'
'-fdump-ipa-cgraph' '-save-temps' '-v'
 /home2/dave/gcc-4.6/objdir/gcc/cc1 -E -quiet -v -iprefix
/home2/dave/gcc-4.6/objdir/gcc/../lib/gcc/hppa-linux/4.6.0/ -isystem
/home2/dave/gcc-4.6/objdir/gcc/include -isystem
/home2/dave/gcc-4.6/objdir/gcc/include-fixed
/home2/dave/gcc-4.6/gcc/gcc/testsuite/gcc.c-torture/execute/builtins/abs-1.c -w
-flto -fno-builtin-abs -fdump-ipa-cgraph -O2 -fpch-preprocess -o abs-1.i
ignoring nonexistent directory
/home2/dave/gcc-4.6/objdir/gcc/../lib/gcc/hppa-linux/4.6.0/include
ignoring nonexistent directory
/home2/dave/gcc-4.6/objdir/gcc/../lib/gcc/hppa-linux/4.6.0/include-fixed
ignoring nonexistent directory
/home2/dave/gcc-4.6/objdir/gcc/../lib/gcc/hppa-linux/4.6.0/../../../../hppa-linux/include
ignoring nonexistent directory
/home2/dave/gcc-4.6/objdir/gcc/../lib/gcc/../../lib/gcc/hppa-linux/4.6.0/include
ignoring nonexistent directory
/home2/dave/gcc-4.6/objdir/gcc/../lib/gcc/../../include
ignoring nonexistent directory
/home2/dave/gcc-4.6/objdir/gcc/../lib/gcc/../../lib/gcc/hppa-linux/4.6.0/include-fixed
ignoring nonexistent directory
/home2/dave/gcc-4.6/objdir/gcc/../lib/gcc/../../lib/gcc/hppa-linux/4.6.0/../../../../hppa-linux/include
#include ... search starts here:
#include ... search starts here:
 /home2/dave/gcc-4.6/objdir/gcc/include
 /home2/dave/gcc-4.6/objdir/gcc/include-fixed
 /home2/dave/opt/gnu/include
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-B' '/home2/dave/gcc-4.6/objdir/gcc/' '-w' '-O2' '-flto'
'-fno-builtin-abs' '-o' '/home2/dave/gcc-4.6/objdir/gcc/testsuite/gcc/abs-1.x7'
'-fdump-ipa-cgraph' '-save-temps' '-v'
 /home2/dave/gcc-4.6/objdir/gcc/cc1 -fpreprocessed abs-1.i -quiet -dumpbase
abs-1.c -auxbase abs-1 -O2 -w -version -flto -fno-builtin-abs -fdump-ipa-cgraph
-o abs-1.s
GNU C (GCC) version 4.6.0 20110126 (experimental) [trunk revision 169296]
(hppa-linux)
compiled by GNU C version 4.6.0 20110126 (experimental) [trunk revision
169296], GMP version 4.3.2, MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C (GCC) version 4.6.0 20110126 (experimental) [trunk revision 169296]
(hppa-linux)
compiled by GNU C version 4.6.0 20110126 (experimental) [trunk revision
169296], GMP version 4.3.2, MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 394c56f917a1cdcda6b767bcbf6fcebb
COLLECT_GCC_OPTIONS='-B' '/home2/dave/gcc-4.6/objdir/gcc/' '-w' '-O2' '-flto'
'-fno-builtin-abs' '-o' '/home2/dave/gcc-4.6/objdir/gcc/testsuite/gcc/abs-1.x7'
'-fdump-ipa-cgraph' '-save-temps' '-v'
 /home2/dave/gcc-4.6/objdir/gcc/as -v -W -o abs-1.o abs-1.s
GNU assembler version 2.21.51 (hppa-unknown-linux-gnu) using BFD version (GNU
Binutils) 2.21.51.20110116
COLLECT_GCC_OPTIONS='-B' '/home2/dave/gcc-4.6/objdir/gcc/' '-w' '-O2' '-flto'
'-fno-builtin-abs' '-o' '/home2/dave/gcc-4.6/objdir/gcc/testsuite/gcc/abs-1.x7'
'-fdump-ipa-cgraph' '-save-temps' '-v'
 /home2/dave/gcc-4.6/objdir/gcc/cc1 -E -quiet -v -iprefix
/home2/dave/gcc-4.6/objdir/gcc/../lib/gcc/hppa-linux/4.6.0/ -isystem
/home2/dave/gcc-4.6/objdir/gcc/include -isystem
/home2/dave/gcc-4.6/objdir/gcc/include-fixed
/home2/dave/gcc-4.6/gcc/gcc/testsuite/gcc.c-torture/execute/builtins/abs-1-lib.c
-w -flto -fno-builtin-abs -fdump-ipa-cgraph -O2 -fpch-preprocess -o abs-1-lib.i
ignoring nonexistent directory
/home2/dave/gcc-4.6/objdir/gcc/../lib/gcc/hppa-linux/4.6.0/include
ignoring nonexistent directory
/home2/dave/gcc-4.6/objdir/gcc/../lib/gcc/hppa-linux/4.6.0/include-fixed
ignoring nonexistent directory
/home2/dave/gcc-4.6/objdir/gcc/../lib/gcc/hppa-linux/4.6.0/../../../../hppa-linux/include
ignoring 

Re: [Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-27 Thread Jan Hubicka
 lto1: internal compiler error: in lto_varpool_replace_node, at 
 lto-symtab.c:305

Merging should happen after unmerged files are dumped.  Perhaps they go to some 
funny place,
like /tmp?

Honza


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-27 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #19 from Jan Hubicka hubicka at ucw dot cz 2011-01-27 17:16:31 
UTC ---
 lto1: internal compiler error: in lto_varpool_replace_node, at 
 lto-symtab.c:305

Merging should happen after unmerged files are dumped.  Perhaps they go to some
funny place,
like /tmp?

Honza


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-27 Thread dave at hiauly1 dot hia.nrc.ca
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #20 from dave at hiauly1 dot hia.nrc.ca 2011-01-27 18:06:02 UTC ---
On Thu, 27 Jan 2011, hubicka at ucw dot cz wrote:

 Merging should happen after unmerged files are dumped.  Perhaps they go to 
 some
 funny place,
 like /tmp?

They are not in /tmp.  There is one other cgraph file which I attach.

Dave


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-20 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P2
 CC||jakub at gcc dot gnu.org


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-19 Thread dave at hiauly1 dot hia.nrc.ca
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #16 from dave at hiauly1 dot hia.nrc.ca 2011-01-20 00:13:36 UTC ---
On Tue, 18 Jan 2011, dave at hiauly1 dot hia.nrc.ca wrote:

 Here is abs-1.c.000i.cgraph:

The above call graph indicates main_test is not called.  Here is
main.c.000i.cgraph.  It also seems wrong...


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-17 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #6 from Richard Guenther rguenth at gcc dot gnu.org 2011-01-17 
13:49:47 UTC ---
I can't reproduce this with the testcase from comment #3 on x86_64-linux
with either gold or GNU ld from stock binutils 2.21 nor without using
the linker plugin.

The only call to lto_varpool_replace_node sees

Breakpoint 5, lto_varpool_replace_node (vnode=0x75d041a0, 
prevailing_node=0x75d040d0)
at /space/rguenther/src/svn/trunk/gcc/lto-symtab.c:304
304   if (vnode-needed)
(gdb) n
306   gcc_assert (!vnode-analyzed || prevailing_node-analyzed);
(gdb) p vnode-analyzed
$1 = 0
(gdb) p prevailing_node-analyzed
$2 = 1

Note that the assert probably should do , not ||.  Or it doesn't
make sense at all.  Asserting that the prevailing_node is analyzed
should be enough.

Honza?

People, you have to show us what goes wrong for you.


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-17 Thread danglin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #7 from John David Anglin danglin at gcc dot gnu.org 2011-01-17 
15:42:26 UTC ---
Resolution file is:

3
abs-1.o 3
70 262910e5 PREEMPTED_IR main_test
84 262910e5 PREEMPTED_IR abs
88 262910e5 PREEMPTED_IR abs_called
abs-1-lib.o 3
70 b13b015b PREVAILING_DEF_IRONLY abs
101 b13b015b PREEMPTED_IR inside_main
103 b13b015b PREVAILING_DEF_IRONLY abs_called
main.o 3
70 e5772d37 PREVAILING_DEF main
76 e5772d37 PREVAILING_DEF_IRONLY main_test
79 e5772d37 PREVAILING_DEF_IRONLY inside_main

/tmp/ccJGcG05.lto.o is empty:
dave@gsyprf11:~/gcc-4.6/objdir/gcc/testsuite/gcc$ ls -l /tmp/ccJGcG05.lto.o
-rw--- 1 dave users 0 Jan 17 07:20 /tmp/ccJGcG05.lto.o

Assert fails at this point:

Breakpoint 1, lto_varpool_replace_node (prevailing_node=0x404591c0,
vnode=0x40459150) at ../../gcc/gcc/lto-symtab.c:306
306   gcc_assert (!vnode-analyzed || prevailing_node-analyzed);
(gdb) p vnode-analyzed
$7 = 1
(gdb) p prevailing_node-analyzed
$8 = 0
(gdb) p *vnode
$9 = {decl = 0x4045a480, next = 0x0, prev = 0x404591c0,
  next_needed = 0x404591f8, prev_needed = 0x0, extra_name = 0x0,
  same_comdat_group = 0x0, ref_list = {references = 0x0, refering = 0xc652e0},
  lto_file_data = 0x4045b000, aux = 0x0, order = 3, resolution = LDPR_UNKNOWN,
  needed = 1, force_output = 0, analyzed = 1, finalized = 1, output = 0,
  externally_visible = 1, alias = 0, used_from_other_partition = 0,
  in_other_partition = 0}
(gdb) p *prevailing_node
$10 = {decl = 0x4045a780, next = 0x40459150, prev = 0x404591f8,
  next_needed = 0x0, prev_needed = 0x0, extra_name = 0x0,
  same_comdat_group = 0x0, ref_list = {references = 0x0, refering = 0xc65be8},
  lto_file_data = 0x4045b0a0, aux = 0x0, order = 8,
  resolution = LDPR_PREVAILING_DEF_IRONLY, needed = 1, force_output = 0,
  analyzed = 0, finalized = 0, output = 0, externally_visible = 0, alias = 0,
  used_from_other_partition = 0, in_other_partition = 0}
(gdb) p debug_tree (vnode-decl)
 var_decl 0x4045a480 abs_called
type integer_type 0x403fc2a0 int public SI
size integer_cst 0x403f1270 constant 32
unit size integer_cst 0x403f10a8 constant 4
align 32 symtab 0 alias set -1 structural equality precision 32 min
integer_cst 0x403f1228 -2147483648 max integer_cst 0x403f1240 2147483647
pointer_to_this pointer_type 0x403fcb40
used public static SI file
/home2/dave/gcc-4.6/gcc/gcc/testsuite/gcc.c-torture/execute/builtins/abs-1.c
line 7 col 5 size integer_cst 0x403f1270 32 unit size integer_cst 0x403f10a8
4
align 32 context translation_unit_decl 0x40404700 D.1190 initial
integer_cst 0x403f1528 0
(mem/c/i:SI (symbol_ref:SI (abs_called) [flags 0x2] var_decl 0x4045a480
abs_called) [0 abs_called+0 S4 A32])
$11 = void
(gdb) p debug_tree (prevailing_node-decl)
 var_decl 0x4045a780 abs_called
type integer_type 0x403fc2a0 int public SI
size integer_cst 0x403f1270 constant 32
unit size integer_cst 0x403f10a8 constant 4
align 32 symtab 0 alias set -1 structural equality precision 32 min
integer_cst 0x403f1228 -2147483648 max integer_cst 0x403f1240 2147483647
pointer_to_this pointer_type 0x403fcb40
used public external common SI file
/home2/dave/gcc-4.6/gcc/gcc/testsuite/gcc.c-torture/execute/builtins/abs-1-lib.c
line 2 col 12 size integer_cst 0x403f1270 32 unit size integer_cst
0x403f10a8 4
align 32 context translation_unit_decl 0x40404770 D.1196
$12 = void


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-17 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #8 from Jan Hubicka hubicka at ucw dot cz 2011-01-17 16:03:37 UTC 
---
 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274
 
 --- Comment #7 from John David Anglin danglin at gcc dot gnu.org 2011-01-17 
 15:42:26 UTC ---
 Resolution file is:
 
 3
 abs-1.o 3
 70 262910e5 PREEMPTED_IR main_test
 84 262910e5 PREEMPTED_IR abs
 88 262910e5 PREEMPTED_IR abs_called
 abs-1-lib.o 3
 70 b13b015b PREVAILING_DEF_IRONLY abs
 101 b13b015b PREEMPTED_IR inside_main
 103 b13b015b PREVAILING_DEF_IRONLY abs_called
 main.o 3
 70 e5772d37 PREVAILING_DEF main
 76 e5772d37 PREVAILING_DEF_IRONLY main_test
 79 e5772d37 PREVAILING_DEF_IRONLY inside_main
 
 /tmp/ccJGcG05.lto.o is empty:
 dave@gsyprf11:~/gcc-4.6/objdir/gcc/testsuite/gcc$ ls -l /tmp/ccJGcG05.lto.o
 -rw--- 1 dave users 0 Jan 17 07:20 /tmp/ccJGcG05.lto.o
 
 Assert fails at this point:
 
 Breakpoint 1, lto_varpool_replace_node (prevailing_node=0x404591c0,
 vnode=0x40459150) at ../../gcc/gcc/lto-symtab.c:306
 306   gcc_assert (!vnode-analyzed || prevailing_node-analyzed);
 (gdb) p vnode-analyzed
 $7 = 1
 (gdb) p prevailing_node-analyzed
 $8 = 0

We need to debug how the defined node ends up to be unanalyzed.
I assume it is abs_called variable?
It seems that we get wrong already when streaming abs-1-lib.o file.  Would be
possible to attach cgraph dump from WPA?

Honza


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-17 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #9 from Jan Hubicka hubicka at ucw dot cz 2011-01-17 16:05:56 UTC 
---
 Note that the assert probably should do , not ||.  Or it doesn't
 make sense at all.  Asserting that the prevailing_node is analyzed
 should be enough.
No, the assert basically test that when node is analyzed prevailing_node must
be analyzed, too.  So the test tests the implication, not conjunction.

It is possible that we merge two unanalyzed nodes (such as aliases).

Honza


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-17 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #10 from Richard Guenther rguenth at gcc dot gnu.org 2011-01-17 
16:14:21 UTC ---
The GNU linker made

extern int abs_called;

prevailing (it's a common, probably works with -fno-common?) instead of

int abs_called = 0;

thus I think this is a bug in the GNU linker (we remove the zero initializer
I think, so maybe out LTO symtab we create is slightly odd).


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-17 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #11 from Richard Guenther rguenth at gcc dot gnu.org 2011-01-17 
16:15:10 UTC ---
(In reply to comment #10)
 The GNU linker made
 
 extern int abs_called;
 
 prevailing (it's a common, probably works with -fno-common?) instead of
 
 int abs_called = 0;
 
 thus I think this is a bug in the GNU linker (we remove the zero initializer
 I think, so maybe out LTO symtab we create is slightly odd).

Which means you can also try -fno-zero-initialized-in-bss


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-17 Thread dave at hiauly1 dot hia.nrc.ca
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #12 from dave at hiauly1 dot hia.nrc.ca 2011-01-17 18:32:22 UTC ---
On Mon, 17 Jan 2011, hubicka at ucw dot cz wrote:

 It seems that we get wrong already when streaming abs-1-lib.o file.  Would be
 possible to attach cgraph dump from WPA?

Is this what you wanted?

Dave


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-17 Thread dave at hiauly1 dot hia.nrc.ca
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #13 from dave at hiauly1 dot hia.nrc.ca 2011-01-17 18:39:14 UTC ---
Last graph.


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-17 Thread dave at hiauly1 dot hia.nrc.ca
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #14 from dave at hiauly1 dot hia.nrc.ca 2011-01-18 00:10:55 UTC ---
This is it!

Dave


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-17 Thread dave at hiauly1 dot hia.nrc.ca
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #15 from dave at hiauly1 dot hia.nrc.ca 2011-01-18 00:21:42 UTC ---
Here is abs-1.c.000i.cgraph:


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-15 Thread sch...@linux-m68k.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

Andreas Schwab sch...@linux-m68k.org changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu.org

--- Comment #5 from Andreas Schwab sch...@linux-m68k.org 2011-01-15 22:44:11 
UTC ---
lto_varpool_replace_node has been broken since it was added in r158854.


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-14 Thread anton at samba dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #3 from Anton Blanchard anton at samba dot org 2011-01-15 
02:04:04 UTC ---
I'm seeing this too:

# cat test1.c
void *ptr;

# cat test2.c
extern void *ptr;
void foo()
{
ptr = 0;
}

# gcc -flto -c test1.c
# gcc -flto -c test2.c 
# gcc -flto test1.o test2.o

lto1: internal compiler error: in lto_varpool_replace_node, at lto-symtab.c:306
Please submit a full bug report

-v output:

Using built-in specs.
COLLECT_GCC=/root/gcc-installed/bin/gcc
COLLECT_LTO_WRAPPER=/root/gcc-installed/libexec/gcc/powerpc64-linux/4.6.0/lto-wrapper
Target: powerpc64-linux
Configured with: ../gcc/configure --build=powerpc64-linux
--enable-targets=powerpc64-linux --prefix=/root/gcc-installed --disable-nls
--with-gmp=/root/gcc-installed --with-mpfr=/root/gcc-installed
--with-libelf=/root/gcc-installed --with-cloog=/root/gcc-installed
--with-ppl=/root/gcc-installed --disable-werror
--with-ld=/root/gcc-installed/bin/ld --with-as=/root/gcc-installed/bin/as
--enable-languages=c,c++,fortran --enable-lto : (reconfigured) ../gcc/configure
--build=powerpc64-linux --enable-targets=powerpc64-linux
--prefix=/root/gcc-installed --disable-nls --with-gmp=/root/gcc-installed
--with-mpfr=/root/gcc-installed --with-libelf=/root/gcc-installed
--with-cloog=/root/gcc-installed --with-ppl=/root/gcc-installed
--disable-werror --with-ld=/root/gcc-installed/bin/ld
--with-as=/root/gcc-installed/bin/as --enable-lto build_alias=powerpc64-linux
--enable-languages=c,c++,fortran,lto --no-create --no-recursion
Thread model: posix
gcc version 4.6.0 20110114 (experimental) (GCC) 
COMPILER_PATH=/root/gcc-installed/libexec/gcc/powerpc64-linux/4.6.0/:/root/gcc-installed/libexec/gcc/powerpc64-linux/4.6.0/:/root/gcc-installed/libexec/gcc/powerpc64-linux/:/root/gcc-installed/lib/gcc/powerpc64-linux/4.6.0/:/root/gcc-installed/lib/gcc/powerpc64-linux/:/root/gcc-installed/lib/gcc/powerpc64-linux/4.6.0/../../../../powerpc64-linux/bin/
LIBRARY_PATH=/root/gcc-installed/lib/gcc/powerpc64-linux/4.6.0/:/root/gcc-installed/lib/gcc/powerpc64-linux/4.6.0/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/root/gcc-installed/lib/gcc/powerpc64-linux/4.6.0/../../../../powerpc64-linux/lib/:/root/gcc-installed/lib/gcc/powerpc64-linux/4.6.0/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-flto'
 /root/gcc-installed/libexec/gcc/powerpc64-linux/4.6.0/collect2 -plugin
/root/gcc-installed/libexec/gcc/powerpc64-linux/4.6.0/liblto_plugin.so
-plugin-opt=/root/gcc-installed/libexec/gcc/powerpc64-linux/4.6.0/lto-wrapper
-plugin-opt=-fresolution=/tmp/ccSsas7e.res -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -flto
--eh-frame-hdr -V -Qy -m elf64ppc -dynamic-linker /lib64/ld64.so.1
/usr/lib/../lib64/crt1.o /usr/lib/../lib64/crti.o
/root/gcc-installed/lib/gcc/powerpc64-linux/4.6.0/crtbegin.o
-L/root/gcc-installed/lib/gcc/powerpc64-linux/4.6.0
-L/root/gcc-installed/lib/gcc/powerpc64-linux/4.6.0/../../../../lib64
-L/lib/../lib64 -L/usr/lib/../lib64
-L/root/gcc-installed/lib/gcc/powerpc64-linux/4.6.0/../../../../powerpc64-linux/lib
-L/root/gcc-installed/lib/gcc/powerpc64-linux/4.6.0/../../.. test1.o test2.o
-lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s
--no-as-needed /root/gcc-installed/lib/gcc/powerpc64-linux/4.6.0/crtend.o
/usr/lib/../lib64/crtn.o
GNU ld (GNU Binutils) 2.21.51.20110113
  Supported emulations:
   elf64ppc
   elf32ppclinux
   elf32ppc
   elf32ppcsim
 /root/gcc-installed/bin/gcc @/tmp/ccgYtfeo.args
Using built-in specs.
COLLECT_GCC=/root/gcc-installed/bin/gcc
COLLECT_LTO_WRAPPER=/root/gcc-installed/libexec/gcc/powerpc64-linux/4.6.0/lto-wrapper
Target: powerpc64-linux
Configured with: ../gcc/configure --build=powerpc64-linux
--enable-targets=powerpc64-linux --prefix=/root/gcc-installed --disable-nls
--with-gmp=/root/gcc-installed --with-mpfr=/root/gcc-installed
--with-libelf=/root/gcc-installed --with-cloog=/root/gcc-installed
--with-ppl=/root/gcc-installed --disable-werror
--with-ld=/root/gcc-installed/bin/ld --with-as=/root/gcc-installed/bin/as
--enable-languages=c,c++,fortran --enable-lto : (reconfigured) ../gcc/configure
--build=powerpc64-linux --enable-targets=powerpc64-linux
--prefix=/root/gcc-installed --disable-nls --with-gmp=/root/gcc-installed
--with-mpfr=/root/gcc-installed --with-libelf=/root/gcc-installed
--with-cloog=/root/gcc-installed --with-ppl=/root/gcc-installed
--disable-werror --with-ld=/root/gcc-installed/bin/ld
--with-as=/root/gcc-installed/bin/as --enable-lto build_alias=powerpc64-linux
--enable-languages=c,c++,fortran,lto --no-create --no-recursion
Thread model: posix
gcc version 4.6.0 20110114 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-c' '-v' '-fltrans-output-list=/tmp/ccd96jEi.ltrans.out'
'-fwpa' '-fresolution=/tmp/ccSsas7e.res'
 /root/gcc-installed/libexec/gcc/powerpc64-linux/4.6.0/lto1 -quiet -dumpbase
test1.o -auxbase test1 -version 

[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-14 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

Jack Howarth howarth at nitro dot med.uc.edu changed:

   What|Removed |Added

 CC||howarth at nitro dot
   ||med.uc.edu

--- Comment #4 from Jack Howarth howarth at nitro dot med.uc.edu 2011-01-15 
04:33:03 UTC ---
(In reply to comment #3)

 lto1: internal compiler error: in lto_varpool_replace_node, at 
 lto-symtab.c:306
 Please submit a full bug report
 

On darwin with the collect2 lto, this test case emits the same expected error
with and without -flto...

gcc-4 -flto test1.o test2.o

Undefined symbols:
  _main, referenced from:
  start in crt1.10.5.o
ld: symbol(s) not found
collect2: ld returned 1 exit status


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2011.01.13 10:57:39
   Target Milestone|--- |4.6.0
 Ever Confirmed|0   |1

--- Comment #1 from Richard Guenther rguenth at gcc dot gnu.org 2011-01-13 
10:57:39 UTC ---
Now that we use -fuse-linker-plugin by default - do you use gold or GNU ld
and what version?  Does it use the linker plugin?  Thus, please provide
output with -v appended.


[Bug lto/47274] [4.6 regression] ICE in lto_varpool_replace_node, at lto-symtab.c:306

2011-01-13 Thread sch...@linux-m68k.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

Andreas Schwab sch...@linux-m68k.org changed:

   What|Removed |Added

 Status|WAITING |NEW

--- Comment #2 from Andreas Schwab sch...@linux-m68k.org 2011-01-13 16:54:51 
UTC ---
Reading specs from ./specs
COLLECT_GCC=./xgcc
COLLECT_LTO_WRAPPER=./lto-wrapper
Target: powerpc64-linux
Configured with: ../configure --prefix=/usr --build=powerpc64-linux
--host=powerpc64-linux --enable-shared --enable-threads --enable-__cxa_atexit
--with-system-zlib --with-cpu=default32 --with-cpu-64=power4 --enable-secureplt
--with-long-double-128
Thread model: posix
gcc version 4.6.0 20110111 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-B' './' '-flto' '-v'
 ./cc1 -quiet -v -iprefix
/daten/gcc/gcc-20110111/Build/gcc/../lib/gcc/powerpc64-linux/4.6.0/ -isystem
./include -isystem ./include-fixed -D__unix__ -D__gnu_linux__ -D__linux__
-Dunix -D__unix -Dlinux -D__linux -Asystem=linux -Asystem=unix -Asystem=posix
../../gcc/testsuite/gcc.c-torture/execute/builtins/abs-1.c -msecure-plt -quiet
-dumpbase abs-1.c -auxbase abs-1 -version -flto -o /tmp/cc5tSkJl.s
GNU C (GCC) version 4.6.0 20110111 (experimental) (powerpc64-linux)
compiled by GNU C version 4.6.0 20110111 (experimental), GMP version
4.3.2, MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ignoring nonexistent directory
/daten/gcc/gcc-20110111/Build/gcc/../lib/gcc/powerpc64-linux/4.6.0/include
ignoring nonexistent directory
/daten/gcc/gcc-20110111/Build/gcc/../lib/gcc/powerpc64-linux/4.6.0/include-fixed
ignoring nonexistent directory
/daten/gcc/gcc-20110111/Build/gcc/../lib/gcc/powerpc64-linux/4.6.0/../../../../powerpc64-linux/include
ignoring nonexistent directory
/daten/gcc/gcc-20110111/Build/gcc/../lib/gcc/../../lib/gcc/powerpc64-linux/4.6.0/include
ignoring nonexistent directory
/daten/gcc/gcc-20110111/Build/gcc/../lib/gcc/../../lib/gcc/powerpc64-linux/4.6.0/include-fixed
ignoring nonexistent directory
/daten/gcc/gcc-20110111/Build/gcc/../lib/gcc/../../lib/gcc/powerpc64-linux/4.6.0/../../../../powerpc64-linux/include
#include ... search starts here:
#include ... search starts here:
 ./include
 ./include-fixed
 /usr/local/include
 /usr/include
End of search list.
GNU C (GCC) version 4.6.0 20110111 (experimental) (powerpc64-linux)
compiled by GNU C version 4.6.0 20110111 (experimental), GMP version
4.3.2, MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 00974a4f682cf3e5d3da12c4fdb5bd16
COLLECT_GCC_OPTIONS='-B' './' '-flto' '-v'
 ./as -a32 -mppc -many -Qy -o /tmp/ccyVTDiU.o /tmp/cc5tSkJl.s
COLLECT_GCC_OPTIONS='-B' './' '-flto' '-v'
 ./cc1 -quiet -v -iprefix
/daten/gcc/gcc-20110111/Build/gcc/../lib/gcc/powerpc64-linux/4.6.0/ -isystem
./include -isystem ./include-fixed -D__unix__ -D__gnu_linux__ -D__linux__
-Dunix -D__unix -Dlinux -D__linux -Asystem=linux -Asystem=unix -Asystem=posix
../../gcc/testsuite/gcc.c-torture/execute/builtins/abs-1-lib.c -msecure-plt
-quiet -dumpbase abs-1-lib.c -auxbase abs-1-lib -version -flto -o
/tmp/cc5tSkJl.s
GNU C (GCC) version 4.6.0 20110111 (experimental) (powerpc64-linux)
compiled by GNU C version 4.6.0 20110111 (experimental), GMP version
4.3.2, MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ignoring nonexistent directory
/daten/gcc/gcc-20110111/Build/gcc/../lib/gcc/powerpc64-linux/4.6.0/include
ignoring nonexistent directory
/daten/gcc/gcc-20110111/Build/gcc/../lib/gcc/powerpc64-linux/4.6.0/include-fixed
ignoring nonexistent directory
/daten/gcc/gcc-20110111/Build/gcc/../lib/gcc/powerpc64-linux/4.6.0/../../../../powerpc64-linux/include
ignoring nonexistent directory
/daten/gcc/gcc-20110111/Build/gcc/../lib/gcc/../../lib/gcc/powerpc64-linux/4.6.0/include
ignoring nonexistent directory
/daten/gcc/gcc-20110111/Build/gcc/../lib/gcc/../../lib/gcc/powerpc64-linux/4.6.0/include-fixed
ignoring nonexistent directory
/daten/gcc/gcc-20110111/Build/gcc/../lib/gcc/../../lib/gcc/powerpc64-linux/4.6.0/../../../../powerpc64-linux/include
#include ... search starts here:
#include ... search starts here:
 ./include
 ./include-fixed
 /usr/local/include
 /usr/include
End of search list.
GNU C (GCC) version 4.6.0 20110111 (experimental) (powerpc64-linux)
compiled by GNU C version 4.6.0 20110111 (experimental), GMP version
4.3.2, MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 00974a4f682cf3e5d3da12c4fdb5bd16
COLLECT_GCC_OPTIONS='-B' './' '-flto' '-v'
 ./as -a32 -mppc -many -Qy -o /tmp/ccbKKCgO.o /tmp/cc5tSkJl.s
COLLECT_GCC_OPTIONS='-B' './' '-flto' '-v'
 ./cc1 -quiet -v -iprefix