------- Comment #1 from burnus at gcc dot gnu dot org  2007-11-24 23:02 -------
Some debugging notes. While the following crashes
   C_NULL_PTR1 = transfer(0_C_INTPTR_T, C_NULL_PTR1)
it works after replacing the constant by a variable.

In gfc_simplify_transfer (for the constant expression),
  /* And read the buffer back into the new expression.  */
  gfc_target_interpret_expr (buffer, buffer_size, result);
is called. Here, "result" is of the type(c_ptr), i.e. ts.type == BT_DERIVED.
As it is not a real derived type calling gfc_interpret_derived fails
(segfault); converting it into INTEGER works in principle, but it fails in the
"C_NULL_PTR1 =" assignment step as one cannot assign an integer to a derived
type.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34199

Reply via email to