Hello, it seems if there is a bug in the avr 32 gcc compiler. avr32-gcc: version 4.3.2 toolchain: avr32-gnu-toolchain-2.4.2-setup.exe avr32studio: avr32studio-ide-installer-2.5.0.35-win32.win32.x86.exe Both got from www.atmel.com Device: UC3B0256 Compilerflags: -O2 -g2 -mpart=uc3b0256 When compiling the atached example whith optimation "O2" the line: telegramm[10] = 1; won't be translated right. In the listfile I see, that the wrong register will be stored to "telegramm[10]". Listfile: telegramm[10] = 1; 8000011a: 30 1a mov r10,1 void test_func(u8_t port) { u8_t *telegramm = test_str[port].telegramm_tx; telegramm[6] = 33; 8000011c: b8 e9 st.b r12[0x6],r9 telegramm[10] = 1; 8000011e: f9 68 00 0a st.b r12[10],r8 It will store r8 instead of r10, which has got the 1. I don't know if you coult help me, because the gcc ported from Atmel? I have attached the test code, the listfile and the output of avr32-gcc -v -save-temps -O2 -g3 -mpart=uc3b0256 -c main.o main.c. (hope I can attach them after commit)
Created attachment 20889 [details] Test program This file could be compiled alone with avr32-gcc -v -save-temps -O2 -g3 -mpart=uc3b0256 -c main.o main.c
Created attachment 20890 [details] Listfile with resulted assembler Generated with: avr32-objdump.exe -S main.o > main.lst
Created attachment 20891 [details] gcc output Output of avr32-gcc by using: avr32-gcc -v -save-temps -O2 -g3 -mpart=uc3b0256 -c main.o main.c.
I think this bug should be closed. It's about a private port from Atmel for AVR32 which is not in GCC main line.
(In reply to comment #4) > I think this bug should be closed. > > It's about a private port from Atmel for AVR32 which is not in GCC main line. I'm leaving it open for the moment. Assigning to self.
Closed as invalig because AVR32 is not a supported target.