This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Weird assembler error
- From: "Vincent R." <forumer at smartmobili dot com>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Wed, 15 Apr 2009 12:03:33 +0200
- Subject: Weird assembler error
Hi,
When implementing seh for arm we have a weird assembler message when
declaring
ASM_DECLARE_FUNCTION_NAME. This macro calls the arm_seh_header_function and
if
we are trying to directly access a new field (has_seh) from cfun struct we
get
an assembler error message.
However if we use a temporary variable it seems to work.
Note that we are using gcc trunk revision 144974, is it a known bug ?
cc/gcc/config/arm/wince-pe.h
--
#undef ASM_DECLARE_FUNCTION_NAME
#define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \
do \
{ \
arm_seh_header_function (STREAM, NAME, DECL); \
ARM_PE_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL); \
} \
while (0)
arm.c:
-------
//
// IF WE ACCESS DIRCTLY cfun->has_seh we get assembler error .rdata ...
//
void
arm_seh_header_function (FILE *fp, char *name, tree decl)
{
if (cfun->has_seh)
{
...
}
}
//
// IF WE USE temp. variable to store cfun->has_seh it WORKS
//
void
arm_seh_header_function (FILE *fp, char *name, tree decl)
{
int has_seh = cfun->has_seh;
if (has_seh)
{
...
}
}