]> git.ipfire.org Git - thirdparty/gcc.git/commit
compiler: treat S("") as a string constant
authorIan Lance Taylor <iant@golang.org>
Sun, 9 Oct 2022 19:52:17 +0000 (12:52 -0700)
committerIan Lance Taylor <iant@golang.org>
Mon, 10 Oct 2022 21:45:57 +0000 (14:45 -0700)
commit29b0fe393859729215b0db5d28f2faea30c6ec32
tree8cc81ccaddcbfced1d66d5e886eef9c443a95c59
parent0f6efd34c21ab6452aa846fd7e59acbccf15fbef
compiler: treat S("") as a string constant

The compiler neglected to notice that a conversion from a string
constant to a string type was a valid string constant.

No test case because this only caused a compiler failure when compiling
without optimization, which is not the normal case, and is not a case
that we test.

Fixes golang/go#56113

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/441555
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc