1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-27 00:29:31 +00:00
cc65/test/val/pr1423.c

42 lines
476 B
C
Raw Normal View History

2021-03-19 23:55:55 +00:00
/* pr #1423 - Codegen fix for certain cases of object addresses as boolean */
unsigned char fails = 0;
void test1(void)
{
int a;
while (&a) {
return;
}
fails++;
return;
2022-04-17 14:07:52 +00:00
}
2021-03-19 23:55:55 +00:00
void test2(void)
{
int a;
do {
return;
} while (&a);
fails++;
return;
}
void test3(void)
{
int a;
for (;&a;) {
return;
}
fails++;
return;
}
int main(void)
{
test1();
test2();
test3();
return fails;
}