Backport r250561
2017-07-27 Martin Liska <mliska@suse.cz> Backport from mainline 2017-07-26 Martin Liska <mliska@suse.cz> PR sanitize/81186 * function.c (expand_function_start): Make expansion of nonlocal_goto_save_area after parm_birth_insn. 2017-07-27 Martin Liska <mliska@suse.cz> Backport from mainline 2017-07-26 Martin Liska <mliska@suse.cz> PR sanitize/81186 * gcc.dg/asan/pr81186.c: New test. From-SVN: r250605
This commit is contained in:
parent
da7b783895
commit
4dad7c1d13
@ -1,3 +1,12 @@
|
||||
2017-07-27 Martin Liska <mliska@suse.cz>
|
||||
|
||||
Backport from mainline
|
||||
2017-07-26 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR sanitize/81186
|
||||
* function.c (expand_function_start): Make expansion of
|
||||
nonlocal_goto_save_area after parm_birth_insn.
|
||||
|
||||
2017-07-27 Martin Liska <mliska@suse.cz>
|
||||
|
||||
Backport from mainline
|
||||
|
@ -5263,6 +5263,16 @@ expand_function_start (tree subr)
|
||||
}
|
||||
}
|
||||
|
||||
/* The following was moved from init_function_start.
|
||||
The move is supposed to make sdb output more accurate. */
|
||||
/* Indicate the beginning of the function body,
|
||||
as opposed to parm setup. */
|
||||
emit_note (NOTE_INSN_FUNCTION_BEG);
|
||||
|
||||
gcc_assert (NOTE_P (get_last_insn ()));
|
||||
|
||||
parm_birth_insn = get_last_insn ();
|
||||
|
||||
/* If the function receives a non-local goto, then store the
|
||||
bits we need to restore the frame pointer. */
|
||||
if (cfun->nonlocal_goto_save_area)
|
||||
@ -5284,16 +5294,6 @@ expand_function_start (tree subr)
|
||||
update_nonlocal_goto_save_area ();
|
||||
}
|
||||
|
||||
/* The following was moved from init_function_start.
|
||||
The move is supposed to make sdb output more accurate. */
|
||||
/* Indicate the beginning of the function body,
|
||||
as opposed to parm setup. */
|
||||
emit_note (NOTE_INSN_FUNCTION_BEG);
|
||||
|
||||
gcc_assert (NOTE_P (get_last_insn ()));
|
||||
|
||||
parm_birth_insn = get_last_insn ();
|
||||
|
||||
if (crtl->profile)
|
||||
{
|
||||
#ifdef PROFILE_HOOK
|
||||
|
@ -1,3 +1,11 @@
|
||||
2017-07-27 Martin Liska <mliska@suse.cz>
|
||||
|
||||
Backport from mainline
|
||||
2017-07-26 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR sanitize/81186
|
||||
* gcc.dg/asan/pr81186.c: New test.
|
||||
|
||||
2017-07-27 Martin Liska <mliska@suse.cz>
|
||||
|
||||
Backport from mainline
|
||||
|
18
gcc/testsuite/gcc.dg/asan/pr81186.c
Normal file
18
gcc/testsuite/gcc.dg/asan/pr81186.c
Normal file
@ -0,0 +1,18 @@
|
||||
/* PR sanitizer/81186 */
|
||||
/* { dg-do run } */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
__label__ l;
|
||||
void f ()
|
||||
{
|
||||
int a[123];
|
||||
|
||||
goto l;
|
||||
}
|
||||
|
||||
f ();
|
||||
l:
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user