| 1 |
! PR fortran/45636 |
| 2 |
! { dg-do compile } |
| 3 |
! { dg-options "-O2 -fdump-tree-forwprop2" } |
| 4 |
! PR 45636 - make sure no memset is needed for a short right-hand side. |
| 5 |
program main |
| 6 |
character(len=2), parameter :: x='a ' |
| 7 |
character(len=1), parameter :: y='b' |
| 8 |
character(len=4) :: a, b |
| 9 |
a = x |
| 10 |
b = y |
| 11 |
call sub(a, b) |
| 12 |
end program main |
| 13 |
! This test will fail on targets which prefer memcpy/memset over |
| 14 |
! move_by_pieces/store_by_pieces. |
| 15 |
! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { { hppa*-*-* && { ! lp64 } } || { mips*-*-* && { ! nomips16 } } } } } } |