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/] [allocate_char_star_scalar_1.f90] - Blame information for rev 312

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

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do compile }
2
! Tests the patch for PR26038 that used to ICE in gfc_trans_allocate
3
! for the want of a string_length to pass to the library.
4
! Contributed by hjl@lucon.org && Erik Edelmann  
5
module moo
6
 
7
contains
8
 
9
    subroutine foo(self)
10
        character(*) :: self
11
        pointer :: self
12
 
13
        nullify(self)
14
        allocate(self)          ! Used to ICE here
15
        print *, len(self)
16
    end subroutine
17
 
18
end module moo
19
 
20
 
21
program hum
22
 
23
    use moo
24
 
25
    character(5), pointer :: p
26
    character(10), pointer :: q
27
 
28
    call foo(p)
29
    call foo(q)
30
 
31
end program hum
32
 
33
! { dg-final { cleanup-modules "moo" } }

powered by: WebSVN 2.1.0

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