This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [simplify.c] bug?
On Sun, Jun 12, 2005 at 08:51:09AM -0700, Jerry DeLisle wrote:
> Steve Kargl wrote:
> >If you implement atanh in a similar fashion as besj0 or erfc,
> >there is no simplification routine. Simplification does more
> >than just constant folding. Are you implementing atanh to take
> >an array argument and return an array of results?
> >
> Yes, I am following besj0. I was exploring checking for range limits
> with atanh when I stumbled on the odd behavior. I used asin as an
> example for the list because the other is still cooking.
>
AFAICT, the simplification functions are working as designed.
It appears the error message is not properly propagated back
through the call chain.
Okay, I know wants going on (sort of).
Consider the three programs
program asin_specific
real(4) x
x = asin(1.1)
end program asin_specific
program dasin_specific
real(8) x
x = dasin(1.1_8)
end program dasin_specific
program asin_generic
real(8) x
x = asin(1.1_8)
end program asin_generic
The first 2 program yield errors from the simplification
because this portion
if (expr->value.function.isym != NULL)
return (do_simplify (expr->value.function.isym, expr) == FAILURE)
? MATCH_ERROR : MATCH_YES;
of gfc_intrinsic_func_interface() in intrinsic.c is executed.
For the case of a generic function, expr->value.function.isym == NULL
and by pass this chunk. I need to check the rest of
gfc_intrinsic_func_interface() to see how failures with generics are
handled.
--
Steve