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/60677] [4.9 Regression] FAIL: gfortran.dg/ichar_3.f90 -O (test for excess errors)


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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-03-28
                 CC|                            |burnus at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
We have:

gfc_conv_intrinsic_ichar (gfc_se * se, gfc_expr * expr)
{
  tree args[2], type, pchartype;
  int nargs;
  nargs = gfc_intrinsic_argument_list_length (expr);
  gfc_conv_intrinsic_function_args (se, expr, args, nargs);

The problem is that nargs == 3, but we have "args[2]". The arguments are the
character (BT_CHARACTER) and the kind (BT_INTEGER). However,
gfc_intrinsic_argument_list_length  counts character types as len==2 as one
usually has a character length. Hence, one accesses invalid memory with
gfc_conv_intrinsic_function_args.


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