1 /* A test for various conversions of chrecs. */
3 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
4 /* { dg-options "-O2 -fdump-tree-optimized" } */
7 void blau (unsigned char xxx
);
13 for (i
= 0; i
< 128; i
++) /* This cast to char has to be preserved. */
15 for (i
= 0; i
< 127; i
++) /* And this one does not. */
17 for (i
= 0; i
< 255; i
++) /* This cast is not necessary. */
18 blau ((unsigned char) i
);
19 for (i
= 0; i
< 256; i
++)
20 blau ((unsigned char) i
); /* This one is necessary. */
23 /* { dg-final { scan-tree-dump-times "\\(int\\) \\(unsigned char\\)" 1 "optimized" } } */
24 /* { dg-final { scan-tree-dump-times "\\(int\\) \\(char\\)" 1 "optimized" } } */
26 /* { dg-final { cleanup-tree-dump "optimized" } } */