Re: fstrict-enums and value ranges in VRP

2016-06-02 Thread Richard Biener
On Thu, Jun 2, 2016 at 2:53 AM, Trevor Saunders wrote: > On Thu, Jun 02, 2016 at 08:54:36AM +1000, kugan wrote: >> Hi All, >> >> When I compile the following code with g++ using -fstrict-enums and -O2 >> >> enum v >> { >> OK = 0, >> NOK = 1, >> }; >> >> int foo0 (enum v a) >> { >> if (a > NO

Re: fstrict-enums and value ranges in VRP

2016-06-01 Thread Trevor Saunders
On Thu, Jun 02, 2016 at 08:54:36AM +1000, kugan wrote: > Hi All, > > When I compile the following code with g++ using -fstrict-enums and -O2 > > enum v > { > OK = 0, > NOK = 1, > }; > > int foo0 (enum v a) > { > if (a > NOK) > return 0; > return 1; > } > > vrp1 dump looks like: > Va