From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29939 invoked by alias); 27 Oct 2004 13:54:19 -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 29919 invoked by uid 48); 27 Oct 2004 13:54:17 -0000 Date: Wed, 27 Oct 2004 13:54:00 -0000 From: "reichelt at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20041027135414.18177.reichelt@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/18177] New: [4.0 regression] ICE with const_cast for undeclared variable X-Bugzilla-Reason: CC X-SW-Source: 2004-10/txt/msg03317.txt.bz2 List-Id: The following invalid code snippet causes an ICE when compiled with mainline: ============================= void foo() { X; const_cast(X); } ============================= bug.cc: In function `void foo()': bug.cc:3: error: 'X' was not declared in this scope bug.cc:4: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in build_pointer_type_for_mode, at tree.c:4118 Please submit a full bug report, [etc.] The regression appeared in March 2004: : Search converges between 2004-03-01-trunk (#446) and 2004-04-01-trunk (#447). -- Summary: [4.0 regression] ICE with const_cast for undeclared variable Product: gcc Version: 4.0.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code, error-recovery, monitored Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18177