diff options
author | Richard Henderson <rth@redhat.com> | 2001-10-11 10:46:53 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2001-10-11 10:46:53 -0700 |
commit | 8063ddcf237c3bb42fc0b09d19dad816d0dc0b28 (patch) | |
tree | e3d1221dd3890e45b2570a9d103eda4dfa333f05 /gcc/dwarf2out.c | |
parent | 0faae2f5222db231c1287c1dda3499e88a29946d (diff) | |
download | gcc-8063ddcf237c3bb42fc0b09d19dad816d0dc0b28.zip gcc-8063ddcf237c3bb42fc0b09d19dad816d0dc0b28.tar.gz gcc-8063ddcf237c3bb42fc0b09d19dad816d0dc0b28.tar.bz2 |
dwarf2out.c (rtl_for_decl_location): If no DECL_RTL, look for a DECL_INITIAL.
* dwarf2out.c (rtl_for_decl_location): If no DECL_RTL, look
for a DECL_INITIAL.
From-SVN: r46193
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index e8a5f18..275e5b4 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -8567,6 +8567,16 @@ rtl_for_decl_location (decl) #endif } + /* A variable with no DECL_RTL but a DECL_INITIAL is a compile-time + constant, and will have been substituted directly into all + expressions that use it. C does not have such a concept, but + C++ and other languages do. */ + else if (DECL_INITIAL (decl)) + { + rtl = expand_expr (DECL_INITIAL (decl), NULL_RTX, VOIDmode, + EXPAND_INITIALIZER); + } + return rtl; } |