Problem using A0 & A1 as digital inputs from M4 co-processors

I have an Opta Lite and am using the GPIO pins as digital inputs from the M4 processor, but have found a problem reading A0 (PA0_C) and A1 (PC2_C ). The Opta is being powered with a 24v supply and this is being used for the input - i.e., unconnected = LOW & 24v = HIGH.
As an example, the code below reads inputs A0 thru A3 and changes the status of LED0 thru LED3 to reflect the respective input value. It works fine on the M7 with all GPIO pins, but on the M4 it only works with inputs A2 thru A7. A0 & A1 do nothing.
The only code on the M7 processor during the test is an RPC.begin(); to start the M4.

#include <RPC.h>

const byte numofinputs = 4;
int switchinput[] = {A0, A1, A2, A3};
int statusled[] = {LED_D0, LED_D1, LED_D2, LED_D3};

void setup() {
  
  RPC.begin();

  for(byte loop=0; loop<numofinputs; loop++)
  {
    // set inputs to be digital
    pinMode(switchinput[loop], INPUT);
    // set led outputs off
    pinMode(statusled[loop], OUTPUT);
    digitalWrite(statusled[loop], LOW);
  }
}

void loop()
{
  // read each input in turn and change led status to match
  for(byte loop=0; loop<numofinputs; loop++)
  {
    digitalWrite(statusled[loop], digitalRead(switchinput[loop]));
  }
}

Has anyone else seen this problem, or know how to fix/workaround it? Any assistance would be greatly appreciated.

PS I have previously posted this here, but I'm not sure I put it in the right place GitHub: ArduinoCore-mbed issue 857