summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/tree-ssa/pr47707.C
blob: 98852de17b887dc14f41a34838a11fc9c3784253 (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
25
26
27
28
29
/* { dg-do run } */
/* { dg-options "-O2 -fno-tree-vrp" } */
#include <assert.h>

struct CH
{
  unsigned char ch : 3;
} ch;

__attribute__((noinline)) void MakeCheckOp (unsigned int *v1, unsigned int *v2)
{
 assert (*v1 == *v2);

}

int main (void)
{

  int len;

  for (len = 4; len >= 1; len--)
  {
     unsigned v1, v2;
     ch.ch = len;
     v1 = ch.ch;
     v2 = len;
     MakeCheckOp (&v1, &v2);
  }
}