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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [module_read_1.f90] - Blame information for rev 399

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

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
! { dg-options "-Wreturn-type" }
3
! PR fortran/33941
4
! The problem was that the intrinsic operators
5
! were written to the module file as '/=' etc.
6
! but this format was not understood on reading.
7
!
8
! Test case by Toby White, stripped down by
9
! Dominique d'Humieres and Francois-Xavier Coudert
10
 
11
module foo
12
contains
13
  function pop(n) result(item)          ! { dg-warning "not set" }
14
    integer :: n
15
    character(len=merge(1, 0, n > 0)) :: item
16
  end function pop
17
  function push(n) result(item)         ! { dg-warning "not set" }
18
    integer :: n
19
    character(len=merge(1, 0, n /= 0)) :: item
20
  end function push
21
end module foo
22
 
23
program test
24
  use foo
25
  if(len(pop(0)) /= 0) call abort()
26
  if(len(pop(1)) /= 1) call abort()
27
  if(len(push(0)) /= 0) call abort()
28
  if(len(push(1)) /= 1) call abort()
29
end program
30
! { dg-final { cleanup-modules "foo" } }

powered by: WebSVN 2.1.0

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