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: [testsuite/guality, committed] Prevent optimization of local in vla-1.c


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.

> [testsuite/guality] Prevent optimization of local in vla-1.c
> 
> 2018-07-01  Tom de Vries  <tdevries@suse.de>
> 
> 	* gcc.dg/guality/prevent-optimization.h (VOLATILE): Define.
> 	* gcc.dg/guality/vla-1.c (f1): Mark local vla a as VOLATILE.

	Jakub


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