aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/ipa-devirt.c8
-rw-r--r--gcc/ipa-profile.c8
-rw-r--r--gcc/ipa.c2
4 files changed, 23 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 075b1a0..3f3a1bc 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2013-09-17 Jan Hubicka <jh@suse.cz>
+
+ PR middle-end/58329
+ * ipa-devirt.c (ipa_devirt): Be ready for symtab_nonoverwritable_alias
+ to return NULL.
+ * ipa.c (function_and_variable_visibility): Likewise.
+ * ipa-profile.c (ipa_profile): Likewise.
+
2013-09-17 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR ipa/58398
diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c
index 1be19f8..85bc5b0 100644
--- a/gcc/ipa-devirt.c
+++ b/gcc/ipa-devirt.c
@@ -1098,7 +1098,13 @@ ipa_devirt (void)
cgraph_node_name (likely_target),
likely_target->symbol.order);
if (!symtab_can_be_discarded ((symtab_node) likely_target))
- likely_target = cgraph (symtab_nonoverwritable_alias ((symtab_node)likely_target));
+ {
+ cgraph_node *alias;
+ alias = cgraph (symtab_nonoverwritable_alias
+ ((symtab_node)likely_target));
+ if (alias)
+ likely_target = alias;
+ }
nconverted++;
update = true;
cgraph_turn_edge_to_speculative
diff --git a/gcc/ipa-profile.c b/gcc/ipa-profile.c
index 2b22333..424e4a6 100644
--- a/gcc/ipa-profile.c
+++ b/gcc/ipa-profile.c
@@ -625,7 +625,13 @@ ipa_profile (void)
of N2. Speculate on the local alias to allow inlining.
*/
if (!symtab_can_be_discarded ((symtab_node) n2))
- n2 = cgraph (symtab_nonoverwritable_alias ((symtab_node)n2));
+ {
+ cgraph_node *alias;
+ alias = cgraph (symtab_nonoverwritable_alias
+ ((symtab_node)n2));
+ if (alias)
+ n2 = alias;
+ }
nconverted++;
cgraph_turn_edge_to_speculative
(e, n2,
diff --git a/gcc/ipa.c b/gcc/ipa.c
index 91d63eb..67b3bc0 100644
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -998,7 +998,7 @@ function_and_variable_visibility (bool whole_program)
{
struct cgraph_node *alias = cgraph (symtab_nonoverwritable_alias ((symtab_node) node));
- if (alias != node)
+ if (alias && alias != node)
{
while (node->callers)
{