[Bug middle-end/95315] [11 Regression] ICE: Segmentation fault (in lookup_page_table_entry) since r11-382-g7a50e7087567cffb
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed May 27 08:30:18 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95315
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:baff22c48bdee9cb644b7336bf6f20f799531507
commit r11-653-gbaff22c48bdee9cb644b7336bf6f20f799531507
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed May 27 10:25:56 2020 +0200
openmp: Fix up omp_declare_variant{s,_alt} htab handling
This patch fixes a GC ICE. During debugging, I've found that during
gimplification we can actually call omp_resolve_declare_variant multiple
times and it would create a new magic declare_variant_alt FUNCTION_DECL
each time, which is undesirable, once we have such a decl, we should just
use that. The other problem is that there was no cgraph node removal hook.
As the omp_declare_variants htab is used just early during gimplification,
we can just clear the whole htab, rather than trying to lookup and remove
a particular entry. The other hash table is used later as well and that
one uses just DECL_UID as hash, so in that case the patch removes the elt.
2020-05-27 Jakub Jelinek <jakub@redhat.com>
PR middle-end/95315
* omp-general.c (omp_declare_variant_remove_hook): New function.
(omp_resolve_declare_variant): Always return base if it is already
declare_variant_alt magic decl itself. Register
omp_declare_variant_remove_hook as cgraph node removal hook.
* gcc.dg/gomp/pr95315.c: New test.
More information about the Gcc-bugs
mailing list