OSDN Git Service

* integrate.c (copy_insn_list): Remove REG_LABEL notes.
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 7 Jul 2000 20:06:57 +0000 (20:06 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 7 Jul 2000 20:06:57 +0000 (20:06 +0000)
* gcc.dg/20000707-1.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34907 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/integrate.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/20000707-1.c [new file with mode: 0644]

index 41df73b..b9261b3 100644 (file)
@@ -1,5 +1,9 @@
 2000-07-07  Jakub Jelinek  <jakub@redhat.com>
 
+       * integrate.c (copy_insn_list): Remove REG_LABEL notes.
+
+2000-07-07  Jakub Jelinek  <jakub@redhat.com>
+
        * sibcall.c (uses_addressof): Add INMEM argument, check for
        current_function_internal_arg_pointer outside of MEM rtxs in addition
        to ADDRESSOFs.
index eba94c1..93ed6d4 100644 (file)
@@ -1581,13 +1581,21 @@ copy_insn_list (insns, map, static_chain_value)
        && map->insn_map[INSN_UID (insn)]
        && REG_NOTES (insn))
       {
-       rtx tem = copy_rtx_and_substitute (REG_NOTES (insn), map, 0);
+       rtx next, note = copy_rtx_and_substitute (REG_NOTES (insn), map, 0);
 
        /* We must also do subst_constants, in case one of our parameters
           has const type and constant value.  */
-       subst_constants (&tem, NULL_RTX, map, 0);
+       subst_constants (&note, NULL_RTX, map, 0);
        apply_change_group ();
-       REG_NOTES (map->insn_map[INSN_UID (insn)]) = tem;
+       REG_NOTES (map->insn_map[INSN_UID (insn)]) = note;
+
+       /* Finally, delete any REG_LABEL notes from the chain.  */                
+       for (; note; note = next)
+         {
+           next = XEXP (note, 1);
+           if (REG_NOTE_KIND (note) == REG_LABEL)
+             remove_note (map->insn_map[INSN_UID (insn)], note);
+         }
       }
 
   if (local_return_label)
index e50a96c..096cea1 100644 (file)
@@ -1,5 +1,9 @@
 2000-07-07  Jakub Jelinek  <jakub@redhat.com>
 
+       * gcc.dg/20000707-1.c: New test.
+
+2000-07-07  Jakub Jelinek  <jakub@redhat.com>
+
        * gcc.c-torture/execute/20000706-1.c: New test.
        * gcc.c-torture/execute/20000706-2.c: New test.
        * gcc.c-torture/execute/20000706-3.c: New test.
diff --git a/gcc/testsuite/gcc.dg/20000707-1.c b/gcc/testsuite/gcc.dg/20000707-1.c
new file mode 100644 (file)
index 0000000..5328dfa
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wall" } */
+
+extern void foo(void *here);
+extern inline void bar(void)
+{
+  __label__ here;
+  foo(&&here);
+here:
+  ;
+}
+
+void baz(void)
+{
+  bar();
+}