Files
cc65/test/val/bug2205.c
Colin Leroy-Mira 20a9db757d Optimize multiple incax* and incax*/ldaxi
- Group multiple calls to incax* and decax* into a single one
- Replace incaxN/jsr ldaxi with ldy #N+1/jsr ldaxidx

Fixes #2055
2025-07-06 20:37:01 +02:00

21 lines
460 B
C

#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