Tobias,
Sorry to return to this patch so long after the discussion, but I have
been investigating testsuite failures on AIX and this patch introduced
a number of Fortran failures.
+ if (sym->module)
+ name = gfc_get_string (".__%s_MOD_%s", sym->module, sym->name);
+ else
+ name = gfc_get_string (".%s", sym->name);
Symbols beginning with "." have a well-known meaning on AIX, so the
compiler cannot assume that it is safe to mangle a name by prepending
a period.
For instance, the test allocatable_function_5.s generates the
following global symbol definitions in the assembler:
.globl __m_MOD_mbar
.globl .__m_MOD_mbar
.csect __m_MOD_mbar[DS]
__m_MOD_mbar: <--- function
descriptor __m_MOD_mbar
.long .__m_MOD_mbar, TOC[tc0], 0
.csect .text[PR]
.__m_MOD_mbar: <--- function address
.__m_MOD_mbar
...
.globl .__m_MOD_mbar
.csect .data[RW],4
.align 2
.__m_MOD_mbar: <--- mangled string
name .__m_MOD_mbar
.space 4
Unsurprisingly, two symbols with the same name are a problem and the
AIX assembler complains about the redefinition.
I am not sure why you chose a period and how best to correct this.
Thanks, David