From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9435 invoked by alias); 12 Apr 2006 09:43:52 -0000 Received: (qmail 9415 invoked by uid 48); 12 Apr 2006 09:43:49 -0000 Date: Wed, 12 Apr 2006 09:43:00 -0000 Subject: [Bug c++/27129] New: [4.1/4.2 Regression] ICE in get_expr_operands X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub 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-04/txt/msg00946.txt.bz2 List-Id: static const float a = 0.299f; static const float b = 0.114f; static const float c = 1 - a - c; float foo (void) { return a + b + c; } ICEs at -O and higher. There is a typo (should have been 1 - a - b of course), but IMHO that just triggers undefined behavior. G++ 4.0.x would initialize c in __static_initialization_and_destruction_0(int, int) and compile it without ICE, where foo would be return 0.413f + c; In 4.1.0+, apparently c is initialized to error_mark_node, although no error nor even a warning is emitted at compile time, and obviously various later optimizers are upset when seeing error_mark_node on unexpected places, errorneous input is not supposed to reach that far ever. -- Summary: [4.1/4.2 Regression] ICE in get_expr_operands Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jakub at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27129