--- a/flang/runtime/reduction-templates.h
+++ b/flang/runtime/reduction-templates.h
@@ -88,7 +88,7 @@
 #ifdef _MSC_VER // work around MSVC spurious error
   accumulator.GetResult(&result);
 #else
-  accumulator.template GetResult(&result);
+  accumulator.GetResult(&result);
 #endif
   return result;
 }
@@ -130,7 +130,7 @@
 #ifdef _MSC_VER // work around MSVC spurious error
   accumulator.GetResult(result, zeroBasedDim);
 #else
-  accumulator.template GetResult(result, zeroBasedDim);
+  accumulator.GetResult(result, zeroBasedDim);
 #endif
 }

@@ -158,7 +158,7 @@
 #ifdef _MSC_VER // work around MSVC spurious error
   accumulator.GetResult(result, zeroBasedDim);
 #else
-  accumulator.template GetResult(result, zeroBasedDim);
+  accumulator.GetResult(result, zeroBasedDim);
 #endif
 }
