Why GCC_ARM and ARMC6 show different flash and RAM usage for same program on same hardware?

Memory reporting is broken. See Code size reporting does not take into account .rodata and memap tool: displayed text+data sizes differ from real size · Issue #12541 · ARMmbed/mbed-os · GitHub