diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ada/exp_util.adb | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 8a87274..5808008 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,11 @@ 2019-09-19 Eric Botcazou <ebotcazou@adacore.com> + * exp_util.adb (Is_Possibly_Unaligned_Slice): Do not return true + on pure alignment considerations if the target does not require + the strict alignment of memory accesses. + +2019-09-19 Eric Botcazou <ebotcazou@adacore.com> + * sem_ch12.adb (Check_Private_View): Add a comment to indicate future work. diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index 905e3f4..6306320 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -8692,9 +8692,11 @@ package body Exp_Util is -- We are definitely in trouble if the record in question -- has an alignment, and either we know this alignment is -- inconsistent with the alignment of the slice, or we don't - -- know what the alignment of the slice should be. + -- know what the alignment of the slice should be. But this + -- really matters only if the target has strict alignment. - if Known_Alignment (Ptyp) + if Target_Strict_Alignment + and then Known_Alignment (Ptyp) and then (Unknown_Alignment (Styp) or else Alignment (Styp) > Alignment (Ptyp)) then |