This is the mail archive of the gcc-patches@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]

Re: [Patch, fortran] PR40011 - Problems with -fwhole-file


Richi,

Sorry to take so long to come back to you.  I am on vacation and
cannot reasonably overdo the gfortran work without causing justified
offence to the family!

> + ? ? ?if (ts.type == BT_DERIVED)
> + ? ? ? TYPE_MAIN_VARIANT (TREE_TYPE (rse->expr))
> + ? ? ? ? ? ? ? = TYPE_MAIN_VARIANT (TREE_TYPE (lse->expr));
>
> hm, this looks odd (or rather wrong). ?Care to explain?
>
> It looks like derived types are somehow special - what are they?

I have not entirely convinced that I have understood this.  There is
nowhere in the fortran frontend where TYPE_MAIN_VARIANT is beingset so
it must occur in one of the functions in tree.c, as part of the
process of building a derived type function.  I have isolated this
kluge to the TYPE_MAIN_VARIANTs being different, assigning that to a
temporary and then changing the TYPE_MAIN_VARIANT:

The patch is just now regtesting and I will commit later on.

Cheers

Paul


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