public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/50892] New: Internal compiler error: in gimplify_expr, at gimplify.c:7477
@ 2011-10-28 2:45 fkrogh#gcc at mathalacarte dot com
2011-10-28 9:43 ` [Bug fortran/50892] " rguenth at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: fkrogh#gcc at mathalacarte dot com @ 2011-10-28 2:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50892
Bug #: 50892
Summary: Internal compiler error: in gimplify_expr, at
gimplify.c:7477
Classification: Unclassified
Product: gcc
Version: 4.6.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: fkrogh#gcc@mathalacarte.com
Created attachment 25641
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25641
File test.f90 gives the internal compile error
I'm using: GNU Fortran (Gentoo 4.6.1-r1 p1.0, pie-0.4.5) 4.6.1
Compilation flags are: -march=native -funroll-loops -pipe \
-ftree-vectorize -floop-strip-mine \
-floop-block -fimplicit-none -finit-real=NAN -ggdb
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'm mainly filing this bug because of the internal
compiler error, which reads as follows:
test.f90: In function 'test':
test.f90:11:0: internal compiler error: in gimplify_expr, at gimplify.c:7477
Please submit a full bug report,
with preprocessed source if appropriate.
My CPU is: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
Thanks,
Fred
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/50892] Internal compiler error: in gimplify_expr, at gimplify.c:7477
2011-10-28 2:45 [Bug fortran/50892] New: Internal compiler error: in gimplify_expr, at gimplify.c:7477 fkrogh#gcc at mathalacarte dot com
@ 2011-10-28 9:43 ` rguenth at gcc dot gnu.org
2011-10-29 15:05 ` burnus at gcc dot gnu.org
2015-08-08 20:21 ` fxcoudert at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-10-28 9:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50892
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011-10-28
Ever Confirmed|0 |1
Known to fail| |4.7.0
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-10-28 09:42:57 UTC ---
Confirmed.
#1 0x00000000009ab110 in gimplify_expr (expr_p=0x7ffff5b3d078,
pre_p=0x7fffffffbdc8, post_p=0x7fffffff84f8, gimple_test_f=
0x93fdf9 <is_gimple_val(tree_node*)>, fallback=1)
at /space/rguenther/src/svn/trunk/gcc/gimplify.c:7599
7599 gcc_assert (!VOID_TYPE_P (TREE_TYPE (*expr_p)));
(gdb) call debug_generic_expr (*expr_p)
*D.1735
#3 0x00000000009840a8 in gimplify_call_expr (expr_p=0x7ffff5a2d7a8,
pre_p=0x7fffffffbdc8, want_value=true)
at /space/rguenther/src/svn/trunk/gcc/gimplify.c:2438
2438 EXPR_LOCATION (*expr_p));
(gdb) call debug_generic_expr (*expr_p)
strlen_void (*D.1735)
<mem_ref 0x7ffff5a2d930
type <void_type 0x7ffff5a31bd0 void VOID
align 8 symtab 0 alias set -1 canonical type 0x7ffff5a31bd0
pointer_to_this <pointer_type 0x7ffff5a31c78>>
arg 0 <var_decl 0x7ffff5a2c640 D.1735
type <pointer_type 0x7ffff5a31c78 type <void_type 0x7ffff5a31bd0 void>
public unsigned DI
size <integer_cst 0x7ffff5a20ec0 constant 64>
unit size <integer_cst 0x7ffff5a20ee0 constant 8>
align 64 symtab 0 alias set -1 canonical type 0x7ffff5a31c78
pointer_to_this <pointer_type 0x7ffff5a44f18>>
used unsigned ignored DI file t.f90 line 18 col 0 size <integer_cst
0x7ffff5a20ec0 64> unit size <integer_cst 0x7ffff5a20ee0 8>
align 64 context <function_decl 0x7ffff5b38600 test>>
arg 1 <integer_cst 0x7ffff5a34580 type <pointer_type 0x7ffff5a31c78>
constant 0>
t.f90:18:0>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/50892] Internal compiler error: in gimplify_expr, at gimplify.c:7477
2011-10-28 2:45 [Bug fortran/50892] New: Internal compiler error: in gimplify_expr, at gimplify.c:7477 fkrogh#gcc at mathalacarte dot com
2011-10-28 9:43 ` [Bug fortran/50892] " rguenth at gcc dot gnu.org
@ 2011-10-29 15:05 ` burnus at gcc dot gnu.org
2015-08-08 20:21 ` fxcoudert at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-10-29 15:05 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/50892] Internal compiler error: in gimplify_expr, at gimplify.c:7477
2011-10-28 2:45 [Bug fortran/50892] New: Internal compiler error: in gimplify_expr, at gimplify.c:7477 fkrogh#gcc at mathalacarte dot com
2011-10-28 9:43 ` [Bug fortran/50892] " rguenth at gcc dot gnu.org
2011-10-29 15:05 ` burnus at gcc dot gnu.org
@ 2015-08-08 20:21 ` fxcoudert at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2015-08-08 20:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50892
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fxcoudert at gcc dot gnu.org
--- Comment #3 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Further reduced testcase still fails. Shows that it's all about the character
length, not C binding or the C_PTR derived type:
program test
character, pointer :: str
str => g(42)
contains
function g(i)
integer, value :: i
character(len=i), pointer :: g
end function
end
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-08-08 20:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-28 2:45 [Bug fortran/50892] New: Internal compiler error: in gimplify_expr, at gimplify.c:7477 fkrogh#gcc at mathalacarte dot com
2011-10-28 9:43 ` [Bug fortran/50892] " rguenth at gcc dot gnu.org
2011-10-29 15:05 ` burnus at gcc dot gnu.org
2015-08-08 20:21 ` fxcoudert at gcc dot gnu.org
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).