aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2017-07-26 10:52:37 +0200
committerMartin Liska <marxin@gcc.gnu.org>2017-07-26 08:52:37 +0000
commit108c3c88d7273be093ff1431760bff5774381ac1 (patch)
treee6e7217bb711dfa24d97cebd3c4daad78029b430 /gcc/function.c
parent9cda17b5c6411df40b865838bc99d55709d7ae21 (diff)
downloadgcc-108c3c88d7273be093ff1431760bff5774381ac1.zip
gcc-108c3c88d7273be093ff1431760bff5774381ac1.tar.gz
gcc-108c3c88d7273be093ff1431760bff5774381ac1.tar.bz2
Move non-local goto expansion after parm_birth_insn (PR sanitize/81186).
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-26 Martin Liska <mliska@suse.cz> PR sanitize/81186 * gcc.dg/asan/pr81186.c: New test. From-SVN: r250561
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 986f43f..62e72eb 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -5254,6 +5254,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)
@@ -5275,16 +5285,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