[Patch, Fortran, OOP] PR 46313: OOP-ABI issue, ALLOCATE issue, CLASS renaming issue

Tobias Schlüter tobias.schlueter@physik.uni-muenchen.de
Sun Nov 7 12:11:00 GMT 2010


On 2010-11-07 13:04, Janus Weil wrote:
>>> Yes, that is expected, because the patch changes the name of the vtab
>>> to "vtab$main$dt", so one needs to change the name of the subroutine
>>> in the test case in the same way in order to see the failure:
>>
>> Dot? vtab.main.dt?
>
> Yes, we once had this variant. I think the reason why I switched to
> dollars was that it made the dumps easier to read (think
> "vtab.main.dt..extends..size" etc).

Sorry I'm late, but gcc has the macro ASM_FORMAT_PRIVATE_NAME which does 
the work of making a name collision-free.  If you use it you can make 
the rest of the name as readable as you want.

Cheers,
- Tobi

>
> The best option I can currently see is to use leading underscores (as
> in "_vtab_main_dt"). This is forbidden in Fortran (cf. F08:R303), but
> accepted by the assembler (cf.
> http://sourceware.org/binutils/docs-2.20/as/Symbol-Names.html#Symbol-Names).
>
> Attached is a patch which does this change. I also added a few macros
> in gfortran.h. Ok for trunk after successful regtest?
>
> Cheers,
> Janus



More information about the Fortran mailing list