From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21991 invoked by alias); 29 Aug 2006 02:44:44 -0000 Received: (qmail 21968 invoked by uid 48); 29 Aug 2006 02:44:38 -0000 Date: Tue, 29 Aug 2006 02:44:00 -0000 Message-ID: <20060829024438.21967.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/28879] [4.0/4.1/4.2 regression] ICE with variable-sized array in template function In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia 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-08/txt/msg02505.txt.bz2 List-Id: ------- Comment #2 from pinskia at gcc dot gnu dot org 2006-08-29 02:44 ------- Actually the second case is because we call: 426 t = build_array_type (elt_type, index_type); #12 0x081e0cae in build_cplus_array_type_1 (elt_type=0xb7c62284, index_type=0xb7d055c0) at ../../gcc/cp/tree.c:426 And the first problem was introduced with an ABI change: 6524 if (abi_version_at_least (2) 6525 /* We should only handle value dependent expressions specially. */ 6526 ? value_dependent_expression_p (size) #3 0x08084f4f in compute_array_index_type (name=0xb7cea09c, size=0xb7cba0c8) at ../../gcc/cp/decl.c:6524 If you do -fabi-version=1, we get the ICE later on but with the same problem: 417 if (dependent_type_p (elt_type) 418 || (index_type 419 && value_dependent_expression_p (TYPE_MAX_VALUE (index_type)))) #4 0x081e0c31 in build_cplus_array_type_1 (elt_type=0xb7cf0284, index_type=0xb7d93564) at ../../gcc/cp/tree.c:417 -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2006-08-29 02:44:38 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28879