This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [gfortran] recent change causes a regression
- From: Paul Brook <paul at codesourcery dot com>
- To: fortran at gcc dot gnu dot org
- Cc: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>,"gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 24 May 2004 00:51:42 +0100
- Subject: Re: [gfortran] recent change causes a regression
- Organization: CodeSourcery
- References: <20040523164948.GA41137@troutmask.apl.washington.edu>
> I think your restrict_intrinsic rewrite is causing a regression.
> The following compiles fine with NAG's compiler and it compiled
> fine before the above commit.
>
> kargl[256] cat xx.f90
> subroutine box_muller_array(x1)
> implicit none
> integer, parameter :: knd = kind(1.e0)
> real(knd), dimension(0:), intent(out) :: x1
> real(knd), dimension(0:size(x1)) :: x3
> x3=x1
> end subroutine box_muller_array
Patch below fixes this by removing a couple of conditions from check_inquiry.
The first is plain wrong. The second makes no sense, and is empirically wrong.
Tested on i686-linux. Applied to mainline.
Paul
2004-05-25 Paul Brook <paul@codesourcery.com>
* expr.c (check_inquiry): Remove bogus tests.
testsuite/
* gfortran.fortran-torture/compile/inquiry_1.f90: New test.
Index: expr.c
===================================================================
RCS file: /var/cvsroot/gcc-cvs/gcc/gcc/fortran/expr.c,v
retrieving revision 1.5
diff -u -p -r1.5 expr.c
--- a/expr.c 23 May 2004 16:07:42 -0000 1.5
+++ b/expr.c 23 May 2004 23:41:43 -0000
@@ -1273,15 +1273,6 @@ check_inquiry (gfc_expr * e)
int i;
- /* These functions must have exactly one argument. */
- if (e->value.function.actual == NULL
- || e->value.function.actual->next != NULL)
- return FAILURE;
-
- if (e->value.function.name != NULL
- && e->value.function.name[0] != '\0')
- return FAILURE;
-
name = e->symtree->n.sym->name;
for (i = 0; inquiry_function[i]; i++)