Re: trapv question

Adjust testcase to so the ADD that is expected to overflow cannot
be optimized.

	gcc/testsuite
	* gcc.dg/torture/ftrapv-2.c: Make overflow instruction unremovable.
This commit is contained in:
Andrew MacLeod 2021-01-20 16:27:34 -05:00
parent 0bb27b81a7
commit 842afc4e28

View file

@ -12,7 +12,7 @@
/* Verify SImode operations properly trap. PR middle-end/68046 */
int i = 0x7fffffff;
volatile int i = 0x7fffffff;
int main(void)
{
@ -20,7 +20,7 @@ int main(void)
int status = 0;
if (child == 0)
{
volatile int x = i + 1 < i;
i = i + 1;
exit (0);
}
else if (child == -1)