This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PING Re: gfortran PATCH was Re: [simplify.c] bug?
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: fortran at gcc dot gnu dot org
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 17 Jun 2005 21:35:53 -0700
- Subject: PING Re: gfortran PATCH was Re: [simplify.c] bug?
- References: <42ABC3A0.5000101@verizon.net> <20050612143907.GA10314@troutmask.apl.washington.edu> <42AC59ED.3000604@verizon.net> <20050612162545.GA11444@troutmask.apl.washington.edu> <20050612172820.GA12315@troutmask.apl.washington.edu>
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