id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
1435,"""Naughty"" register error in Cmm",Michael D. Adams,,"When experimenting with Cmm code, I found the following bug/trap.

This Cmm code,
{{{
foo {
    bits8 x;
    x = 5;
    bits8[12] = x;
    R1 = x;
    jump bar;
}
}}}
causes the following error
{{{
/tmp/ghc6613_0/ghc6613_0.s: Assembler messages:

/tmp/ghc6613_0/ghc6613_0.s:7:0:
     Error: junk `naughty I386 byte register' after expression
}}}

The assembly that is produced is:
{{{
.text
        .align 4,0x90
.globl foo
foo:
        movl $5,%eax
        movb %al,12
        movb %al,very naughty I386 byte register
        jmp bar

.section .note.GNU-stack,"""",@progbits
.ident ""GHC 6.7.20070612""
}}}

Note the ""very naughty I386 byte register"" in there.

I am not sure whether this kind of Cmm can be generated from Haskell code.",bug,closed,normal,,Compiler,6.7,invalid,,,Linux,x86,,Unknown,,,,
