#include "debug.h" #include void tst1(int a, int b) { debug("1: %p %p\n", &a, &b); } void tst2() { int a; debug("2: %p\n", &a); } void tst3(int b) { debug("3: %p\n", &b); } void tst4() { int a; int b; debug("4: %p %p\n", &a, &b); } void tst5() { void *a= ((long)(&a)&4) ? alloca(4) : 0; debug("5: %p %p\n", &a, a); tst2(); } void x1() { int a[1]; tst1(a[0], a[1]); tst2(); tst3(a[0]); tst4(); tst5(); } void x2() { int a[2]; tst1(a[0], a[1]); tst2(); tst3(a[0]); tst4(); tst5(); } void x3() { int a[3]; tst1(a[0], a[1]); tst2(); tst3(a[0]); tst4(); tst5(); } #ifdef _WIN32_WCE int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) #else int main(int argc, char **argv) #endif { #ifdef _WIN32_WCE DebugSetLogfile("tststk.log"); #else DebugStdOut(); #endif debug("----1\n"); x1(); debug("----2\n"); x2(); debug("----3\n"); x3(); return 0; }