summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordoko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>2014-01-12 10:44:18 +0000
committerdoko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>2014-01-12 10:44:18 +0000
commit44f3137a12ed0c2e7867c20e9211b1302ef5e33b (patch)
tree7c8b42d1b41ddb809cb8aed19fd6962f782b6e4d
parent0241b81e38f274151eeb77f421dcaaa73f23e001 (diff)
downloadgcc-47-44f3137a12ed0c2e7867c20e9211b1302ef5e33b.tar.gz
* Fix PR target/59588 (AArch64), backport proposed patch.
git-svn-id: svn://svn.debian.org/svn/gcccvs/branches/sid/gcc-4.7@7118 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
-rw-r--r--debian/changelog1
-rw-r--r--debian/patches/pr59695.diff156
-rw-r--r--debian/rules.patch1
3 files changed, 158 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 00197a6..cecf121 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,7 @@ gcc-4.7 (4.7.3-10) UNRELEASED; urgency=low
maintained by an ARM only maintainer. Closes: #734002.
* Update the x32 support from the branch.
* Update the Linaro support to the 4.7-2013.12 release.
+ * Fix PR target/59588 (AArch64), backport proposed patch.
[ Aurelien Jarno ]
* patches/note-gnu-stack.diff: restore and rebase lost parts.
diff --git a/debian/patches/pr59695.diff b/debian/patches/pr59695.diff
new file mode 100644
index 0000000..bd215d0
--- /dev/null
+++ b/debian/patches/pr59695.diff
@@ -0,0 +1,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;
++}
++
diff --git a/debian/rules.patch b/debian/rules.patch
index 996a443..7b7b181 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -40,6 +40,7 @@ debian_patches += \
debian_patches += \
$(if $(with_linaro_branch),aarch64-multiarch) \
$(if $(with_linaro_branch),aarch64-hash-style-gnu) \
+ $(if $(with_linaro_branch),pr59695) \
aarch64-libffi \
aarch64-libffi-testsuite \
gcc-textdomain \