From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18835 invoked by alias); 1 Dec 2003 18:10:01 -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 18803 invoked from network); 1 Dec 2003 18:09:48 -0000 Received: from unknown (HELO fred.ninemoons.com) (68.14.214.217) by sources.redhat.com with SMTP; 1 Dec 2003 18:09:48 -0000 Received: from fred.ninemoons.com (fred.ninemoons.com [127.0.0.1]) by fred.ninemoons.com (8.12.8/8.12.8) with ESMTP id hB1I9ZXj030359; Mon, 1 Dec 2003 11:09:35 -0700 Received: (from fnf@localhost) by fred.ninemoons.com (8.12.8/8.12.8/Submit) id hB1I9ZJA030357; Mon, 1 Dec 2003 11:09:35 -0700 From: Fred Fish Message-Id: <200312011809.hB1I9ZJA030357@fred.ninemoons.com> Subject: Re: [PATCH] Outwit compiler dead code elimination in break.exp test To: cagney@gnu.org (Andrew Cagney) Date: Mon, 01 Dec 2003 18:10:00 -0000 Cc: fnf@ninemoons.com, gdb-patches@sources.redhat.com Reply-To: fnf@public.ninemoons.com (Fred Fish) In-Reply-To: <3FCB7FF9.4090601@gnu.org> from "Andrew Cagney" at Dec 01, 2003 12:52:57 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2003-12/txt/msg00019.txt.bz2 > I know that GCC will now, when -O is specified, inline (and thence > eliminate) pure functions. However, I don't think that should occure > when -O isn't specified. It doesn't. The gdb specifically uses optimization for the test that is currently failing: FAIL: gdb.base/break.exp: run until breakpoint set at small function, optimized file > As for stopping GCC from eliminating code - last time this came up (ref > store.exp) it was recommended that the .c files be split so that GCC > couldn't see the potential optimization. If that is the prefered solution, I can rework the patch. -Fred