summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-8.3/CVE-2019-15847_p3.patch
blob: cd525de622a85d5bdd106c9bd283699d51b27cb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From 5f8cd14f8966f11e8ed10a4c7e35dc01fffe54d8 Mon Sep 17 00:00:00 2001
From: segher <segher@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri, 30 Aug 2019 14:17:20 +0000
Subject: [PATCH 3/3] 	Backport from trunk 	2019-08-23  Segher Boessenkool
  <segher@kernel.crashing.org>

gcc/testsuite/
	PR target/91481
	* gcc.target/powerpc/darn-3.c: New testcase.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@275182 138bc75d-0d04-0410-961f-82ee72b054a4

Upstream-Status: Backport
CVE: CVE-2019-14847 p3
Affects <= 9.2.0
Dropped Change log changes
Signed-off-by: Armin Kuster <akuster@mvista.com>

---
 gcc/testsuite/gcc.target/powerpc/darn-3.c | 16 ++++++++++++++++
 2 files changed, 25 insertions(+)
 create mode 100644 gcc/testsuite/gcc.target/powerpc/darn-3.c

Index: gcc-8.3.0/gcc/testsuite/gcc.target/powerpc/darn-3.c
===================================================================
--- /dev/null
+++ gcc-8.3.0/gcc/testsuite/gcc.target/powerpc/darn-3.c
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-O2 -mdejagnu-cpu=power9" } */
+
+static int darn32(void) { return __builtin_darn_32(); }
+
+int four(void)
+{
+	int sum = 0;
+	int i;
+	for (i = 0; i < 4; i++)
+		sum += darn32();
+	return sum;
+}
+
+/* { dg-final { scan-assembler-times {(?n)\mdarn .*,0\M} 4 } } */