diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2014-04-14 15:59:47 -0700 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2014-04-22 16:16:33 -0700 |
commit | c16207898bba39af7a6ec6159ceee8623dcfb951 (patch) | |
tree | aedbd5b68b2e3f6c0a22d0ff9c1237e35ee58852 /gcc-4.9/gcc/testsuite | |
parent | 5399988ba7d9906878c5f5b6d9390e3595a6e915 (diff) | |
download | toolchain_gcc-c16207898bba39af7a6ec6159ceee8623dcfb951.zip toolchain_gcc-c16207898bba39af7a6ec6159ceee8623dcfb951.tar.gz toolchain_gcc-c16207898bba39af7a6ec6159ceee8623dcfb951.tar.bz2 |
[4.9] Always enable --eh-frame-hdr for static executable
See 5e6cdf76af295c9a39b695ca228cff675e8ff4ae and
23e3137ee2897464b051599b85a09f130d3ad05d
Change-Id: Ibda473188e5a10f2a0592f2494ad00ad1f91e04b
Diffstat (limited to 'gcc-4.9/gcc/testsuite')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/eh/spec3-static.C | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/eh/spec3-static.C b/gcc-4.9/gcc/testsuite/g++.dg/eh/spec3-static.C new file mode 100644 index 0000000..15408ef --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/eh/spec3-static.C @@ -0,0 +1,25 @@ +// PR c++/4381 +// Test that exception-specs work properly for classes with virtual bases. + +// { dg-do run } +// { dg-options "-static" } + +class Base {}; + +struct A : virtual public Base +{ + A() {} +}; + +struct B {}; + +void func() throw (B,A) +{ + throw A(); +} + +int main(void) +{ + try { func(); } + catch (A& a) { } +} |