[Bug fortran/45451] [OOP] Inconsistent status of ALLOCATABLE components inside CLASS variables.
sfilippone at uniroma2 dot it
gcc-bugzilla@gcc.gnu.org
Tue Oct 5 20:28:00 GMT 2010
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45451
--- Comment #11 from Salvatore Filippone <sfilippone at uniroma2 dot it> 2010-10-05 19:39:44 UTC ---
(In reply to comment #4)
> Ok, I could reduce this quite a bit:
>
>
> 1 3 4 5
> 1 3 4 5
> 0 0 4 5
>
> The last line here should be the same as the first two. Changing the CLASS
> variable into a TYPE makes it work. Running through valgrind shows:
>
Strange thing is that guarding with a SELECT TYPE statement as in
===========================
allocate(a,source=acsr)
write(*,*) acsr%irp(:)
select type(aa=>a)
type is (psb_base_sparse_mat)
call move_alloc(acsr%irp, aa%irp)
write(*,*) aa%irp(:)
class default
write(*,*) 'Wrong class default'
end select
================================
still gives the wrong answer
[sfilippo@localhost bug23]$ ./bug23_janus
1 3 4 5
1 3 4 5
0 0 4 5
More information about the Gcc-bugs
mailing list