Skip to content
Snippets Groups Projects
Commit 459bcfb0 authored by Jakub Jelinek's avatar Jakub Jelinek Committed by Jakub Jelinek
Browse files

re PR c++/77722 (-fsanitize=undefined doesn't give runtime error in function...

re PR c++/77722 (-fsanitize=undefined doesn't give runtime error in function without return value, unless at least 2 instructions)

	PR c++/77722
	* cp-gimplify.c (cp_ubsan_maybe_instrument_return): Instrument also
	functions that have just a STATEMENT_LIST instead of BIND_EXPR, or
	BIND_EXPR with some statement rather than STATEMENT_LIST as body.

	* g++.dg/ubsan/return-4.C: New test.
	* g++.dg/ubsan/return-5.C: New test.
	* g++.dg/ubsan/return-6.C: New test.

From-SVN: r240555
parent bbfac6da
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