| 1 |
/* Exception handling constructs in dead code, '-mfake-exceptions'. */ |
| 2 |
|
| 3 |
/* { dg-do run } */ |
| 4 |
/* Via the magic string "-std=*++" indicate that testing one (the default) C++ standard is sufficient. */ |
| 5 |
/* { dg-additional-options -fexceptions } */ |
| 6 |
/* { dg-additional-options -mfake-exceptions } |
| 7 |
{ dg-bogus {sorry, unimplemented: exception handling not supported} {} { target *-*-* } 0 } */ |
| 8 |
/* { dg-additional-options -O0 } */ |
| 9 |
/* { dg-additional-options -fdump-tree-optimized-raw } */ |
| 10 |
|
| 11 |
#include "exceptions-pr118794-1.C" |
| 12 |
|
| 13 |
/* In this specific C++ arrangement, distilled from PR118794, GCC synthesizes |
| 14 |
'__builtin_eh_pointer', '__builtin_unwind_resume' calls as dead code in 'f': |
| 15 |
{ dg-final { scan-tree-dump-times {gimple_call <__builtin_eh_pointer, } 1 optimized } } |
| 16 |
{ dg-final { scan-tree-dump-times {gimple_call <__builtin_unwind_resume, } 1 optimized } } */ |