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
/* bug-2385.c */ #include <testfwk.h> typedef struct fileblk *FILE; FILE standin; struct fileblk { int a; }; int silly(void) { FILE f; return (f = standin)->a; } void testBug(void) { struct fileblk f; f.a = 42; standin = &f; ASSERT(silly() == 42); }