Commit 65f3dedb by Richard Sandiford Committed by Richard Sandiford

emit-rtl.c (try_split): Use a loop to search for NOTE_INSN_CALL_ARG_LOCATIONs.

gcc/
	* emit-rtl.c (try_split): Use a loop to search for
	NOTE_INSN_CALL_ARG_LOCATIONs.

gcc/testsuite/
	From Ryan Mansfield
	* gcc.dg/pr48826.c: New test.

From-SVN: r174401
parent 61e374ab
2011-05-29 Richard Sandiford <rdsandiford@googlemail.com>
* emit-rtl.c (try_split): Use a loop to search for
NOTE_INSN_CALL_ARG_LOCATIONs.
2011-05-29 Richard Guenther <rguenther@suse.de> 2011-05-29 Richard Guenther <rguenther@suse.de>
PR tree-optimization/49217 PR tree-optimization/49217
......
...@@ -3494,15 +3494,14 @@ try_split (rtx pat, rtx trial, int last) ...@@ -3494,15 +3494,14 @@ try_split (rtx pat, rtx trial, int last)
we must move any following NOTE_INSN_CALL_ARG_LOCATION note we must move any following NOTE_INSN_CALL_ARG_LOCATION note
so that it comes immediately after the new call. */ so that it comes immediately after the new call. */
if (NEXT_INSN (insn)) if (NEXT_INSN (insn))
{ for (next = NEXT_INSN (trial);
next = NEXT_INSN (trial); next && NOTE_P (next);
if (next next = NEXT_INSN (next))
&& NOTE_P (next) if (NOTE_KIND (next) == NOTE_INSN_CALL_ARG_LOCATION)
&& NOTE_KIND (next) == NOTE_INSN_CALL_ARG_LOCATION)
{ {
remove_insn (next); remove_insn (next);
add_insn_after (next, insn, NULL); add_insn_after (next, insn, NULL);
} break;
} }
} }
} }
......
2011-05-29 Richard Sandiford <rdsandiford@googlemail.com>
From Ryan Mansfield
* gcc.dg/pr48826.c: New test.
2011-05-29 Richard Guenther <rguenther@suse.de> 2011-05-29 Richard Guenther <rguenther@suse.de>
PR tree-optimization/49217 PR tree-optimization/49217
......
/* { dg-options "-O -g -w" } */
void bar (int *);
void
foo ()
{
int *const pc = __builtin_return_address (0);
bar (pc);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment