Skip to content
Snippets Groups Projects
Commit 2f68e8bc authored by Marek Polacek's avatar Marek Polacek Committed by Marek Polacek
Browse files

fold-const.c (fold_binary_loc): Don't fold if the result is undefined.

	* fold-const.c (fold_binary_loc): Don't fold if the result
	is undefined.
	* match.pd (A + (-B) -> A - B, A - (-B) -> A + B,
	-(-A) -> A): Likewise.

	* c-c++-common/ubsan/overflow-sub-4.c: New test.
	* c-c++-common/ubsan/overflow-sub-2.c: Adjust dg-output.
	* c-c++-common/ubsan/overflow-int128.c: Likewise.

From-SVN: r217427
parent b8c03a9b
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