OSDN Git Service

Fix for aliasing problem reported by Michael Matz.
[pf3gnuchains/gcc-fork.git] / gcc / except.c
index 220835e..5958eae 100644 (file)
@@ -2047,8 +2047,12 @@ sjlj_emit_function_enter (rtx dispatch_label)
   if (cfun->uses_eh_lsda)
     {
       char buf[20];
+      rtx sym;
+
       ASM_GENERATE_INTERNAL_LABEL (buf, "LLSDA", current_function_funcdef_no);
-      emit_move_insn (mem, gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf)));
+      sym = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf));
+      SYMBOL_REF_FLAGS (sym) = SYMBOL_FLAG_LOCAL;
+      emit_move_insn (mem, sym);
     }
   else
     emit_move_insn (mem, const0_rtx);
@@ -3709,6 +3713,7 @@ output_function_exception_table (void)
             care of this for us.  */
          if (TREE_CODE (type) == ADDR_EXPR)
            {
+             type = TREE_OPERAND (type, 0);
              node = cgraph_varpool_node (type);
              if (node)
                cgraph_varpool_mark_needed_node (node);