This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] 69517 - [5/6 regression] SEGV on a VLA with excess initializer elements
- From: Christophe Lyon <christophe dot lyon at linaro dot org>
- To: Martin Sebor <msebor at gmail dot com>
- Cc: Andreas Schwab <schwab at suse dot de>, Jason Merrill <jason at redhat dot com>, Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 15 Apr 2016 09:10:58 +0200
- Subject: Re: [PATCH] 69517 - [5/6 regression] SEGV on a VLA with excess initializer elements
- Authentication-results: sourceware.org; auth=none
- References: <56DCDB80 dot 90208 at gmail dot com> <56F2DD43 dot 2000206 at redhat dot com> <56F2F2D8 dot 10708 at gmail dot com> <56F40CA1 dot 3060005 at redhat dot com> <56FEFE08 dot 8010207 at gmail dot com> <5702FA46 dot 9020807 at redhat dot com> <5706F5D5 dot 9030204 at gmail dot com> <570ADE43 dot 9080107 at gmail dot com> <570D3BC1 dot 1040608 at redhat dot com> <570E91B1 dot 90602 at gmail dot com> <mvmoa9cpj7k dot fsf at hawking dot suse dot de> <570FB693 dot 5080806 at gmail dot com>
On 14 April 2016 at 17:26, Martin Sebor <msebor@gmail.com> wrote:
> On 04/14/2016 04:39 AM, Andreas Schwab wrote:
>>
>> Martin Sebor <msebor@gmail.com> writes:
>>
>>> diff --git a/gcc/testsuite/g++.dg/cpp1y/vla11.C
>>> b/gcc/testsuite/g++.dg/cpp1y/vla11.C
>>> new file mode 100644
>>> index 0000000..af9624a
>>> --- /dev/null
>>> +++ b/gcc/testsuite/g++.dg/cpp1y/vla11.C
>>> @@ -0,0 +1,711 @@
>>> +// PR c++/69517 - [5/6 regression] SEGV on a VLA with excess initializer
>>> +// elements
>>> +// PR c++/70019 - VLA size overflow not detected
>>> +//
>>> +// Runtime test to verify that attempting to either construct a VLA with
>>> +// erroneous bounds, or initialize one with an initializer-list that
>>> +// contains more elements than the VLA's non-constant (runtime) bounds
>>> +// causes an exception to be thrown. Test also verifies that valid
>>> +// VLAs and their initializers don't cause such an exception.
>>> +
>>> +// { dg-do run { target c++11 } }
>>> +// { dg-additional-options "-Wno-vla" }
>>
>>
>> On m68k:
>>
>> /daten/aranym/gcc/gcc-20160414/gcc/testsuite/g++.dg/cpp1y/vla11.C: In
>> instantiation of 'struct TestType<32u>':
>> /daten/aranym/gcc/gcc-20160414/gcc/testsuite/g++.dg/cpp1y/vla11.C:201:1:
>> required from here
>> /daten/aranym/gcc/gcc-20160414/gcc/testsuite/g++.dg/cpp1y/vla11.C:89:27:
>> error: requested alignment 32 is larger than 16 [-Wattributes]
>
>
> Thank you for the heads up (and sorry about the breakage). I've
> committed r234976 to fix that.
>
Hi,
In your follow-up commit r234981, your gcc/testsuite/ChangeLog entry
says that you reverted vla11.C, but the commit does not actually
modify this testcase. As a matter of fact, I see it failing on arm and aarch64.
Did you forget to remove it, or did you expect r234976 to fix it?
Christophe.
> Martin