Re: [PATCH] Fix ICE with -Walloca-larger-than=[>INT_MAX] (PR middle-end/79809)

2017-03-08 Thread Marek Polacek
On Wed, Mar 08, 2017 at 12:30:59PM +0100, Andreas Schwab wrote: > On Mär 02 2017, Marek Polacek wrote: > > > diff --git gcc/testsuite/g++.dg/Walloca1.C gcc/testsuite/g++.dg/Walloca1.C > > index e69de29..23b97e8 100644 > > --- gcc/testsuite/g++.dg/Walloca1.C > > +++ gcc/testsuite/g++.dg/Walloca1.C

Re: [PATCH] Fix ICE with -Walloca-larger-than=[>INT_MAX] (PR middle-end/79809)

2017-03-08 Thread Andreas Schwab
On Mär 02 2017, Marek Polacek wrote: > diff --git gcc/testsuite/g++.dg/Walloca1.C gcc/testsuite/g++.dg/Walloca1.C > index e69de29..23b97e8 100644 > --- gcc/testsuite/g++.dg/Walloca1.C > +++ gcc/testsuite/g++.dg/Walloca1.C > @@ -0,0 +1,6 @@ > +/* PR middle-end/79809 */ > +/* { dg-do compile } */ >

Re: [PATCH] Fix ICE with -Walloca-larger-than=[>INT_MAX] (PR middle-end/79809)

2017-03-07 Thread Jeff Law
On 03/02/2017 05:32 AM, Marek Polacek wrote: As demonstrated by this test, we can crash on the assert in alloca_call_type: gcc_assert (is_vla || warn_alloca_limit > 0); when -Walloca-larger-than= receives an argument greater than INT_MAX. Even though warn_vla_limit is marked as UInteger in c.opt

Re: [PATCH] Fix ICE with -Walloca-larger-than=[>INT_MAX] (PR middle-end/79809)

2017-03-02 Thread Martin Liška
On 03/02/2017 01:32 PM, Marek Polacek wrote: > It's probably too late to change opt-functions.awk now, so the following > is a badn aid fix. Thanks for the patch, I've written this to my TODO list for new stage1. It's bit connected to IntegerRange attribute which I would like to append to options.

[PATCH] Fix ICE with -Walloca-larger-than=[>INT_MAX] (PR middle-end/79809)

2017-03-02 Thread Marek Polacek
As demonstrated by this test, we can crash on the assert in alloca_call_type: gcc_assert (is_vla || warn_alloca_limit > 0); when -Walloca-larger-than= receives an argument greater than INT_MAX. Even though warn_vla_limit is marked as UInteger in c.opt, those are still represented as ints; opt-func