[gcc-6] 204/401: * Fix ICE in gdc symbol mangling (Iain Buclaw). LP: #1620681.

Ximin Luo infinity0 at debian.org
Wed Apr 5 15:49:27 UTC 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch pu/reproducible_builds
in repository gcc-6.

commit 495401ad2bb6278a3eec965804d8ba54c5826d88
Author: doko <doko at 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>
Date:   Sat Sep 10 11:48:37 2016 +0000

      * Fix ICE in gdc symbol mangling (Iain Buclaw). LP: #1620681.
    
    
    git-svn-id: svn://anonscm.debian.org/gcccvs/branches/sid/gcc-6@8972 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
---
 debian/changelog                        |  3 ++-
 debian/patches/gdc-symbol-mangling.diff | 38 +++++++++++++++++++++++++++++++++
 debian/rules.patch                      |  3 ++-
 3 files changed, 42 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index d542577..0776485 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,9 @@ gcc-6 (6.2.0-4) UNRELEASED; urgency=medium
 
   * gcj: Depend on the ecj1 standalone binary.
   * Configure native builds using --with-program-prefix.
+  * Fix ICE in gdc symbol mangling (Iain Buclaw). LP: #1620681.
 
- -- Matthias Klose <doko at debian.org>  Sun, 04 Sep 2016 16:55:59 +0200
+ -- Matthias Klose <doko at debian.org>  Sat, 10 Sep 2016 13:46:58 +0200
 
 gcc-6 (6.2.0-3) unstable; urgency=medium
 
diff --git a/debian/patches/gdc-symbol-mangling.diff b/debian/patches/gdc-symbol-mangling.diff
new file mode 100644
index 0000000..57704c1
--- /dev/null
+++ b/debian/patches/gdc-symbol-mangling.diff
@@ -0,0 +1,38 @@
+--- a/src/gcc/d/d-decls.cc
++++ b/src/gcc/d/d-decls.cc
+@@ -291,11 +291,17 @@ FuncDeclaration::toSymbol()
+       tree vindex = NULL_TREE;
+ 
+       // Run full semantic on symbols we need to know about during compilation.
+-      if (inferRetType && type && !type->nextOf() && !functionSemantic())
++      if (inferRetType && type && !type->nextOf())
+ 	{
+-	  csym = new Symbol();
+-	  csym->Stree = error_mark_node;
+-	  return csym;
++	  Module *old_current_module_decl = current_module_decl;
++	  current_module_decl = NULL;
++	  if (!functionSemantic())
++	    {
++	      csym = new Symbol();
++	      csym->Stree = error_mark_node;
++	      return csym;
++	    }
++	  current_module_decl = old_current_module_decl;
+ 	}
+ 
+       // Use same symbol for FuncDeclaration templates with same mangle
+--- a/src/gcc/d/d-objfile.cc
++++ b/src/gcc/d/d-objfile.cc
+@@ -1155,8 +1155,11 @@ FuncDeclaration::toObjFile()
+   // Ensure all semantic passes have ran.
+   if (semanticRun < PASSsemantic3)
+     {
++      Module *old_current_module_decl = current_module_decl;
++      current_module_decl = NULL;
+       functionSemantic3();
+       Module::runDeferredSemantic3();
++      current_module_decl = old_current_module_decl;
+     }
+ 
+   if (global.errors)
diff --git a/debian/rules.patch b/debian/rules.patch
index 572a397..0ef68a9 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -185,7 +185,8 @@ ifeq ($(with_d),yes)
 	gdc-frontend-posix \
 	gdc-base-version \
 	gdc-profiledbuild \
-	gdc-libphobos-link
+	gdc-libphobos-link \
+	gdc-symbol-mangling
 #	gdc-multiarch
   ifneq ($(GFDL_INVARIANT_FREE),yes)
     debian_patches += gdc-6-doc

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/gcc-6.git



More information about the Reproducible-commits mailing list