aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/initpri1_part_cd4.c
blob: c209db3718e29ef300e05dd6667f7b153ccf4fc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { 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 cd4() __attribute__((constructor (800), destructor (800)));

CDTOR_LINKAGE
void cd4() {
  if (i != 3)
    __builtin_abort ();
  ++j;
}