OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [transfer_simplify_8.f90] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! { dg-options "-O0" }
3
! PR fortran/34537
4
! simplify_transfer used to ICE on divide by zero for cases like this,
5
! where the mold expression is a non-constant character expression.
6
!
7
! Testcase contributed by Tobias Burnus 
8
!
9
  character, pointer :: ptr(:)
10
  character(8) :: a
11
  allocate(ptr(9))
12
  ptr = transfer('Sample#0'//achar(0),ptr) ! Causes ICE
13
  if (any (ptr .ne. ['S','a','m','p','l','e','#','0',achar(0)])) call abort
14
  call test(a)
15
  if (a .ne. 'Sample#2') call abort
16
contains
17
  subroutine test(a)
18
    character(len=*) :: a
19
    a = transfer('Sample#2',a)
20
  end subroutine test
21
end

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.