This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/51434] internal compiler error
- From: "sgk at troutmask dot apl.washington.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 06 Dec 2011 06:31:17 +0000
- Subject: [Bug fortran/51434] internal compiler error
- Auto-submitted: auto-generated
- References: <bug-51434-4@http.gcc.gnu.org/bugzilla/>
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