]> git.ipfire.org Git - thirdparty/gcc.git/commit
Another ICE after conflicting types of redeclaration [PR109619]
authorAndrew Pinski <quic_apinski@quicinc.com>
Thu, 21 Mar 2024 23:29:20 +0000 (16:29 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Fri, 22 Mar 2024 09:19:43 +0000 (02:19 -0700)
commitdbe9062ce070c861cd3fa6435187618413b1b3d1
tree828daab7499d1f4a109cbc24cc09f5f339669d50
parent644a7033cc09b79a5cfefe1fe9b307d835009b17
Another ICE after conflicting types of redeclaration [PR109619]

This another one of these ICE after error issues with the
gimplifier and a fallout from r12-3278-g823685221de986af.
This case happens when we are trying to fold memcpy/memmove.
There is already code to try to catch ERROR_MARKs as arguments
to the builtins so just need to change them to use error_operand_p
which checks the type of the expression to see if it was an error mark
also.

Bootstrapped and tested on x86_64-linux-gnu with no regressions.

gcc/ChangeLog:

PR c/109619
* builtins.cc (fold_builtin_1): Use error_operand_p
instead of checking against ERROR_MARK.
(fold_builtin_2): Likewise.
(fold_builtin_3): Likewise.

gcc/testsuite/ChangeLog:

PR c/109619
* gcc.dg/redecl-26.c: New test.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/builtins.cc
gcc/testsuite/gcc.dg/redecl-26.c [new file with mode: 0644]