<p dir="auto">by <strong>naomi.bancroft</strong>:</p>
<pre class="notranslate">1. What is a short input program that triggers the error?
package main

func main() {
    var max uint64 = 0
    num := 1 &lt;&lt; max
    num += 1
}

2. What is the full compiler output?
bugreport.go:5: internal compiler error: agen OREGISTER

Please file a bug report including a short program that triggers the error.
<a href="http://code.google.com/p/go/issues/entry?template=compilerbug" rel="nofollow">http://code.google.com/p/go/issues/entry?template=compilerbug</a>

3. What version of the compiler are you using?  (Run it with the -V flag.)
8g version release.r58.1 8739</pre>
<p dir="auto">by <strong><a href="mailto:marius@vastech.co.za">marius@vastech.co.za</a></strong>:</p>
<pre class="notranslate">What steps will reproduce the problem?

Forward slashes cannot be escaped in a pattern. The following snippet does not compile:

re, err := regexp.Compile("\/out\/sctp\/5.*")

gives compiler error:

tstRegex.go:9: unknown escape sequence: /
(9 is the line in the actual test file)

The following program incorrectly matches the pattern to the test string:

package main

import(
    "fmt"
    "regexp"
)

func main() {
    if re, err := regexp.Compile("/out/sctp/5.*"); err == nil {
        fmt.Println(re.MatchString("/out/sctp/1420/0.753085.dat"))
    }
}

When the pattern was replaced with:

re, err := regexp.Compile(".out.sctp.5.*")

It correctly matched all test strings. But this does not allow us to require a
"/" in the pattern.


What is your $GOOS?  $GOARCH?

GOARCH=amd64
GOOS=darwin


Which revision are you using?  (hg identify)

00a1813e5bc5 tip

Please provide any additional information below.</pre>