[Bug translator/11366] @defined() and unoptimized stap -u don't work nicely together

mjw at redhat dot com sourceware-bugzilla@sourceware.org
Wed Mar 10 14:57:00 GMT 2010


------- Additional Comments From mjw at redhat dot com  2010-03-10 14:56 -------
Testing patch:

diff --git a/elaborate.cxx b/elaborate.cxx
index 07a2ed6..11d6142 100644
--- a/elaborate.cxx
+++ b/elaborate.cxx
@@ -3674,8 +3674,9 @@ semantic_pass_optimize1 (systemtap_session& s)
 
       // For listing mode, we need const-folding regardless of optimization so
       // that @defined expressions can be properly resolved.  PR11360
-      if (!s.unoptimized || s.listing_mode_vars)
-        semantic_pass_const_fold (s, relaxed_p);
+      // We also want it in case variables are used in if/case expressions,
+      // so enable always.  PR11366
+      semantic_pass_const_fold (s, relaxed_p);
 
       iterations ++;
     }


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|systemtap at sources dot    |mjw at redhat dot com
                   |redhat dot com              |
             Status|NEW                         |ASSIGNED


http://sourceware.org/bugzilla/show_bug.cgi?id=11366

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Systemtap mailing list