From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14474 invoked by alias); 15 Jan 2004 22:17:55 -0000 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 Received: (qmail 14461 invoked by uid 48); 15 Jan 2004 22:17:54 -0000 Date: Thu, 15 Jan 2004 22:17:00 -0000 Message-ID: <20040115221754.14460.qmail@sources.redhat.com> From: "bangerth at dealii dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040114153700.13681.bangerth@dealii.org> References: <20040114153700.13681.bangerth@dealii.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug optimization/13681] [tree-ssa] ICE in get_expr_operands with out-of-bounds access X-Bugzilla-Reason: CC X-SW-Source: 2004-01/txt/msg01807.txt.bz2 List-Id: ------- Additional Comments From bangerth at dealii dot org 2004-01-15 22:17 ------- I should add that the problem is not easily worked around, as it may seem at first glance. I have this code on code-paths that are not taken when the size of the array is smaller than the index. For example here: --------------------- void f(); template struct X { double values[N]; double & foo (const unsigned int index) { return values[index]; } }; template void foo() { double d; X h1; if (N<=2) f(); h1.foo(2) = d; } template void foo<2>(); ---------------------------- f() is a no-return function, but unfortunately the author forgot to mark it as that. Now, it is quite impressive to see that gcc doesn't ICE any more once I mark f() as noreturn, but the present behavior is annoying nevertheless. It triggers at least half a dozen times in my code :-( W. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13681