-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[flang] Fixed -g compilation issues caused by #90484. #90683
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
llvmbot
added
flang
Flang issues not falling into any other category
flang:fir-hlfir
labels
Apr 30, 2024
@llvm/pr-subscribers-flang-fir-hlfir Author: Slava Zakharin (vzakhari) ChangesFull diff: https://github.com/llvm/llvm-project/pull/90683.diff 1 Files Affected:
diff --git a/flang/lib/Optimizer/Transforms/DebugTypeGenerator.cpp b/flang/lib/Optimizer/Transforms/DebugTypeGenerator.cpp
index 227dc978897de7..e5b4050dfb2426 100644
--- a/flang/lib/Optimizer/Transforms/DebugTypeGenerator.cpp
+++ b/flang/lib/Optimizer/Transforms/DebugTypeGenerator.cpp
@@ -45,9 +45,13 @@ DebugTypeGenerator::convertType(mlir::Type Ty, mlir::LLVM::DIFileAttr fileAttr,
if (Ty.isInteger()) {
return genBasicType(context, mlir::StringAttr::get(context, "integer"),
Ty.getIntOrFloatBitWidth(), llvm::dwarf::DW_ATE_signed);
- } else if (mlir::isa<mlir::FloatType>(Ty) || mlir::isa<fir::RealType>(Ty)) {
+ } else if (mlir::isa<mlir::FloatType>(Ty)) {
return genBasicType(context, mlir::StringAttr::get(context, "real"),
Ty.getIntOrFloatBitWidth(), llvm::dwarf::DW_ATE_float);
+ } else if (auto realTy = mlir::dyn_cast_or_null<fir::RealType>(Ty)) {
+ return genBasicType(context, mlir::StringAttr::get(context, "real"),
+ kindMapping.getRealBitsize(realTy.getFKind()),
+ llvm::dwarf::DW_ATE_float);
} else if (auto logTy = mlir::dyn_cast_or_null<fir::LogicalType>(Ty)) {
return genBasicType(context,
mlir::StringAttr::get(context, logTy.getMnemonic()),
|
I am going to merge this without waiting for pre-commit checks. @abidh please add a LIT tests for this case:
|
vzakhari
changed the title
[flang] Fixed -g compilations caused by #90484.
[flang] Fixed -g compilation issues caused by #90484.
Apr 30, 2024
klausler
approved these changes
Apr 30, 2024
clementval
approved these changes
Apr 30, 2024
abidh
added a commit
to abidh/llvm-project
that referenced
this pull request
May 1, 2024
This is an accompanying test for the fix done in llvm#90683. It checks that fir.real conversion works ok. The failing fortran source in the llvm#90683 generates fir.real type in the target-rewrite pass which caused the original issue.
abidh
added a commit
that referenced
this pull request
May 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.