Skip to content

Commit

Permalink
[flang][nfc] Fix GCC 11 build
Browse files Browse the repository at this point in the history
After merging https://reviews.llvm.org/D120801, Flang no longer builds
with GCC 11:
```
../llvm-project/flang/lib/Semantics/runtime-type-info.cpp:385:22: error: variable ‘lenParam’ set but not used [-Werror=unused-but-set-variable]
  385 |       for (SymbolRef lenParam : *lenParameters) {
      |                      ^~~~~~~~
```

I'm sending this without a review as a quick fix.
  • Loading branch information
banach-space committed Mar 3, 2022
1 parent 3717b96 commit 06be148
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions flang/lib/Semantics/runtime-type-info.cpp
Expand Up @@ -383,6 +383,7 @@ const Symbol *RuntimeTableBuilder::DescribeType(Scope &dtScope) {
// Create dummy deferred values for the length parameters so that the
// DerivedTypeSpec is complete and can be used in helpers.
for (SymbolRef lenParam : *lenParameters) {
(void)lenParam;
derived.AddRawParamValue(
std::nullopt, ParamValue::Deferred(common::TypeParamAttr::Len));
}
Expand Down

0 comments on commit 06be148

Please sign in to comment.