Forum Jump

Select Group :
Select Forum :
Sorted By :
Sort Order :
From The :
 
Thread Tools  Search this thread 
IanH
Total Points:
2,270
Status Points:
1,770
Brown Belt
November 3, 2009 10:37 PM PST
Un-use-ual subroutine name causes ICE
I was trying to put an example together for a different problem and frankly got rather lost.  So the attached makes very little sense, but it does cause a "fortcom: Fatal: .... (C00000005)" with 11.1.051.

Thanks,

IanH

 Attachments 
Steve Lionel (Intel)
Total Points:
115,025
Status Points:
115,025
Black Belt
November 4, 2009 3:56 AM PST
Rate
 
#1
Steve Lionel (Intel)
Total Points:
115,025
Status Points:
115,025
Black Belt
November 5, 2009 11:30 AM PST
Rate
 
#2
Very amusing...  Escalated as issue DPD200141584.  Both the calls to SET and USE are required to trigger the error, at least in this example.  As you discovered, renaming USE to something else avoids the error.



IanH
Total Points:
2,270
Status Points:
1,770
Brown Belt
November 5, 2009 9:39 PM PST
Rate
 
#3 Reply to #2
Another example attached (TryingToBeGeneric.f90) that gives an ICE with 11.1.051, which is probably unrelated to the previous one (message is "internal error: Please visit...").

While I've still got your attention...  some F2003 polymorphism questions.  This example (TryingToBeSpecificInAnAbstractWay.f90), when compiled with /check:all /warn:all /traceback, compiles, but then dies with an access violation, apparently at the ALLOCATE statement (the very first executable statement of the program proper!).  This is a bit disappointing even for me - normally I make it at least ten lines in before everything's gone to pot - so any hints appreciated.  Without /check:all /warn:all the crash pops up later.

Second question is around type compatibility of polymorphic dummy and actual arguments.  The previous example has an abstract "base" type (AbstractType) and then a "concrete" extension of that type (AbstractTypeExt).  There is then a procedure (not a type bound one) that has a "CLASS(AbstractType), INTENT(IN) :: obj" dummy.  Quoting from the good PDF... "A polymorphic entity that is not an unlimited polymorphic entity is type compatible with entities of the same type or any of its extensions".  As a result, I would have thought that I could poke in a TYPE(AbstractTypeExt) actual argument to that procedure (see commented out statements with !xxx).  Under 11.1.51 that doesn't "match" and I have to use the obj%parent syntax to get things to work.  Is that just a IVF F2003 implementation-not-there-yet-issue, or an IanH F2003 standard-still-beyond-your-comprehension issue?

Thanks,

IanH


Steve Lionel (Intel)
Total Points:
115,025
Status Points:
115,025
Black Belt
November 6, 2009 7:08 AM PST
Rate
 
#4 Reply to #3
Ian,

Thanks for these additional items. It will take me a few days to sort out the issues and get back to you.  The issue you describe about type matching sounds familiar and may be a bug already reported but not yet fixed. I'll check into it.



Steve Lionel (Intel)
Total Points:
115,025
Status Points:
115,025
Black Belt
November 6, 2009 2:07 PM PST
Rate
 
#5 Reply to #3
TryingToBeGeneric is issue DPD200141626.  TryingToBeSpecificInAnAbstractWay is issue DPD200141627.

The other problem will have to wait till next week.

I really appreciate your reporting these problems to us and wish that you weren't encountering so many issues!


IanH
Total Points:
2,270
Status Points:
1,770
Brown Belt
November 8, 2009 11:50 PM PST
Rate
 
#6 Reply to #5
Thanks for the assistance. 

Another  F2003/11.1.051 question - does a user defined type with an allocatable component have the component de-allocated on entry to a procedure when its associated with a dummy arg that's declared CLASS(xxx), INTENT(OUT)?   I know it does for TYPE(xxx), INTENT(OUT), but the behaviour when the dummy is declared with class seems to be different.  With the attached I get told off at runtime for trying to allocate something that's already allocated.

I've finished my conversion-from-C++ learning exercise, back to lurking.

Ta,

IanH


 Attachments 
Steve Lionel (Intel)
Total Points:
115,025
Status Points:
115,025
Black Belt
November 9, 2009 9:04 AM PST
Rate
 
#7 Reply to #6

Ian,

Yes, the deallocation of components of a polymorphic type should be done for INTENT(OUT) arguments.  A similar issue arises for local polymorphic variables with allocatable components on routine exit.  Our compiler completely misses these cases.  The developers knew about the second but had not yet considered the first - that is our issue DPD200141685.

Unfortunately, we have to invent some new mechanisms in the compiler to deal with this and I don't expect it to be fixed soon.  A workaround is to do a SELECT TYPE, test for allocation and deallocate manually, but you shouldn't have to do that.





Intel Software Network Forums Statistics

8458 users have contributed to 31572 threads and 100537 posts to date.
In the past 24 hours, we have 18 new thread(s) 132 new posts(s), and 152 new user(s).

In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Quoting - rase if (k.eq.0

Please welcome our newest member soundmyth