aboutsummaryrefslogtreecommitdiff
path: root/gcc/langhooks.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-12-16 23:07:10 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2009-12-16 23:07:10 +0000
commitcb799353d6b2f1972bb59a26654d57b7c4d526de (patch)
treea2fa08ca483d4b193a92311ed0fad9cd52d6aa09 /gcc/langhooks.c
parent483a1dce8a60446bef569c47f371fe7e8b50010a (diff)
downloadgcc-cb799353d6b2f1972bb59a26654d57b7c4d526de.zip
gcc-cb799353d6b2f1972bb59a26654d57b7c4d526de.tar.gz
gcc-cb799353d6b2f1972bb59a26654d57b7c4d526de.tar.bz2
re PR lto/42392 ([LTO] ICE with top level asm)
2009-12-16 Richard Guenther <rguenther@suse.de> PR lto/42392 * langhooks.c (lhd_begin_section): Make sure to switch back to the text section, not some random one. * gcc.dg/lto/20091216-1_0.c: New testcase. From-SVN: r155298
Diffstat (limited to 'gcc/langhooks.c')
-rw-r--r--gcc/langhooks.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index 8505ec4..92eacd4 100644
--- a/gcc/langhooks.c
+++ b/gcc/langhooks.c
@@ -604,6 +604,8 @@ lhd_begin_section (const char *name)
/* Save the old section so we can restore it in lto_end_asm_section. */
gcc_assert (!saved_section);
saved_section = in_section;
+ if (!saved_section)
+ saved_section = text_section;
/* Create a new section and switch to it. */
section = get_section (name, SECTION_DEBUG, NULL);