From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 719 invoked by alias); 15 Jan 2010 13:38:59 -0000 Received: (qmail 662 invoked by uid 48); 15 Jan 2010 13:38:44 -0000 Date: Fri, 15 Jan 2010 13:38:00 -0000 Subject: [Bug c++/42758] New: ICE on assert() in function with complex(?) template argument X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "adl at 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: 2010-01/txt/msg01872.txt.bz2 The following code compiles fine with g++-4.4 and causes g++-4.5 to segfault. Removing the assert() or removing the int_less_than parameter no longer lead to a segfault. % g++-4.5 --version g++-4.5 (Debian 4.5-20091226-1) 4.5.0 20091226 (experimental) [trunk revision 155473] Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. % cat bug.cc #include #include namespace spot { struct int_less_than { bool operator()(int, int) const { return 0; } }; int f(const std::set&) { assert(0); return 1; } } % g++-4.4 -c bug.cc # 4.4 runs OK % g++-4.5 -c bug.cc g++-4.5: Internal error: Segmentation fault (program cc1plus) Please submit a full bug report. See for instructions. -- Summary: ICE on assert() in function with complex(?) template argument Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: adl at gnu dot org GCC build triplet: i686-linux-gnu GCC host triplet: i686-linux-gnu GCC target triplet: i486-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42758