Bug 65287 - [5 Regression] Current trunk ICE in address_matters_p, at symtab.c:1908
Summary: [5 Regression] Current trunk ICE in address_matters_p, at symtab.c:1908
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: ipa (show other bugs)
Version: 5.0
: P1 normal
Target Milestone: 5.0
Assignee: Martin Liška
URL:
Keywords:
: 65288 (view as bug list)
Depends on:
Blocks: 65303
  Show dependency treegraph
 
Reported: 2015-03-02 23:33 UTC by Paul Pluzhnikov
Modified: 2015-03-03 17:35 UTC (History)
5 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2015-03-03 00:00:00


Attachments
test case (4.71 KB, text/plain)
2015-03-02 23:33 UTC, Paul Pluzhnikov
Details
c-reduce'd test case (102 bytes, text/plain)
2015-03-03 00:36 UTC, Paul Pluzhnikov
Details
Suggested patch (752 bytes, patch)
2015-03-03 09:44 UTC, Martin Liška
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Pluzhnikov 2015-03-02 23:33:16 UTC
Created attachment 34927 [details]
test case

Continued from PR 65263

r221040 is also possibly causing:

  ../sysdeps/gnu/siglist.c:77:1: internal compiler error: in address_matters_p, at symtab.c:1908

when building trunk GLIBC (seen with GCC @r221125; same source builds with GCC @r220312).

../sysdeps/gnu/siglist.c:77:1: internal compiler error: in address_matters_p, at symtab.c:1908
 versioned_symbol (libc, __new_sys_sigabbrev, sys_sigabbrev, GLIBC_2_1);
 ^
0x747118 symtab_node::address_matters_p()
	../../gcc/symtab.c:1908
0x10e1dcb ipa_icf::sem_variable::merge(ipa_icf::sem_item*)
	../../gcc/ipa-icf.c:1723
0x10e4b21 ipa_icf::sem_item_optimizer::merge_classes(unsigned int)
	../../gcc/ipa-icf.c:2955
0x10ed8c4 ipa_icf::sem_item_optimizer::execute()
	../../gcc/ipa-icf.c:2217
0x10ef521 ipa_icf_driver
	../../gcc/ipa-icf.c:3034
0x10ef521 ipa_icf::pass_ipa_icf::execute(function*)
	../../gcc/ipa-icf.c:3081
Please submit a full bug report,

Reproduces with:
gcc-svn-r221125/bin/gcc -c -O2 /tmp/t.i
Comment 1 Paul Pluzhnikov 2015-03-03 00:36:41 UTC
Created attachment 34928 [details]
c-reduce'd test case

A much shorter test:

const int __new_sys_siglist[] = {};

extern __typeof(__new_sys_siglist) _new_sys_siglist
    __attribute__((alias("__new_sys_siglist")));
extern __typeof(__new_sys_siglist) _sys_siglist
    __attribute__((alias("__new_sys_siglist")));
Comment 2 Alan Modra 2015-03-03 02:02:55 UTC
Confirmed on both x86_64 and powerpc64-linux.
Comment 3 vekumar 2015-03-03 09:01:48 UTC
Also faced this bug when I tired to cross compile for aarch64-none-linux-gnu
Comment 4 Marek Polacek 2015-03-03 09:14:18 UTC
The testcase in Comment 1 started ICEing with r221099.
Comment 5 Martin Liška 2015-03-03 09:44:56 UTC
Created attachment 34935 [details]
Suggested patch

Following patch skips all alias variables. This condition was part of my initial version of patch:

https://gcc.gnu.org/ml/gcc-patches/2015-02/msg01753.html

I hope, as Honza rework the patch, this condition should be placed there.
Comment 6 Alex Velenko 2015-03-03 12:47:35 UTC
I also confirm this issue for aarch64_be-none-linux-gnu, aarch64_be-none-linux-gnu, arm-none-linux-gnueabihf and arm-none-linux-gnueabi
Comment 7 Martin Liška 2015-03-03 13:15:55 UTC
*** Bug 65288 has been marked as a duplicate of this bug. ***
Comment 8 Jan Hubicka 2015-03-03 17:32:52 UTC
Author: hubicka
Date: Tue Mar  3 17:32:21 2015
New Revision: 221156

URL: https://gcc.gnu.org/viewcvs?rev=221156&root=gcc&view=rev
Log:
	PR ipa/65287
	* ipa-icf.c (sem_variable::parse): Skip all alias variables.
	* gcc.dg/ipa/pr65287.c: New test.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ipa-icf.c
    trunk/gcc/testsuite/ChangeLog
Comment 9 Jan Hubicka 2015-03-03 17:33:53 UTC
Author: hubicka
Date: Tue Mar  3 17:33:22 2015
New Revision: 221157

URL: https://gcc.gnu.org/viewcvs?rev=221157&root=gcc&view=rev
Log:

	PR ipa/65287
	* gcc.dg/ipa/pr65287.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/ipa/pr65287.c
Comment 10 Jan Hubicka 2015-03-03 17:35:00 UTC
Fixed.