https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61205

            Bug ID: 61205
           Summary: gccgo: ICE in fold_binary_loc
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: go
          Assignee: ian at airs dot com
          Reporter: dvyukov at google dot com

$ gccgo -v
Using built-in specs.
COLLECT_GCC=gccgo
COLLECT_LTO_WRAPPER=libexec/gcc/x86_64-unknown-linux-gnu/4.10.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --enable-languages=c,c++,go --disable-bootstrap
--enable-checking=yes --disable-multilib --prefix=gcc_trunk/install
Thread model: posix
gcc version 4.10.0 20140516 (experimental) (GCC) 

The program is:

package main
func main() {
    (<-(<-make(chan chan func([1]string, float64) (chan string,
[0]bool))))([1]string{string("foo")}, 1.1)
    _ = <-(([][]chan uintptr{})[(((([][]int{})[1])[(<-(<-(<-((([][][]chan chan
chan int{})[1])[1])[(<-([]chan int{})[1])])))]) + (<-make(chan int)))])[1]
}

$ go build -compiler=gccgo src.go
# command-line-arguments
go1: internal compiler error: in fold_binary_loc, at fold-const.c:10024
0x7a89fe fold_binary_loc(unsigned int, tree_code, tree_node*, tree_node*,
tree_node*)
    ../../gcc/fold-const.c:10021
0x7c609a fold_build2_stat_loc(unsigned int, tree_code, tree_node*, tree_node*,
tree_node*)
    ../../gcc/fold-const.c:14998
0x5c5d0e Gcc_backend::compound_expression(Bstatement*, Bexpression*, Location)
    ../../gcc/go/go-gcc.cc:1439
0x5a7677 Call_expression::set_results(Translate_context*, Bexpression*)
    ../../gcc/go/gofrontend/expressions.cc:9540
0x5bb964 Call_expression::do_get_backend(Translate_context*)
    ../../gcc/go/gofrontend/expressions.cc:9498
0x60718c Expression_statement::do_get_backend(Translate_context*)
    ../../gcc/go/gofrontend/statements.cc:1749
0x5db097 Block::get_backend(Translate_context*)
    ../../gcc/go/gofrontend/gogo.cc:5454
0x5dc925 Function::build(Gogo*, Named_object*)
    ../../gcc/go/gofrontend/gogo.cc:5062
0x5ddc57 Named_object::get_backend(Gogo*, std::vector<Bexpression*,
std::allocator<Bexpression*> >&, std::vector<Btype*, std::allocator<Btype*> >&,
std::vector<Bfunction*, std::allocator<Bfunction*> >&)
    ../../gcc/go/gofrontend/gogo.cc:6753
0x5e2b5c Gogo::write_globals()
    ../../gcc/go/gofrontend/gogo.cc:1136

Reply via email to