middle-end: Fix ifcvt predicate generation for masked function calls
[official-gcc.git] / gcc / testsuite / g++.dg / torture / pr85334.C
bloba282edc88e921913dcce2afbef86d54420af238f
1 // { dg-do run { target { i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } } }
2 // { dg-require-effective-target cet }
3 // { dg-additional-options "-fexceptions -fnon-call-exceptions -fcf-protection" }
5 #include <signal.h>
6 #include <stdlib.h>
8 void sighandler (int signo, siginfo_t * si, void * uc)
10   throw (5);
13 char * dosegv ()
14 {    
15   * ((volatile int *)0) = 12;
16   return 0;
19 int main ()
21   struct sigaction sa;
22   int status;
24   sa.sa_sigaction = sighandler;
25   sa.sa_flags = SA_SIGINFO;
26     
27   status = sigaction (SIGSEGV, & sa, NULL);
28   status = sigaction (SIGBUS, & sa, NULL);
30   try {
31     dosegv ();
32   }
33   catch (int x) {
34     return (x != 5);
35   }
37   return 1;