* auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
[official-gcc.git] / gcc / testsuite / g++.dg / abi / arm_cxa_vec2.C
blob76f327acaab9200d28ffbb64c901367e9a139de0
1 // Check that ARM vector delete functions accept NULL pointers as
2 // inputs.
3 // { dg-do run { target arm*-*-* } }
5 #ifdef __ARM_EABI__
6 #include <cxxabi.h>
8 typedef void *(dtor_type)(void *);
10 extern "C" {
11   void abort();
12   void *__aeabi_vec_dtor_cookie(void *, dtor_type);
13   void __aeabi_vec_delete(void *, dtor_type);
14   void __aeabi_vec_delete3(void *, 
15                            dtor_type, 
16                            void (*)(void *, __SIZE_TYPE__));
17   void __aeabi_vec_delete3_nodtor(void *, 
18                                   void (*)(void *, __SIZE_TYPE__));
21 // These functions should never be called.
22 void* dtor(void *)
24   abort ();
27 void dealloc(void *, size_t) {
28   abort ();
31 int main () {
32   if (__aeabi_vec_dtor_cookie (NULL, &dtor) != NULL)
33     return 1;
34   // These do not return values, but should not crash.
35   __aeabi_vec_delete (NULL, &dtor);
36   __aeabi_vec_delete3 (NULL, &dtor, &dealloc);
37   __aeabi_vec_delete3_nodtor (NULL, &dealloc);
39 #else
40 int main () {}
41 #endif