diff options
author | 2019-02-02 11:27:03 +0000 | |
---|---|---|
committer | 2019-02-02 11:27:03 +0000 | |
commit | 746bf85ef77f47f1e658d909fa3ddb3e26aa65bd (patch) | |
tree | 35aa073e24dc0d06c3f0d64d147b20e1596e9537 | |
parent | Properly account wired pages in pmap_randomize_level (diff) | |
download | wireguard-openbsd-746bf85ef77f47f1e658d909fa3ddb3e26aa65bd.tar.xz wireguard-openbsd-746bf85ef77f47f1e658d909fa3ddb3e26aa65bd.zip |
An extra test that is known to trigger problems with some versions of
clang using -O0
-rw-r--r-- | regress/misc/exceptions/Makefile | 2 | ||||
-rw-r--r-- | regress/misc/exceptions/simple2/Makefile | 8 | ||||
-rw-r--r-- | regress/misc/exceptions/simple2/simple2.cc | 20 |
3 files changed, 29 insertions, 1 deletions
diff --git a/regress/misc/exceptions/Makefile b/regress/misc/exceptions/Makefile index 09308234ad3..d246e2d8a28 100644 --- a/regress/misc/exceptions/Makefile +++ b/regress/misc/exceptions/Makefile @@ -1,3 +1,3 @@ -SUBDIR+= simple libbar foo +SUBDIR+= simple simple2 libbar foo .include <bsd.subdir.mk> diff --git a/regress/misc/exceptions/simple2/Makefile b/regress/misc/exceptions/simple2/Makefile new file mode 100644 index 00000000000..40a8ee2b8e0 --- /dev/null +++ b/regress/misc/exceptions/simple2/Makefile @@ -0,0 +1,8 @@ +# $OpenBSD: Makefile,v 1.1 2019/02/02 11:27:03 otto Exp $ + +PROG= simple2 +SRCS= simple2.cc +# This flag has been known to trigger bugs in clang, please keep it +CXXFLAGS=-O0 + +.include <bsd.regress.mk> diff --git a/regress/misc/exceptions/simple2/simple2.cc b/regress/misc/exceptions/simple2/simple2.cc new file mode 100644 index 00000000000..efd54ec9c54 --- /dev/null +++ b/regress/misc/exceptions/simple2/simple2.cc @@ -0,0 +1,20 @@ +#include <iostream> + + +class ex { +}; + +void f(void) { + throw ex(); +} + +int main() { + try { + f(); + } + catch (const ex & myex) { + std::cout << "Catching..." << std::endl; + exit(0); + } + exit(1); +} |