http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54784
--- Comment #3 from janus at gcc dot gnu.org 2012-10-02 22:35:57 UTC --- (In reply to comment #2) > So there is actually two different bugs Or the two different errors you are seeing are really due to the same underlying problem. I'm not quite sure about that yet, but I already have a suspicion ... > one is the invalid memory reference > which happens when you don't allocate in order. > > There is a second, the one I was really trying to report, and that's when > allocating in my original example type(block1d) before type(block2d), namely > the call > call d%addBlock(1,b1) > call d%addBlock(2,b2) Would be great if you could try to find a maximally reduced test for this case, too. That would definitely help a lot. In the meantime, I will start looking at the case in comment 1 ...