Sync patch from openeuler/gcc - 20220322 (cherry picked from commit f5f215d1e83483976021d60dd23ae5bd534420c8)