On 10/18/2017 10:59 AM, Egeyar Bagcioglu wrote:
Hello,
Test case "guality.exp=nrv-1.c" fails on aarch64. Optimizations reorder
the instructions and cause the value of a variable to be checked before
its first assignment. The following patch is moving the
break point to the end of the function. Therefore, it ensures that the
break point is reached after the assignment instruction is executed.
Please review the patch and apply if legitimate.
This seems wrong.
If I understand the test correctly, we want to break on the line with
the assignment to a2.i[4] = 7 and verify that before that line executes
that a2.i[0] == 42.
Moving the test point to the end of the function seems to defeat the
purpose of the test. A breakpoint at the end of the function to test
state is pointless as it doesn't reflect what a user is likely to want
to do.
I'm guessing based on your description that optimization has sunk the
assignment to a2.i[0] down past the assignment to a2.i[4]? What
optimization did this and what do the dwarf records look like?
Jeff