forked from OSchip/llvm-project
parent
88dd1ff0d7
commit
a24b2b8c88
|
@ -1,21 +0,0 @@
|
|||
// The code generated for this testcase should be completely typesafe!
|
||||
// RUN: %llvmgcc -xc++ -S -o - %s | llvm-as | opt -die | llvm-dis | \
|
||||
// RUN: notcast
|
||||
|
||||
struct contained {
|
||||
unsigned X;
|
||||
contained();
|
||||
};
|
||||
|
||||
struct base {
|
||||
unsigned A, B;
|
||||
};
|
||||
|
||||
struct derived : public base {
|
||||
contained _M_value_field;
|
||||
};
|
||||
|
||||
int test() {
|
||||
derived X;
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
// RUN: %llvmgcc -xc++ -S -o - %s | llvm-as | opt -die | llvm-dis | notcast
|
||||
|
||||
struct A {
|
||||
A() : i(0) {}
|
||||
int getI() {return i;}
|
||||
int i;
|
||||
};
|
||||
|
||||
int f(int j)
|
||||
{
|
||||
A a;
|
||||
return j+a.getI();
|
||||
}
|
Loading…
Reference in New Issue