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: [Patch, fortran] PR37735 - Allocatable components in vectors of derived types cause ICE on assignment


Steve Kargl wrote:

But, I still don't see what distinction you're trying to draw between
-fbounds-check and -fcheck-size, because -fbounds-check correctly identifies the program is doing something that is possibly an error.


        REAL A(10,10)
        A = 1.0
        CALL SUB(A,10)
        END
        SUBROUTINE SUB(A, N)
        REAL A(N, N)
        PRINT*,A(1,N*N)
        END

With -fbounds-check, the above dies with a runtime error.  You then
fix your code:

Ah, yes - that's all real fine if that's the only not-really-wrong-but-non-conformant array indexing.


Unfortunately, in my world, the real bugs (read: addressing outside the extent of the array) are dwarfed by these non-bugs.

That's why I would like to have a separate option ...

--
Toon Moene - e-mail: toon@moene.org (*NEW*) - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
At home: http://moene.org/~toon/
Progress of GNU Fortran: http://gcc.gnu.org/ml/gcc/2008-01/msg00009.html


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