Bug 69330 - avr-gcc Error: operand out of range: 32
Summary: avr-gcc Error: operand out of range: 32
Status: RESOLVED DUPLICATE of bug 67839
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 5.3.0
: P4 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-17 15:35 UTC by ioch
Modified: 2016-01-25 17:34 UTC (History)
1 user (show)

See Also:
Host:
Target: avr
Build:
Known to work: 4.9.2
Known to fail: 5.2.1
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ioch 2016-01-17 15:35:11 UTC
avr-gcc (GCC) 5.3.0 on command
avr-gcc -Os -save-temps -v -mmcu=attiny44  -c main.c -o main.o
produce error:
GNU assembler version 2.25.1 (avr) using BFD version (GNU Binutils) 2.25.1
main.s: Assembler messages:
main.s:15: Error: operand out of range: 32

main.c content:
int main (void) {
	*(volatile unsigned char *)(0x40) &= 0b11111110;
}

NOTE: no error if 0x40 substituted with 0x3f or 0x41
NOTE: no error if optimisation is not used ( -O0)
Comment 1 Georg-Johann Lay 2016-01-25 17:34:02 UTC
Appears to be already fixed.

Assembler generated CBI / SBI with address of 0x20.

	cbi 0x20,0	 ;  9	*cbi	[length = 1]
	ret	 ;  15	return	[length = 1]

which violates CBI.

*** This bug has been marked as a duplicate of bug 67839 ***