[clang] [Clang] Fix crash for incompatible types in inline assembly (PR #119098)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Dec 15 04:56:11 PST 2024
================
@@ -664,11 +664,22 @@ StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple,
SmallerValueMentioned |= OutSize < InSize;
}
+ // If the input is an integer register while the output is floating point,
+ // there is no way they can work together.
+ bool FPBoundToInt = false;
+ if (InputDomain != AD_FP && OutputDomain == AD_FP) {
+ FPBoundToInt = true;
+ }
+ if (InputDomain == AD_FP && OutputDomain != AD_FP) {
+ FPBoundToInt = true;
+ }
----------------
AdUhTkJm wrote:
Done.
https://github.com/llvm/llvm-project/pull/119098
More information about the cfe-commits
mailing list