aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/volatile-1.c
blob: 714314ceea20c01c38a77a302aa4b21e532f8a88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* PR optimization/11381 */
/* Originator: <tobias@ringstrom.mine.nu> */
/* { dg-do compile } */
/* { dg-options "-O" } */

/* Verify that the comparison is not optimized away. */

void foo(volatile unsigned int *vaddr)
{
  while (*vaddr != *vaddr)
    ;
}

/* { dg-final { scan-assembler "cmp" } } */