<< Back to previous view

[PCC-374] movsbl error with -xtemps Created: 04/Aug/11  Updated: 08/Aug/11

Status: Resolved
Project: pcc
Component/s: i386 target
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Iain Hibbert Assignee: Anders Magnusson
Resolution: Fixed Votes: 0
Environment: NetBSD/i386

the following code fragment

int foo(unsigned int a)
        return ((char *)&a)[0];

when compiled with -xtemps results in errors from the gnu i386 assembler

/tmp/ctm.27893a: Assembler messages:
/tmp/ctm.27893a:11: Error: suffix or operands invalid for `movsbl'

Comment by Anders Magnusson [ 04/Aug/11 09:46 PM ]
a gets put into a register even if its address is taken, which is not legal.
Comment by Anders Magnusson [ 08/Aug/11 09:28 PM ]
Fixed now by not discarding UMUL ADDROF when applied to a TEMP node, it will be converted to a memory reference in pass2.
Generated at Sat Oct 21 12:27:58 CEST 2017 using JIRA Enterprise Edition, Version: 3.13.1-#333.