This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/53486] New: ICE compiling code using lambdas as default argument


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53486

             Bug #: 53486
           Summary: ICE compiling code using lambdas as default argument
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jpalecek@web.de


When compiling the attached file with g++-4.7, (or the last snapshot available
in Debian, that is from 20120501), I get the following internal compiler error:

benchmark_test.cpp:424:26: internal compiler error: in tsubst_copy, at
cp/pt.c:12077
   simple_regression<dim> reg;
                          ^

The full output is:

-*- mode: compilation; default-directory: "~/benchmark/" -*-
Compilation started at Fri May 25 16:18:54

LD_LIBRARY_PATH=/usr/lib/gcc-snapshot/lib:$LD_LIBRARY_PATH
PATH=/usr/lib/gcc-snapshot/bin:$PATH g++ -g --std=c++0x benchmark_test.cpp
benchmark_test.cpp: In instantiation of 'ResultType
boost_param_default_415benchmark_regress(ResultType (*)(), const Args&, int,
func_type&, data_vector_type&, timer_type&, error_type&,
variable_function_type&, random_type&) [with ResultType = std::vector<double>;
Args = boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::variable_function, const
main()::<lambda(int)> >, boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::data_vector, const
boost::assign_detail::generic_list<int> >,
boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::func, const main()::<lambda(int)>
>, boost::parameter::aux::empty_arg_list> > >; func_type = const
main()::<lambda(int)>; data_vector_type = const
boost::assign_detail::generic_list<int>; timer_type = const clock_timer;
error_type = const double; variable_function_type = const
main()::<lambda(int)>; random_type = const
boost::random::xor_combine_engine<boost::random::xor_combine_engine<boost::random::linear_feedback_shift_engine<unsigned
int, 32, 31, 13, 12>, 0, boost::random::linear_feedback_shift_engine<unsigned
int, 32, 29, 2, 4>, 0>, 0, boost::random::linear_feedback_shift_engine<unsigned
int, 32, 28, 3, 17>, 0>]':
benchmark_test.cpp:404:1:   required from 'ResultType
boost_param_default_415benchmark_regress(ResultType (*)(), const Args&, long
int, func_type&, data_vector_type&, timer_type&, error_type&,
variable_function_type&, boost::parameter::aux::use_default_tag) [with
ResultType = std::vector<double>; Args = boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::variable_function, const
main()::<lambda(int)> >, boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::data_vector, const
boost::assign_detail::generic_list<int> >,
boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::func, const main()::<lambda(int)>
>, boost::parameter::aux::empty_arg_list> > >; func_type = const
main()::<lambda(int)>; data_vector_type = const
boost::assign_detail::generic_list<int>; timer_type = const clock_timer;
error_type = const double; variable_function_type = const
main()::<lambda(int)>]'
benchmark_test.cpp:404:1:   required from 'ResultType
boost_param_default_415benchmark_regress(ResultType (*)(), const Args&, int,
func_type&, data_vector_type&, timer_type&, error_type&,
variable_function_type&) [with ResultType = std::vector<double>; Args =
boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::variable_function, const
main()::<lambda(int)> >, boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::data_vector, const
boost::assign_detail::generic_list<int> >,
boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::func, const main()::<lambda(int)>
>, boost::parameter::aux::empty_arg_list> > >; func_type = const
main()::<lambda(int)>; data_vector_type = const
boost::assign_detail::generic_list<int>; timer_type = const clock_timer;
error_type = const double; variable_function_type = const
main()::<lambda(int)>]'
benchmark_test.cpp:404:1:   required from 'ResultType
boost_param_default_415benchmark_regress(ResultType (*)(), const Args&, int,
func_type&, data_vector_type&, timer_type&, error_type&) [with ResultType =
std::vector<double>; Args = boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::variable_function, const
main()::<lambda(int)> >, boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::data_vector, const
boost::assign_detail::generic_list<int> >,
boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::func, const main()::<lambda(int)>
>, boost::parameter::aux::empty_arg_list> > >; func_type = const
main()::<lambda(int)>; data_vector_type = const
boost::assign_detail::generic_list<int>; timer_type = const clock_timer;
error_type = const double]'
benchmark_test.cpp:404:1:   required from 'ResultType
boost_param_default_415benchmark_regress(ResultType (*)(), const Args&, long
int, func_type&, data_vector_type&, timer_type&,
boost::parameter::aux::use_default_tag) [with ResultType = std::vector<double>;
Args = boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::variable_function, const
main()::<lambda(int)> >, boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::data_vector, const
boost::assign_detail::generic_list<int> >,
boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::func, const main()::<lambda(int)>
>, boost::parameter::aux::empty_arg_list> > >; func_type = const
main()::<lambda(int)>; data_vector_type = const
boost::assign_detail::generic_list<int>; timer_type = const clock_timer]'
benchmark_test.cpp:404:1:   required from 'ResultType
boost_param_default_415benchmark_regress(ResultType (*)(), const Args&, int,
func_type&, data_vector_type&, timer_type&) [with ResultType =
std::vector<double>; Args = boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::variable_function, const
main()::<lambda(int)> >, boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::data_vector, const
boost::assign_detail::generic_list<int> >,
boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::func, const main()::<lambda(int)>
>, boost::parameter::aux::empty_arg_list> > >; func_type = const
main()::<lambda(int)>; data_vector_type = const
boost::assign_detail::generic_list<int>; timer_type = const clock_timer]'
benchmark_test.cpp:404:1:   required from 'ResultType
boost_param_default_415benchmark_regress(ResultType (*)(), const Args&, long
int, func_type&, data_vector_type&, boost::parameter::aux::use_default_tag)
[with ResultType = std::vector<double>; Args =
boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::variable_function, const
main()::<lambda(int)> >, boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::data_vector, const
boost::assign_detail::generic_list<int> >,
boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::func, const main()::<lambda(int)>
>, boost::parameter::aux::empty_arg_list> > >; func_type = const
main()::<lambda(int)>; data_vector_type = const
boost::assign_detail::generic_list<int>]'
benchmark_test.cpp:404:1:   required from 'ResultType
boost_param_default_415benchmark_regress(ResultType (*)(), const Args&, int,
func_type&, data_vector_type&) [with ResultType = std::vector<double>; Args =
boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::variable_function, const
main()::<lambda(int)> >, boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::data_vector, const
boost::assign_detail::generic_list<int> >,
boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::func, const main()::<lambda(int)>
>, boost::parameter::aux::empty_arg_list> > >; func_type = const
main()::<lambda(int)>; data_vector_type = const
boost::assign_detail::generic_list<int>]'
benchmark_test.cpp:404:1:   required from 'typename
boost_param_result_415benchmark_regress<Args>::type
boost_param_implbenchmark_regress(const Args&) [with Args =
boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::variable_function, const
main()::<lambda(int)> >, boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::data_vector, const
boost::assign_detail::generic_list<int> >,
boost::parameter::aux::arg_list<const
boost::parameter::aux::tagged_argument<tag::func, const main()::<lambda(int)>
>, boost::parameter::aux::empty_arg_list> > >; typename
boost_param_result_415benchmark_regress<Args>::type = std::vector<double>]'
benchmark_test.cpp:404:1:   required from 'typename
boost_param_result_415benchmark_regress<typename
boost::parameter::aux::argument_pack<boost_param_params_415benchmark_regress<int>,
const ParameterArgumentType0, const ParameterArgumentType1, const
ParameterArgumentType2>::type>::type benchmark_regress(const
ParameterArgumentType0&, const ParameterArgumentType1&, const
ParameterArgumentType2&, typename
boost::parameter::aux::match<boost_param_params_415benchmark_regress<int>,
ParameterArgumentType0, ParameterArgumentType1, ParameterArgumentType2>::type)
[with ParameterArgumentType0 =
boost::parameter::aux::tagged_argument<tag::func, const main()::<lambda(int)>
>; ParameterArgumentType1 =
boost::parameter::aux::tagged_argument<tag::data_vector, const
boost::assign_detail::generic_list<int> >; ParameterArgumentType2 =
boost::parameter::aux::tagged_argument<tag::variable_function, const
main()::<lambda(int)> >; typename
boost_param_result_415benchmark_regress<typename
boost::parameter::aux::argument_pack<boost_param_params_415benchmark_regress<int>,
const ParameterArgumentType0, const ParameterArgumentType1, const
ParameterArgumentType2>::type>::type = std::vector<double>; typename
boost::parameter::aux::match<boost_param_params_415benchmark_regress<int>,
ParameterArgumentType0, ParameterArgumentType1, ParameterArgumentType2>::type =
boost::parameter::parameters<boost::parameter::required<tag::func,
boost::mpl::always<mpl_::bool_<true> > >,
boost::parameter::required<tag::data_vector,
boost::mpl::always<mpl_::bool_<true> > >,
boost::parameter::optional<tag::timer, boost::mpl::always<mpl_::bool_<true> >
>, boost::parameter::optional<tag::error, boost::mpl::always<mpl_::bool_<true>
> >, boost::parameter::optional<tag::variable_function,
boost::mpl::always<mpl_::bool_<true> > >,
boost::parameter::optional<tag::random, boost::mpl::always<mpl_::bool_<true> >
> >]'
benchmark_test.cpp:474:167:   required from here
benchmark_test.cpp:424:26: internal compiler error: in tsubst_copy, at
cp/pt.c:12077
   simple_regression<dim> reg;
                          ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-snapshot/README.Bugs> for instructions.
Preprocessed source stored into /home/jirka/tmp/cccYhoSw.out file, please
attach this to your bugreport.

Compilation exited abnormally with code 1 at Fri May 25 16:19:13


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]