This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/48462] [4.6/4.7 Regression] realloc on assignment: matmul Segmentation Fault with Allocatable Array
- From: "pault at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 8 Apr 2011 04:23:19 +0000
- Subject: [Bug fortran/48462] [4.6/4.7 Regression] realloc on assignment: matmul Segmentation Fault with Allocatable Array
- Auto-submitted: auto-generated
- References: <bug-48462-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48462
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
--- Comment #4 from Paul Thomas <pault at gcc dot gnu.org> 2011-04-08 04:23:05 UTC ---
This should be easy. The only difference between default (failing) and
-fno-realloc-lhs is a chunk at the beginning of the assignment:
{
void * D.1571;
D.1571 = (void *) a.data;
if (D.1571 != 0B)
{
__builtin_free (D.1571);
}
}
a.data = 0B;
a.dtype = 538;
which sort of does a job on 'a'. I say that it is easy because there are not
many sections in trans-xxx that hide behind the -frealloc-lhs condition.
It's obviously mine.
Paul