blob: cc5fa33db86bcec7f179b267b3ec7531cae3e115 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
/*
bug2889032.c
*/
#include <testfwk.h>
struct timetable_timestamp {
const char *id;
};
struct timetable {
struct timetable_timestamp *timestamps;
unsigned int * const ptr;
};
// no need to call this, it generates compiler error:
// Assertion failed: 0, file sdcc/src/SDCCopt.c, line 707
int timetable_timediff(struct timetable *t, const char *id1)
{
int i;
for(i = *t->ptr - 1; i >= 0; --i)
{
if(t->timestamps[i].id == id1)
{
return i;
}
}
return 0;
}
void
testBug (void)
{
ASSERT (1);
}
|