aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/pr33961.c
blob: 43403ed30a9dd8f3dd37c06aa983a6dd67841def (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* PR tree-optimization/33961 */
/* { dg-do run } */
/* { dg-options "-O2 -ftree-cselim" } */

void decode(char *d, int len);

void decode(char *d, int len) {
        int i = len - 1;
        while(i >= 0) {
                d[i];
                if(d[i] == 0)
                        d[i]=' ';
		if(d[i] == 1)
			d[i]='x';
                i--;
        }
}

int main(int argc, char **argv)
{
        decode("this bug is really weird", 24);
	return 0;
}