(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
pr80020.c
       1  /* PR middle-end/80020 - gcc confused about aligned_alloc argument order
       2     { dg-do compile }
       3     { dg-options "-O2 -Wall -fdump-tree-optimized" } */
       4  
       5  void sink (void*);
       6  
       7  void foo (void)
       8  {
       9    enum {
      10      Align = 32,
      11      Size = 123
      12    };
      13  
      14    void *p = __builtin_aligned_alloc (Align, Size);
      15    unsigned n = __builtin_object_size (p, 0);
      16  
      17    if (n != Size)
      18      __builtin_abort ();
      19  
      20    __builtin___memset_chk (p, 0, Size, n);
      21  
      22    sink (p);
      23  }
      24  
      25  /* { dg-final { scan-tree-dump-not "abort" "optimized" } }
      26     { dg-final { scan-tree-dump-not "memset_chk" "optimized" } } */