diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/ext/builtin2.C')
-rw-r--r-- | gcc/testsuite/g++.dg/ext/builtin2.C | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ext/builtin2.C b/gcc/testsuite/g++.dg/ext/builtin2.C new file mode 100644 index 000000000..ffa25285b --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/builtin2.C @@ -0,0 +1,13 @@ +// PR c++/18514 +// Test whether alternate 'asm' name is applied correctly to +// builtin imported into namespace std. + +// { dg-do compile } +// { dg-options "" } +// { dg-final { scan-assembler "fancy_printf" } } + +extern "C" int printf(const char*, ...) __asm("_fancy_printf"); + +namespace std { using ::printf; } + +namespace std { void foo() { printf("abc"); } } |