summaryrefslogtreecommitdiffstats
path: root/flang/include/flang/ISO_Fortran_binding.h
diff options
context:
space:
mode:
Diffstat (limited to 'flang/include/flang/ISO_Fortran_binding.h')
-rw-r--r--flang/include/flang/ISO_Fortran_binding.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/flang/include/flang/ISO_Fortran_binding.h b/flang/include/flang/ISO_Fortran_binding.h
index 3f74a7e56f17..757d7f2b10cb 100644
--- a/flang/include/flang/ISO_Fortran_binding.h
+++ b/flang/include/flang/ISO_Fortran_binding.h
@@ -127,7 +127,7 @@ namespace cfi_internal {
// because a struct cannot be empty.
extern "C++" template <typename T> struct FlexibleArray : T {
RT_API_ATTRS T &operator[](int index) { return *(this + index); }
- const RT_API_ATTRS T &operator[](int index) const { return *(this + index); }
+ RT_API_ATTRS const T &operator[](int index) const { return *(this + index); }
RT_API_ATTRS operator T *() { return this; }
RT_API_ATTRS operator const T *() const { return this; }
};