Blame SOURCES/gcc8-rh1760208-3.patch

8de16c
commit ff12f8b9ae10bf7270ec7ead28a479f6105058eb
8de16c
Author: Segher Boessenkool <segher@kernel.crashing.org>
8de16c
Date:   Fri Aug 30 16:17:20 2019 +0200
8de16c
8de16c
    backport: re PR target/91481 (POWER9 "DARN" RNG intrinsic produces repeated output (CVE-2019-15847))
8de16c
    
8de16c
            Backport from trunk
8de16c
            2019-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
8de16c
    
8de16c
    gcc/testsuite/
8de16c
            PR target/91481
8de16c
            * gcc.target/powerpc/darn-3.c: New testcase.
8de16c
    
8de16c
    From-SVN: r275182
8de16c
8de16c
--- /dev/null
8de16c
+++ gcc/testsuite/gcc.target/powerpc/darn-3.c
8de16c
@@ -0,0 +1,16 @@
8de16c
+/* { dg-do compile { target { powerpc*-*-* } } } */
8de16c
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
8de16c
+/* { dg-options "-O2 -mdejagnu-cpu=power9" } */
8de16c
+
8de16c
+static int darn32(void) { return __builtin_darn_32(); }
8de16c
+
8de16c
+int four(void)
8de16c
+{
8de16c
+	int sum = 0;
8de16c
+	int i;
8de16c
+	for (i = 0; i < 4; i++)
8de16c
+		sum += darn32();
8de16c
+	return sum;
8de16c
+}
8de16c
+
8de16c
+/* { dg-final { scan-assembler-times {(?n)\mdarn .*,0\M} 4 } } */