From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10037 invoked by alias); 26 Mar 2003 18:04:43 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 10015 invoked from network); 26 Mar 2003 18:04:41 -0000 Received: from unknown (HELO duracef.shout.net) (204.253.184.12) by sources.redhat.com with SMTP; 26 Mar 2003 18:04:41 -0000 Received: (from mec@localhost) by duracef.shout.net (8.11.6/8.11.6) id h2QI4cG17022 for gdb-patches@sources.redhat.com; Wed, 26 Mar 2003 12:04:38 -0600 Date: Wed, 26 Mar 2003 18:04:00 -0000 From: Michael Elizabeth Chastain Message-Id: <200303261804.h2QI4cG17022@duracef.shout.net> To: gdb-patches@sources.redhat.com Subject: [rfa/testsuite] ptype.exp: fix FAILs for unused types X-SW-Source: 2003-03/txt/msg00518.txt.bz2 This patch fixes two FAILs in gdb.base/ptype.exp with gcc HEAD -gdwarf-2. gdb.base/ptype.exp: ptype t_char_array gdb.base/ptype.exp: ptype func_type gdb.base/ptype.c typedef's some types but then does not actually use them. Recent versions of gcc HEAD with -gdwarf-2 optimize away the type information. So this patch simply uses the types. Tested on my usual testbed: native i686-pc-linux-gnu with gcc v2 and v3, -gdward-2 and -gstabs+. I specifically checked that it fixes the FAILs associated with gcc HEAD. OK to commit? Michael C 2003-03-26 Michael Chastain * gdb.base/ptype.exp: Actually use some typedef'd types. Index: ptype.c =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/ptype.c,v retrieving revision 1.2 diff -u -r1.2 ptype.c --- ptype.c 21 Feb 2002 20:34:16 -0000 1.2 +++ ptype.c 26 Mar 2003 17:39:21 -0000 @@ -59,6 +59,7 @@ /* PR 3742 */ typedef char t_char_array[]; +t_char_array *pv_char_array; /**** pointers *******/ @@ -236,6 +237,8 @@ int (*xptr) (int (*) (), int (*) (void), int); int (*(*ffptr) (char)) (short); int (*(*(*fffptr) (char)) (short)) (long); + +func_type v_func_type; /* Here are the sort of stabs we expect to see for the above: