@@ -11478,8 +11479,25 @@ legitimate_constant_p (rtx x)
...
+ case PLUS:
+ {
+ rtx left = XEXP (x, 0);
+ rtx right = XEXP (x, 1);
+ bool left_is_constant = legitimate_constant_p (left);
+ bool right_is_constant = legitimate_constant_p (right);
+ return left_is_constant && right_is_constant;
+ }
+ /* mdynamic-no-pic */
+ #endif
+ break;
This is very inkorrekt.
PLUS is RTX_COMM_ARITH. A constant must be RTX_CONST_OBJ.
The correct way to handle this is to wrap a PLUS inside of
a CONST, which means this code is in the wrong place, and
the thing that's generating this is also incorrect.