From 8a879a16cffbd6e379ea041f759d1f7fa1631496 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 22 May 2003 15:49:58 +0000 Subject: [PATCH] Make the testcase even more insane git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6280 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/C++Frontend/2003-05-22-LocalTypeTest.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/test/C++Frontend/2003-05-22-LocalTypeTest.c b/test/C++Frontend/2003-05-22-LocalTypeTest.c index af60a2e7744..2dac830b661 100644 --- a/test/C++Frontend/2003-05-22-LocalTypeTest.c +++ b/test/C++Frontend/2003-05-22-LocalTypeTest.c @@ -1,10 +1,24 @@ +#include + struct sometimes { short offset; short bit; short live_length; short calls_crossed; } Y; int main() { - struct sometimes { int X, Y; } S; - S.X = 1; - return Y.offset; + int X; + { + struct sometimes { int X, Y; } S; + S.X = 1; + X = S.X; + } + { + struct sometimes { char X; } S; + S.X = -1; + X += S.X; + } + X += Y.offset; + + printf("Result is %d\n", X); + return X; }