(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
torture/
pr94392.c
       1  /* { dg-do compile } */
       2  /* { dg-skip-if "finite loops" { *-*-* } { "-ffinite-loops" } } */
       3  /* { dg-skip-if "LTO optimizes the test" { *-*-* } { "-flto" } } */
       4  /* { dg-additional-options "-fdump-tree-optimized" } */
       5  
       6  int a, b;
       7  
       8  int
       9  main()
      10  {
      11    while (1)
      12      {
      13        /* Try really hard.  */
      14        if (a != b)
      15  	return 1;
      16      }
      17    return 0;
      18  }
      19  
      20  /* ISO C does not guarantee forward progress like C++ does so we
      21     cannot assume the loop is finite and optimize it to return 1.  */
      22  /* { dg-final { scan-tree-dump "if" "optimized" } } */