This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/79864] Implicit type conversion on assignment of unallocated array to unallocated array variable segfaults.
- 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: Sat, 14 Oct 2017 10:21:26 +0000
- Subject: [Bug fortran/79864] Implicit type conversion on assignment of unallocated array to unallocated array variable segfaults.
- Auto-submitted: auto-generated
- References: <bug-79864-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79864
--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> Note, there is a small difference to pr78963
Should be 79863.
Compiling the test with '-Wall -Wextra -fcheck=all -Ofast -m32
-fsanitize=address' gives
pr79864.f90:4:0:
si = ssi
Warning: 'ssi.dim[0].ubound' may be used uninitialized in this function
[-Wmaybe-uninitialized]
pr79864.f90:2:0:
integer(kind=1), allocatable :: ssi(:)
note: 'ssi.dim[0].ubound' was declared here
pr79864.f90:4:0:
si = ssi
Warning: 'ssi.dim[0].lbound' may be used uninitialized in this function
[-Wmaybe-uninitialized]
pr79864.f90:2:0:
integer(kind=1), allocatable :: ssi(:)
note: 'ssi.dim[0].lbound' was declared here
pr79864.f90:4:0:
si = ssi
Warning: 'si.dim[0].ubound' may be used uninitialized in this function
[-Wmaybe-uninitialized]
pr79864.f90:1:0:
integer, allocatable :: si(:)
note: 'si.dim[0].ubound' was declared here
pr79864.f90:4:0:
si = ssi
Warning: 'si.dim[0].lbound' may be used uninitialized in this function
[-Wmaybe-uninitialized]
pr79864.f90:1:0:
integer, allocatable :: si(:)
note: 'si.dim[0].lbound' was declared here
unless the patch in pr52162 comment 8 is applied.
Note that I don't see any segfault at run time.