OSDN Git Service

compiler: fix infinite recursion in string constant evaluation.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 16 Apr 2012 23:06:08 +0000 (23:06 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 16 Apr 2012 23:06:08 +0000 (23:06 +0000)
commitc48577a9ea5770bdf16f8686ccdb8de246a26eaa
treeba2118a4afe4410c7d356708fcf40c85be232cf0
parentd0897d0baa460b5738a0ae7035a0ac755b7ec7d5
compiler: fix infinite recursion in string constant evaluation.

Fixes compilation of incorrect code:
    const f, g = g, f
    func S() []byte { return []byte(f) }

The problem was already handled for numerical constants.

Part of issue 3186 (go).

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@186512 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/go/gofrontend/expressions.cc