diff options
author | Mark Mitchell <mark@codesourcery.com> | 2005-07-22 17:40:37 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2005-07-22 17:40:37 +0000 |
commit | 9881e3e5e8b19559f67332ea3f027c315933aed0 (patch) | |
tree | 0803afaa84c77bde73aa2d88d39c8c1d727a9b2c /gcc/varasm.c | |
parent | 1a8d0d41ac5e1593cebec8a1fc7b01d5e61f7018 (diff) | |
download | gcc-9881e3e5e8b19559f67332ea3f027c315933aed0.zip gcc-9881e3e5e8b19559f67332ea3f027c315933aed0.tar.gz gcc-9881e3e5e8b19559f67332ea3f027c315933aed0.tar.bz2 |
re PR debug/21828 (debug info omitted for uninitialized variables)
PR debug/21828
* toplev.c (check_global_declarations): Do not mark undefined
variables as DECL_IGNORED_P.
* varasm.c (first_global_object_name): GTY it.
(weak_global_object_name): Likewise.
(notice_global_symbol): Use ggc_strdup, not xstrdup, when creating
a string to go into {weak,first}_global_object_name.
PR debug/21828
* gcc.dg/debug/dwarf2/dwarf-uninit.c: New test.
From-SVN: r102287
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index e4d3097..3ef8146 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -60,6 +60,9 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA #endif /* The (assembler) name of the first globally-visible object output. */ +extern GTY(()) const char *first_global_object_name; +extern GTY(()) const char *weak_global_object_name; + const char *first_global_object_name; const char *weak_global_object_name; @@ -1207,11 +1210,11 @@ notice_global_symbol (tree decl) if (!*type) { const char *p; - char *name; + const char *name; rtx decl_rtl = DECL_RTL (decl); p = targetm.strip_name_encoding (XSTR (XEXP (decl_rtl, 0), 0)); - name = xstrdup (p); + name = ggc_strdup (p); *type = name; } |