Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gcc-patches:master commit in: 7.4.0/gentoo/
Date: Mon, 10 Dec 2018 22:48:43
Message-Id: 1544482082.ef2a97ee34b85bfb7865ce9d78d28b4a31294706.slyfox@gentoo
1 commit: ef2a97ee34b85bfb7865ce9d78d28b4a31294706
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Mon Dec 10 22:48:02 2018 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 10 22:48:02 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=ef2a97ee
7
8 7.4.0: fix gcc SIGSEGV on k&r style declarations, bug #672032
9
10 Fix gcc SIGSEGV on net-analyzer/netcat-110 (IPA analysis
11 assumed pointer argument where it was not).
12
13 Reported-by: ernsteiswuerfel
14 https://bugs.gentoo.org/672032
15 https://gcc.gnu.org/PR88214
16 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
17
18 7.4.0/gentoo/21_all_kr-decl-PR88214.patch | 46 +++++++++++++++++++++++++++++++
19 7.4.0/gentoo/README.history | 1 +
20 2 files changed, 47 insertions(+)
21
22 diff --git a/7.4.0/gentoo/21_all_kr-decl-PR88214.patch b/7.4.0/gentoo/21_all_kr-decl-PR88214.patch
23 new file mode 100644
24 index 0000000..182ff07
25 --- /dev/null
26 +++ b/7.4.0/gentoo/21_all_kr-decl-PR88214.patch
27 @@ -0,0 +1,46 @@
28 +https://bugs.gentoo.org/672032
29 +https://gcc.gnu.org/PR88214
30 +
31 +From a2fd08219c82eba4d1d15f260db98c2e154268f2 Mon Sep 17 00:00:00 2001
32 +From: jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>
33 +Date: Mon, 10 Dec 2018 12:45:47 +0000
34 +Subject: [PATCH] [PR 88214] Check that an argument is a pointer
35 +
36 +2018-12-10 Martin Jambor <mjambor@××××.cz>
37 +
38 + PR ipa/88214
39 + * ipa-prop.c (determine_locally_known_aggregate_parts): Make sure
40 + we check pointers against pointers.
41 +
42 + testsuite/
43 + * gcc.dg/ipa/pr88214.c: New test.
44 +
45 +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266953 138bc75d-0d04-0410-961f-82ee72b054a4
46 +--- a/gcc/ipa-prop.c
47 ++++ b/gcc/ipa-prop.c
48 +@@ -1569,7 +1569,8 @@ determine_locally_known_aggregate_parts (gcall *call, tree arg,
49 + if (TREE_CODE (arg) == SSA_NAME)
50 + {
51 + tree type_size;
52 +- if (!tree_fits_uhwi_p (TYPE_SIZE (TREE_TYPE (arg_type))))
53 ++ if (!tree_fits_uhwi_p (TYPE_SIZE (TREE_TYPE (arg_type)))
54 ++ || !POINTER_TYPE_P (TREE_TYPE (arg)))
55 + return;
56 + check_ref = true;
57 + arg_base = arg;
58 +--- /dev/null
59 ++++ b/gcc/testsuite/gcc.dg/ipa/pr88214.c
60 +@@ -0,0 +1,10 @@
61 ++/* { dg-do compile } */
62 ++/* { dg-options "-O2" } */
63 ++
64 ++void i();
65 ++ short a;
66 ++ void b(e) char * e;
67 ++ {
68 ++ i();
69 ++ b(a);
70 ++ }
71 +--
72 +2.19.2
73 +
74
75 diff --git a/7.4.0/gentoo/README.history b/7.4.0/gentoo/README.history
76 index b1796a4..e51f83e 100644
77 --- a/7.4.0/gentoo/README.history
78 +++ b/7.4.0/gentoo/README.history
79 @@ -1,5 +1,6 @@
80 1.1 TODO
81 U 01_all_default-fortify-source.patch
82 + + 21_all_kr-decl-PR88214.patch
83
84 1.0 [not released, a copy of 7.3.0]
85 + 01_all_default-fortify-source.patch