This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/39894] memory corruption with array section assignment of arrays with different shape
- From: "dominiq at lps dot ens dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Apr 2009 13:38:38 -0000
- Subject: [Bug fortran/39894] memory corruption with array section assignment of arrays with different shape
- References: <bug-39894-8911@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from dominiq at lps dot ens dot fr 2009-04-25 13:38 -------
If you compile the code in comment #1 with '-fbounds-check', you get:
At line 32 of file pr39894.f90
Fortran runtime error: Array bound mismatch, size mismatch for dimension 2 of
array 'listgeonm' (18/999)
(off by one, see pr39872). So the code is invalid and have to be fixed as
noticed in comment #1. Note that I don't see the "memory corruption" on
i686-apple-darwin9, but this is pure luck.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39894