Commits

Iain Buclaw committed dea7e43

Issue #318 - ICE: tree check in lookup_decl_die

  • Participants
  • Parent commits 00ae62a

Comments (0)

Files changed (1)

File d/d-objfile.cc

         TREE_TYPE(t) = TREE_TYPE(DECL_INITIAL(t));
     }
 
+    // see dwarf2out.c:dwarf2out_decl gcc expects local statics
+    // to have context pointing to nested function, not record.
+    DECL_CONTEXT(t) = decl_function_context(t);
+
     if (! g.ofile->shouldEmit(sym))
         return;