integrate.c (copy_insn_list): Remove REG_LABEL notes.

* integrate.c (copy_insn_list): Remove REG_LABEL notes.

	* gcc.dg/20000707-1.c: New test.

From-SVN: r34907
This commit is contained in:
Jakub Jelinek 2000-07-07 22:06:57 +02:00 committed by Jakub Jelinek
parent f5afd9e924
commit ca81c149d4
4 changed files with 35 additions and 3 deletions

View File

@ -1,3 +1,7 @@
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

View 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)

View File

@ -1,3 +1,7 @@
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.

View File

@ -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();
}