diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:44:14 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:44:14 +0000 |
| commit | 2b6b257f4e5503a7a2675bdb8735693db769f75c (patch) | |
| tree | e85e046ae7003fe3bcc8b5454cd0fa3f7407b470 /test/CodeGen/pass-object-size.c | |
| parent | b4348ed0b7e90c0831b925fbee00b5f179a99796 (diff) | |
Notes
Diffstat (limited to 'test/CodeGen/pass-object-size.c')
| -rw-r--r-- | test/CodeGen/pass-object-size.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/pass-object-size.c b/test/CodeGen/pass-object-size.c index 1ad3f853ca6d..6e2bc2090eda 100644 --- a/test/CodeGen/pass-object-size.c +++ b/test/CodeGen/pass-object-size.c @@ -351,3 +351,18 @@ void test13() { ObjectSize0(++p); ObjectSize0(p++); } + +// There was a bug where variadic functions with pass_object_size would cause +// problems in the form of failed assertions. +void my_sprintf(char *const c __attribute__((pass_object_size(0))), ...) {} + +// CHECK-LABEL: define void @test14 +void test14(char *c) { + // CHECK: @llvm.objectsize + // CHECK: call void (i8*, i64, ...) @my_sprintf + my_sprintf(c); + + // CHECK: @llvm.objectsize + // CHECK: call void (i8*, i64, ...) @my_sprintf + my_sprintf(c, 1, 2, 3); +} |
