Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: bad debug_line stmt selection for if statement involving string comparison #31138
Given the following program:
for line 15 (
Both instructions selected as statements (0x450c03 and 0x450c19) happen after a check on string length, something like 0x450bea or 0x450bf4 would be more appropriate.
It's only happen if you disable optimization, which
If you move
For me, the compiler does reverse logic here. I expect the behavior of non-optimization happens in optimization mode.
git bisect points to 2578ac5
It seems to be reasonable, because with optimization,
What should we do in this case? cc @josharian