http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46897

--- Comment #6 from Damian Rouson <damian at rouson dot net> 2010-12-13 
15:16:42 UTC ---
Janus, 

Thanks for finding the relevant language in the standard.  

In case it helps, what I submitted originally was a reduced example of code
written by Jim Xia, who is member of both the IBM compiler test team and the
Fortran standards committee.  IBM XL Fortran 13.1 calls the defined assignment
in my original example (and interestingly in Janus's reduced example, although
it appears from what you wrote that it is not required to do so in your reduced
example).  

Unfortunately, Jim is on vacation, so I probably won't be able to find out soon
what part of the standard he was relying upon when he wrote the relevant code,
but I know he gave it a a lot of thought becasue that code plays a central role
in an algorithm that he developed with us for the open-source ForTrilinos
package (http://trilinos.sandia.gov/download/trilinos-10.6.html).  Every
derived type in ForTrilinos extends a derived type analogous to the "parent"
type in my original posting.  The defined assignment is needed for a reference
counting scheme to prevent memory management problems.  If the compiler does
not call the defined assignment, it would have significant downstream
implications for all ForTrilinos derived types and for all user-defined types
that aggregate or extend ForTrilinos derived types.

Damian

Reply via email to