From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25855 invoked by alias); 17 Oct 2004 16:11:47 -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 25838 invoked by uid 48); 17 Oct 2004 16:11:46 -0000 Date: Sun, 17 Oct 2004 16:11:00 -0000 Message-ID: <20041017161146.25837.qmail@sourceware.org> From: "pinskia at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20041017123619.18040.aj@gcc.gnu.org> References: <20041017123619.18040.aj@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug tree-optimization/18040] [4.0 Regression] ICE in for_each_index, at tree-ssa-loop-im.c:178 X-Bugzilla-Reason: CC X-SW-Source: 2004-10/txt/msg02312.txt.bz2 List-Id: ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-17 16:11 ------- Here is the reduced testcase to make your investigation easier: typedef struct _object PyObject; int PyObject_IsTrue(PyObject *); class object; typedef PyObject* (object::*bool_type)() const; struct object_base { operator bool_type() const; ~object_base(); PyObject* ptr() const; }; struct object : public object_base { object(); template explicit object(T const& x) ; }; inline object_base::operator bool_type() const { const object &x = *static_cast(this); return PyObject_IsTrue(x.ptr()) ? &object::ptr : 0; } void f(const char *); void argument_error (void) { for (unsigned n = 0; n < 100; ++n) { object kv(""); if (kv) f(""); } } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18040