Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions flang/include/flang/Evaluate/integer.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class Integer {
static_assert(std::is_unsigned_v<BigPart>);
static_assert(CHAR_BIT * sizeof(BigPart) >= 2 * partBits);
static constexpr bool littleEndian{IS_LITTLE_ENDIAN};
static constexpr int alignment{ALIGNMENT};

private:
static constexpr int maxPartBits{CHAR_BIT * sizeof(Part)};
Expand Down
5 changes: 4 additions & 1 deletion flang/include/flang/Evaluate/real.h
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,10 @@ template <typename WORD, int PREC> class Real {
bool isNegative, int exponent, const Fraction &, Rounding, RoundingBits,
bool multiply = false);

Word word_{}; // an Integer<>
// Require alignment, in case code generation on x86_64 decides that our
// Real object is suitable for SSE2 instructions and then gets surprised
// by unaligned address.
alignas(Word::alignment / 8) Word word_{}; // an Integer<>
};

extern template class Real<Integer<16>, 11>; // IEEE half format
Expand Down
Loading