(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
noreorder.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-O2" } */
       3  
       4  /* The function order in this file is opposite from what the cgraph
       5     topological sort would output. So we can check the order is preserved. */
       6  
       7  extern void f2(int);
       8  static int func2(void);
       9  
      10  #ifndef NOREORDER
      11  #define NOREORDER __attribute__((no_reorder))
      12  #endif
      13  
      14  asm("firstasm");
      15  
      16  NOREORDER __attribute__((noipa)) int bozo(void)
      17  {
      18    f2(3);
      19    func2();
      20  }
      21  
      22  asm("jukjuk");
      23  
      24  NOREORDER __attribute__((noipa)) static int func1(void)
      25  {
      26    f2(1);
      27  }
      28  
      29  asm("barbar");
      30  
      31  NOREORDER __attribute__((noipa)) static int func2(void)
      32  {
      33    func1();
      34  }
      35  
      36  asm("lastasm");
      37  
      38  /* { dg-final { scan-assembler "firstasm.*bozo.*jukjuk.*func1.*barbar.*func2.*lastasm" } } */