]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix internal error during inlining after ICF pass
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 30 Sep 2024 19:04:18 +0000 (21:04 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Mon, 30 Sep 2024 19:07:38 +0000 (21:07 +0200)
commit65073a5b90c00a1c47efae8a67b9c754e2287ee0
tree02e93d3e999482afc0eedc7dff1914d2381d598e
parent9c14f9a9c19957d9a45a7df97701bad475c80eea
Fix internal error during inlining after ICF pass

The problem is that the ICF pass identifies two functions, one of which has
a static chain while the other does not.  The fix is simply to prevent this
identification from occurring.

gcc/
PR ipa/113996
* ipa-icf.cc (sem_function::get_hash): Hash DECL_STATIC_CHAIN.
(sem_function::equals_wpa): Compare it.
(sem_function::equals_private): Likewise.

gcc/testsuite/
* gnat.dg/lto27.adb: New test.
gcc/ipa-icf.cc
gcc/testsuite/gnat.dg/lto27.adb [new file with mode: 0644]