This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47042] ICE with character pointer in function
- From: "dominiq at lps dot ens.fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 29 Jan 2011 13:53:06 +0000
- Subject: [Bug fortran/47042] ICE with character pointer in function
- Auto-submitted: auto-generated
- References: <bug-47042-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47042
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.01.29 13:53:01
Ever Confirmed|0 |1
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-01-29 13:53:01 UTC ---
I confirm the ICE on *-apple-darwin* on trunk:
pr47042.f90: In function 'get_cstring':
pr47042.f90:9:0: internal compiler error: in build_function_decl, at
fortran/trans-decl.c:1683
The code in comment #0 compiles with gfortran 4.5 (4.5.0 and 4.5.2 r167027) and
4.4.4, but fails to link because c_f_pointer is not found. So it looks like a
regression. However if I remove the ONLY clause, I get an ICE with the versions
I have tested:
4.6)
gimplification failed:
ptmp <addr_expr 0x141d04540
type <pointer_type 0x141e02c78
type <function_type 0x141e02bd0 type <void_type 0x141d12d20 void>
QI
size <integer_cst 0x141d014b0 constant 8>
unit size <integer_cst 0x141d014d8 constant 1>
align 8 symtab 0 alias set -1 canonical type 0x141e02b28
attributes <tree_list 0x141e00a28
purpose <identifier_node 0x141dda898 fn spec>
value <tree_list 0x141e00a00
value <string_cst 0x141dfd220 constant "..R">>>
arg-types <tree_list 0x141e009b0 value <reference_type 0x141e02a80>
chain <tree_list 0x141e009d8 value <integer_type 0x141d12498
integer(kind=4)>
chain <tree_list 0x141d01f50 value <void_type 0x141d12d20
void>>>>
pointer_to_this <pointer_type 0x141e02c78>>
unsigned DI
size <integer_cst 0x141d017a8 constant 64>
unit size <integer_cst 0x141d017d0 constant 8>
align 64 symtab 0 alias set -1 canonical type 0x141e02d20>
constant
arg 0 <function_decl 0x141dfee00 ptmp type <function_type 0x141e02bd0>
addressable static QI file pr47042_db_4.f90 line 6 col 0 align 8
context <function_decl 0x141dfec00 get_cstring>
result <result_decl 0x141d0a380 D.1542 type <void_type 0x141d12d20
void>
ignored VOID file pr47042_db_4.f90 line 6 col 0
align 8 context <function_decl 0x141dfee00 ptmp>>>
pr47042_db_4.f90:6:0>
pr47042_db_4.f90: In function 'get_cstring':
pr47042_db_4.f90:6:0: internal compiler error: gimplification failed
4.5)
pr47042_db_4.f90: In function 'get_cstring':
pr47042_db_4.f90:10:0: internal compiler error: in gimplify_expr, at
gimplify.c:7362
4.4)
pr47042_db_4.f90: In function 'get_cstring':
pr47042_db_4.f90:2: internal compiler error: in fold_convert, at
fold-const.c:2654
So for the time being, I refrain to mark this pr as a regression.
The backtrace for 4.6 is
#0 fancy_abort (file=0x1009d44c8 "../../work/gcc/fortran/trans-decl.c",
line=1683, function=0x100a46c00 "build_function_decl") at
../../work/gcc/diagnostic.c:893
#1 0x00000001000c8326 in build_function_decl (sym=0x141c17410, global=0 '\0')
at ../../work/gcc/fortran/trans-decl.c:1680