FAQ
Reviewers: ken2,

Message:
Hello ken2 (cc: golang-dev@googlegroups.com),

I'd like you to review this change to
https://code.google.com/p/go/


Description:
cmd/gc: fix 'internal error: typename ideal bool'

Fixes issue 6298.

Please review this at https://codereview.appspot.com/13624043/

Affected files (+17, -0 lines):
    M src/cmd/gc/walk.c
    A test/fixedbugs/issue6298.go


Index: src/cmd/gc/walk.c
===================================================================
--- a/src/cmd/gc/walk.c
+++ b/src/cmd/gc/walk.c
@@ -1386,7 +1386,9 @@
    // constants until walk. For example, if n is y%1 == 0, the
    // walk of y%1 may have replaced it by 0.
    // Check whether n with its updated args is itself now a constant.
+ t = n->type;
    evconst(n);
+ n->type = t;
    if(n->op == OLITERAL)
     typecheck(&n, Erv);

Index: test/fixedbugs/issue6298.go
===================================================================
new file mode 100644
--- /dev/null
+++ b/test/fixedbugs/issue6298.go
@@ -0,0 +1,15 @@
+// compile
+
+// golang.org/issue/6298.
+// Used to cause "internal error: typename ideal bool"
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+func main() {
+ var x interface{} = "abc"[0] == 'a'
+ _ = x
+}


--

---
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Rsc at Sep 9, 2013 at 4:00 pm
    *** Submitted as
    https://code.google.com/p/go/source/detail?r=ee14a38d17aa ***

    cmd/gc: fix 'internal error: typename ideal bool'

    Fixes issue 6298.

    R=ken2
    CC=golang-dev
    https://codereview.appspot.com/13624043


    https://codereview.appspot.com/13624043/

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedSep 9, '13 at 4:00p
activeSep 9, '13 at 4:00p
posts2
users1
websitegolang.org

1 user in discussion

Rsc: 2 posts

People

Translate

site design / logo © 2022 Grokbase