aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2010-07-14 09:22:06 -0700
committerRichard Henderson <rth@gcc.gnu.org>2010-07-14 09:22:06 -0700
commitfc7fcda12bd16c2c7515d9d1d1350c3547916e5c (patch)
tree874b2a508d9c0b1ec4eb686294037a1d6c7610d6 /gcc/varasm.c
parenteab3f92e9569d18a1dc9f9080bf91fc365143f65 (diff)
downloadgcc-fc7fcda12bd16c2c7515d9d1d1350c3547916e5c.zip
gcc-fc7fcda12bd16c2c7515d9d1d1350c3547916e5c.tar.gz
gcc-fc7fcda12bd16c2c7515d9d1d1350c3547916e5c.tar.bz2
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
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 5fad5f0..55218c4 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -2150,6 +2150,9 @@ assemble_variable (tree decl, int top_level ATTRIBUTE_UNUSED,
rtx decl_rtl, symbol;
section *sect;
+ /* This function is supposed to handle VARIABLES. Ensure we have one. */
+ gcc_assert (TREE_CODE (decl) == VAR_DECL);
+
if (! targetm.have_tls
&& TREE_CODE (decl) == VAR_DECL
&& DECL_THREAD_LOCAL_P (decl))
@@ -2188,12 +2191,6 @@ assemble_variable (tree decl, int top_level ATTRIBUTE_UNUSED,
if (DECL_EXTERNAL (decl))
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. */
if (DECL_RTL_SET_P (decl) && REG_P (DECL_RTL (decl)))
{