Hi,
instrumentation thunks are de-facto transparent aliases and thus their bodies
should not be streamed (longer term plan is to reorganize them to aliases).
This avoids an ICE when mixing instrumented and non-instrumented files in LTO.

Bootstrapped/regtested x86_64-linux, plan to commit it if there are no 
complains.

Honza

        * lto-streamer-out.c (lto_output): Do not stream instrumentation
        thunks.
Index: lto-streamer-out.c
===================================================================
--- lto-streamer-out.c  (revision 232466)
+++ lto-streamer-out.c  (working copy)
@@ -2320,7 +2320,8 @@ lto_output (void)
       if (cgraph_node *node = dyn_cast <cgraph_node *> (snode))
        {
          if (lto_symtab_encoder_encode_body_p (encoder, node)
-             && !node->alias)
+             && !node->alias
+             && (!node->thunk.thunk_p || !node->instrumented_version))
            {
              if (flag_checking)
                {

Reply via email to