Bug 4651

Summary: chained .req do not work
Product: binutils Reporter: Axel Heider <axelheider>
Component: gasAssignee: unassigned
Status: NEW ---    
Severity: normal CC: bug-binutils
Priority: P2    
Version: 2.15   
Target Milestone: ---   
Host: i386/cygwin Target: ARM
Build: Last reconfirmed:

Description Axel Heider 2007-06-15 14:30:36 UTC
rsXX1	     .req r0
rsXX2	     .req rsXX1

causes error "Warning: register 'rsXX1' does not exist"
Comment 1 Richard Earnshaw 2007-07-17 15:19:26 UTC
I think it shouldn't be allowed.  Consider:

rsXX1 .req r0
rsXX2 .req rsXX1
      .unreq rsXX1

What value does rsXX2 have now?  What if rsXX1 were further redefined?
Comment 2 Axel Heider 2007-07-17 21:40:06 UTC
Well, in this case I would actually expect something like an error at ".unreq
rsXX1" with the message ".unreq not allowed, because another .req definition at
line XXX already depends on it". A un-definition of "rsXX1" should not be
allowerd when other things depend on it, too.