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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |d at domob dot eu

--- Comment #3 from janus at gcc dot gnu.org 2010-11-21 16:32:23 UTC ---
(In reply to comment #2)
> I just checked: It's indeed due to my r166480.

Well, at least this commit is the direct cause of the regression, because it
changed the names of the temporaries. However, there is nothing wrong with that
patch, and I think it rather uncovered a latent bug of Daniel's patch for
SELECT TYPE with associate-name:

http://gcc.gnu.org/viewcvs?view=revision&revision=163572

Namely, it does not handle correctly nested ASSOCIATE statements, which is how
SELECT TYPE is implemented: There is an outer BLOCK namespace for the whole
SELECT TYPE statement, with the selector as associate-name. And then there are
inner BLOCK namespaces for each TYPE IS/CLASS IS case with a temporary as
associate-name.

Right now all the temporaries (and the selector) are initialized in the outer
ns, though they should be initialized in their respective inner ns. So it can
happen that by accident the temps get initialized before the selector, which
causes the error.

I have a draft patch which fixes this (regtesting now).

Reply via email to