summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/special/20000419-2.c
blob: 4a228eb1ae9dc0e440a9bb1ce0848edde61c0603 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* A static function with a global alias should not get 'defined but
   not used' warnings.  Exposed by Linux kernel.  */
/* { dg-do compile } */
/* { dg-require-alias "" } */
/* { dg-options "-Wall" } */

extern void do_something (void);
extern void do_something_else (void);

static int
init_foobar(void)  /* { dg-bogus "defined but not used" "not used warning" } */
{
  do_something();
  do_something_else();
  return 0;
}

int init_module(void) __attribute__((alias("init_foobar")));