[Bug lto/88220] LTO ICE with GNU inline and alias's

2021-08-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88220

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |10.0

[Bug lto/88220] LTO ICE with GNU inline and alias's

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

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #6 from Martin Liška  ---
Fixed on trunk, not planning to backport that.

[Bug lto/88220] LTO ICE with GNU inline and alias's

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

--- Comment #5 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/88220] LTO ICE with GNU inline and alias's

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

Martin Liška  changed:

   What|Removed |Added

   Assignee|hubicka at gcc dot gnu.org |marxin at gcc dot 
gnu.org

--- Comment #4 from Martin Liška  ---
Good, I've got a patch for it.

[Bug lto/88220] LTO ICE with GNU inline and alias's

2019-02-11 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88220

--- Comment #3 from Martin Liška  ---
$ ld --version
GNU ld (GNU Binutils; openSUSE Tumbleweed) 2.31.1.20180828-3
Copyright (C) 2018 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

[Bug lto/88220] LTO ICE with GNU inline and alias's

2018-11-30 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88220

--- Comment #2 from Martin Liška  ---
So the issue is that in WPA we mix:
void a() __asm__("open64");

and

void open64() {}

Then we stream out:
*open64/0 (a) @0x7698f5a0
  Type: function definition analyzed
  Visibility: externally_visible prevailing_def_ironly_exp public
  Address is taken.
  References: 
  Referring: e/2 (addr)
  Read from file: open64.o
  Availability: overwritable
  Function flags: count:1073741824 (estimated locally)
  Called by: 
  Calls: c/4 (1073741824 (estimated locally),1.00 per call) b/3 (1073741824
(estimated locally),1.00 per call) 

and in ltrans the function body of the cgraph node looks as follows:
$2 = void
(gdb) p debug_function(fn_decl, 0)
a ()
{
   [local count: 1073741824]:
  return;

}

which has no calls, thus the discrepancy in cgraph edges. I think it's the same
issue as PR87525. So Honza's turn.

[Bug lto/88220] LTO ICE with GNU inline and alias's

2018-11-28 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88220

Martin Liška  changed:

   What|Removed |Added

   Assignee|hubicka at gcc dot gnu.org |marxin at gcc dot 
gnu.org

--- Comment #1 from Martin Liška  ---
I'll take a look.