(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
s390/
hotpatch-compile-16.c
       1  /* Functional tests for the function hotpatching feature.  */
       2  
       3  /* { dg-do compile } */
       4  /* { dg-options "-O3 -mzarch" } */
       5  
       6  typedef int (*fn_t)(void);
       7  
       8  fn_t hp1(void)
       9  {
      10    __attribute__((hotpatch(0,0)))
      11    int nested1(void)
      12    { return 1; }
      13  
      14    return nested1;
      15  }
      16  
      17  fn_t hp2(void)
      18  {
      19    __attribute__ ((hotpatch(1,2)))
      20    int nested2(void)
      21    { return 2; }
      22  
      23    return nested2;
      24  }