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
This commit is contained in:
Richard Guenther 2009-12-16 23:07:10 +00:00 committed by Richard Biener
parent 483a1dce8a
commit cb799353d6
4 changed files with 22 additions and 0 deletions

View File

@ -1,3 +1,9 @@
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.
2009-12-16 Jakub Jelinek <jakub@redhat.com>
* tree-chrec.c (chrec_convert_1): Only fold (T2)(t +- x) to

View File

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

View File

@ -1,3 +1,8 @@
2009-12-16 Richard Guenther <rguenther@suse.de>
PR lto/42392
* gcc.dg/lto/20091216-1_0.c: New testcase.
2009-12-15 Jason Merrill <jason@redhat.com>
PR c++/42387

View File

@ -0,0 +1,9 @@
/* { dg-lto-do run } */
asm (".globl start; start: nop");
int
main ()
{
return 0;
}