[Bug fortran/51434] internal compiler error
sgk at troutmask dot apl.washington.edu
gcc-bugzilla@gcc.gnu.org
Tue Dec 6 06:31:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51434
--- Comment #2 from Steve Kargl <sgk at troutmask dot apl.washington.edu> 2011-12-06 06:31:17 UTC ---
On Tue, Dec 06, 2011 at 06:26:29AM +0000, kargl at gcc dot gnu.org wrote:
>
> Can you explain what you think the code is doing,
> because I believe that it may not be doing what
> you intend?
>
I forgot to mention the ICE is present in trunk.
Slightly modified testcase.
module a
use iso_c_binding
integer, parameter :: n = 5
!
! ICE with next line
! character(kind=c_char), parameter :: s(n) = 'a'
!
! Next two lines do not have an ICE.
! character(c_char), parameter :: s(n) = ['a', 'b', 'c', 'd', 'e']
character(kind=c_char), parameter :: s(n) = ['a', 'b', 'c', 'd', 'e']
type b
integer :: m = n
! All three lines work with the above to 'good' lines.
! character(kind=c_char) :: t(n) = transfer('abc ', s)
! character(len=c_char) :: t(n) = transfer('abc ', s)
character(c_char) :: t(n) = transfer('abc ', s)
end type
end module a
More information about the Gcc-bugs
mailing list