From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26932 invoked by alias); 23 Feb 2008 18:31:08 -0000 Received: (qmail 26819 invoked by uid 48); 23 Feb 2008 18:30:28 -0000 Date: Sat, 23 Feb 2008 18:31:00 -0000 Subject: [Bug c++/35321] New: [4.1/4.2/4.3/4.4 regression] ICE with invalid use of __builtin_offsetof X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "reichelt at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-02/txt/msg02459.txt.bz2 The following invalid code snippet triggers an ICE since GCC 4.0.0: ========================================= struct A { A operator[] (int); }; struct B { A a; }; void foo() { __builtin_offsetof(B, a[0]); } ========================================= bug.cc: In function 'void foo()': bug.cc:13: internal compiler error: in fold_offsetof_1, at c-common.c:6850 Please submit a full bug report, [etc.] Before, the code was rejected as __builtin_offsetof was not yet supported. The problem is related to PR28573. -- Summary: [4.1/4.2/4.3/4.4 regression] ICE with invalid use of __builtin_offsetof Product: gcc Version: 4.4.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code, monitored Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org BugsThisDependsOn: 28573 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35321