diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 475fb0d827f43e5b2750f673125e1ac54134688e..340f7c95d76b86b750493597787c4bd4ff65b474 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -3396,9 +3396,11 @@ arm_configure_build_target (struct arm_build_target *target,
       auto_sbitmap fpu_bits (isa_num_bits);
 
       arm_initialize_isa (fpu_bits, arm_selected_fpu->isa_bits);
-      /* Clear out ALL bits relating to the FPU/simd extensions, to avoid
-	 potentially invalid combinations later on that we can't match.  */
-      bitmap_and_compl (target->isa, target->isa, isa_all_fpbits);
+      /* This should clear out ALL bits relating to the FPU/simd
+	 extensions, to avoid potentially invalid combinations later on
+	 that we can't match.  At present we only clear out those bits
+	 that can be set by -mfpu.  This should be fixed in GCC-12.  */
+      bitmap_and_compl (target->isa, target->isa, isa_all_fpubits_internal);
       bitmap_ior (target->isa, target->isa, fpu_bits);
     }