This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Fortran, (RFC) patch] PR49110/51055 Assignment to alloc. deferred-length character vars
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: Fortran List <fortran at gcc dot gnu dot org>, Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 3 Oct 2012 16:46:42 -0400
- Subject: Re: [Fortran, (RFC) patch] PR49110/51055 Assignment to alloc. deferred-length character vars
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