[Bug ipa/65521] [5 Regression] nondeterministic -fcompare-debug failures
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65521 --- Comment #10 from Jakub Jelinek jakub at gcc dot gnu.org --- Author: jakub Date: Mon Mar 23 15:17:20 2015 New Revision: 221596 URL: https://gcc.gnu.org/viewcvs?rev=221596root=gccview=rev Log: PR ipa/65521 * ipa-icf.c (sem_item::update_hash_by_addr_refs): Hash ultimate_alias_target ()-order ints instead of ultimate_alias_target () pointers. * gcc.dg/pr65521.c: New test. Added: trunk/gcc/testsuite/gcc.dg/pr65521.c Modified: trunk/gcc/ChangeLog trunk/gcc/ipa-icf.c trunk/gcc/testsuite/ChangeLog
[Bug ipa/65521] [5 Regression] nondeterministic -fcompare-debug failures
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65521 Markus Trippelsdorf trippels at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #11 from Markus Trippelsdorf trippels at gcc dot gnu.org --- Fixed. Thanks!
[Bug ipa/65521] [5 Regression] nondeterministic -fcompare-debug failures
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65521 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #6 from Jakub Jelinek jakub at gcc dot gnu.org --- But even hashing DECL_UIDs rather than hashing pointers is a no-go here, pointers can be arbitrary, for DECL_UIDs we at least have the guarantee that -g and -g0 DECL_UIDs compare the same, but there can be bigger gaps in between them for -g. Dunno if symtab_node's order field can be used reliably for this or not (or it could hash -name () string).
[Bug ipa/65521] [5 Regression] nondeterministic -fcompare-debug failures
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65521 --- Comment #7 from Jakub Jelinek jakub at gcc dot gnu.org --- Created attachment 35105 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=35105action=edit gcc5-pr65521.patch This fixes this for me. But I haven't done any in-depth analysis whether the symtab order fields are always identical between -g and -g0.
[Bug ipa/65521] [5 Regression] nondeterministic -fcompare-debug failures
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65521 Markus Trippelsdorf trippels at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2015-03-23 CC||marxin at gcc dot gnu.org Component|debug |ipa Target Milestone|--- |5.0 Ever confirmed|0 |1 --- Comment #3 from Markus Trippelsdorf trippels at gcc dot gnu.org --- I suspect r221576 is responsible for this issue, because -fno-ipa-icf fixes the problem.
[Bug ipa/65521] [5 Regression] nondeterministic -fcompare-debug failures
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65521 --- Comment #4 from Markus Trippelsdorf trippels at gcc dot gnu.org --- struct socket { int sk; }; selinux_task_getioprio(struct task_struct *p) { return current_has_perm(p, 256UL); } selinux_task_getscheduler(struct task_struct *p) { return current_has_perm(p, 256UL); } selinux_socket_getsockname(struct socket *sock) { return sock_has_perm(get_current(), sock-sk, 16UL); } selinux_socket_getpeername(struct socket *sock) { return sock_has_perm(get_current(), sock-sk, 16UL); } selinux_ops() { security_module_enable(selinux_ops); }
[Bug ipa/65521] [5 Regression] nondeterministic -fcompare-debug failures
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65521 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added Attachment #35105|0 |1 is obsolete|| Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org --- Comment #9 from Jakub Jelinek jakub at gcc dot gnu.org --- Created attachment 35106 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=35106action=edit gcc5-pr65521.patch Patch I'm going to bootstrap/regtest.
[Bug ipa/65521] [5 Regression] nondeterministic -fcompare-debug failures
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65521 Richard Biener rguenth at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P1 --- Comment #5 from Richard Biener rguenth at gcc dot gnu.org --- Feels like hashing of pointers and walking hash-tables where ordering changes code-generation (well, DECL_UID in this case). That's a no-no, of course (think address-space randomization).
[Bug ipa/65521] [5 Regression] nondeterministic -fcompare-debug failures
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65521 --- Comment #8 from Jakub Jelinek jakub at gcc dot gnu.org --- Though, judging from the fact that we print symtab_node::order into the -fdump-final-insns= dumps: ;; Function selinux_ops (selinux_ops, funcdef_no=4, cgraph_uid=4, symbol_order=4) it should be ok (otherwise we'd have -fcompare-debug failures already). For functions we could also use node-uid (either just that, or hash in both), but we don't have those in the varpool. So, I think I'll just add the testcase into the testsuite and bootstrap/regtest this.