aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/initpri1_part_d3.c
blob: ae290fa4594dd01c698cf5192d8f4e4e86a12d86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-skip-if part { *-*-* } } */
/* Via the magic string "-std=*++" indicate that testing one (the default) C++ standard is sufficient.  */

extern int i;
extern int j;

CDTOR_LINKAGE
void d3() __attribute__((destructor (600)));

CDTOR_LINKAGE
void d3() {
  if (j != 2)
    __builtin_abort ();
  if (--i != 1)
    __builtin_abort ();
}