This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Re: [gfortran] recent change causes a regression


> 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++)


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