http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47455

--- Comment #10 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-31 
22:18:41 UTC ---
(In reply to comment #7)
> The test in comment #6 segfault also.

That's a test-case problem.
  this%x = find_x(this)
is invalid if the LHS is not associated - and a RHS null() is also problematic.
Use:
  this%x => find_x(this)
instead (for all assignments in the file).


> The ICEs disappear with the patch in comment #6, but the test in comment #4
> fails at
>         if(any (this%x%i /= [5, 7])) call abort() ! FAILS

I think you mean comment 5. In comment 4, the line:
        this%y = this%find_y()
fails; the LHS is a nonpointer, nonallocatable DT. The RHS returns an
(allocated) allocatable; the type is type(tx) w/ allocatable but unallocated
components.
I think the test case is valid


Regarding comment 5: As written there, a deep copy is missing

Reply via email to