https://bugs.llvm.org/show_bug.cgi?id=35619
Bug ID: 35619
Summary: Debug location missing for collapsed returns with opt
> 0
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: DebugInfo
Assignee: unassignedb...@nondot.org
Reporter: pmatos@linki.tools
CC: llvm-bugs@lists.llvm.org
This is a hard one to solve in the general case.
For example:
#include <stdint.h>
volatile int16_t a_val = 2;
volatile int16_t arr[30];
int16_t __attribute__((noinline)) foo3(int16_t a, int16_t b) {
if(a > b) {
return 10;
}
else if(a + 10 > b) {
return 100;
}
else {
return 70;
}
}
int main() {
arr[6] = foo3(1000, 101);
return (int)(arr[6] & 0xff);
}
If one, compiles with optimization on (like -Os) runs this and sets a
breakpoint in 'return 10;' this breakpoint is not hit even though we do return
10.
I understand the general problem, returns are collapsed and debug locs are
lost. However, I think it might be useful to have a tracking bug for this kind
of thing.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs