Skip to content

Commit b22e823

Browse files
author
Mark Danial
committed
[flang] fix hlfir stack issue on AIX
1 parent 6c1b5ec commit b22e823

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

flang/lib/Optimizer/HLFIR/Transforms/SimplifyHLFIRIntrinsics.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ class TransposeAsElementalConversion
5050
auto genKernel = [&array](mlir::Location loc, fir::FirOpBuilder &builder,
5151
mlir::ValueRange inputIndices) -> hlfir::Entity {
5252
assert(inputIndices.size() == 2 && "checked in TransposeOp::validate");
53-
mlir::ValueRange transposedIndices{{inputIndices[1], inputIndices[0]}};
53+
const std::initializer_list<mlir::Value> initList = {inputIndices[1],
54+
inputIndices[0]};
55+
mlir::ValueRange transposedIndices(initList);
5456
hlfir::Entity element =
5557
hlfir::getElementAt(loc, builder, array, transposedIndices);
5658
hlfir::Entity val = hlfir::loadTrivialScalar(loc, builder, element);

flang/test/HLFIR/simplify-hlfir-intrinsics.fir

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// XFail the following test case on AIX due to potential miscompilation
2-
// TODO: Crash fir-opt on AIX
3-
// XFAIL: system-aix
41
// RUN: fir-opt --simplify-hlfir-intrinsics %s | FileCheck %s
52

63
// box with known extents

0 commit comments

Comments
 (0)