------- Comment #2 from brooks at gcc dot gnu dot org  2007-03-17 23:39 -------
At the end of 14.6.3.3, "Default initialization may be specified for a storage
unit that is storage associated provided the objects or subobjects supplying
the default initialization are of the same type and type parameters, and supply
the same value for the storage unit."

It is somewhat unclear to me from that language whether the relevant constraint
is that A1 and A2 would have to have the "same type and type parameters" (which
they do not, making the code illegal), or whether A1%I and A2%I would have to
have the same type and type parameters (which they do, making the code legal). 
I tried to get some further opinions about this on comp.lang.fortran, but
apparently nobody found my question interesting enough to reply to.  :)

I've now found that MR&C describes this condition as being that the components
in question must have the same type and type parameters, which would make this
legal, and I suspect that's the final answer we'll get.  Thus, I'm confirming
the bug; I can certainly reproduce the error message.


-- 

brooks at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |brooks at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
      Known to fail|                            |4.3.0
   Last reconfirmed|0000-00-00 00:00:00         |2007-03-17 23:39:00
               date|                            |


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

Reply via email to