bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in gas, with expressions in macros


From: kieft_brian
Subject: Bug in gas, with expressions in macros
Date: Wed, 22 May 2002 10:42:38 -0400

Does anyone know if this situation has been pursued at all? I still get the
error in larger files despite having listings turned off. It appears that X_op
ends up being O_subtract instead of O_constant when you do subtraction of two
variables in the same memory section (or subtraction of two constants inside a
macro that may or may not be in the same memory section). I'm interested in
providing/finding/assisting with a fix for this problem. Please let me know if
you have anymore information. Thanks,
Brian
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Bug in gas, with expressions in macros
From: Peter Jansen <peter at smartcontainer dot net> 
To: bug-binutils at gnu dot org 
Date: Tue, 20 Nov 2001 17:42:05 +1100 
Subject: Bug in gas, with expressions in macros 
ยท   
Hi

I have a very strange bug in binutils/gas, using gas 2.10.91 or 2.11.2 
or the current CVS, when using the .if directive inside macros and listings.

assembling the following code:

---------------------------------------------------

;
        .macro VEC name
          .if ( . - .__start_of_init__ )
            .string "Hello"
          .endif
        .endm

.__start_of_init__:

        VEC _vector_1

---------------------------------------------------

with

address@hidden gas-test]$ as -o gcrt1.o gcrt1.s --verbose -an
GNU assembler version 2.10.91 (i386-redhat-linux) using BFD version 
2.10.91.0.2
gcrt1.s: Assembler messages:
gcrt1.s:10: Error: non-constant expression in ".if" statement

I get an error of a non-contant expression.

but if I turn listings off (without the -an) then it assembles ok, ie

address@hidden gas-test]$ as -o gcrt1.o gcrt1.s --verbose
GNU assembler version 2.10.91 (i386-redhat-linux) using BFD version 
2.10.91.0.2

no error.

The same happens with version 2.11.92 20011119 of gas.

Has anyone seen this behavoiur or know what is going on?

It appears that in gas/cond.c, the function 's_if' gets the wrong 
operator type (X_op is 20 and not 2) but I cannot see what this has to 
do with turning listings on or off.

-- 
Peter Jansen
Smart Container
Level 1, NIC Building
Eveleigh
NSW       1430
AUSTRALIA



_____________________________________________________________________

Brian C. Kieft
address@hidden

Software Engineer
Mission Management Systems

Smiths Aerospace, Electronic Systems
3290 Patterson Ave., S.E.
Grand Rapids, MI  49512

(616) 241-7617
_____________________________________________________________________
















**********************************************************************
This e-mail and any files transmitted with it are confidential and may
be legally privileged or otherwise exempt from disclosure under
applicable law. This e-mail and its files are intended solely for
the individual or entity to whom they are addressed and their content
is the property of Smiths Aerospace.  If you are not the intended
recipient, please do not read, copy, use or disclose this communication.
If you have received this e-mail in error please notify the e-mail
administrator at address@hidden and then delete this e-mail, its
files and any copies.

This footnote also confirms that this e-mail message has been scanned
for the presence of known computer viruses.
***********************************************************************



reply via email to

[Prev in Thread] Current Thread [Next in Thread]