This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/42888] [4.5 Regression] ICE in fold_convert_loc, at fold-const.c:2670



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]