mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-14 23:29:51 +00:00
Make testcase executable
llvm-svn: 6165
This commit is contained in:
parent
e586cc42bf
commit
c16c4836d0
@ -1,11 +1,27 @@
|
||||
int array[] = { 1, 2, 3, 4 };
|
||||
#include <stdio.h>
|
||||
//extern int printf(const char *, ...);
|
||||
|
||||
int CN = 0;
|
||||
int DN = 0;
|
||||
|
||||
struct foo {
|
||||
foo() throw();
|
||||
} Constructor1; // Global with ctor to be called before main
|
||||
|
||||
foo Constructor2;
|
||||
int Num;
|
||||
foo(int num) : Num(num) {
|
||||
printf("Foo ctor %d %d\n", Num, CN++);
|
||||
}
|
||||
~foo() {
|
||||
printf("Foo dtor %d %d\n", Num, DN++);
|
||||
}
|
||||
} Constructor1(7); // Global with ctor to be called before main
|
||||
foo Constructor2(12);
|
||||
|
||||
struct bar {
|
||||
~bar() throw();
|
||||
~bar() {
|
||||
printf("bar dtor\n");
|
||||
}
|
||||
} Destructor1; // Global with dtor
|
||||
|
||||
int main() {
|
||||
printf("main\n");
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user