view gcc/testsuite/gcc.dg/vxworks/initpri2.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* On VxWorks, in kernel mode, there is no support for .ctors/.dtors.
   Instead, initialization is handled by munch.  */

/* { dg-do compile { target vxworks_kernel } } */
/* { dg-final { scan-assembler-not "\.ctors" } } */
/* { dg-final { scan-assembler-not "\.dtors" } } */

volatile int i;

void c1 () __attribute__((constructor));
void c1 () { ++i; }

void d1 () __attribute__((destructor));
void d1 () { --i; }