Merge pull request #2778 from colinleroy/optimise-ldaxi

Optimise ldaxi
This commit is contained in:
Bob Andrews
2025-07-10 17:03:28 +02:00
committed by GitHub
4 changed files with 121 additions and 17 deletions

20
test/val/bug2205.c Normal file
View File

@@ -0,0 +1,20 @@
#include "unittest.h"
struct Object
{
int a;
int data[10];
};
struct Object object_data = { 0x0102, {0x0304, 0x0506,
0x0708, 0x090A, 0x0B0C,
0x0D0E, 0x0F10, 0x1112,
0x1314, 0x1516}};
TEST
{
struct Object *o = &object_data;
ASSERT_IsTrue(o->a == 0x0102, "Wrong value for a");
ASSERT_IsTrue(o->data[2] == 0x0708, "Wrong value for data[2]");
}
ENDTEST