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: FORTRAN :PATCH FOR PR 7179


bdavis wrote:

The problem:

     dimension  a(250000,250000)
     a(1,1)= 0.
     write(*,*) ' a',a(1,1)
     end

gives no error message.


Here is what it should do:



big.f: In program `MAIN__': big.f:1: dimension a(250000,250000) ^ Array `a' at (^) is too large to handle.

Patch tested on i386 / linux with no new failures. The above snippet can be added to the "non-compile" directory of the testsuite.
(Toon, what is the best way to post new test files?)


--bud davis

----------------------------------------------------------------------------------------------------------------------------------------

Index: gcc/gcc/f/com.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/f/com.c,v
retrieving revision 1.195
diff -c -3 -p -r1.195 com.c
*** gcc/gcc/f/com.c     13 May 2003 18:06:48 -0000      1.195
--- gcc/gcc/f/com.c     18 May 2003 21:57:36 -0000
*************** ffecom_sym_transform_ (ffesymbol s)
*** 7407,7420 ****
         {
           ffestorag st = ffesymbol_storage (s);
           tree type;
-
-           if ((st != NULL)
-               && (ffestorag_size (st) == 0))
-             {
-               t = error_mark_node;
-               break;
-             }
-
           type = ffecom_type_localvar_ (s, bt, kt);

           if (type == error_mark_node)
--- 7407,7412 ----

Hmmmm, can we be sure that `s' being "too large" is the only reason that ffestorag_size (st) is zero ?

--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://gcc-g95.sourceforge.net/ (under construction)


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