public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/64125] New: Allocation of character strings
@ 2014-11-30 17:50 fmartinez at gmv dot com
2014-11-30 18:12 ` [Bug fortran/64125] " dominiq at lps dot ens.fr
0 siblings, 1 reply; 2+ messages in thread
From: fmartinez at gmv dot com @ 2014-11-30 17:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64125
Bug ID: 64125
Summary: Allocation of character strings
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: fmartinez at gmv dot com
Hi.
The following code inside a module causes the compiler to crash (also in the
latest version of 4.9)
allocate( character(len=size(right))::left%chars )
^
internal compiler error: in gimplify_expr, at gimplify.c:8646
0x572c28 ???
../sysdeps/x86_64/elf/start.S:113
Cheers,
Fran
type t_string
private
character(len=:), allocatable :: chars
end type t_string
pure subroutine string_assign_from_array( left, right )
! The target string
type(t_string), intent(out) :: left
! The source string
character, dimension(:), intent(in) :: right
! Copy memory
allocate( character(len=size(right)) :: left%chars )
left%chars = transfer( right, left%chars )
end subroutine string_assign_from_array
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug fortran/64125] Allocation of character strings
2014-11-30 17:50 [Bug fortran/64125] New: Allocation of character strings fmartinez at gmv dot com
@ 2014-11-30 18:12 ` dominiq at lps dot ens.fr
0 siblings, 0 replies; 2+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-11-30 18:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64125
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Next time please provide a full test. With
module test
type t_string
private
character(len=:), allocatable :: chars
end type t_string
contains
pure subroutine string_assign_from_array( left, right )
! The target string
type(t_string), intent(out) :: left
! The source string
character, dimension(:), intent(in) :: right
! Copy memory
allocate( character(len=size(right)) :: left%chars )
left%chars = transfer( right, left%chars )
end subroutine string_assign_from_array
end module test
I get the same ICEs (depending on --enable-checking=release in the configure
command used to bootstrap) than with pr63230. Thus marking this PR as a
duplicate. Note that I am sure that pr63230 is also a duplicate.
*** This bug has been marked as a duplicate of bug 63230 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-30 18:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-30 17:50 [Bug fortran/64125] New: Allocation of character strings fmartinez at gmv dot com
2014-11-30 18:12 ` [Bug fortran/64125] " dominiq at lps dot ens.fr
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).