From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23685 invoked by alias); 29 Apr 2006 03:35:46 -0000 Received: (qmail 23670 invoked by uid 48); 29 Apr 2006 03:35:44 -0000 Date: Sat, 29 Apr 2006 03:35:00 -0000 Message-ID: <20060429033544.23669.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/27347] [4.0/4.1/4.2 Regression] static array member specialization failure 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-04/txt/msg02556.txt.bz2 List-Id: ------- Comment #2 from pinskia at gcc dot gnu dot org 2006-04-29 03:35 ------- The problem I think is the non specialization is getting in the way in that: template char const type_name::name[] = ""; is recording the size as 1. Another testcase with a slightly different error: emplate struct type_name { static int const name[]; }; template int const type_name::name[] = {0}; template<> int const type_name::name[] = {0, 1, 2, 3}; int f(void) { return type_name::name[2]; } -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pinskia at gcc dot gnu dot | |org Known to fail|3.4.6 4.0.3 4.1.0 4.2.0 |3.4.6 4.0.3 4.1.0 4.2.0 | |3.4.0 Last reconfirmed|2006-04-28 13:33:30 |2006-04-29 03:35:43 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27347