Commit a9deb256 by Jan Hubicka Committed by Jan Hubicka

re PR middle-end/43391 (make_decl_rtl failure for C++ on AIX and HPUX)

	PR middle-end/43391
	* varasm.c (make_decl_rtl): Deal with COMMON flag to make
	notice_global_symbol work.

From-SVN: r157773
parent 5a9c8a1b
2010-03-27 Jan Hubicka <jh@suse.cz>
PR middle-end/43391
* varasm.c (make_decl_rtl): Deal with COMMON flag to make
notice_global_symbol work.
2010-03-27 Jakub Jelinek <jakub@redhat.com> 2010-03-27 Jakub Jelinek <jakub@redhat.com>
* dwarf2out.c (dwarf2_debug_hooks): Use dwarf2out_function_decl * dwarf2out.c (dwarf2_debug_hooks): Use dwarf2out_function_decl
......
...@@ -1435,16 +1435,19 @@ make_decl_rtl (tree decl) ...@@ -1435,16 +1435,19 @@ make_decl_rtl (tree decl)
/* Specifying a section attribute on a variable forces it into a /* Specifying a section attribute on a variable forces it into a
non-.bss section, and thus it cannot be common. */ non-.bss section, and thus it cannot be common. */
gcc_assert (!(TREE_CODE (decl) == VAR_DECL /* FIXME: In general this code should not be necessary because
&& DECL_SECTION_NAME (decl) != NULL_TREE visibility pass is doing the same work. But notice_global_symbol
&& DECL_INITIAL (decl) == NULL_TREE is called early and it needs to make DECL_RTL to get the name.
&& DECL_COMMON (decl)) we take care of recomputing the DECL_RTL after visibility is changed. */
|| !DECL_COMMON (decl)); if (TREE_CODE (decl) == VAR_DECL
&& DECL_SECTION_NAME (decl) != NULL_TREE
&& DECL_INITIAL (decl) == NULL_TREE
&& DECL_COMMON (decl))
DECL_COMMON (decl) = 0;
/* Variables can't be both common and weak. */ /* Variables can't be both common and weak. */
gcc_assert (TREE_CODE (decl) != VAR_DECL if (TREE_CODE (decl) == VAR_DECL && DECL_WEAK (decl))
|| !DECL_WEAK (decl) DECL_COMMON (decl) = 0;
|| !DECL_COMMON (decl));
if (use_object_blocks_p () && use_blocks_for_decl_p (decl)) if (use_object_blocks_p () && use_blocks_for_decl_p (decl))
x = create_block_symbol (name, get_block_for_decl (decl), -1); x = create_block_symbol (name, get_block_for_decl (decl), -1);
......
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