(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
pr87954.c
       1  /* { dg-options "-O2 -fdump-tree-optimized" } */
       2  
       3  #define __GFP_DMA 1u
       4  #define __GFP_RECLAIM 0x10u
       5  
       6  #define KMALLOC_DMA 2
       7  #define KMALLOC_RECLAIM 1
       8  
       9  unsigned int
      10  imul(unsigned int flags)
      11  {
      12    int is_dma, type_dma, is_rec;
      13  
      14    is_dma = !!(flags & __GFP_DMA);
      15    type_dma = is_dma * KMALLOC_DMA;
      16    is_rec = !!(flags & __GFP_RECLAIM);
      17  
      18    return type_dma + (is_rec * !is_dma) * KMALLOC_RECLAIM;
      19  }
      20  
      21  /* { dg-final { scan-tree-dump-times { \* } 1 "optimized" } } */