public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Wu Zhou <woodzltc@cn.ibm.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb@sourceware.org
Subject: Re: New Fortran test failures
Date: Tue, 28 Feb 2006 14:04:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.0602272107210.4363@localhost.localdomain> (raw)
In-Reply-To: <20060227163318.GA20782@nevyn.them.org>


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

  reply	other threads:[~2006-02-28  2:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-28  2:54 Daniel Jacobowitz
2006-02-28 14:04 ` Wu Zhou [this message]
2006-02-28 15:46   ` Daniel Jacobowitz
2006-03-01  1:39     ` Wu Zhou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0602272107210.4363@localhost.localdomain \
    --to=woodzltc@cn.ibm.com \
    --cc=drow@false.org \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).