This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

Re: [Bug fortran/28118] ICE calling subroutine defined via explicit interface


Harald,


as you dealt with the above PR, could you please have a look into PR 28174? Either there is something wrong with your fix, or there is an independent problem.

It turned out to be both. I had forgotten that the character length structures can be shared; in this case, the temporary was sharing with the original variable, so that the substring reference wound up applying to both! This is cured by obtaining a new character length structure and populating that.

As I said earlier, the above patch does not return the actual values because I did not write back the temporary. With a small amount of juggling, the fix for components of derived type arrays works fine but it requires the fix applied to PR28118, for the same reason.

The patch to trans-expr.c works with constant substring expressions. I need to do some more to generalise this to general expressions and then to go back to the original patch in trans-array.c to see whether one should be consumed in the other or what.

I anticipate submitting a patch in a few days.

Thanks for the prompt report and an interesting problem.

Paul


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