Bug 6575 - Error assembling macros using altmacro LOCAL
Summary: Error assembling macros using altmacro LOCAL
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.17
: P2 normal
Target Milestone: ---
Assignee: Alan Modra
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-28 06:02 UTC by Nathan Keynes
Modified: 2008-08-15 05:35 UTC (History)
1 user (show)

See Also:
Host: i486-linux-gnu
Target: all
Build: i486-linux-gnu
Last reconfirmed: 2008-08-11 05:36:10


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan Keynes 2008-05-28 06:02:27 UTC
Test case:
---
.section .text
.altmacro

.macro macro2
LOCAL LC1
LOCAL LC2
LOCAL LCM
LC1:    tst r2, r3
LCM:    tst r1, r2
LC2:	tst r0, r0
.endm

.macro macro1
LOCAL LC1
LOCAL LC2
LOCAL LCM
LC1:    tst r2, r2
LCM:    tst r0, r0
LC2:	tst r1, r1
.endm

.global _test_addc
_test_addc:

test_addc_1:
	macro1
	macro1
	macro1
	macro2
	macro1
	macro2
	macro2
	macro1
	rts
---
Generates the following error output with binutils 2.17 through CVS head:
./test.s: Assembler messages:
./test.s:15: Error: `LC2' was already used as parameter (or another local) name
./test.s:33: Error: symbol `.LL0017' is already defined

Last worked correctly in 2.16. Also tested (with the same results) built/hosted on i686-apple-darwin9.
Comment 1 Alan Modra 2008-08-11 05:36:10 UTC
This bug affects all targets, not just SH.