This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/40963] ICE segfault - c_loc with derived type component as argument
- 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: 4 Aug 2009 16:14:31 -0000
- Subject: [Bug fortran/40963] ICE segfault - c_loc with derived type component as argument
- References: <bug-40963-18019@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from burnus at gcc dot gnu dot org 2009-08-04 16:14 -------
The issue is that the expression is an array ("expr->rank > 0") but the symbol
itself is not, only it's component.
==16545== Invalid read of size 4
==16545== at 0x55343F: gfc_conv_procedure_call (trans-expr.c:2441)
==16545== by 0x547595F: ???
==16545== by 0x4FBD06: gfc_match_actual_arglist (primary.c:1670)
That's the last line in:
if (sym->intmod_sym_id == ISOCBINDING_LOC)
[...]
if (arg->expr->rank == 0)
gfc_conv_expr_reference (se, arg->expr);
else
{[...]
/* We should want it to do g77 calling convention. */
f = (fsym != NULL)
&& !(fsym->attr.pointer || fsym->attr.allocatable)
&& fsym->as->type != AS_ASSUMED_SHAPE;
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2009-08-04 16:14:31
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40963