[Patch, Fortran] PR 42353: [OOP] Bogus Error: Name 'vtype$...' at (1) is an ambiguous reference ...
Janus Weil
janus@gcc.gnu.org
Mon Dec 28 20:43:00 GMT 2009
> However, I completely forgot about comment #6 in the PR, which is an
> example which still fails (with both versions of the patch). Before I
> commit anything, I will try to make this one work, too.
Ok, I think I got it. Basically, one just has to do the same thing one
does to the vtypes also to the vtabs, i.e. making both of them PRIVATE
makes all errors in the PR vanish. The attached patch has been
regtested successfully. I will commit it once Harald confirms that he
sees no further problems (and provided no one else protests).
Cheers,
Janus
>>> 2009/12/17 Janus Weil <janus@gcc.gnu.org>:
>>>>> the attached patch fixes a small OOP problem, where under certain
>>>>> circumstances one would get 'ambiguous reference' errors for the
>>>>> vtypes. The easiest thing I could think of to fix this is to make the
>>>>> vtypes private, which means that each module which uses a vtype will
>>>>> have its own private copy (which in principle should not be a problem,
>>>>> should it?).
>>>>
>>>> In contrast to the patch I sent earlier, the version attached here
>>>> also fixes the second error in the PR, which I almost forgot about
>>>> ("Error: The element in the derived type constructor at (1), for
>>>> pointer component '$extends', is DERIVED but should be DERIVED").
>>>>
>>>> Although the patch obviously works, I'm not sure if it may have any
>>>> negative consequences and if it's the best thing to do. At least it
>>>> fixes the test case and regtests cleanly.
>>>>
>>>> Comments? Suggestions? Ok for trunk?
>>>>
>>>> Cheers,
>>>> Janus
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr42353_3.diff
Type: application/octet-stream
Size: 767 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20091228/7a66f3e5/attachment.obj>
More information about the Gcc-patches
mailing list