https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61510

--- Comment #4 from jgreenhalgh at gcc dot gnu.org ---
Obviously something simple like this will fix the problem, but I don't know the
area to say that it doesn't just mask a deeper bug.

Honza?


---

2014-06-19  James Greenhalgh  <james.greenha...@arm.com>

    * cgraphunit.c (analyze_functions): Check we have an origin
    node before dereferencing it.


diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index
1b7ab330a3e51a9bc3336f64998f4d89b45d342b..82e5a6838e36c464191c533e163a00c825265c84
100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -1051,7 +1051,8 @@ analyze_functions (void)
         {
           struct cgraph_node *origin_node
               = cgraph_get_node (DECL_ABSTRACT_ORIGIN (decl));
-          origin_node->used_as_abstract_origin = true;
+          if (origin_node)
+            origin_node->used_as_abstract_origin = true;
         }
         }
       else

Reply via email to