This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Proposed fix for PR 17982

Zack Weinberg wrote:
PR 17982 complains that you can no longer write

extern int foo(void);
extern inline int thingy(void) { return foo(); }
extern int foo(void) __asm__ ("mumble");

on ia64, because the reference to foo from thingy causes
assemble_external to be called, and ia64 defines ASM_OUTPUT_EXTERNAL.
Any definition of ASM_OUTPUT_EXTERNAL, no matter what it does, causes
assemble_external to set the DECL_RTL and DECL_ASSEMBLER_NAME of its
argument.  Thus, by the time we get to the redeclaration of foo, its
DECL_ASSEMBLER_NAME is set and the asm annotation is rejected.

Interesting; this is the same bad behavior that caused a problem with debugging information that I fixed recently. I completely agree with you that having assemble_external called early is a bug. Furthermore, I think that the rest of the compiler should, like the C++ front-end, insist on unit-at-a-time being always on, for 4.1.

Mark Mitchell
CodeSourcery, LLC
(916) 791-8304

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]