Sync patch from openeuler/gcc - 20220223 (cherry picked from commit 9cc7c99d7c4cedbbda73939466dd4b9a55a6917b)