http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54667
Bug #: 54667 Summary: [OOP] gimplification failure with c_f_pointer Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: ja...@gcc.gnu.org Reported by Andrew Benson at http://gcc.gnu.org/ml/fortran/2012-09/msg00078.html: use, intrinsic :: ISO_C_Binding type :: nc end type type(c_ptr) :: cSelf class(nc), pointer :: self call c_f_pointer(cSelf, self) end This ICEs with all gfortran versions I tried. With trunk one gets: gimplification failed: &self <addr_expr 0x7f163fa3b4b0 type <pointer_type 0x7f163fa3c888 type <record_type 0x7f163fa3c7e0 __class_MAIN___Nc_p type_4 TI size <integer_cst 0x7f163f92bda0 constant 128> unit size <integer_cst 0x7f163f92bdc0 constant 16> align 64 symtab 0 alias set -1 canonical type 0x7f163fa3c7e0 fields <field_decl 0x7f163fa31850 _data> pointer_to_this <pointer_type 0x7f163fa3c888> chain <type_decl 0x7f163f94db80 D.1882>> unsigned DI size <integer_cst 0x7f163f92bd20 constant 64> unit size <integer_cst 0x7f163f92bd40 constant 8> align 64 symtab 0 alias set -1 canonical type 0x7f163fa3c888> arg 0 <var_decl 0x7f163fa31980 self type <record_type 0x7f163fa3c7e0 __class_MAIN___Nc_p> addressable used TI file andrew3.f90 line 8 col 0 size <integer_cst 0x7f163f92bda0 128> unit size <integer_cst 0x7f163f92bdc0 16> align 64 context <function_decl 0x7f163fa39300 MAIN__>> andrew3.f90:10:0> andrew3.f90: In function ‘MAIN__’: andrew3.f90:10:0: internal compiler error: gimplification failed call c_f_pointer(cSelf, self)