* [Bug middle-end/95315] [11 Regression] ICE: Segmentation fault (in lookup_page_table_entry)
2020-05-25 14:37 [Bug middle-end/95315] New: [11 Regression] ICE: Segmentation fault (in lookup_page_table_entry) asolokha at gmx dot com
@ 2020-05-25 14:46 ` rguenth at gcc dot gnu.org
2020-05-26 7:21 ` [Bug middle-end/95315] [11 Regression] ICE: Segmentation fault (in lookup_page_table_entry) since r11-382-g7a50e7087567cffb marxin at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-05-25 14:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95315
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.0
CC| |jakub at gcc dot gnu.org
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/95315] [11 Regression] ICE: Segmentation fault (in lookup_page_table_entry) since r11-382-g7a50e7087567cffb
2020-05-25 14:37 [Bug middle-end/95315] New: [11 Regression] ICE: Segmentation fault (in lookup_page_table_entry) asolokha at gmx dot com
2020-05-25 14:46 ` [Bug middle-end/95315] " rguenth at gcc dot gnu.org
@ 2020-05-26 7:21 ` marxin at gcc dot gnu.org
2020-05-26 11:50 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-05-26 7:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95315
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org
Known to fail| |11.0
Status|UNCONFIRMED |NEW
Last reconfirmed| |2020-05-26
Ever confirmed|0 |1
Known to work| |10.1.0
Summary|[11 Regression] ICE: |[11 Regression] ICE:
|Segmentation fault (in |Segmentation fault (in
|lookup_page_table_entry) |lookup_page_table_entry)
| |since
| |r11-382-g7a50e7087567cffb
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r11-382-g7a50e7087567cffb.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/95315] [11 Regression] ICE: Segmentation fault (in lookup_page_table_entry) since r11-382-g7a50e7087567cffb
2020-05-25 14:37 [Bug middle-end/95315] New: [11 Regression] ICE: Segmentation fault (in lookup_page_table_entry) asolokha at gmx dot com
2020-05-25 14:46 ` [Bug middle-end/95315] " rguenth at gcc dot gnu.org
2020-05-26 7:21 ` [Bug middle-end/95315] [11 Regression] ICE: Segmentation fault (in lookup_page_table_entry) since r11-382-g7a50e7087567cffb marxin at gcc dot gnu.org
@ 2020-05-26 11:50 ` jakub at gcc dot gnu.org
2020-05-27 8:30 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-05-26 11:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95315
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 48603
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48603&action=edit
gcc11-pr95315.patch
Untested fix.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/95315] [11 Regression] ICE: Segmentation fault (in lookup_page_table_entry) since r11-382-g7a50e7087567cffb
2020-05-25 14:37 [Bug middle-end/95315] New: [11 Regression] ICE: Segmentation fault (in lookup_page_table_entry) asolokha at gmx dot com
` (2 preceding siblings ...)
2020-05-26 11:50 ` jakub at gcc dot gnu.org
@ 2020-05-27 8:30 ` cvs-commit at gcc dot gnu.org
2020-05-27 10:53 ` asolokha at gmx dot com
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-27 8:30 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/95315] [11 Regression] ICE: Segmentation fault (in lookup_page_table_entry) since r11-382-g7a50e7087567cffb
2020-05-25 14:37 [Bug middle-end/95315] New: [11 Regression] ICE: Segmentation fault (in lookup_page_table_entry) asolokha at gmx dot com
` (3 preceding siblings ...)
2020-05-27 8:30 ` cvs-commit at gcc dot gnu.org
@ 2020-05-27 10:53 ` asolokha at gmx dot com
2020-05-27 10:57 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: asolokha at gmx dot com @ 2020-05-27 10:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95315
--- Comment #4 from Arseny Solokha <asolokha at gmx dot com> ---
(In reply to Jakub Jelinek from comment #2)
> Created attachment 48603 [details]
> gcc11-pr95315.patch
>
> Untested fix.
@@ -1823,6 +1850,12 @@ omp_resolve_declare_variant (tree base)
}
}
+ static struct cgraph_node_hook_list *node_removal_hook_holder;
+ if (node_removal_hook_holder)
+ node_removal_hook_holder
+ = symtab->add_cgraph_removal_hook (omp_declare_variant_remove_hook,
+ NULL);
+
if (omp_declare_variants == NULL)
omp_declare_variants
= hash_table<omp_declare_variant_hasher>::create_ggc (64);
Shouldn't there be
if (!node_removal_hook_holder)
node_removal_hook_holder
= symtab->add_cgraph_removal_hook (…
instead?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/95315] [11 Regression] ICE: Segmentation fault (in lookup_page_table_entry) since r11-382-g7a50e7087567cffb
2020-05-25 14:37 [Bug middle-end/95315] New: [11 Regression] ICE: Segmentation fault (in lookup_page_table_entry) asolokha at gmx dot com
` (4 preceding siblings ...)
2020-05-27 10:53 ` asolokha at gmx dot com
@ 2020-05-27 10:57 ` jakub at gcc dot gnu.org
2020-05-29 8:50 ` cvs-commit at gcc dot gnu.org
2020-05-29 9:42 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-05-27 10:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95315
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Arseny Solokha from comment #4)
> Shouldn't there be
>
> if (!node_removal_hook_holder)
> node_removal_hook_holder
> = symtab->add_cgraph_removal_hook (…
>
> instead?
Of course, good catch. For the particular testcase, only the non-removal_hook
related part of the patch is sufficient, and I didn't try to come up with a
testcase where a function is originally needed, but e.g. early inlining makes
it go away. Will try to construct that and see if the removal hook fix will
fix that.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/95315] [11 Regression] ICE: Segmentation fault (in lookup_page_table_entry) since r11-382-g7a50e7087567cffb
2020-05-25 14:37 [Bug middle-end/95315] New: [11 Regression] ICE: Segmentation fault (in lookup_page_table_entry) asolokha at gmx dot com
` (5 preceding siblings ...)
2020-05-27 10:57 ` jakub at gcc dot gnu.org
@ 2020-05-29 8:50 ` cvs-commit at gcc dot gnu.org
2020-05-29 9:42 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-29 8:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95315
--- Comment #6 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:3d0675f3bb54b58903bc9214d05c8e6d20e5f313
commit r11-712-g3d0675f3bb54b58903bc9214d05c8e6d20e5f313
Author: Jakub Jelinek <jakub@redhat.com>
Date: Fri May 29 10:48:40 2020 +0200
openmp: One omp_resolve_declare_variant followup
As noticed by Arseny, I got the condition when to call the add removal hook
wrong wrong. Fixed thusly.
2020-05-28 Jakub Jelinek <jakub@redhat.com>
PR middle-end/95315
* omp-general.c (omp_resolve_declare_variant): Fix up addition of
declare variant cgraph node removal callback.
* gcc.dg/gomp/pr95315-2.c: New test.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/95315] [11 Regression] ICE: Segmentation fault (in lookup_page_table_entry) since r11-382-g7a50e7087567cffb
2020-05-25 14:37 [Bug middle-end/95315] New: [11 Regression] ICE: Segmentation fault (in lookup_page_table_entry) asolokha at gmx dot com
` (6 preceding siblings ...)
2020-05-29 8:50 ` cvs-commit at gcc dot gnu.org
@ 2020-05-29 9:42 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-05-29 9:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95315
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 9+ messages in thread