diff --git a/flang/lib/Lower/IO.cpp b/flang/lib/Lower/IO.cpp --- a/flang/lib/Lower/IO.cpp +++ b/flang/lib/Lower/IO.cpp @@ -530,17 +530,17 @@ ? getIORuntimeFunc(loc, builder) : getIORuntimeFunc(loc, builder); if (auto ty = type.dyn_cast()) { - if (auto width = ty.getWidth(); width <= 32) + if (auto width = ty.getWidth(); width == 32) return getIORuntimeFunc(loc, builder); - else if (width <= 64) + else if (width == 64) return getIORuntimeFunc(loc, builder); } auto kindMap = fir::getKindMapping(builder.getModule()); if (auto ty = type.dyn_cast()) { auto width = kindMap.getRealBitsize(ty.getFKind()); - if (width <= 32) + if (width == 32) return getIORuntimeFunc(loc, builder); - else if (width <= 64) + else if (width == 64) return getIORuntimeFunc(loc, builder); } if (type.isa())