From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12744 invoked by alias); 2 Jul 2006 23:52:31 -0000 Received: (qmail 12728 invoked by uid 48); 2 Jul 2006 23:52:23 -0000 Date: Sun, 02 Jul 2006 23:52:00 -0000 Subject: [Bug c++/28225] New: [4.0/4.1/4.2 regression] segfault in type_dependent_expression_p X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "tbm at cyrius dot com" 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-07/txt/msg00077.txt.bz2 List-Id: [ Forwarded from http://bugs.debian.org/376148 ] The following bug has been reported by Alexei Sheplyakov who submitted a testcase which shows a segfault with gcc 4.0, 4.1 and 4.2. gcc 3.4 produces an error: (sid)1311:tbm@reyes: ~] g++-4.0 -c test.cc test.cc: In member function 'void foo::operator()(T1&, T3&)': test.cc:14: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. For Debian GNU/Linux specific bug reporting instructions, see . zsh: exit 1 g++-4.0 -c test.cc (sid)1312:tbm@reyes: ~] g++-4.1 -c test.cc test.cc: In member function 'void foo::operator()(T1&, T3&)': test.cc:14: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. For Debian GNU/Linux specific bug reporting instructions, see . Preprocessed source stored into /tmp/ccj3KtQL.out file, please attach this to your bugreport. zsh: exit 1 g++-4.1 -c test.cc (sid)1313:tbm@reyes: ~] g++-3.4 -c test.cc test.cc: In member function 'void foo::operator()(T1&, T3&)': test.cc:14: error: non-constant 'foo::N_BC' cannot be used as template argument test.cc:14: error: template argument 3 is invalid test.cc:14: error: invalid type in declaration before '(' token zsh: exit 1 g++-3.4 -c test.cc (sid)1314:tbm@reyes: ~] (sid)1314:tbm@reyes: ~] cat test.cc template struct size_traits; template struct same_size_p; template struct foo { static const unsigned N_BC = size_traits::Size; template::value > struct bar; template struct bar { static void apply(const T1& x, T2& y) { } }; template void operator()(T1& a, T3& b) { bar::apply(a, b); // will get an ICE here // Here is a work-around: //bar::value>::apply(a, b); } }; -- Summary: [4.0/4.1/4.2 regression] segfault in type_dependent_expression_p Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tbm at cyrius dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28225