diff options
Diffstat (limited to 'test/FrontendC/2005-03-06-OffsetOfStructCrash.c')
-rw-r--r-- | test/FrontendC/2005-03-06-OffsetOfStructCrash.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/FrontendC/2005-03-06-OffsetOfStructCrash.c b/test/FrontendC/2005-03-06-OffsetOfStructCrash.c new file mode 100644 index 000000000000..91e686280233 --- /dev/null +++ b/test/FrontendC/2005-03-06-OffsetOfStructCrash.c @@ -0,0 +1,14 @@ +// RUN: %llvmgcc %s -S -o - + +struct Y {}; +struct XXX { + struct Y F; +}; + +void test1() { + (int)&((struct XXX*)(((void *)0)))->F; +} + +void test2() { + &((struct XXX*)(((void *)0)))->F; +} |