Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gccgo: internal compiler error: in write_equal_function #47130

Open
ALTree opened this issue Jul 12, 2021 · 0 comments
Open

gccgo: internal compiler error: in write_equal_function #47130

ALTree opened this issue Jul 12, 2021 · 0 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@ALTree
Copy link
Member

ALTree commented Jul 12, 2021

$ gccgo --version
gccgo (GCC) 11.0.1 20210317 (experimental)
package main

const B = false

func main() {
	if B {
		var m map[int]struct {
			f float64
		}
		_ = func() float64 {
			return m[0].f
		}
	}
}
$ gccgo crash.go
go1: internal compiler error: in write_equal_function, at go/gofrontend/types.cc:2303
  0x16ad6e9 internal_error(char const*, ...)
  0x6e4be6 fancy_abort(char const*, int, char const*)
  0x7c3f6a Type::write_equal_function(Gogo*, Named_type*, long, Backend_name const*, Function_type*)
  0x7c4262 Type::build_equal_function(Gogo*, Named_type*, long, Function_type*)
  0x7cc337 Type::equal_function(Gogo*, Named_type*, Function_type*)
  0x7cf87c Type::type_descriptor_constructor(Gogo*, int, Named_type*, Methods const*, bool)
  0x7d07bc Struct_type::do_type_descriptor(Gogo*, Named_type*)
  0x7c7c7f Type::make_type_descriptor_var(Gogo*)
  0x7c838f Type::type_descriptor_pointer(Gogo*, Location)
...

Also crashes gccgo 10.2.

cc @ianlancetaylor @thanm

@ALTree ALTree added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jul 12, 2021
@ALTree ALTree added this to the Gccgo milestone Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

1 participant