Skip to content
Snippets Groups Projects
Commit 2454ba9e authored by Andrew Pinski's avatar Andrew Pinski
Browse files

c: Fix ICE when an argument was an error mark [PR100532]

In the case of convert_argument, we would return the same expression
back rather than error_mark_node after the error message about
trying to convert to an incomplete type. This causes issues in
the gimplfier trying to see if another conversion is needed.

The code here dates back to before the revision history too so
it might be the case it never noticed we should return an error_mark_node.

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

	PR c/100532

gcc/c/ChangeLog:

	* c-typeck.cc (convert_argument): After erroring out
	about an incomplete type return error_mark_node.

gcc/testsuite/ChangeLog:

	* gcc.dg/pr100532-1.c: New test.
parent 9f33e4c5
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment