http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45813
--- Comment #3 from Darren Jenkins <darrenrjenkins at gmail dot com> 2010-09-28 23:07:08 UTC --- unsigned short ReadLE16U( volatile unsigned char * ptr ) { unsigned short value; unsigned char * bytes = (unsigned char *)&value; bytes[0] = ptr[0]; bytes[1] = ptr[1]; return value; } Gives me the same erroneous results. The compiler I am using is part of Rowley "CrossWorks for ARM" 2.0.7 which claims to be an unmodified GCC 4.4.4 http://www.rowley.co.uk/crossworks/gpl_sources.htm cc1 --version GNU C (GCC) version 4.4.4 (arm-unknown-elf) compiled by GNU C version 3.4.4 (mingw special), GMP version 4.3.2 version 2.4.2. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 What gets passed to the compiler seems to be : "C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.0/gcc/bin/cc1" -fmessage-length=0 -mcpu=arm7tdmi-s -mthumb -mthumb-interwork -mlittle-endian -mfpu=vfp -mfloat-abi=soft -nostdinc "-isystemC:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.0/include" "-isystemC:/Users/DarrenJenkins/AppData/Local/Rowley Associates Limited/CrossWorks for ARM/packages/include" -I. -I../.. -I../../include -I../../system -I../../LwIP -I../../LwIP/include -I../../LwIP/include/lwip -I../../LwIP/include/ipv4 -I../../NXP_Lib -I../../fat_file_system -I../../usb -I../../usb/UsbHost/Include -I../../Macro -D__ARM_ARCH_4T__ -D__CROSSWORKS_ARM -D__CROSSWORKS_MAJOR_VERSION=2 -D__CROSSWORKS_MINOR_VERSION=0 -D__CROSSWORKS_REVISION=7 -D__TARGET_PROCESSOR=LPC2468 -DNESTED_INTERRUPTS -DSRAM_EXCEPTIONS -D__THUMB -D__FLASH_BUILD -DOSCILLATOR_CLOCK_FREQUENCY=12000000 -DDEBUG -MD "THUMB Flash Debug/usbhost_lpc2468.d" -MQ "THUMB Flash Debug/usbhost_lpc2468.o" -quiet -Wall -fno-omit-frame-pointer -fno-schedule-insns2 -gdwarf-2 -Os -fno-dwarf2-cfi-asm -fno-builtin -ffunction-sections -fdata-sections C:/Users/DarrenJenkins/Documents/NXP_darren/src/projects/Darren/../../usb/UsbHost/Host/usbhost_lpc2468.c -o "C:/Users/DarrenJenkins/Documents/NXP_darren/src/projects/Darren/THUMB Flash Debug/usbhost_lpc2468.asm" and "C:/Program Files (x86)/Rowley Associates Limited/CrossWorks for ARM 2.0/gcc/bin/as" --traditional-format -mcpu=arm7tdmi-s -mthumb -mthumb-interwork -EL -mfpu=vfp -mfloat-abi=soft "C:/Users/DarrenJenkins/Documents/NXP_darren/src/projects/Darren/THUMB Flash Debug/usbhost_lpc2468.asm" -o "C:/Users/DarrenJenkins/Documents/NXP_darren/src/projects/Darren/THUMB Flash Debug/usbhost_lpc2468.o" Yell out if you would like to know anything else.