summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/2007-09-27-ComplexIntCompare.c
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-07-26 21:42:32 +0000
committerEric Christopher <echristo@apple.com>2011-07-26 21:42:32 +0000
commite70ea8b806ff60c2c78e373b22590633f35b3937 (patch)
tree0647325c24f788718449304cb88a7eb26fedfa0a /clang/test/CodeGen/2007-09-27-ComplexIntCompare.c
parentd2659138da55d08e0e480dd9bce6a6b933bae294 (diff)
downloadbcm5719-llvm-e70ea8b806ff60c2c78e373b22590633f35b3937.tar.gz
bcm5719-llvm-e70ea8b806ff60c2c78e373b22590633f35b3937.zip
Migrate:
CodeGen/2003-08-21-WideString.c CodeGen/2003-10-02-UnionLValueError.c CodeGen/2004-02-20-Builtins.c CodeGen/2008-01-04-WideBitfield.c CodeGen/2002-07-14-MiscTests3.c CodeGen/2005-04-09-ComplexOps.c CodeGen/2008-12-23-AsmIntPointerTie.c CodeGen/2005-07-20-SqrtNoErrno.c CodeGen/2005-01-02-VAArgError-ICE.c CodeGen/2004-06-17-UnorderedCompares.c CodeGen/2002-06-25-FWriteInterfaceFailure.c CodeGen/2002-02-18-64bitConstant.c CodeGen/2002-05-24-Alloca.c CodeGen/2006-01-13-Includes.c CodeGen/2007-09-27-ComplexIntCompare.c CodeGen/2004-02-13-IllegalVararg.c CodeGen/2007-09-12-PragmaPack.c CodeGen/2002-08-02-UnionTest.c from test/FrontendC with changes to remove header file includes. llvm-svn: 136153
Diffstat (limited to 'clang/test/CodeGen/2007-09-27-ComplexIntCompare.c')
-rw-r--r--clang/test/CodeGen/2007-09-27-ComplexIntCompare.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/CodeGen/2007-09-27-ComplexIntCompare.c b/clang/test/CodeGen/2007-09-27-ComplexIntCompare.c
new file mode 100644
index 00000000000..d07aa0cf7c3
--- /dev/null
+++ b/clang/test/CodeGen/2007-09-27-ComplexIntCompare.c
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -emit-llvm %s -o -
+// PR1708
+
+void __attribute__((noreturn)) abort(void);
+
+struct s { _Complex unsigned short x; };
+struct s gs = { 100 + 200i };
+struct s __attribute__((noinline)) foo (void) { return gs; }
+
+int main ()
+{
+ if (foo ().x != gs.x)
+ abort ();
+ exit (0);
+}
OpenPOWER on IntegriCloud