This is the mail archive of the
mailing list for the GCC project.
Re: [testsuite/guality, committed] Prevent optimization of local in vla-1.c
- From: Tom de Vries <tdevries at suse dot de>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 1 Jul 2018 21:25:27 +0200
- Subject: Re: [testsuite/guality, committed] Prevent optimization of local in vla-1.c
- References: <20180701161920.lzm5ikaiyr3pspxn@delia> <20180701191137.GQ7166@tucnak>
On 07/01/2018 09:11 PM, Jakub Jelinek wrote:
> On Sun, Jul 01, 2018 at 06:19:20PM +0200, Tom de Vries wrote:
>> So, the local vla a is optimized away.
>> This patch adds VOLATILE to 'a', which prevents it from being optimized away,
>> and fixes the non-lto failures.
>> Committed as obvious.
> That isn't obvious, it is just wrong.
> The intent of the testcase is to test how debugging of optimized code with
> VLAs works. With your change we don't test that anymore. Please revert.
Sure, but ... if this is wrong, then for my understanding can you
explain to me how the fail should be addressed?
[ FWIW, I considered this obvious, given the ok for "[testsuite] Fix
guality/pr45882.c for flto" (
https://gcc.gnu.org/ml/gcc-patches/2018-06/msg01304.html ) which seemed
similar to me. ]
>> [testsuite/guality] Prevent optimization of local in vla-1.c
>> 2018-07-01 Tom de Vries <firstname.lastname@example.org>
>> * gcc.dg/guality/prevent-optimization.h (VOLATILE): Define.
>> * gcc.dg/guality/vla-1.c (f1): Mark local vla a as VOLATILE.