Re: [testsuite/guality, committed] Prevent optimization of local in vla-1.c

2018-07-04 Thread Tom de Vries
On 07/03/2018 11:05 AM, Tom de Vries wrote: > On 07/02/2018 10:16 AM, Jakub Jelinek wrote: >> On Mon, Jul 02, 2018 at 09:44:04AM +0200, Richard Biener wrote: >>> Given the array has size i + 1 it's upper bound should be 'i' and 'i' >>> should be available via DW_OP_[GNU_]entry_value. >>> >>> I see

Re: [testsuite/guality, committed] Prevent optimization of local in vla-1.c

2018-07-03 Thread Tom de Vries
On 07/02/2018 10:16 AM, Jakub Jelinek wrote: > On Mon, Jul 02, 2018 at 09:44:04AM +0200, Richard Biener wrote: >> Given the array has size i + 1 it's upper bound should be 'i' and 'i' >> should be available via DW_OP_[GNU_]entry_value. >> >> I see it is >> >> <175> DW_AT_upper_bound : 10 byte

Re: [testsuite/guality, committed] Prevent optimization of local in vla-1.c

2018-07-02 Thread Jakub Jelinek
On Mon, Jul 02, 2018 at 09:44:04AM +0200, Richard Biener wrote: > Given the array has size i + 1 it's upper bound should be 'i' and 'i' > should be available via DW_OP_[GNU_]entry_value. > > I see it is > > <175> DW_AT_upper_bound : 10 byte block: 75 1 8 20 24 8 20 26 31 > 1c (DW_OP_b

Re: [testsuite/guality, committed] Prevent optimization of local in vla-1.c

2018-07-02 Thread Richard Biener
On Sun, Jul 1, 2018 at 9:25 PM Tom de Vries wrote: > > 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 > >>

Re: [testsuite/guality, committed] Prevent optimization of local in vla-1.c

2018-07-01 Thread Tom de Vries
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. >

Re: [testsuite/guality, committed] Prevent optimization of local in vla-1.c

2018-07-01 Thread Jakub Jelinek
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

[testsuite/guality, committed] Prevent optimization of local in vla-1.c

2018-07-01 Thread Tom de Vries
Hi, Atm vla-1.c has the following failures: ... FAIL: gcc.dg/guality/vla-1.c -O1 -DPREVENT_OPTIMIZATION line 17 sizeof (a) == 6 FAIL: gcc.dg/guality/vla-1.c -O2 -DPREVENT_OPTIMIZATION line 17 sizeof (a) == 6 FAIL: gcc.dg/guality/vla-1.c -O3 -g -DPREVENT_OPTIMIZATION line 17 sizeof (