[Bug lto/91393] [10 Regression] lto1: internal compiler error: decompressed stream: Destination buffer is too small

2019-10-30 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91393

Martin Liška  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #13 from Martin Liška  ---
Fixed on trunk.

[Bug lto/91393] [10 Regression] lto1: internal compiler error: decompressed stream: Destination buffer is too small

2019-10-30 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91393

--- Comment #12 from Martin Liška  ---
Author: marxin
Date: Wed Oct 30 10:38:52 2019
New Revision: 277607

URL: https://gcc.gnu.org/viewcvs?rev=277607=gcc=rev
Log:
Use symtab_node::order in LTO sections with body.

2019-10-30  Martin Liska  

PR lto/91393
PR lto/88220
* cgraph.c (cgraph_node::get_create): Overwrite node->order
from a first_clone in order to get proper LTO section
in LTO stream.
(cgraph_node::get_untransformed_body):
Use lto_get_section_data where symtab_node::order
must be provided.
* cgraphclones.c (cgraph_node::find_replacement):
Update also symbol order.
* ipa-fnsummary.c (ipa_fn_summary_read):
Use new function lto_get_summary_section_data.
* ipa-hsa.c (ipa_hsa_read_summary): Likewise.
* ipa-icf.c (sem_item_optimizer::read_summary):
Likewise.
* ipa-prop.c (ipa_prop_read_jump_functions):
Likewise.
(ipcp_read_transformation_summaries): Likewise.
* ipa-sra.c (ipa_sra_read_summary): Likewise.
* lto-cgraph.c (input_node): Add also order_base.
(input_varpool_node): Likewise.
(input_cgraph_1): Assign the order_base.
(input_cgraph_opt_summary): Use new lto_get_summary_section_data.
* lto-opts.c (lto_write_options): Pass new argument.
* lto-section-in.c (lto_get_section_data): Add new argumente order.
(lto_get_summary_section_data): New.
(lto_get_raw_section_data): Add order argument.
(lto_create_simple_input_block): Likewise.
* lto-section-out.c (lto_destroy_simple_output_block):
Likewise.
* lto-streamer-in.c (lto_input_toplevel_asms):
Use lto_get_summary_section_data.
(lto_input_mode_table): Likewise.
* lto-streamer-out.c (produce_asm): Pass symtab_node::order.
(lto_output_toplevel_asms): Pass new argument.
(copy_function_or_variable): Likewise.
(produce_lto_section):Likewise.
(produce_symtab): Likewise.
(lto_write_mode_table): Likewise.
(produce_asm_for_decls): Likewise.
* lto-streamer.c (lto_get_section_name): Concat symbol name
and symbol order.
* lto-streamer.h (lto_get_section_data): Add order argument.
(lto_get_summary_section_data): New.
(lto_get_raw_section_data): Add order argument.
(lto_get_section_name): Likewise.
* varpool.c (varpool_node::get_constructor): Pass order argument.
2019-10-30  Martin Liska  

PR lto/91393
PR lto/88220
* lto-common.c (lto_file_finalize): Use lto_get_summary_section_data.
(get_section_data): Add order argument.
2019-10-30  Martin Liska  

PR lto/91393
PR lto/88220
* gcc.dg/lto/pr91393_0.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/lto/pr91393_0.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cgraph.c
trunk/gcc/cgraphclones.c
trunk/gcc/ipa-fnsummary.c
trunk/gcc/ipa-hsa.c
trunk/gcc/ipa-icf.c
trunk/gcc/ipa-prop.c
trunk/gcc/ipa-sra.c
trunk/gcc/lto-cgraph.c
trunk/gcc/lto-opts.c
trunk/gcc/lto-section-in.c
trunk/gcc/lto-section-out.c
trunk/gcc/lto-streamer-in.c
trunk/gcc/lto-streamer-out.c
trunk/gcc/lto-streamer.c
trunk/gcc/lto-streamer.h
trunk/gcc/lto/ChangeLog
trunk/gcc/lto/lto-common.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/varpool.c

[Bug lto/91393] [10 Regression] lto1: internal compiler error: decompressed stream: Destination buffer is too small

2019-10-22 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91393

