From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19803 invoked by alias); 25 Feb 2005 14:48:45 -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 19419 invoked by uid 48); 25 Feb 2005 14:48:09 -0000 Date: Fri, 25 Feb 2005 19:35:00 -0000 From: "pinskia at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20050225144806.20208.pinskia@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/20208] New: [4.0 Regression] No array-to-pointer decay happens for template functions X-Bugzilla-Reason: CC X-SW-Source: 2005-02/txt/msg03139.txt.bz2 List-Id: At -O1 and above, the following code ICE because well, the same reason why PR 2892 fails currently really: extern "C" void abort(); template inline void *Foo (T arg) { return &arg[0]; } int main () { int bry[2]; if (Foo(bry) != bry) abort(); } I filed this a seperate bug because well the ICE is a regression even though fixing PR 2892 will fix this also. -- Summary: [4.0 Regression] No array-to-pointer decay happens for template functions Product: gcc Version: 4.0.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org OtherBugsDependingO 2892 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20208