Some code in gen_opl was depending on a gvtst label which in nocode_wanted mode is not set. This was causing vstack leaks and crashes with for example long long ll; if (0) return ll - 10 < 0;
Unified · Split
| @@ -1614,7 +1614,7 @@ static void gen_opl(int op) · 1613 unmodified lines | ||
| 1614 | 1614 | if (op != TOK_EQ) { |
| 1615 | 1615 | /* generate non equal test */ |
| 1616 | 1616 | /* XXX: NOT PORTABLE yet */ |
| 1617 | − if (a == 0) { | |
| 1617 | + if (op1 == TOK_NE) { | |
| 1618 | 1618 | b = gvtst(0, 0); |
| 1619 | 1619 | } else { |
| 1620 | 1620 | #if defined(TCC_TARGET_I386) |
| @@ -1622,10 +1622,8 @@ static void gen_opl(int op) · 1 unmodified line | ||
| 1622 | 1622 | #elif defined(TCC_TARGET_ARM) |
| 1623 | 1623 | b = ind; |
| 1624 | 1624 | o(0x1A000000 | encbranch(ind, 0, 1)); |
| 1625 | −#elif defined(TCC_TARGET_C67) || defined(TCC_TARGET_ARM64) | |
| 1626 | − tcc_error("not implemented"); | |
| 1627 | 1625 | #else |
| 1628 | −#error not supported | |
| 1626 | + tcc_error("not implemented"); | |
| 1629 | 1627 | #endif |
| 1630 | 1628 | } |
| 1631 | 1629 | } |