[Patch, fortran] PR34429 PR34431 and PR34471 - function type characteristics

Tobias Burnus burnus@net-b.de
Thu Jan 17 07:36:00 GMT 2008


Paul Thomas wrote:
> Given that Tobi's tests show greens across the board and the timing
> relative to the release cycle, I propose to commit this patch tomorrow
> night, just to ensure that it is properly exposed..  Comments, errors,
> or whatever are more than welcome on that timescale.
You added:

 gfc_clear_ts (gfc_typespec *ts)
 {
   ts->type = BT_UNKNOWN;
-  ts->kind = 0;
   ts->derived = NULL;
+  if (ts->kind != -1)
+    ts->kind = 0;

VALGRIND correctly claims that the "if" uses uninitialized memory. For
instance when called via intrinsic.c's add_conv. That function has:

  gfc_typespec from, to;
[...]
  gfc_clear_ts (&from);

which means that "from" can contain anything - including "-1"!

Tobias



More information about the Fortran mailing list