[gfortran] PATCH range checking wrong part of complex number

Tobias Schlüter tobias.schlueter@physik.uni-muenchen.de
Mon May 17 23:41:00 GMT 2004


I committed this under the obviously correct rule. Quoting the whole 
mail so that the patch appears on gcc-patches.

- Tobi

Steve Kargl wrote:
> This patch should be obvious.
> 
> 2004-05-17  Steve Kargl  <kargls@comcast.net>
> 
>         * arith.c (gfc_real2complex): range checking wrong part of complex
>           number. 
> 
> 
> ------------------------------------------------------------------------
> 
> Index: arith.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/fortran/arith.c,v
> retrieving revision 1.5
> diff -u -r1.5 arith.c
> --- arith.c	16 May 2004 18:01:38 -0000	1.5
> +++ arith.c	17 May 2004 22:49:27 -0000
> @@ -2666,7 +2666,7 @@
>    mpf_set (result->value.complex.r, src->value.real);
>    mpf_set_ui (result->value.complex.i, 0);
>  
> -  if ((rc = gfc_check_real_range (result->value.complex.i, kind)) != ARITH_OK)
> +  if ((rc = gfc_check_real_range (result->value.complex.r, kind)) != ARITH_OK)
>      {
>        arith_error (rc, &src->ts, &result->ts, &src->where);
>        gfc_free_expr (result);



More information about the Gcc-patches mailing list