2014-09-24 14:45:10 +00:00
|
|
|
/*
|
2022-04-17 14:07:52 +00:00
|
|
|
!!DESCRIPTION!!
|
2014-09-24 14:45:10 +00:00
|
|
|
!!ORIGIN!! testsuite
|
|
|
|
!!LICENCE!! Public Domain
|
|
|
|
!!AUTHOR!!
|
|
|
|
*/
|
|
|
|
|
2014-11-22 17:28:05 +00:00
|
|
|
#include "common.h"
|
|
|
|
|
2014-09-24 14:45:10 +00:00
|
|
|
struct Record {
|
|
|
|
struct Record *PtrComp;
|
|
|
|
int x;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct Record RecordType;
|
|
|
|
typedef RecordType *RecordPtr;
|
|
|
|
|
|
|
|
void Proc3(RecordPtr *PtrParOut)
|
|
|
|
{
|
2019-02-12 21:50:49 +00:00
|
|
|
/* whatever */
|
2014-09-24 14:45:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void Proc1(RecordPtr PtrParIn)
|
|
|
|
{
|
|
|
|
#define NextRecord (*(PtrParIn->PtrComp))
|
2019-02-12 21:50:49 +00:00
|
|
|
Proc3((RecordPtr *)NextRecord.PtrComp);
|
|
|
|
Proc3(&NextRecord.PtrComp);
|
|
|
|
Proc3(&PtrParIn->PtrComp->PtrComp);
|
2014-09-24 14:45:10 +00:00
|
|
|
|
|
|
|
#ifdef CAST_STRUCT_PTR
|
2019-02-12 21:50:49 +00:00
|
|
|
Proc3((RecordPtr *) PtrParIn->PtrComp->PtrComp);
|
|
|
|
Proc3((RecordPtr *) (*(PtrParIn->PtrComp)).PtrComp);
|
|
|
|
Proc3((RecordPtr *) NextRecord.PtrComp);
|
2014-09-24 14:45:10 +00:00
|
|
|
#else
|
2019-02-12 21:50:49 +00:00
|
|
|
Proc3(PtrParIn->PtrComp->PtrComp);
|
|
|
|
Proc3((*(PtrParIn->PtrComp)).PtrComp);
|
|
|
|
Proc3(NextRecord.PtrComp);
|
2014-09-24 14:45:10 +00:00
|
|
|
#endif
|
2022-04-17 14:07:52 +00:00
|
|
|
|
2014-09-24 14:45:10 +00:00
|
|
|
#undef NextRecord
|
|
|
|
}
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
|
|
|
printf("it works :)\n");
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|