From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21745 invoked by alias); 28 Feb 2006 02:30:54 -0000 Received: (qmail 21734 invoked by uid 22791); 28 Feb 2006 02:30:53 -0000 X-Spam-Check-By: sourceware.org Received: from ausmtp04.au.ibm.com (HELO ausmtp04.au.ibm.com) (202.81.18.152) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 28 Feb 2006 02:30:50 +0000 Received: from sd0208e0.au.ibm.com (d23rh904.au.ibm.com [202.81.18.202]) by ausmtp04.au.ibm.com (8.12.10/8.13.5) with ESMTP id k1S2bg0R045882 for ; Tue, 28 Feb 2006 13:37:42 +1100 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.250.244]) by sd0208e0.au.ibm.com (8.12.10/NCO/VER6.8) with ESMTP id k1S2Xs6Y154298 for ; Tue, 28 Feb 2006 13:33:55 +1100 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.12.11/8.13.3) with ESMTP id k1S2UakD026715 for ; Tue, 28 Feb 2006 13:30:36 +1100 Received: from [9.181.133.108] ([9.181.133.108]) by d23av03.au.ibm.com (8.12.11/8.12.11) with ESMTP id k1S2UYAn026535; Tue, 28 Feb 2006 13:30:35 +1100 Date: Tue, 28 Feb 2006 14:04:00 -0000 From: Wu Zhou To: Daniel Jacobowitz cc: gdb@sourceware.org Subject: Re: New Fortran test failures In-Reply-To: <20060227163318.GA20782@nevyn.them.org> Message-ID: References: <20060227163318.GA20782@nevyn.them.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00326.txt.bz2 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 * 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