(root)/
gcc-13.2.0/
gcc/
testsuite/
c-c++-common/
attributes-3.c
       1  /* PR c++/71024 */
       2  /* { dg-do compile } */
       3  /* { dg-prune-output "declared but never defined" } */
       4  
       5  void
       6  fn0 (void) /* { dg-message "previous definition" } */
       7  {
       8  }
       9  extern void __attribute__((optimize ("O2"))) fn0 (void); /* { dg-warning "optimization attribute" } */
      10  
      11  extern __attribute__((noinline)) int fn1 (void); /* { dg-message "previous declaration" } */
      12  extern inline int fn1 (void); /* { dg-warning "inline declaration of" } */
      13  
      14  extern inline int fn2 (void); /* { dg-message "previous declaration" } */
      15  extern __attribute__((noinline)) int fn2 (void); /* { dg-warning "attribute .noinline. follows inline declaration" } */
      16  
      17  extern __attribute__((always_inline)) int fn3 (void); /* { dg-message "previous declaration" } */
      18  extern __attribute__((noinline)) int fn3 (void); /* { dg-warning "attribute .noinline." } */
      19  
      20  extern __attribute__((noinline)) int fn4 (void); /* { dg-message "previous declaration" } */
      21  extern __attribute__((always_inline)) int fn4 (void); /* { dg-warning "attribute .always_inline." } */
      22  
      23  extern __attribute__((hot)) int fn5 (void); /* { dg-message "previous declaration" } */
      24  extern __attribute__((cold)) int fn5 (void); /* { dg-warning "attribute .cold." } */
      25  
      26  extern __attribute__((cold)) int fn6 (void); /* { dg-message "previous declaration" } */
      27  extern __attribute__((hot)) int fn6 (void); /* { dg-warning "attribute .hot." } */