[simplify.c] bug?
Jerry DeLisle
jvdelisle@verizon.net
Sun Jun 12 16:19:00 GMT 2005
Steve Kargl wrote:
> I instrumented gfc_simplify_asin() with
>
> int i,j;
>
> mpfr_out_str (stderr, 10, 0, x->value.real, GFC_RND_MODE);
> i = mpfr_cmp_si (x->value.real, 1);
> j = mpfr_cmp_si (x->value.real, -1);
> printf("\ni = %d, j = %d\n", i, j);
>
> if (i > 0 || j < 0)
> {
> printf("here\n");
> gfc_error ("Argument of ASIN at %L must be between -1 and 1", &x->where);
> printf("there\n");
> return &gfc_bad_expr;
> printf("where\n");
> }
>
> which gives
>
> kargl[214] gfc41 -static -o z asin.f90
> 1.10000000000000
> i = 1, j = 1
> here
> there
> kargl[217] ./z
> NaN
>
> So &gfc_bad_expr appears to be set to something that permits
> compilation to continue without an error.
>
gfc_error did not print either from your output so gfc_suppress_error
must be getting set somewhere?
Jerry
More information about the Fortran
mailing list