This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/42888] [4.5 Regression] ICE in fold_convert_loc, at fold-const.c:2670
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jan 2010 18:44:25 -0000
- Subject: [Bug fortran/42888] [4.5 Regression] ICE in fold_convert_loc, at fold-const.c:2670
- References: <bug-42888-6318@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #13 from burnus at gcc dot gnu dot org 2010-01-28 18:44 -------
(In reply to comment #11)
> I get a suspicious error:
>
> Error: The NULL in the derived type constructor at (1) is being applied to
> component 'ptr', which is neither a POINTER nor ALLOCATABLE
The problem is that for both
type(c_ptr) :: ptr => C_NULL_PTR
and for
integer, pointer :: ptr => null()
the expression type EXPR_NULL is used. At some point when going from the
front-end representation (gfc_symbol, gfc_expr) to the middle-end
representation (tree), the derived type non-pointer "type(c_ptr)" will be
converted to a scalar pointer. Seemingly, by moving code from resolve.c to
trans*.c you have an ordering problem with regards to type(c_(fun)ptr).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42888