This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix nrv-1.c false failure on aarch64.
- From: "Richard Earnshaw (lists)" <Richard dot Earnshaw at arm dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>, Egeyar Bagcioglu <egeyar dot bagcioglu at oracle dot com>, Alexandre Oliva <aoliva at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 19 Oct 2017 13:47:27 +0100
- Subject: Re: [PATCH] Fix nrv-1.c false failure on aarch64.
- Authentication-results: sourceware.org; auth=none
- References: <583990e4-7340-f9ac-686d-ccc5b4fb7a7d@oracle.com> <CAFiYyc3ueo5hqWTNQSJ6To9hfZ_=a4xHn7DDLjcR=ehwHjUJMw@mail.gmail.com>
On 19/10/17 09:14, Richard Biener wrote:
> On Wed, Oct 18, 2017 at 6:59 PM, Egeyar Bagcioglu
> <egeyar.bagcioglu@oracle.com> 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.
>
> guality testcases are mostly user-experience tests but they are indeed
> prone to the usual jumpiness. As a user we'd expect a breakpoint
> on this line to trigger only if previous stmts have been committed.
>
If all the side effects of the later expression occur before any of the
side effects of the earlier one then this would never happen.
You might be able to concoct dwarf expressions that gave the appearance
of the expression having been evaluated, but memory dumping would almost
certainly reveal that memory hadn't really been updated at that point.
> I guess Alex work on stmt frontiers will fix this instance?
Don't stmt frontiers just enable you to identify exactly one stopping
point with each statement, so that you don't keep repeatedly stepping to
the same line?
R.
>
> Richard.
>
>> Egeyar
>>