(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
attr-section.c
       1  /* PR c/96126 - conflicting attribute section accepted on redeclaration
       2     { dg-do compile }
       3     { dg-options "-Wall" }
       4     { dg-require-named-sections "" } */
       5  
       6  __attribute__ ((section ("s1"))) void f1 (void);
       7  __attribute__ ((section ("s2"))) void f1 (void);  // { dg-warning "ignoring attribute 'section \\\(\"s2\"\\\)' because it conflicts with previous 'section \\\(\"s1\"\\\)'" }
       8  
       9  __attribute__ ((section ("s3"), section ("s4")))
      10  void f2 (void);                                   // { dg-error "conflicts" }
      11  
      12  __attribute__ ((section ("s5"))) __attribute ((section ("s6")))
      13  void f3 (void);                                   // { dg-error "conflicts" }