This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/69866] lto1: internal compiler error: in add_symbol_to_partition_1, at lto/lto-partition.c:158
- From: "acrsofter at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 20 Feb 2016 03:25:13 +0000
- Subject: [Bug lto/69866] lto1: internal compiler error: in add_symbol_to_partition_1, at lto/lto-partition.c:158
- Auto-submitted: auto-generated
- References: <bug-69866-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69866
--- Comment #3 from acrsofter at gmail dot com ---
reproduce steps:
[foo.c]
int _umh(int i)
{
return i+1;
}
int weaks(int i) __attribute__((weak, alias("_umh")));
int main()
{
return weaks(10);
}
[bar.c]
int weaks(int i)
{
return i+1;
}
now compile:
gcc -c bar.c
gcc -flto -c foo.c
gcc -flto -o elf bar.o foo.o
note:
bar compiled without flt
but rest with flt
now at linking stage booms
at line
gcc_assert (c != SYMBOL_EXTERNAL
&& (c == SYMBOL_DUPLICATE || !symbol_partitioned_p (node)));
in lto/lto-partition.c
===============================================================
same code compiled without lto ok
gcc 4.9.3 not affected
but 5.3.0 affected and latest (gcc-6-20160214) affected