Add volatile to avoid clang optimization.
BUG: 18108178 Change-Id: Ie5b8b1808fcf6d1eacc14a7c6ac0c8d49641fec2
This commit is contained in:
parent
5bea7edddd
commit
a1ff475b07
1 changed files with 1 additions and 1 deletions
|
|
@ -59,7 +59,7 @@ static void *noisy(void *x)
|
|||
for(;;) {
|
||||
usleep(250*1000);
|
||||
write(2, &c, 1);
|
||||
if(c == 'C') *((unsigned*) 0) = 42;
|
||||
if(c == 'C') *((volatile unsigned*) 0) = 42;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue