This is the mail archive of the gcc-patches@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]

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


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


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