lance@ORC.OLIVETTI.COM (10/04/89)
gcc 1.36 puts out code that the AT&T SystemV.3.1 assembler chokes
on (it assembles with BSD/gas):
m380mach6{66} cat tst1.c
struct from { unsigned short field; } from[1];
struct to { char field1; }to[1];
lose()
{
unsigned char i;
to[1].field1 = from[i].field;
}
m380mach6{67} /lib/fgcc-cc1 -quiet -version -fvolatile tst1.c
GNU C version 1.36 (80386, ATT syntax) compiled by GNU C version 1.36.
default target switches: -m80387
m380mach6{68} /lib/fgcc-as tst1.s
Assembler: tst1.c
aline 12 : syntax error
m380mach6{69} cat tst1.s
.file "tst1.c"
gcc_compiled.:
.text
.align 4
.globl lose
lose:
pushl %ebp
movl %esp,%ebp
subl $4,%esp
movzbl -4(%ebp),%eax
movw from(,%eax,2),%ax
movb %ax,to+1 <-- chunder!
.L1:
leave
ret
.comm to,1
.comm from,2
lance
lance@orc.olivetti.com