On FC5 gcc (GCC) 4.1.1 20060525:
expected:<62> but was:<61>
This should not happen since the fix for the innermost frame is already in.
Created attachment 1352 [details]
Patch that works around the bug in GCC
GCC over-optimizes the empty loop, such that it ends up without line number
notes, which is why debug info only mentions the previous line. Adding
something that GCC does not understand (an empty asm) will still generate the
same code, but the debug info won't be optimized away.
I'll look into improving GCC so as to not over-optimize debug info in this
case, but it looks hard and it's sort-of pointless.
Discussion about the GCC problem started at
The bug appears also in the frysk test program funit-rt-threader.c. The while
loop at line 71 is sometimes reported as being at line 71 or at line 72.
*** Bug 3814 has been marked as a duplicate of this bug. ***
Confirmed still a problem with: gcc (GCC) 4.1.2 20070925 (Red Hat 4.1.2-31)
$ frysk-core/frysk/pkglibdir/funit-rt-looper 0 0 &
$ frysk-core/frysk/bindir/fstack -a $!
#0 0x0804864e in baz()
[...] # Line number should be 62, not 61.