mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 13:10:34 +00:00
Do type promotion for short
fold_constants used to do this when it was overly aggressive. Fixes the ICE when accessing an array in a struct via a pointer.
This commit is contained in:
parent
227ac46ffe
commit
439cd15620
1 changed files with 44 additions and 44 deletions
|
@ -269,22 +269,22 @@ static expr_type_t integer_uinteger[] = {
|
|||
};
|
||||
|
||||
static expr_type_t integer_short[] = {
|
||||
{'+', &type_integer},
|
||||
{'-', &type_integer},
|
||||
{'*', &type_integer},
|
||||
{'/', &type_integer},
|
||||
{'&', &type_integer},
|
||||
{'|', &type_integer},
|
||||
{'^', &type_integer},
|
||||
{'%', &type_integer},
|
||||
{SHL, &type_integer},
|
||||
{SHR, &type_integer},
|
||||
{EQ, &type_integer},
|
||||
{NE, &type_integer},
|
||||
{LE, &type_integer},
|
||||
{GE, &type_integer},
|
||||
{LT, &type_integer},
|
||||
{GT, &type_integer},
|
||||
{'+', &type_integer, 0, &type_integer},
|
||||
{'-', &type_integer, 0, &type_integer},
|
||||
{'*', &type_integer, 0, &type_integer},
|
||||
{'/', &type_integer, 0, &type_integer},
|
||||
{'&', &type_integer, 0, &type_integer},
|
||||
{'|', &type_integer, 0, &type_integer},
|
||||
{'^', &type_integer, 0, &type_integer},
|
||||
{'%', &type_integer, 0, &type_integer},
|
||||
{SHL, &type_integer, 0, &type_integer},
|
||||
{SHR, &type_integer, 0, &type_integer},
|
||||
{EQ, &type_integer, 0, &type_integer},
|
||||
{NE, &type_integer, 0, &type_integer},
|
||||
{LE, &type_integer, 0, &type_integer},
|
||||
{GE, &type_integer, 0, &type_integer},
|
||||
{LT, &type_integer, 0, &type_integer},
|
||||
{GT, &type_integer, 0, &type_integer},
|
||||
{0, 0}
|
||||
};
|
||||
|
||||
|
@ -340,42 +340,42 @@ static expr_type_t uinteger_uinteger[] = {
|
|||
#define short_quat integer_quat
|
||||
|
||||
static expr_type_t short_integer[] = {
|
||||
{'+', &type_integer},
|
||||
{'-', &type_integer},
|
||||
{'*', &type_integer},
|
||||
{'/', &type_integer},
|
||||
{'&', &type_integer},
|
||||
{'|', &type_integer},
|
||||
{'^', &type_integer},
|
||||
{'%', &type_integer},
|
||||
{'+', &type_integer, &type_integer, 0},
|
||||
{'-', &type_integer, &type_integer, 0},
|
||||
{'*', &type_integer, &type_integer, 0},
|
||||
{'/', &type_integer, &type_integer, 0},
|
||||
{'&', &type_integer, &type_integer, 0},
|
||||
{'|', &type_integer, &type_integer, 0},
|
||||
{'^', &type_integer, &type_integer, 0},
|
||||
{'%', &type_integer, &type_integer, 0},
|
||||
{SHL, &type_short},
|
||||
{SHR, &type_short},
|
||||
{EQ, &type_integer},
|
||||
{NE, &type_integer},
|
||||
{LE, &type_integer},
|
||||
{GE, &type_integer},
|
||||
{LT, &type_integer},
|
||||
{GT, &type_integer},
|
||||
{EQ, &type_integer, &type_integer, 0},
|
||||
{NE, &type_integer, &type_integer, 0},
|
||||
{LE, &type_integer, &type_integer, 0},
|
||||
{GE, &type_integer, &type_integer, 0},
|
||||
{LT, &type_integer, &type_integer, 0},
|
||||
{GT, &type_integer, &type_integer, 0},
|
||||
{0, 0}
|
||||
};
|
||||
|
||||
static expr_type_t short_uinteger[] = {
|
||||
{'+', &type_uinteger},
|
||||
{'-', &type_uinteger},
|
||||
{'*', &type_uinteger},
|
||||
{'/', &type_uinteger},
|
||||
{'&', &type_uinteger},
|
||||
{'|', &type_uinteger},
|
||||
{'^', &type_uinteger},
|
||||
{'%', &type_uinteger},
|
||||
{'+', &type_uinteger, &type_uinteger, 0},
|
||||
{'-', &type_uinteger, &type_uinteger, 0},
|
||||
{'*', &type_uinteger, &type_uinteger, 0},
|
||||
{'/', &type_uinteger, &type_uinteger, 0},
|
||||
{'&', &type_uinteger, &type_uinteger, 0},
|
||||
{'|', &type_uinteger, &type_uinteger, 0},
|
||||
{'^', &type_uinteger, &type_uinteger, 0},
|
||||
{'%', &type_uinteger, &type_uinteger, 0},
|
||||
{SHL, &type_short},
|
||||
{SHR, &type_short},
|
||||
{EQ, &type_integer},
|
||||
{NE, &type_integer},
|
||||
{LE, &type_integer},
|
||||
{GE, &type_integer},
|
||||
{LT, &type_integer},
|
||||
{GT, &type_integer},
|
||||
{EQ, &type_integer, &type_uinteger, 0},
|
||||
{NE, &type_integer, &type_uinteger, 0},
|
||||
{LE, &type_integer, &type_uinteger, 0},
|
||||
{GE, &type_integer, &type_uinteger, 0},
|
||||
{LT, &type_integer, &type_uinteger, 0},
|
||||
{GT, &type_integer, &type_uinteger, 0},
|
||||
{0, 0}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue