public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/c++-modules] Save ref->speculative_id before clone_reference.
@ 2020-03-23 14:42 Nathan Sidwell
0 siblings, 0 replies; only message in thread
From: Nathan Sidwell @ 2020-03-23 14:42 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:2fa4b1ffd6e4058e53b3a486494b00098ee1bf63
commit 2fa4b1ffd6e4058e53b3a486494b00098ee1bf63
Author: Martin Liska <mliska@suse.cz>
Date: Mon Mar 23 08:57:06 2020 +0100
Save ref->speculative_id before clone_reference.
PR ipa/94250
* symtab.c (symtab_node::clone_references): Save speculative_id
as ref may be overwritten by create_reference.
(symtab_node::clone_referring): Likewise.
(symtab_node::clone_reference): Likewise.
Diff:
---
gcc/ChangeLog | 8 ++++++++
gcc/symtab.c | 9 ++++++---
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 96883830929..6ba82946a50 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2020-03-23 Martin Liska <mliska@suse.cz>
+
+ PR ipa/94250
+ * symtab.c (symtab_node::clone_references): Save speculative_id
+ as ref may be overwritten by create_reference.
+ (symtab_node::clone_referring): Likewise.
+ (symtab_node::clone_reference): Likewise.
+
2020-03-22 Iain Sandoe <iain@sandoe.co.uk>
* config/i386/darwin.h (JUMP_TABLES_IN_TEXT_SECTION): Remove
diff --git a/gcc/symtab.c b/gcc/symtab.c
index 3022acfc1ea..a36cdccf9c1 100644
--- a/gcc/symtab.c
+++ b/gcc/symtab.c
@@ -670,11 +670,12 @@ symtab_node::clone_references (symtab_node *node)
{
bool speculative = ref->speculative;
unsigned int stmt_uid = ref->lto_stmt_uid;
+ unsigned int spec_id = ref->speculative_id;
ref2 = create_reference (ref->referred, ref->use, ref->stmt);
ref2->speculative = speculative;
ref2->lto_stmt_uid = stmt_uid;
- ref2->speculative_id = ref->speculative_id;
+ ref2->speculative_id = spec_id;
}
}
@@ -689,11 +690,12 @@ symtab_node::clone_referring (symtab_node *node)
{
bool speculative = ref->speculative;
unsigned int stmt_uid = ref->lto_stmt_uid;
+ unsigned int spec_id = ref->speculative_id;
ref2 = ref->referring->create_reference (this, ref->use, ref->stmt);
ref2->speculative = speculative;
ref2->lto_stmt_uid = stmt_uid;
- ref2->speculative_id = ref->speculative_id;
+ ref2->speculative_id = spec_id;
}
}
@@ -704,12 +706,13 @@ symtab_node::clone_reference (ipa_ref *ref, gimple *stmt)
{
bool speculative = ref->speculative;
unsigned int stmt_uid = ref->lto_stmt_uid;
+ unsigned int spec_id = ref->speculative_id;
ipa_ref *ref2;
ref2 = create_reference (ref->referred, ref->use, stmt);
ref2->speculative = speculative;
ref2->lto_stmt_uid = stmt_uid;
- ref2->speculative_id = ref->speculative_id;
+ ref2->speculative_id = spec_id;
return ref2;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-03-23 14:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-23 14:42 [gcc/devel/c++-modules] Save ref->speculative_id before clone_reference Nathan Sidwell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).