From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6604 invoked by alias); 21 Jun 2009 21:32:40 -0000 Received: (qmail 6572 invoked by alias); 21 Jun 2009 21:32:27 -0000 Date: Sun, 21 Jun 2009 21:32:00 -0000 Subject: [Bug c++/40512] New: Compilation stops on valid code with ICE X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "gcc-bugzilla 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: 2009-06/txt/msg01519.txt.bz2 compile the attached code with the -std=c++0x flag. Environment: System: Linux x 2.6.26-2-686 #1 SMP Thu Mar 26 01:08:11 UTC 2009 i686 GNU/Linux host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: ./configure --prefix=/home/x/gcc-4.4-20090616 --enable-languages=,c,c++, How-To-Repeat: template class M { T v; public: T & operator[](unsigned) { return v; } T const & operator[](unsigned) const { return v; } template auto mggggg(M o) -> M { typedef M res_t; return res_t(); } template auto operator*(M const & o) const -> M { typedef M res_t; return res_t(); } }; int main(int, char *[]) { typedef M<2, 2, int> xt; M<3, 2, xt> hv; M<4, 3, xt> vv; hv.mggggg(vv); } ------- Comment #1 from pooly at ural2 dot hszk dot bme dot hu 2009-06-21 21:32 ------- Fix: Replace o[0] with oT() on line 10. -- Summary: Compilation stops on valid code with ICE Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pooly at ural2 dot hszk dot bme dot hu GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40512