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 type_size #11554

Closed
dvyukov opened this issue Jul 3, 2015 · 2 comments
Closed

gccgo: internal compiler error in type_size #11554

dvyukov opened this issue Jul 3, 2015 · 2 comments
Milestone

Comments

@dvyukov
Copy link
Member

dvyukov commented Jul 3, 2015

gccgo crashes on the following program:

package a
type e[5][1e10][1e10]*e
go1: internal compiler error: in type_size, at go/go-gcc.cc:1103
0x6074fb Gcc_backend::type_size(Btype*)
    ../../gcc/go/go-gcc.cc:1103
0x674108 Type::backend_type_size(Gogo*, long*)
    ../../gcc/go/gofrontend/types.cc:2526
0x6199f4 Gogo::zero_value(Type*)
    ../../gcc/go/gofrontend/gogo.cc:662
0x677b2e Type::type_descriptor_constructor(Gogo*, int, Named_type*, Methods const*, bool)
    ../../gcc/go/gofrontend/types.cc:2053
0x6796c3 Array_type::array_type_descriptor(Gogo*, Named_type*)
    ../../gcc/go/gofrontend/types.cc:6297
0x67117d Type::make_type_descriptor_var(Gogo*)
    ../../gcc/go/gofrontend/types.cc:1218
0x6714f6 Type::type_descriptor_pointer(Gogo*, Location)
    ../../gcc/go/gofrontend/types.cc:1156
0x6207ad 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:7110
0x626912 Gogo::write_globals()
    ../../gcc/go/gofrontend/gogo.cc:1345

gcc version 6.0.0 2015070 (experimental) (GCC)

@dvyukov
Copy link
Member Author

dvyukov commented Jul 3, 2015

@paranoiacblack

@gopherbot
Copy link
Contributor

CL https://golang.org/cl/13684 mentions this issue.

mydongistiny pushed a commit to mydongistiny/GCC_SaberMod that referenced this issue Sep 11, 2015
    
    The gcc backend throws an internal error when trying to get the size
    of a type which is larger than the amount of address space on the
    machine.  This patch catches this error and reports it in a user
    friendly way.
    
    Fixes golang/go#11554.
    
    Reviewed-on: https://go-review.googlesource.com/13684

	* go-gcc.cc (Gcc_backend::type_size): Return -1 for
	unrepresentable size.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227656 138bc75d-0d04-0410-961f-82ee72b054a4
@golang golang locked and limited conversation to collaborators Sep 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants