Bug 61205 - gccgo: ICE in fold_binary_loc [GoSmith]
Summary: gccgo: ICE in fold_binary_loc [GoSmith]
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: go (show other bugs)
Version: 5.0
: P3 normal
Target Milestone: ---
Assignee: Ian Lance Taylor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-16 20:18 UTC by Dmitry Vyukov
Modified: 2014-12-12 19:22 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Vyukov 2014-05-16 20:18:27 UTC
$ 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
Comment 1 Chris Manghane 2014-12-12 19:22:16 UTC
Unable to reproduce on tip.