This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[vta] Re: compilation error in var-tracking-assignments-branch

[Adding gcc-patches]

On Oct 30, 2008, Wenji Huang <> wrote:

> Alexandre Oliva wrote:
>> On Oct 29, 2008, Wenji Huang <> wrote:
>>> I am a new guy to gcc and want to try some new things.
>>> When I built var-tracking-assignments-branch
>>> (,
>>> I got the following error.
>> Yeah, known problem.  I have a bunch of post-merge patches to check
>> in.  Please use the tag prior to the merge for now:
>> tags/var-tracking-assignments-merge-141024-before
> Thx.  I pulled the tag and built the branch again. Now it is finished.

> But I met error in compiling 2.6.27 mainline kernel using the generated gcc.

> $ make
>   CC [M]  crypto/blkcipher.o
> crypto/blkcipher.c: In function âskcipher_geniv_initâ:
> crypto/blkcipher.c:682: internal compiler error: in remap_gimple_stmt,
> at tree-inline.c:1222

Thanks again for the bug report.

I managed to duplicate it in the current vta branch, with the
preprocessed sources you sent me.

Here's the patch I just wrote to fix it.  The problem was that debug
stmts wouldn't prevent otherwise-empty logical blocks from being
discarded, but inlining demanded the logical block of every stmt to
have been remapped before.  That's not possible when we've optimized
it away.

This patch relaxes the requirement such that it doesn't apply to
logical blocks of debug stmts.  I'll give it a round of testing and
then check it in.

Index: gcc/ChangeLog.vta
from  Alexandre Oliva  <>

	* tree-inline.c (remap_gimple_stmt): Don't demand lexical blocks
	for debug stmts to have been remapped before, remap them.

Index: gcc/tree-inline.c
--- gcc/tree-inline.c.orig	2008-10-29 17:28:45.000000000 -0200
+++ gcc/tree-inline.c	2008-11-17 04:29:39.000000000 -0200
@@ -1233,8 +1233,15 @@ remap_gimple_stmt (gimple stmt, copy_bod
       tree *n;
       n = (tree *) pointer_map_contains (id->decl_map, gimple_block (copy));
-      gcc_assert (n);
-      new_block = *n;
+      if (n)
+	new_block = *n;
+      else
+	{
+	  tree nb = gimple_block (copy);
+	  gcc_assert (IS_DEBUG_BIND (copy));
+	  remap_block (&nb, id);
+	  new_block = nb;
+	}
   gimple_set_block (copy, new_block);
Alexandre Oliva
Free Software Evangelist  oliva@{,}
FSFLA Board Member       ÂSÃ Libre! =>
Red Hat Compiler Engineer   aoliva@{,}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]