This is the mail archive of the 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:

I still don't get what you want.  Are the semantics of -fcheck-size
to permit the above code to compile and run?  I would prefer that
gfortran does not grow a bunch of crufty questionable options because
no one in 30 years has bother to fix their code.

Indeed you don't seem to understand.

Exceeding array bounds is wrong in general. However, it's most heinous when it also means you address outside of the array's extent (i.e., you either read bogus data outside of the array or you write (shudder) outside the array.

This is sufficiently more aggravating that making a distinction would be useful:

1. Warn (or error) on exceeding a single array bound.
2. Warn (or error) on an access/store from/to an array be outside its

The last one at least warns if you are to read a completely unrelated value, but more importantly, would *write* over an unrelated value.

The first one is nice to have to know that your program (in this respect) is Standard conforming.

Kind regards,

Toon Moene - e-mail: - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
At home:
Progress of GNU Fortran:

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