This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F6779: Memory alignment and pointer variable using

Part Number: MSP430F6779

I test with code (IAR 5.60.1) below.

static unsigned long *test_value_p;

static unsigned long test_value_1;
static unsigned long test_value_2;
static unsigned char array[8] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07};

test_value_p = (uint32_t *)(&array[1]);
test_value_2 = *test_value_p;

Expected output: test_value_2 , 0x04030201
Actual output: test_value_2,  0x03020100

Did it cause from compiler force the memory address to even number (test_value_2 = *test_value_p;)?

**Attention** This is a public forum