Commit ccd88fb7 by Jakub Jelinek Committed by Jakub Jelinek

re PR target/70941 (Test miscompiled with -O2.)

	PR middle-end/70941
	* gcc.dg/torture/pr70941.c (abort): Remove prototype.
	(a, b, c, d): Change type from char to signed char.
	(main): Compare against (signed char) -1634678893 instead of
	hardcoded -109.  Use __builtin_abort instead of abort.

From-SVN: r235978
parent 58d4c836
2016-05-06 Jakub Jelinek <jakub@redhat.com>
PR middle-end/70941
* gcc.dg/torture/pr70941.c (abort): Remove prototype.
(a, b, c, d): Change type from char to signed char.
(main): Compare against (signed char) -1634678893 instead of
hardcoded -109. Use __builtin_abort instead of abort.
* gcc.target/i386/avx512bw-vpsraw-3.c: New test.
* gcc.target/i386/avx512vl-vpsrad-3.c: New test.
......
/* { dg-do run } */
/* { dg-require-effective-target int32plus } */
extern void abort (void);
char a = 0, b = 0, c = 0, d = 0;
signed char a = 0, b = 0, c = 0, d = 0;
int main()
{
a = -(b - 405418259) - ((d && c) ^ 2040097152);
if (a != -109)
abort();
if (a != (signed char) -1634678893)
__builtin_abort ();
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment