Commit fc7fcda1 by Richard Henderson Committed by Richard Henderson

passes.c (rest_of_decl_compilation): Do not call

        * passes.c (rest_of_decl_compilation): Do not call
        * assemble_variable for functions.
        * varasm.c (assemble_variable): Remove early exit for functions;
        assert that we're given a variable.

From-SVN: r162184
parent eab3f92e
2010-07-14 Richard Henderson <rth@redhat.com>
* passes.c (rest_of_decl_compilation): Do not call assemble_variable
for functions.
* varasm.c (assemble_variable): Remove early exit for functions;
assert that we're given a variable.
2010-07-14 Jie Zhang <jie@codesourcery.com> 2010-07-14 Jie Zhang <jie@codesourcery.com>
* config/arm/cortex-a8.md (cortex_a8_alu): Don't use * config/arm/cortex-a8.md (cortex_a8_alu): Don't use
......
...@@ -194,8 +194,6 @@ rest_of_decl_compilation (tree decl, ...@@ -194,8 +194,6 @@ rest_of_decl_compilation (tree decl,
; ;
else if (TREE_CODE (decl) != FUNCTION_DECL) else if (TREE_CODE (decl) != FUNCTION_DECL)
varpool_finalize_decl (decl); varpool_finalize_decl (decl);
else
assemble_variable (decl, top_level, at_end, 0);
} }
#ifdef ASM_FINISH_DECLARE_OBJECT #ifdef ASM_FINISH_DECLARE_OBJECT
......
...@@ -2150,6 +2150,9 @@ assemble_variable (tree decl, int top_level ATTRIBUTE_UNUSED, ...@@ -2150,6 +2150,9 @@ assemble_variable (tree decl, int top_level ATTRIBUTE_UNUSED,
rtx decl_rtl, symbol; rtx decl_rtl, symbol;
section *sect; section *sect;
/* This function is supposed to handle VARIABLES. Ensure we have one. */
gcc_assert (TREE_CODE (decl) == VAR_DECL);
if (! targetm.have_tls if (! targetm.have_tls
&& TREE_CODE (decl) == VAR_DECL && TREE_CODE (decl) == VAR_DECL
&& DECL_THREAD_LOCAL_P (decl)) && DECL_THREAD_LOCAL_P (decl))
...@@ -2188,12 +2191,6 @@ assemble_variable (tree decl, int top_level ATTRIBUTE_UNUSED, ...@@ -2188,12 +2191,6 @@ assemble_variable (tree decl, int top_level ATTRIBUTE_UNUSED,
if (DECL_EXTERNAL (decl)) if (DECL_EXTERNAL (decl))
return; return;
/* Output no assembler code for a function declaration.
Only definitions of functions output anything. */
if (TREE_CODE (decl) == FUNCTION_DECL)
return;
/* Do nothing for global register variables. */ /* Do nothing for global register variables. */
if (DECL_RTL_SET_P (decl) && REG_P (DECL_RTL (decl))) if (DECL_RTL_SET_P (decl) && REG_P (DECL_RTL (decl)))
{ {
......
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