summaryrefslogtreecommitdiffstats
path: root/elaborate.cxx
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2008-05-21 11:42:51 -0400
committerFrank Ch. Eigler <fche@elastic.org>2008-05-21 11:42:51 -0400
commitd0c4107b0e02c31acb062de829c6d104cb6918df (patch)
tree0bef81ad6399fba8b5995bff85d22d9ed6c84d20 /elaborate.cxx
parentf61c1f2d83a57ffd207573dc47b913dd45b9e317 (diff)
downloadsystemtap-steved-d0c4107b0e02c31acb062de829c6d104cb6918df.tar.gz
systemtap-steved-d0c4107b0e02c31acb062de829c6d104cb6918df.tar.xz
systemtap-steved-d0c4107b0e02c31acb062de829c6d104cb6918df.zip
PR6538: fix treatment of initialized globals
Diffstat (limited to 'elaborate.cxx')
-rw-r--r--elaborate.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/elaborate.cxx b/elaborate.cxx
index f8bfabdb..26786c00 100644
--- a/elaborate.cxx
+++ b/elaborate.cxx
@@ -1683,7 +1683,8 @@ void semantic_pass_opt2 (systemtap_session& s, bool& relaxed_p)
}
else
{
- if (vut.written.find (l) == vut.written.end())
+ if (vut.written.find (l) == vut.written.end() &&
+ ! l->init) // no initializer
if (! s.suppress_warnings)
clog << "WARNING: read-only global variable " << *l->tok << endl;
i++;