diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/char_cshift_3.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/char_cshift_3.f90 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/char_cshift_3.f90 b/gcc/testsuite/gfortran.dg/char_cshift_3.f90 new file mode 100644 index 000000000..80c0ede3a --- /dev/null +++ b/gcc/testsuite/gfortran.dg/char_cshift_3.f90 @@ -0,0 +1,13 @@ +! { dg-do run } +! PR 36886 - misalignment of characters for cshift could cause +! problems on some architectures. +program main + character(len=2) :: c2 + character(len=4), dimension(2,2) :: a, b, c, d + ! Force misalignment of a or b + common /foo/ a, c, c2, b, d + a = 'aa' + b = 'bb' + d = cshift(b,1) + c = cshift(a,1) +end program main |