13.0 compiler bug: bad object code for user-defined constructor used in assignment

13.0 compiler bug: bad object code for user-defined constructor used in assignment

I've attached a short example (mostly declarations, only a few executable statements) for which the 13.0 compiler is generating bad object code.  The offending statement is an intrinsic assignment of a derived type with pointer component where the rhs is a user-defined constructor.  I point out a couple variations where the code will run correctly.

Fichier attachéTaille
Télécharger intel-bug-20121014.f902.23 Ko
5 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

Thank you for reporting this issue Neil and for the convenient reproducer. I confirmed your results and reported this to the Fortran Developers (internal tracking id noted below) for further analysis/repair. I will update this thread after learning more.

(Internal tracking id: DPD200237446)

(Resolution Update on 02/08/2013): This defect is fixed in the Intel Fortran Composer XE 2013 Update 2 (2013.2.146 - Linux)

I wanted to share our Developer’s comments w/you, Neil. She is working on a fix and I'll update on availability as it becomes known.

She wrote:

First, kudos to the submitter for such a concise reproducer.

Really, what it needed to fail was the following set of circumstances:

1) a TYPE that contains an allocatable CLASS
2) a function that returns that type (or a type that contains that type)
3) that function needs to be called from multiple program units.

Neil - I confirmed this defect is fixed in our internal builds and expect the fix to be in our next XE2013 update 2 (tentatively in late January). The offending intrinsic assignment now also returns T when using our internal build.

Thank you again for reporting this defect and convenient reproducer.

This defect is fixed in the Intel Fortran Composer XE 2013 Update 2 (2013.1.146 - Linux)

Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui