Skip to content
Snippets Groups Projects
Commit 4e1a2158 authored by Eric Botcazou's avatar Eric Botcazou
Browse files

Fix biased integer arithmetic

The Ada compiler uses a biased representation when a size clause reserves
fewer bits than normal either for the lower or for the upper bound.

gcc/ada/ChangeLog:
	* gcc-interface/trans.c (build_binary_op_trapv): Convert operands
	to the result type before doing generic overflow checking.

gcc/testsuite/ChangeLog:
	* gnat.dg/bias2.adb: New test.
parent ec1b8711
No related merge requests found
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