view gcc/testsuite/gcc.dg/pr33961.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* 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;
}