/usr/src/gcc-4.7/debian/patches/pr59695.diff is in gcc-4.7-source 4.7.3-12ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | # DP: Fix PR target/59588 (AArch64), backport proposed patch.
gcc/
2014-01-11 Matthew Gretton-Dann <matthew.gretton-dann@linaro.org>
Kugan Vivekanandarajah <kuganv@linaro.org>
PR target/59588
* config/aarch64/aarch64.c (aarch64_build_constant): Fix incorrect
truncation.
gcc/testsuite/
2014-01-11 Matthew Gretton-Dann <matthew.gretton-dann@linaro.org>
Kugan Vivekanandarajah <kuganv@linaro.org>
PR target/59695
* g++.dg/pr59695.C: New file.
--- a/src/gcc/config/aarch64/aarch64.c
+++ b/src/gcc/config/aarch64/aarch64.c
@@ -2486,7 +2486,7 @@ aarch64_build_constant (int regnum, HOST_WIDE_INT val)
if (ncount < zcount)
{
emit_move_insn (gen_rtx_REG (Pmode, regnum),
- GEN_INT ((~val) & 0xffff));
+ GEN_INT (~((~val) & 0xffff)));
tval = 0xffff;
}
else
--- a/src/gcc/testsuite/g++.dg/pr59695.C
+++ b/src/gcc/testsuite/g++.dg/pr59695.C
@@ -0,0 +1,125 @@
+
+/* PR target/53055 */
+/* { dg-do run { target aarch64*-*-* } } */
+/* { dg-options "-O0" } */
+
+#define DEFINE_VIRTUALS_FNS(i) virtual void xxx##i () {} \
+ virtual void foo1_##i () {}\
+ virtual void foo2_##i () {}\
+ virtual void foo3_##i () {}\
+ virtual void foo4_##i () {}\
+ virtual void foo5_##i () {}\
+ virtual void foo6_##i () {}\
+ virtual void foo7_##i () {}\
+ virtual void foo8_##i () {}\
+ virtual void foo9_##i () {}\
+ virtual void foo10_##i () {}\
+ virtual void foo11_##i () {}\
+ virtual void foo12_##i () {}\
+ virtual void foo13_##i () {}\
+ virtual void foo14_##i () {}\
+ virtual void foo15_##i () {}\
+ virtual void foo16_##i () {}\
+ virtual void foo17_##i () {}\
+ virtual void foo18_##i () {}\
+ virtual void foo19_##i () {}\
+ virtual void foo20_##i () {}\
+ virtual void foo21_##i () {}\
+ virtual void foo22_##i () {}\
+
+class base_class_2
+{
+
+public:
+ /* Define lots of virtual functions */
+ DEFINE_VIRTUALS_FNS (1)
+ DEFINE_VIRTUALS_FNS (2)
+ DEFINE_VIRTUALS_FNS (3)
+ DEFINE_VIRTUALS_FNS (4)
+ DEFINE_VIRTUALS_FNS (5)
+ DEFINE_VIRTUALS_FNS (6)
+ DEFINE_VIRTUALS_FNS (7)
+ DEFINE_VIRTUALS_FNS (8)
+ DEFINE_VIRTUALS_FNS (9)
+ DEFINE_VIRTUALS_FNS (10)
+ DEFINE_VIRTUALS_FNS (11)
+ DEFINE_VIRTUALS_FNS (12)
+ DEFINE_VIRTUALS_FNS (13)
+ DEFINE_VIRTUALS_FNS (14)
+ DEFINE_VIRTUALS_FNS (15)
+ DEFINE_VIRTUALS_FNS (16)
+ DEFINE_VIRTUALS_FNS (17)
+ DEFINE_VIRTUALS_FNS (18)
+ DEFINE_VIRTUALS_FNS (19)
+ DEFINE_VIRTUALS_FNS (20)
+
+ base_class_2();
+ virtual ~base_class_2 ();
+};
+
+base_class_2::base_class_2()
+{
+}
+
+base_class_2::~base_class_2 ()
+{
+}
+
+class base_class_1
+{
+public:
+ virtual ~base_class_1();
+ base_class_1();
+};
+
+base_class_1::base_class_1()
+{
+}
+
+base_class_1::~base_class_1()
+{
+}
+
+class base_Impl_class :
+ virtual public base_class_2, public base_class_1
+{
+public:
+ base_Impl_class ();
+ virtual ~base_Impl_class ();
+};
+
+base_Impl_class::base_Impl_class ()
+{
+}
+
+base_Impl_class::~base_Impl_class ()
+{
+}
+
+
+class test_cls : public base_Impl_class
+{
+public:
+ test_cls();
+ virtual ~test_cls();
+};
+
+test_cls::test_cls()
+{
+}
+
+test_cls::~test_cls()
+{
+}
+
+int main()
+{
+ test_cls *test = new test_cls;
+ base_class_2 *p1 = test;
+
+ /* PR 53055 destructor thunk offsets are not setup
+ correctly resulting in crash. */
+ delete p1;
+ return 0;
+}
+
|