This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/64980] [5 Regression] ICE in trans-expr.c


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64980

--- Comment #15 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
Created attachment 34758
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34758&action=edit
Updated patch that also fixes pr64230.f90

(In reply to Dominique d'Humieres from comment #12)
> With any of the patches the first test for pr64230 fails at run time with
> 
> At line 35 of file pr64230.f90
> Fortran runtime error: Attempt to DEALLOCATE unallocated 't'
> 
> but the test gfortran.dg/class_allocate_18.f90 succeeds.
> 
> In addition Bernd's patch fixes/hides the ICE for pr61960.

I think this updated patch fixes all mentioned test cases.
Especially pr64230.f90.  In this example the condition
CLASS_DATA (fsym) != CLASS_DATA (e) evaluates to TRUE,
but fsym->ts.u.derived->name and e->ts.u.derived->name
are the same, something like "__class_m_T4_a".

But s from pr64230.f90 has an intent(out) parameter.

Entering this code path for an intent(out) parameter
means complete disaster, because it does only copy the value
to the destination and not in the reverse direction.

Hopefully these types are really identical also for the back end...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]