public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53486] New: ICE compiling code using lambdas as default argument
@ 2012-05-25 15:56 jpalecek at web dot de
  2012-05-25 16:22 ` [Bug c++/53486] " redi at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: jpalecek at web dot de @ 2012-05-25 15:56 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/53486] ICE compiling code using lambdas as default argument
  2012-05-25 15:56 [Bug c++/53486] New: ICE compiling code using lambdas as default argument jpalecek at web dot de
@ 2012-05-25 16:22 ` redi at gcc dot gnu.org
  2012-05-25 17:59 ` jpalecek at web dot de
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2012-05-25 16:22 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2012-05-25
     Ever Confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-05-25 16:17:53 UTC ---
No attached file, no testcase, no version, no 'gcc -v' output. Please see the
bug reporting instructions.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/53486] ICE compiling code using lambdas as default argument
  2012-05-25 15:56 [Bug c++/53486] New: ICE compiling code using lambdas as default argument jpalecek at web dot de
  2012-05-25 16:22 ` [Bug c++/53486] " redi at gcc dot gnu.org
@ 2012-05-25 17:59 ` jpalecek at web dot de
  2012-05-25 18:13 ` jpalecek at web dot de
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jpalecek at web dot de @ 2012-05-25 17:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jiří Paleček <jpalecek at web dot de> 2012-05-25 17:55:39 UTC ---
Sorry for the missing test file, it was somehow lost in the bug submission
process. The compiler version is

jirka@debian:~/benchmark$
LD_LIBRARY_PATH=/usr/lib/gcc-snapshot/lib:$LD_LIBRARY_PATH
PATH=/usr/lib/gcc-snapshot/bin:$PATH g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc-snapshot/libexec/gcc/i486-linux-gnu/4.8.0/lto-wrapper
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 20120501-1'
--with-bugurl=file:///usr/share/doc/gcc-snapshot/README.Bugs
--enable-languages=c,ada,c++,java,go,fortran,objc,obj-c++
--prefix=/usr/lib/gcc-snapshot --enable-shared --enable-linker-build-id
--with-system-zlib --disable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object
--enable-plugin --disable-browser-plugin --enable-java-awt=gtk
--enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-snap/jre
--enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-snap
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-snap
--with-arch-directory=i386 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-targets=all --with-arch-32=i586 --with-tune=generic
--disable-werror --enable-checking=yes --build=i486-linux-gnu
--host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.8.0 20120501 (experimental) [trunk revision 187013] (Debian
20120501-1)


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/53486] ICE compiling code using lambdas as default argument
  2012-05-25 15:56 [Bug c++/53486] New: ICE compiling code using lambdas as default argument jpalecek at web dot de
  2012-05-25 16:22 ` [Bug c++/53486] " redi at gcc dot gnu.org
  2012-05-25 17:59 ` jpalecek at web dot de
@ 2012-05-25 18:13 ` jpalecek at web dot de
  2012-05-25 18:16 ` redi at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jpalecek at web dot de @ 2012-05-25 18:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jiří Paleček <jpalecek at web dot de> 2012-05-25 17:58:50 UTC ---
Created attachment 27499
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27499
Compressed source file

Sorry again, the file was too big.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/53486] ICE compiling code using lambdas as default argument
  2012-05-25 15:56 [Bug c++/53486] New: ICE compiling code using lambdas as default argument jpalecek at web dot de
                   ` (2 preceding siblings ...)
  2012-05-25 18:13 ` jpalecek at web dot de
@ 2012-05-25 18:16 ` redi at gcc dot gnu.org
  2012-05-25 18:32 ` jpalecek at web dot de
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2012-05-25 18:16 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |UNCONFIRMED
     Ever Confirmed|1                           |0

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-05-25 18:13:29 UTC ---
Thanks. 

If the file's too big to upload maybe it's a hint you should try to reduce it
to something more manageable, as requested in the bug reporting instructions:
http://gcc.gnu.org/bugs/minimize.html


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/53486] ICE compiling code using lambdas as default argument
  2012-05-25 15:56 [Bug c++/53486] New: ICE compiling code using lambdas as default argument jpalecek at web dot de
                   ` (3 preceding siblings ...)
  2012-05-25 18:16 ` redi at gcc dot gnu.org
@ 2012-05-25 18:32 ` jpalecek at web dot de
  2012-05-26 21:00 ` jpalecek at web dot de
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jpalecek at web dot de @ 2012-05-25 18:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jiří Paleček <jpalecek at web dot de> 2012-05-25 18:29:19 UTC ---
If I got a minimal testcase, but a slightly different error message, what
should I do?


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/53486] ICE compiling code using lambdas as default argument
  2012-05-25 15:56 [Bug c++/53486] New: ICE compiling code using lambdas as default argument jpalecek at web dot de
                   ` (4 preceding siblings ...)
  2012-05-25 18:32 ` jpalecek at web dot de
@ 2012-05-26 21:00 ` jpalecek at web dot de
  2012-05-29 10:34 ` rguenth at gcc dot gnu.org
  2013-02-15 12:05 ` paolo.carlini at oracle dot com
  7 siblings, 0 replies; 9+ messages in thread
From: jpalecek at web dot de @ 2012-05-26 21:00 UTC (permalink / raw)
  To: gcc-bugs

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

Jiří Paleček <jpalecek at web dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #27499|0                           |1
        is obsolete|                            |

--- Comment #6 from Jiří Paleček <jpalecek at web dot de> 2012-05-26 20:32:07 UTC ---
Created attachment 27505
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27505
Minimal testcase reproducing the error


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/53486] ICE compiling code using lambdas as default argument
  2012-05-25 15:56 [Bug c++/53486] New: ICE compiling code using lambdas as default argument jpalecek at web dot de
                   ` (5 preceding siblings ...)
  2012-05-26 21:00 ` jpalecek at web dot de
@ 2012-05-29 10:34 ` rguenth at gcc dot gnu.org
  2013-02-15 12:05 ` paolo.carlini at oracle dot com
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-29 10:34 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|2012-05-25 00:00:00         |2012-05-29
            Version|unknown                     |4.7.0
     Ever Confirmed|0                           |1

--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-29 10:31:24 UTC ---
Confirmed.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/53486] ICE compiling code using lambdas as default argument
  2012-05-25 15:56 [Bug c++/53486] New: ICE compiling code using lambdas as default argument jpalecek at web dot de
                   ` (6 preceding siblings ...)
  2012-05-29 10:34 ` rguenth at gcc dot gnu.org
@ 2013-02-15 12:05 ` paolo.carlini at oracle dot com
  7 siblings, 0 replies; 9+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-02-15 12:05 UTC (permalink / raw)
  To: gcc-bugs


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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #8 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-02-15 12:05:03 UTC ---
Dup. Testcase doesn't ICE anymore.

*** This bug has been marked as a duplicate of bug 55223 ***


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-02-15 12:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-25 15:56 [Bug c++/53486] New: ICE compiling code using lambdas as default argument jpalecek at web dot de
2012-05-25 16:22 ` [Bug c++/53486] " redi at gcc dot gnu.org
2012-05-25 17:59 ` jpalecek at web dot de
2012-05-25 18:13 ` jpalecek at web dot de
2012-05-25 18:16 ` redi at gcc dot gnu.org
2012-05-25 18:32 ` jpalecek at web dot de
2012-05-26 21:00 ` jpalecek at web dot de
2012-05-29 10:34 ` rguenth at gcc dot gnu.org
2013-02-15 12:05 ` paolo.carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).