This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PING Re: gfortran PATCH was Re: [simplify.c] bug?


PING.

On Sun, Jun 12, 2005 at 10:28:20AM -0700, Steve Kargl wrote:
> The attached patch enables the reporting of errors for
> generic functions whose simplification routine returns
> FAILURE.  That is, the above asin_generic program will
> cause gfortran to issue 
> 
> kargl[251] gfc41 -static -o z asin.f90
>  In file asin.f90:3
> 
>    y = asin(1.1_8)
>            1
> Error: Argument of ASIN at (1) must be between -1 and 1
> 
> 2005-06-12  Steven G. Kargl  <kargls@comcast.net>
> 
> 	* intrinsic.c (gfc_intrinsic_func_interface): Enable errors for generic
> 	functions whose simplification routine return FAILURE.
> 
> Index: intrinsic.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/fortran/intrinsic.c,v
> retrieving revision 1.47
> diff -c -p -r1.47 intrinsic.c
> *** intrinsic.c	1 Jun 2005 19:17:32 -0000	1.47
> --- intrinsic.c	12 Jun 2005 17:20:32 -0000
> *************** got_specific:
> *** 3007,3017 ****
>     expr->value.function.isym = specific;
>     gfc_intrinsic_symbol (expr->symtree->n.sym);
>   
>     if (do_simplify (specific, expr) == FAILURE)
> !     {
> !       gfc_suppress_error = 0;
> !       return MATCH_ERROR;
> !     }
>   
>     /* TODO: We should probably only allow elemental functions here.  */
>     flag |= (expr->ts.type != BT_INTEGER && expr->ts.type != BT_CHARACTER);
> --- 3007,3015 ----
>     expr->value.function.isym = specific;
>     gfc_intrinsic_symbol (expr->symtree->n.sym);
>   
> +   gfc_suppress_error = 0;
>     if (do_simplify (specific, expr) == FAILURE)
> !     return MATCH_ERROR;
>   
>     /* TODO: We should probably only allow elemental functions here.  */
>     flag |= (expr->ts.type != BT_INTEGER && expr->ts.type != BT_CHARACTER);


-- 
Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]