This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/52151] Segfault with realloc on assignment and RESHAPE to unallocated LHS
- From: "dominiq at lps dot ens.fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 07 Feb 2012 21:28:15 +0000
- Subject: [Bug fortran/52151] Segfault with realloc on assignment and RESHAPE to unallocated LHS
- Auto-submitted: auto-generated
- References: <bug-52151-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52151
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-02-07
Ever Confirmed|0 |1
--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-02-07 21:28:15 UTC ---
> * B is not allocated
> -> Segfault since the patch for PR 52012
With -O, I don't get the segfault, but the following wrong result:
A( 1 , 1 ) = 1.00000000 B = 1.00000000
A( 2 , 1 ) = 2.00000000 B = 2.00000000
A( 1 , 2 ) = 3.00000000 B = 1.00000000
A( 2 , 2 ) = 4.00000000 B = 2.00000000
A( 1 , 3 ) = 5.00000000 B = 1.00000000
A( 2 , 3 ) = 6.00000000 B = 2.00000000
A( 1 , 4 ) = 7.00000000 B = 1.00000000
A( 2 , 4 ) = 8.00000000 B = 2.00000000