PR target/29943
authoramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 20 Feb 2007 01:25:41 +0000 (01:25 +0000)
committeramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 20 Feb 2007 01:25:41 +0000 (01:25 +0000)
* varasm.c (use_blocks_for_decl_p): Return false for decls with
alias attribute.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122148 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/varasm.c

index 6bab159..cc601c8 100644 (file)
@@ -1,3 +1,9 @@
+2007-02-20  Alan Modra  <amodra@bigpond.net.au>
+
+       PR target/29943
+       * varasm.c (use_blocks_for_decl_p): Return false for decls with
+       alias attribute.
+
 2007-02-19  Kazu Hirata  <kazu@codesourcery.com>
 
        * doc/invoke.texi (-ftree-lrs): Remove.
index cc83623..5671864 100644 (file)
@@ -1218,6 +1218,10 @@ use_blocks_for_decl_p (tree decl)
   if (DECL_INITIAL (decl) == decl)
     return false;
 
+  /* If this decl is an alias, then we don't want to emit a definition.  */
+  if (lookup_attribute ("alias", DECL_ATTRIBUTES (decl)))
+    return false;
+
   return true;
 }