From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15049 invoked by alias); 19 Jan 2006 08:39:09 -0000 Received: (qmail 15007 invoked by uid 48); 19 Jan 2006 08:39:05 -0000 Date: Thu, 19 Jan 2006 08:39:00 -0000 Message-ID: <20060119083905.15006.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug rtl-optimization/25791] -O2 execution fails, -O and -g work In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ebotcazou at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-01/txt/msg01902.txt.bz2 List-Id: ------- Comment #22 from ebotcazou at gcc dot gnu dot org 2006-01-19 08:39 ------- > From what I can tell with the testcase, any static data that is not > 'referenced' is eliminated. This is terribly non-transparent in programs that > create tables by using static data to define table members. Only those members > specifically referenced are retained by -O2. That destroys the tables. Sure, but you must use arrays for tables, not seemingly contiguous objects which have never been guaranteed to be contiguous by anyone. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25791