1 /* PR optimization/11381 */
2 /* Originator: <tobias@ringstrom.mine.nu> */
3 /* { dg-do compile } */
4 /* { dg-options "-O" } */
5 
6 /* Verify that the comparison is not optimized away. */
7 
foo(volatile unsigned int * vaddr)8 void foo(volatile unsigned int *vaddr)
9 {
10   while (*vaddr != *vaddr)
11     ;
12 }
13 
14 /* { dg-final { scan-assembler "cmp" } } */
15