[PATCH] gas: require an operand to .startof.()/.sizeof.()
Jan Beulich
JBeulich@suse.com
Thu Feb 23 10:20:00 GMT 2017
>>> On 22.02.17 at 17:31, <nickc@redhat.com> wrote:
>> gas/
>> 2017-02-21 Jan Beulich <jbeulich@suse.com>
>>
>> * expr.c (operand): Handle missing operand to .startof.() and
>> .sizeof.().
>> * testsuite/gas/all/err-sizeof.s: New.
>
> The cris architecture is not the only one affected by this new test.
> The following are also affected:
>
> alpha-dec-vms
> cr16-elf
> crx-elf
> d10v-elf
> d30v-elf
> epiphany-elf
> fr30-elf
> frv-elf
> h8300-elf
> h8300-rtems
> i386-darwin
> ip2k-elf
> iq2000-elf
> lm32-rtems4.10
> m32c-elf
> m32r-elf
> m68hc11-elf
> mep-elf
> microblaze-elf
> mn10200-elf
> mn10300-elf
> ms1-elf
> msp430-elf
> mt-elf
> or1k-elf
> pdp11-dec-aout
> riscv32-elf
> riscv64-elf
> rl78-elf
> rs6000-aix4.3.3
> rx-elf
> s390-linux
> s390x-ibm-tpf
> spu-elf
> tilegx-linux-gnu
> tilegxbe-linux-gnu
> tilepro-elf
> v850-elf
> vax-netbsdelf
> xc16x-elf
> xgate-elf
> xstormy16-elf
>
> Given the large number of targets affected, maybe the test itself needs
> to be reconsidered ? Or maybe split into two tests, one general one,
> and one for targets which do support the difference of two symbols in an
> expression ?
I'll commit the patch below as obvious - using a number as second
operand is good enough for the purpose of the test and should
eliminate all dependencies on target specific behavior.
Jan
gas: slightly relax .startof.()/.sizeof.() testcase
gas/
2017-02-23 Jan Beulich <jbeulich@suse.com>
* testsuite/gas/all/err-sizeof.s: Don't use sums or differences
of symbols as expression.
--- 2017-02-21/gas/testsuite/gas/all/err-sizeof.s
+++ 2017-02-21/gas/testsuite/gas/all/err-sizeof.s
@@ -2,8 +2,8 @@
;# { dg-do assemble }
.long .sizeof.(a b) ;# { dg-error "Error: syntax error" }
.long .startof.(x y) ;# { dg-error "Error: syntax error" }
- .long .sizeof.(a+b) ;# { dg-error "Error: syntax error" }
- .long .startof.(x-y) ;# { dg-error "Error: syntax error" }
+ .long .sizeof.(a+1) ;# { dg-error "Error: syntax error" }
+ .long .startof.(x-1) ;# { dg-error "Error: syntax error" }
.long .sizeof.("a+b")
.long .startof.("x-y")
.long .sizeof.() ;# { dg-error "Error: expected symbol name" }
@@ -13,9 +13,6 @@
;# { dg-error "junk at end" "" { target *-*-* } 3 }
;# { dg-error "junk at end" "junk" { target *-*-* } 4 }
;# { dg-error "junk at end" "junk" { target *-*-* } 5 }
-;# { dg-error "UND" "undefined" { target *-*-* } 5 }
;# { dg-error "junk at end" "junk" { target *-*-* } 6 }
-;# { dg-error "UND" "undefined" { target *-*-* } 6 }
-;# { dg-error "too complex" "too complex" { target powerpc*-*-* cris*-*-* } 6 }
;# { dg-warning "zero assumed" "missing" { target *-*-* } 9 }
;# { dg-warning "zero assumed" "missing" { target *-*-* } 10 }
More information about the Binutils
mailing list