This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/13504] New: -L type errors from variables that are optimized out


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

             Bug #: 13504
           Summary: -L type errors from variables that are optimized out
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap@sourceware.org
        ReportedBy: jistone@redhat.com
    Classification: Unclassified


We do very little optimization in probe listing -L mode, so we can see all
available variables, even though they're not referenced.  We always do
const-folding though, so @defined-conditional blocks can be wiped away without
producing errors in their content.  However, if there's a local variable that
only existed in a disappearing block, its vardecl will remain and cause an
unresolved-type error.  This can be seen in bug #13501 comment #5, and here is
a simpler reproducer:

$ cat foo/foo.stp 
probe foo = begin {
  if (@defined($bar))
    bar = $bar
}

$ stap -L foo -I foo
semantic error: unresolved type : identifier 'bar' at foo/foo.stp:3:5
        source:     bar = $bar
                    ^
foo bar:unknown

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]