You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package main
type a [10]int
type b [10.0]int
//type c [float64(10)]int
type d [complex(10, 0)]int
//type e [complex128(complex(10, 0))]int
func main(){}
gccgo crashes with an internal error for both of the invalid declarations of c and e:
package main
type a [10]int
type b [10.0]int
var c [float64(10)]int
type d [complex(10, 0)]int
var e [complex128(complex(10, 0))]int
func main(){ println(c[0]) }
(var instead of type declarations for c, e), the compiler accepts it without complaints even though the variable c is used.
The text was updated successfully, but these errors were encountered:
Tweak the array type checking code to avoid crashing on array types
whose length expressions are explicit non-integer types (for example,
"float64(10)"). If such constructs are seen, issue an "invalid array
bound" error.
Fixesgolang/go#13486.
Reviewed-on: https://go-review.googlesource.com/91975
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@259900 138bc75d-0d04-0410-961f-82ee72b054a4
Tweak the array type checking code to avoid crashing on array types
whose length expressions are explicit non-integer types (for example,
"float64(10)"). If such constructs are seen, issue an "invalid array
bound" error.
Fixesgolang/go#13486.
Reviewed-on: https://go-review.googlesource.com/91975
From-SVN: r259900
gccgo crashes with an internal error for both of the invalid declarations of c and e:
For a discussion see also #13485.
Furthermore, for this program:
(var instead of type declarations for c, e), the compiler accepts it without complaints even though the variable c is used.
The text was updated successfully, but these errors were encountered: