File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -82,14 +82,15 @@ static bool isReal8OrLarger(const Fortran::semantics::DeclTypeSpec *type) {
8282// type, the alignment is computed accordingly.
8383std::optional<size_t > ComputeOffsetsHelper::CompAlignment (const Symbol &sym) {
8484 size_t max_align{0 };
85+ constexpr size_t fourByteAlign{4 };
8586 bool contain_double{false };
8687 auto derivedTypeSpec{sym.GetType ()->AsDerived ()};
8788 DirectComponentIterator directs{*derivedTypeSpec};
8889 for (auto it{directs.begin ()}; it != directs.end (); ++it) {
8990 auto type{it->GetType ()};
9091 auto s{GetSizeAndAlignment (*it, true )};
9192 if (isReal8OrLarger (type)) {
92- max_align = std::max (max_align, 4UL );
93+ max_align = std::max (max_align, fourByteAlign );
9394 contain_double = true ;
9495 } else if (type->AsDerived ()) {
9596 if (const auto newAlgin{CompAlignment (*it)}) {
You can’t perform that action at this time.
0 commit comments