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: Peter Jansen
Subject: Bug in gas, with expressions in macros
Date: Tue, 20 Nov 2001 17:42:05 +1100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2

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





reply via email to

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