This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/50892] Internal compiler error: in gimplify_expr, at gimplify.c:7477
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 29 Oct 2011 15:04:34 +0000
- Subject: [Bug fortran/50892] Internal compiler error: in gimplify_expr, at gimplify.c:7477
- Auto-submitted: auto-generated
- References: <bug-50892-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50892
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
CC| |burnus at gcc dot gnu.org
Known to fail| |4.3.4
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-10-29 15:04:34 UTC ---
(In reply to comment #0)
> In addition to the internal compiler error, there is a problem mentioned in a
> comment. According to a Fortran language lawyer, Fortran 2008 allows two local
> definitions of procedures to have the same binding label. This problem is
> illustrated in a comment.
I think that's PR 48858.
> I'm mainly filing this bug because of the internal compiler error
Simplified test case below. Dump shows:
test ()
{
character(kind=1)[1:1] * str;
void * text;
static void fortranchar (character(kind=1)[1:] * &, integer(kind=4), void *);
{
character(kind=1)[1:MAX_EXPR <D.1732, 0>] * pstr.0;
integer(kind=4) D.1732;
void * D.1730;
D.1730 = text;
D.1732 = strlen (*D.1730);
fortranchar (&pstr.0, MAX_EXPR <D.1732, 0>, D.1730);
str = (character(kind=1)[1:1] *) pstr.0;
}
}
program test
use, intrinsic :: ISO_C_Binding, only: c_ptr, c_int, c_char
type(c_ptr) :: text
character, pointer :: str
interface
pure integer(c_int) function strlen (c) bind(c,name='strlen')
import
type(c_ptr), intent(in), value :: c
end function strlen
end interface
str => FortranChar(text)
contains
function FortranChar ( C )
type(c_ptr), intent(in), value :: C
character(len=strlen(c),kind=c_char), pointer :: FortranChar
end function FortranChar
end program test