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++/57246] New: ICE on lambda in template function


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

            Bug ID: 57246
           Summary: ICE on lambda in template function
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dirkmoermans at gmail dot com

Created attachment 30096
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30096&action=edit
bz2 of preprocessed file

The compiler ICEs when trying to compile the attached program. The code is a
rather complex mixtures of templates and lambdas. I was not succesful in
reducing the testcase, so the preprocessed file is attached. I think the
program is valid C++11, but I am not completely sure.

The compile commandline + output:

$ :~/projects/cheapshot$ g++-4.8.0  -g -O3  -I. -std=c++11 -march=native
-mtune=native -Wall  -c -o test/unittest_other.o test/forced_mate.cc -v
-save-temps
Using built-in specs.
COLLECT_GCC=g++-4.8.0
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/home/dirk/local --program-suffix=-4.8.0
--enable-languages=c,c++
Thread model: posix
gcc version 4.8.0 (GCC) 
COLLECT_GCC_OPTIONS='-g' '-O3' '-I' '.' '-std=c++11' '-march=native'
'-mtune=native' '-Wall' '-c' '-o' 'test/unittest_other.o' '-v' '-save-temps'
'-shared-libgcc'
 /home/dirk/local/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/cc1plus -E -quiet
-v -I . -imultilib . -imultiarch x86_64-linux-gnu -D_GNU_SOURCE
test/forced_mate.cc -march=core2 -mcx16 -msahf -mno-movbe -mno-aes -mno-pclmul
-mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2
-mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mno-lzcnt -mno-rtm
-mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx
-mfxsr -mno-xsave -mno-xsaveopt --param l1-cache-size=32 --param
l1-cache-line-size=64 --param l2-cache-size=1024 -mtune=core2 -std=c++11 -Wall
-g -fworking-directory -O3 -fpch-preprocess -o forced_mate.ii
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/home/dirk/local/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 .

/home/dirk/local/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0

/home/dirk/local/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/x86_64-unknown-linux-gnu/.

/home/dirk/local/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/backward
 /home/dirk/local/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include
 /usr/local/include
 /home/dirk/local/include
 /home/dirk/local/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-g' '-O3' '-I' '.' '-std=c++11' '-march=native'
'-mtune=native' '-Wall' '-c' '-o' 'test/unittest_other.o' '-v' '-save-temps'
'-shared-libgcc'
 /home/dirk/local/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/cc1plus
-fpreprocessed forced_mate.ii -march=core2 -mcx16 -msahf -mno-movbe -mno-aes
-mno-pclmul -mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi
-mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mno-lzcnt
-mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw
-mno-adx -mfxsr -mno-xsave -mno-xsaveopt --param l1-cache-size=32 --param
l1-cache-line-size=64 --param l2-cache-size=1024 -mtune=core2 -quiet -dumpbase
forced_mate.cc -auxbase-strip test/unittest_other.o -g -O3 -Wall -std=c++11
-version -o forced_mate.s
GNU C++ (GCC) version 4.8.0 (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.8.0, GMP version 5.0.5, MPFR version 3.1.1-p2,
MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++ (GCC) version 4.8.0 (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.8.0, GMP version 5.0.5, MPFR version 3.1.1-p2,
MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 9fb9b2dcf9f2fd61806836ab0ba292f9
In file included from test/forced_mate.cc:7:0:
./cheapshot/loop.hh: In instantiation of
âcheapshot::analyze_position(Controller&, const cheapshot::context&) [with
cheapshot::side S = (cheapshot::side)0u; Controller =
cheapshot::max_ply_cutoff<cheapshot::control::alphabeta,
cheapshot::control::noop_hash, cheapshot::control::noop_material,
cheapshot::control::noop_cache>]::__lambda6â:
./cheapshot/loop.hh:469:23:   required from âstruct
cheapshot::analyze_position(Controller&, const cheapshot::context&) [with
cheapshot::side S = (cheapshot::side)0u; Controller =
cheapshot::max_ply_cutoff<cheapshot::control::alphabeta,
cheapshot::control::noop_hash, cheapshot::control::noop_material,
cheapshot::control::noop_cache>]::__lambda6â
./cheapshot/loop.hh:479:14:   required from âvoid
cheapshot::analyze_position(Controller&, const cheapshot::context&) [with
cheapshot::side S = (cheapshot::side)0u; Controller =
cheapshot::max_ply_cutoff<cheapshot::control::alphabeta,
cheapshot::control::noop_hash, cheapshot::control::noop_material,
cheapshot::control::noop_cache>]â
./cheapshot/loop.hh:575:49:   required from âint
cheapshot::score_position(Controller&, const cheapshot::context&) [with
Controller = cheapshot::max_ply_cutoff<cheapshot::control::alphabeta,
cheapshot::control::noop_hash, cheapshot::control::noop_material,
cheapshot::control::noop_cache>]â
test/forced_mate.cc:33:49:   required from here
./cheapshot/loop.hh:474:28: internal compiler error: Segmentation fault
                scoped_hash scoped_ep_info(ec,hhash_ep_change0,ctx.ep_info);
                            ^
0x88929f crash_signal
    ../.././gcc/toplev.c:332
0x4dc2e4 build_new_op_1
    ../.././gcc/cp/call.c:5085
0x4dcd87 build_new_op(unsigned int, tree_code, int, tree_node*, tree_node*,
tree_node*, tree_node**, int)
    ../.././gcc/cp/call.c:5444
0x569a31 build_x_indirect_ref(unsigned int, tree_node*, ref_operator, int)
    ../.././gcc/cp/typeck.c:2816
0x58fa1a finish_non_static_data_member(tree_node*, tree_node*, tree_node*)
    ../.././gcc/cp/semantics.c:1547
0x58fdb4 finish_qualified_id_expr(tree_node*, tree_node*, bool, bool, bool,
bool)
    ../.././gcc/cp/semantics.c:1777
0x515657 tsubst_qualified_id
    ../.././gcc/cp/pt.c:12017
0x4ff8f6 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
    ../.././gcc/cp/pt.c:13647
0x50375b tsubst_expr
    ../.././gcc/cp/pt.c:13337
0x5077d2 tsubst(tree_node*, tree_node*, int, tree_node*)
    ../.././gcc/cp/pt.c:11761
0x507924 tsubst(tree_node*, tree_node*, int, tree_node*)
    ../.././gcc/cp/pt.c:11650
0x506a66 tsubst_decl
    ../.././gcc/cp/pt.c:10625
0x5080a7 tsubst(tree_node*, tree_node*, int, tree_node*)
    ../.././gcc/cp/pt.c:11081
0x5031ca tsubst_expr
    ../.././gcc/cp/pt.c:12853
0x502fbc tsubst_expr
    ../.././gcc/cp/pt.c:12802
0x503260 tsubst_expr
    ../.././gcc/cp/pt.c:12992
0x502fbc tsubst_expr
    ../.././gcc/cp/pt.c:12802
0x503260 tsubst_expr
    ../.././gcc/cp/pt.c:12992
0x502713 instantiate_decl(tree_node*, int, bool)
    ../.././gcc/cp/pt.c:18854
0x515c64 instantiate_class_template_1
    ../.././gcc/cp/pt.c:9000
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

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