aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/torture/pr84961-1.C
blob: 6a72ad5134fc30cdd0930f0af7027a6ce808d24b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// PR c++/84961
// { dg-do compile }

short a;
volatile int b;
int c, d;

void
foo ()
{
  asm volatile ("" : "=r" (b = a));
}

void
bar ()
{
  asm volatile ("" : "=r" (++c, ++d, b = a));
}

void
baz ()
{
  asm volatile ("" : "=r" (--b));
}