--- Comment #11 from Martin Liška  ---
(In reply to David Binderman from comment #10)
> (In reply to Martin Liška from comment #9)
> > I've got a patch candidate for it.
> 
> Ping Martin. Anything happened with that patch ?

There's a discussion going on:
https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01559.html

[Bug lto/91393] [10 Regression] lto1: internal compiler error: decompressed stream: Destination buffer is too small

2019-10-02 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91393

--- Comment #10 from David Binderman  ---
(In reply to Martin Liška from comment #9)
> I've got a patch candidate for it.

Ping Martin. Anything happened with that patch ?

[Bug lto/91393] [10 Regression] lto1: internal compiler error: decompressed stream: Destination buffer is too small

2019-08-09 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91393

--- Comment #9 from Martin Liška  ---
I've got a patch candidate for it.

[Bug lto/91393] [10 Regression] lto1: internal compiler error: decompressed stream: Destination buffer is too small

2019-08-09 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91393

Martin Liška  changed:

   What|Removed |Added

 Status|WAITING |ASSIGNED
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=88220

--- Comment #8 from Martin Liška  ---
Thank you David, now I can see it:

$ cat pr91393.i
void __open_alias(int, ...) __asm__("open");
void __open_alias(int flags, ...) {}
extern __inline __attribute__((__gnu_inline__)) int open() {}
struct {
  void *func;
} a = {open};

$ gcc -flto -O pr91393.i 
lto1: internal compiler error: decompressed stream: Destination buffer is too
small
0xb3d04b lto_uncompression_zstd
/home/marxin/Programming/gcc/gcc/lto-compress.c:170
0xb3d7ce lto_end_uncompression(lto_compression_stream*, lto_compression)
/home/marxin/Programming/gcc/gcc/lto-compress.c:408
0xb3b66c lto_get_section_data(lto_file_decl_data*, lto_section_type, char
const*, unsigned long*, bool)
/home/marxin/Programming/gcc/gcc/lto-section-in.c:164
0x86ec4c cgraph_node::get_untransformed_body()
/home/marxin/Programming/gcc/gcc/cgraph.c:3578
0x87b36e cgraph_node::expand()
/home/marxin/Programming/gcc/gcc/cgraphunit.c:2164
0x87c3db expand_all_functions
/home/marxin/Programming/gcc/gcc/cgraphunit.c:2332
0x87c3db symbol_table::compile()
/home/marxin/Programming/gcc/gcc/cgraphunit.c:2688
0x7da5f1 lto_main()
/home/marxin/Programming/gcc/gcc/lto/lto.c:644

Looks to me very similar to PR88220.

[Bug lto/91393] [10 Regression] lto1: internal compiler error: decompressed stream: Destination buffer is too small

2019-08-09 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91393

--- Comment #7 from David Binderman  ---
Created attachment 46697
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46697=edit
preprocessed C source code

Preprocessed source code for open.c (aka /tmp/q.i in previous comment)

[Bug lto/91393] [10 Regression] lto1: internal compiler error: decompressed stream: Destination buffer is too small

2019-08-09 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91393

--- Comment #6 from David Binderman  ---
Command line seems to be

/home/dcb/gcc/results.274150/bin/gcc  -O3 -flto -g -pipe -Wall
-Werror=format-se
curity  -fexceptions -fstack-protector-strong -grecord-gcc-switches   
-fasynchr
onous-unwind-tables -fstack-clash-protection  -c -fPIC /tmp/q.i

[Bug lto/91393] [10 Regression] lto1: internal compiler error: decompressed stream: Destination buffer is too small

2019-08-09 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91393

Martin Liška  changed:

   What|Removed |Added

 Status|ASSIGNED|WAITING

--- Comment #5 from Martin Liška  ---
Where the problematic section is:

$ readelf -S -W .libs/open.o
There are 27 section headers, starting at offset 0x3048:

Section Headers:
  [Nr] Name  TypeAddress  OffSize   ES Flg
Lk Inf Al
...
  [15] .gnu.lto_open.e5c71689fb58e64f PROGBITS 000954
000a9d 00   E  0   0  1
...


@David: Can you please create a pro-processed file for open.o and the full
command line that was used to create the object?

[Bug lto/91393] [10 Regression] lto1: internal compiler error: decompressed stream: Destination buffer is too small

2019-08-09 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91393

Martin Liška  changed:

   What|Removed |Added

 Status|WAITING |ASSIGNED

--- Comment #4 from Martin Liška  ---
I can reproduce that now with:
$ gcc .libs/open.o
lto1: internal compiler error: decompressed stream: Destination buffer is too
small
0xb3d04b lto_uncompression_zstd
/home/marxin/Programming/gcc/gcc/lto-compress.c:170
0xb3d7ce lto_end_uncompression(lto_compression_stream*, lto_compression)
/home/marxin/Programming/gcc/gcc/lto-compress.c:408
0xb3b66c lto_get_section_data(lto_file_decl_data*, lto_section_type, char
const*, unsigned long*, bool)
/home/marxin/Programming/gcc/gcc/lto-section-in.c:164
0x86ec4c cgraph_node::get_untransformed_body()
/home/marxin/Programming/gcc/gcc/cgraph.c:3578
0x87b36e cgraph_node::expand()
/home/marxin/Programming/gcc/gcc/cgraphunit.c:2164
0x87c3db expand_all_functions
/home/marxin/Programming/gcc/gcc/cgraphunit.c:2332
0x87c3db symbol_table::compile()
/home/marxin/Programming/gcc/gcc/cgraphunit.c:2688
0x7da5f1 lto_main()
/home/marxin/Programming/gcc/gcc/lto/lto.c:644

[Bug lto/91393] [10 Regression] lto1: internal compiler error: decompressed stream: Destination buffer is too small

2019-08-09 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91393

--- Comment #3 from David Binderman  ---
Created attachment 46695
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46695=edit
xz compressed tar file

cat bug2.txz | xz -d | tar xvf - should do it.

First attachment contains object files [_a-m]* and second has
[n-z]*.

I used recent trunk compiler. x86_64, if that makes any difference.

[Bug lto/91393] [10 Regression] lto1: internal compiler error: decompressed stream: Destination buffer is too small

2019-08-09 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91393

--- Comment #2 from David Binderman  ---
Created attachment 46694
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46694=edit
xz compressed tar file

cat bug1.txz | xz -d | tar xvf - should do it.

[Bug lto/91393] [10 Regression] lto1: internal compiler error: decompressed stream: Destination buffer is too small

2019-08-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91393

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |10.0
Summary|lto1: internal compiler |[10 Regression] lto1:
   |error: decompressed stream: |internal compiler error:
   |Destination buffer is too   |decompressed stream:
   |small   |Destination buffer is too
   ||small