Reverse copy .ctors/.dtors sections if needed.
[deliverable/binutils-gdb.git] / ld / testsuite / ld-elf / pr12730.cc
1 #include <iostream>
2
3 class Hello
4 {
5 public:
6 Hello ()
7 {}
8
9 ~Hello ()
10 {}
11
12 void act ()
13 { std::cout << "Hello, world!" << std::endl; }
14 };
15
16
17 template <class T>
18 struct Foo
19 {
20 T* _M_allocate_single_object ()
21 {
22 return new T;
23 }
24 };
25
26 static void __attribute__ (( constructor )) PWLIB_StaticLoader() {
27 Foo<Hello> allocator;
28 Hello* salut = allocator._M_allocate_single_object ();
29 salut->act ();
30 }
31
32
33 int
34 main (int /*argc*/,
35 char* /*argv*/[])
36 {
37 return 0;
38 }
This page took 0.031456 seconds and 4 git commands to generate.