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, OOP] PR 58185: [4.8/4.9 Regression] ICE when selector in SELECT TYPE is non-polymorphic


Le 19/08/2013 13:38, Janus Weil a écrit :
> Hi all,
> 
> here is a small patch which does some cleanup to avoid an ICE on
> invalid SELECT TYPE statements.
> 
> The first three hunks are just cosmetics, and the fourth one also
> contains minor refactoring, where I pull some common code out of the
> two branches of an if statement. The important part, however, is that
> I prevent gfc_build_class_symbol from being called if no type symbol
> is available.
> 
> Regtested on x86_64-unknown-linux-gnu. Ok for trunk and 4.8?
> 

> +  else if (selector->ts.u.derived)

Hum, accessing ts.u.derived is correct only if selector->ts.type is
BT_DERIVED or BT_CLASS, isn't it?  Thus the condition should probably be
else if (selector->ts.type == BT_DERIVED) as the BT_CLASS was handled
before?  OK with that change (if it works).  Thanks.

Mikael






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