Mingw hosted arm-elf output differs from linux hosted arm-elf when compiling with -Os and -mthumb for the code added below. Remove -mthumb and the output won't differ.
Mingw hosted toolchain: Target: arm-elf Configured with: ../gcc-4.2.2/configure --target=arm-elf --prefix=/proj/crossgcc/arm-elf --disable-nls --with-gnu-as --with-gnu-ld --enable-languages=c --disable-shared --disable-threads --disable-libssp --disable-__cxa_atexit --disable-libstdcxx-pch --enable-interwork --enable-multilib Thread model: single gcc version 4.2.2 Linux hosted toolchain: Target: arm-elf Configured with: ../gcc-4.2.2/configure --target=arm-elf --prefix=/proj/crossgcc/arm-elf --disable-nls --with-gnu-as --with-gnu-ld --enable-languages=c --disable-shared --disable-threads --disable-libssp --disable-__cxa_atexit --disable-libstdcxx-pch --enable-interwork --enable-multilib Thread model: single gcc version 4.2.2 arm-elf-gcc -Wall -mlittle-endian -mthumb -mthumb-interwork -Os -save-temps -c main.c main.c: typedef struct pic { unsigned int soft_set; unsigned int soft_clear; } pic_t; typedef struct isr { void (*func)(void *); void * arg; } isr_t; static volatile pic_t * const pSIC = (pic_t *)0xCA000000; static isr_t isr_table[32]; static void isr1 (void * arg) { /* Clear high priority IRQ */ pSIC->soft_clear = (1 << 0); } int main (void) { /* Install interrupt handlers */ isr_table[0].func = isr1; isr_table[0].arg = (void *)3; while(1); return (1); } regards Andreas -- Summary: mingw hosted arm-elf output differs from linux hosted arm-elf when compiling with -Os and -mthumb Product: gcc Version: 4.2.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: info dot gnu at rt-labs dot com GCC build triplet: x86_64-unknown-linux-gnu, i686-pc-mingw32 GCC host triplet: x86_64-unknown-linux-gnu, i686-pc-mingw32 GCC target triplet: arm-elf http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39663