blob: 719104e50531c15b9a7a53c0550d76a09f13a0d6 (
plain)
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
38
39
40
41
42
43
|
/*
bug2823963.c
*/
#include <testfwk.h>
typedef struct xLIST_ITEM
{
unsigned short xItemValue;
volatile struct xLIST_ITEM * pxNext;
volatile struct xLIST_ITEM * pxPrevious;
void * pvOwner;
void * pvContainer;
}xListItem;
typedef struct xMINI_LIST_ITEM
{
unsigned short xItemValue;
volatile struct xLIST_ITEM *pxNext;
volatile struct xLIST_ITEM *pxPrevious;
}xMiniListItem;
typedef struct xLIST
{
volatile unsigned char uxNumberOfItems;
volatile xListItem * pxIndex;
volatile xMiniListItem xListEnd;
} xList;
static xList xDelayedTaskList1;
void vListInitialise( xList *pxList )
{
pxList->pxIndex = ( xListItem * ) &( pxList->xListEnd );
}
void
testBug(void)
{
void * p = &xDelayedTaskList1.xListEnd;
vListInitialise( &xDelayedTaskList1 );
ASSERT (xDelayedTaskList1.pxIndex == p);
}
|