diff options
-rw-r--r-- | test/C++Frontend/2003-11-09-ConstructorTypeSafety.cpp.tr | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/C++Frontend/2003-11-09-ConstructorTypeSafety.cpp.tr b/test/C++Frontend/2003-11-09-ConstructorTypeSafety.cpp.tr new file mode 100644 index 0000000000..0475002c51 --- /dev/null +++ b/test/C++Frontend/2003-11-09-ConstructorTypeSafety.cpp.tr @@ -0,0 +1,20 @@ +// The code generated for this testcase should be completely typesafe! +// RUN: %llvmgcc -xc++ -S -o - %s | not grep ' cast ' + +struct contained { + unsigned X; + contained(); +}; + +struct base { + unsigned A, B; +}; + +struct derived : public base { + contained _M_value_field; +}; + +int test() { + derived X; +} + |