From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8636 invoked by alias); 5 Dec 2002 21:30:56 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 8627 invoked from network); 5 Dec 2002 21:30:55 -0000 Received: from unknown (HELO jackfruit.Stanford.EDU) (171.64.38.136) by sources.redhat.com with SMTP; 5 Dec 2002 21:30:55 -0000 Received: (from carlton@localhost) by jackfruit.Stanford.EDU (8.11.6/8.11.6) id gB5LUs907407; Thu, 5 Dec 2002 13:30:54 -0800 X-Authentication-Warning: jackfruit.Stanford.EDU: carlton set sender to carlton@math.stanford.edu using -f To: gdb Cc: Andrew Cagney Subject: store.exp failures From: David Carlton Date: Thu, 05 Dec 2002 13:30:00 -0000 Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-12/txt/msg00091.txt.bz2 When I run gdb.base/store.exp, (GCC 3.1, i686 Linux) I get tons and tons of failures. Looking into the log file, I see the following: (gdb) break main Breakpoint 1 at 0x80488f0: file gdb.base/store.c, line 233. (gdb) run Starting program: /extra/gdb/mirror/src/gdb/testsuite/gdb.base/store Breakpoint 1, main () at gdb.base/store.c:233 233 wack_struct_1 (); (gdb) tbreak wack_char Breakpoint 2 at 0x804849e: file gdb.base/store.c, line 46. (gdb) PASS: gdb.base/store.exp: tbreak wack_char continue Continuing. Program exited normally. So, basically, it looks like some of the calls to the wack_XXX functions are getting optimized out by the compiler, even though no optimization flags are being passed. Digging into the assembly confirms this; the code for main starts off as follows: main: .LFB25: # store.c:215 .loc 1 215 0 # basic block 0 pushl %ebp .LCFI67: movl %esp, %ebp .LCFI68: subl $120, %esp .LCFI69: andl $-16, %esp movl $0, %eax subl %eax, %esp # store.c:233 .loc 1 233 0 leal -10(%ebp), %eax movl %eax, (%esp) call wack_struct_1 I have no idea what to do about this. The same thing happens with GCC 3.2. For what it's worth, if I run it with GCC 2.95.3, I get FAILs on "new up struct 1" and "new up struct 2", but everything else works. (Incidentally, is 'wack' a typo for 'whack', or something else?) David Carlton carlton@math.stanford.edu