blob: bf0deb75ffa6ed3002f94e78c6d87ed67fba8361 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/* bug-3523.c
Instructions that conditionally skip the following instruction were not considered correctly in the peephole optimizer.
*/
#include <testfwk.h>
char c;
char f(void)
{
char a = c + 1;
if (a < 3)
return 1;
return a; // The ret got incorrectly optimized out for pdk.
}
void
testBug(void)
{
c = 3;
ASSERT (f() == 4);
}
|