[Bug lto/47577] New: [lto]: does not recognize/unify identical .macro
aldot at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 1 18:01:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47577
Summary: [lto]: does not recognize/unify identical .macro
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: aldot@gcc.gnu.org
Fails with: -flto on
gcc-4.6.0-trunk@169467
GNU assembler (GNU Binutils for Debian) 2.20.1-system.20100303
GNU assembler (GNU Binutils) 2.21.51.20110131
(1da8c83863b4fe3db654d0bb35b46a38069c4c97)
---8<--- one.c ---8<---
__asm__(
#ifdef __IMA__
".ifndef __GUARD\n\t"
".set __GUARD,1\n\t"
#endif
".macro mmm arg1 arg2\n\t"
".if 1 - \\arg1\n\t"
"nop\n\t"
".endif\n\t"
".endm\n\t"
#ifdef __IMA__
".endif\n\t"
#endif
);
#ifndef __MAIN
#define __MAIN
int main(void){return 0;}
#endif
---8<--- two.c ---8<---
#define __MAIN
#include "one.c"
$ gcc-4.6.orig-HEAD one.c two.c -o o
$ gcc-4.6.orig-HEAD one.c two.c -o o -flto
/tmp/ccSk75A8.s: Assembler messages:
/tmp/ccSk75A8.s:28: Error: Macro `mmm' was already defined
lto-wrapper: gcc-4.6.orig-HEAD returned 1 exit status
collect2: lto-wrapper returned 1 exit status
$ gcc-4.6.orig-HEAD one.c two.c -o o -flto -D__IMA__
$
The .macro in all TUs is identical, shouldn't only one be passed to the
assembler?
More information about the Gcc-bugs
mailing list