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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |kargl at gcc dot gnu.org
         Resolution|---                         |INVALID

--- Comment #1 from kargl at gcc dot gnu.org ---
(In reply to Shubham Narlawar from comment #0)
> For below testcase, I ran on godbolt.org GFORTRAN trunk. Here are some
> observations - 
> 
> gfortran throws an error for BGE intrinsic when the value of one of
> parameter is -2147483648 which should not be according to permissible range
> of BGE, the maximum range for default kind is (-2147483648, 2147483647)
> 
> derived as -2^31 to 2^31 - 1
> 
> whereas x86-64 ifort 19.0.0 (Intel's fortran compiler) gives output without
> error.
> 
> 
> --------------------------------TESTCASE-----------------------------------
> 
> subroutine print_pass_fail(expected, actual)
> implicit none
>   logical :: actual, expected
>    if ( actual .eqv. expected )then
>         print *, "PASS"
>    else
>         print *, "FAIL"
> end if
> end subroutine print_pass_fail
> program bge_test_base
>       implicit none
>       logical :: index
>       index = BGE(127, -2147483648);
>       !print *, index
>       call print_pass_fail (.true.,index)
> end program

There are no negative integers.  There are integers and unary minus operator. 
This means that "-2147483648" is parse as "unary minus 2147483648".  2147483648
is too big for its kind.

Reply via email to