This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Re: [PATCH] Fix nrv-1.c false failure on aarch64.


On 10/26/2017 05:03 PM, Jeff Law wrote:
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
Hi Jeff,

Thank you for the review. Your analysis of the issue is correct. Indeed, I realized after the first reviews that the test was aiming the debugging experience rather than the functionality of the executable. As a result, I withdraw this patch.

Earlier reviewers mentioned Alex Oliva's SFN work could fix this test case as well. I verified that. His patches are currently in review. I am following and waiting for their progress before any further action.

Egeyar


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