]> git.ipfire.org Git - thirdparty/gcc.git/commit
c/118742 - gimple FE parsing of unary operators of C promoted args
authorRichard Biener <rguenther@suse.de>
Tue, 4 Feb 2025 09:54:48 +0000 (10:54 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 4 Feb 2025 12:06:31 +0000 (13:06 +0100)
commit4c8c9c9ee22bdb306439020a5a8fc5b4ee935f5b
tree8fb3d415651457356b5ea6aca8f23eef077027f6
parenta2e0a30c52faa022421f5d2cc55abc487c86ab01
c/118742 - gimple FE parsing of unary operators of C promoted args

The GIMPLE FE currently invokes parser_build_unary_op to build
unary GENERIC which has the operand subject to C promotion rules
which does not match GIMPLE.  The following adds a wrapper around
the build_unary_op worker which conveniently has an argument to
indicate whether to skip such promotion.

PR c/118742
gcc/c/
* gimple-parser.cc (gimple_parser_build_unary_op): New
wrapper around build_unary_op.
(c_parser_gimple_unary_expression): Use it.

gcc/testsuite/
* gcc.dg/gimplefe-56.c: New testcase.
gcc/c/gimple-parser.cc
gcc/testsuite/gcc.dg/gimplefe-56.c [new file with mode: 0644]