diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/init/dso_handle1.C')
-rw-r--r-- | gcc/testsuite/g++.dg/init/dso_handle1.C | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/init/dso_handle1.C b/gcc/testsuite/g++.dg/init/dso_handle1.C new file mode 100644 index 000000000..97f67cad8 --- /dev/null +++ b/gcc/testsuite/g++.dg/init/dso_handle1.C @@ -0,0 +1,11 @@ +// PR c++/17042 +// { dg-do assemble } +/* { dg-require-weak "" } */ +// { dg-options "-fuse-cxa-atexit" } + +struct A +{ A(); ~A(); }; +A a; +extern "C" { void* __dso_handle __attribute__ ((__weak__)); } +void f() +{ __dso_handle = 0; } |