https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118828
--- Comment #1 from chenglulu <chenglulu at loongson dot cn> --- (In reply to Xi Ruoyao from comment #0) > Test case: > > /* { dg-do preprocess } */ > /* { dg-options "-mno-lasx" } */ > > #ifdef __loongarch_asx > #error LASX shouldn't be available here > #endif > > #pragma GCC push_options > #pragma GCC target("lasx") > #ifndef __loongarch_asx > #error LASX should be available here > #endif > #pragma GCC pop_options > > #ifdef __loongarch_asx > #error LASX should become unavailable again > #endif > > Note that a similar test case (c-c++-common/pragma-target-2.c) for x86 works > as expected. This issue indeed hasn't been addressed. I've already fixed a patch for it, and the tests came back fine. I'll commit it tonight.