https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78676

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[5/6/7 Regression]          |[5/6/7 Regression]
                   |Optimizer bug exposed by    |Optimizer bug with
                   |program with many bit       |-ftree-vrp exposed by
                   |operations                  |program with many bit
                   |                            |operations

--- Comment #6 from janus at gcc dot gnu.org ---
(In reply to janus from comment #5)
> gfortran 4.7 and 4.8 print at all optimization levels:
> 
>   -682598705          58
>   1741342173          32
> 
> That's also what 4.9 prints at -00 and -01. But then 4.9 (and upwards) print
> at -O2 and -O3:
> 
>   -682598705          57
>   1741342172          32
> 
> The error goes away if I remove the loop (even though it occurs already for
> i=1).

The latter is printed by 4.9 also with "-O1 -ftree-vrp", but not with
"-ftree-vrp" alone. In any case, this flag seems to be the culprit here.

Reply via email to