]> git.ipfire.org Git - thirdparty/gcc.git/commit
compiler: better arg type checking for selected builtins
authorThan McIntosh <thanm@google.com>
Thu, 6 Oct 2022 19:58:59 +0000 (15:58 -0400)
committerIan Lance Taylor <iant@golang.org>
Fri, 7 Oct 2022 02:15:18 +0000 (19:15 -0700)
commit8a9e92b249c9c5a5371588b1e939a90a677b4fd3
treed9e43103bc474b751177b57e4a422b19a27c7bb5
parent629d04d35d819bdc26c30d215bc4ea66a74af15b
compiler: better arg type checking for selected builtins

Tighten up the argument type checking for Builtin_call_expression to
catch erroneous cases such as

   panic(panic("bad")))

where an argument void type is being passed to panic/alignof/sizeof.

Fixes golang/go#56071.

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