diff options
Diffstat (limited to 'clang/test/CodeGen/2003-10-02-UnionLValueError.c')
-rw-r--r-- | clang/test/CodeGen/2003-10-02-UnionLValueError.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CodeGen/2003-10-02-UnionLValueError.c b/clang/test/CodeGen/2003-10-02-UnionLValueError.c new file mode 100644 index 0000000..180eb10 --- /dev/null +++ b/clang/test/CodeGen/2003-10-02-UnionLValueError.c @@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -emit-llvm %s -o /dev/null + +int sprintf(char * restrict str, const char * restrict format, ...); +union U{ + int i[8]; + char s[80]; +}; + +void format_message(char *buffer, union U *u) { + sprintf(buffer, u->s); +} |