On 9/10/26 7:43 AM, Richard Sandiford wrote:
pdp11_rtx_costs has:
if (GET_RTX_LENGTH (code) > 1)
src = XEXP (x, 1);
followed by uses of src that are gated on GET_CODE. GET_RTX_LENGTH
internally uses a static table whose contents are defined in rtl.cc.
This means that, when compiling pdp11.cc, the compiler doesn't know
what value GET_RTX_LENGTH has for a given GET_CODE. It therefore
flags src as being potentially uninitialised.
There are only two places that use src, so it seemed easier to copy
the assignment to both places.
This fixes pdp11 builds with config-list.mk.
Tested with config-list.mk. OK to install?
Richard
gcc/
* config/pdp11/pdp11.cc (pdp11_rtx_costs): Move src assignment
into the blocks that need it.
OK
jeff