xref: /llvm-project/clang/test/CodeGen/2007-09-27-ComplexIntCompare.c (revision 7d644e1215b376ec5e915df9ea2eeb56e2d94626)
1 // RUN: %clang_cc1 -emit-llvm %s -o -
2 // PR1708
3 
4 void __attribute__((noreturn)) abort(void);
5 void __attribute__((noreturn)) exit(int);
6 
7 struct s { _Complex unsigned short x; };
8 struct s gs = { 100 + 200i };
foo(void)9 struct s __attribute__((noinline)) foo (void) { return gs; }
10 
main(void)11 int main (void)
12 {
13   if (foo ().x != gs.x)
14     abort ();
15   exit (0);
16 }
17