Skip to content

agen PLUS #1710

@gopherbot

Description

@gopherbot

by Confunctionist:

1. What is a short input program that triggers the error?

package main

import "fmt"

const ( CR  = byte(13)
        LF  = byte(10)
        SPACE   = " "
)

func main() {

    fun := make([]byte,100)
    pos := 0
    for i := 0; i<10; i++{
        fun[pos] = byte(pos)
        pos++
    }
    fun[pos] = CR
    pos++
    fun[pos] = LF
    pos++

    str := ""
    for _, v := range fun {
        if v == CR {
            fmt.Printf(str)
        } else if v == LF {
            str = ""
        } else {
            str =+ string(v)
        }
    }

}


2. What is the full compiler output?

BUG.go line 30: internal compiler error: agen PLUS

3. What version of the compiler are you using?  (Run it with the -V flag.) 2011.03.7.1
7666

Attachments:

  1. BUG.go (413 bytes)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions