This is the mail archive of the gdb@sourceware.org mailing list for the GDB 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: New Fortran test failures


On Mon, 27 Feb 2006, Daniel Jacobowitz wrote:

> Hi Wu,
> 
> Have you run the GDB testsuite lately?  I don't have before-and-after
> results, but it looks like your recent Fortran patch caused extra
> whitespace after printing certain Fortran types, which shows up as
> failures in gdb.fortran/types.exp.  I'm not sure why.

Daniel, I had a look, it is the error of the following code:

    default_case:
    default:
      /* Handle types not explicitly handled by the other cases,
         such as fundamental types.  For these, just print whatever
         the type name is, as recorded in the type itself.  If there
         is no type name, then complain. */
      if (TYPE_NAME (type) != NULL)
        fprintfi_filtered (level, stream, "%s ", TYPE_NAME (type));

The original code use "fputs_filtered (TYPE_NAME (type), stream);". When I 
replaced these un-idented functions with the indented oens, I incorrectly 
added a space after "%s".  It seems that this stupid error escaped my 
test.  Really sorry for that.  Blush~~~~

Here is the fix.  OK to install?

2006-02-28  Wu Zhou  <woodzltc@cn.ibm.com>

	* f-typeprint.c (f_type_print_base): Delete the redundant space.

Index: f-typeprint.c
===================================================================
RCS file: /cvs/src/src/gdb/f-typeprint.c,v
retrieving revision 1.15
diff -c -p -r1.15 f-typeprint.c
*** f-typeprint.c	24 Feb 2006 07:26:10 -0000	1.15
--- f-typeprint.c	28 Feb 2006 02:01:13 -0000
*************** f_type_print_base (struct type *type, st
*** 416,422 ****
           the type name is, as recorded in the type itself.  If there
           is no type name, then complain. */
        if (TYPE_NAME (type) != NULL)
! 	fprintfi_filtered (level, stream, "%s ", TYPE_NAME (type));
        else
  	error (_("Invalid type code (%d) in symbol table."), TYPE_CODE (type));
        break;
--- 416,422 ----
           the type name is, as recorded in the type itself.  If there
           is no type name, then complain. */
        if (TYPE_NAME (type) != NULL)
! 	fprintfi_filtered (level, stream, "%s", TYPE_NAME (type));
        else
  	error (_("Invalid type code (%d) in symbol table."), TYPE_CODE (type));
        break;


After a little more thought, there is another potential problem in that 
testcase.  It need the GNU fortran 95 compiler to run.  This has to be 
specified on the command line explicitly (F77_FOR_TARGET=/usr/bin/gfortran).
Otherwise it will reported "UNTESTED".

Maybe we can let dejagnu automatically select gfortran as the compiler for 
".f90" files.  

Ben, I know that you are the maintainer of dejagnu.  Do you think 
that it is feasible to do that?  OR there are any other methods?  If 
you can point out a way for me, I am very happy to have a try. :-)

Regards
- Wu Zhou


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