[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#386910: [PR 26957] ICE in make_decl_rtl, at varasm.c:871



Package: gcc-4.1
Version: 4.1.1-5
Severity: important
Tags: patch, upstream
Forwarded: http://gcc.gnu.org/PR26957

The attached fixes an ICE when building packages like ace.
#! /bin/sh -e

# All lines beginning with `# DPATCH:' are a description of the patch.
# DP: Fix for c++/26957; committed upstream

dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
    pdir="-d $3"
    dir="$3/"
elif [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi
case "$1" in
    -patch)
        patch $pdir -f --no-backup-if-mismatch -p0 < $0
        #cd ${dir}gcc && autoconf
        ;;
    -unpatch)
        patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
        #rm ${dir}gcc/configure
        ;;
    *)
        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
        exit 1
esac
exit 0

# append the patch here and adjust the -p? flag in the patch calls.

2006-09-07  Jason Merrill  <jason@redhat.com>

	PR c++/26957
	* method.c (use_thunk): Clear DECL_HAS_VALUE_EXPR_P on copied
	parms.

Index: method.c
===================================================================
*** gcc/cp/method.c	(revision 116754)
--- gcc/cp/method.c	(working copy)
*************** use_thunk (tree thunk_fndecl, bool emit_
*** 419,424 ****
--- 419,425 ----
        TREE_CHAIN (x) = t;
        DECL_CONTEXT (x) = thunk_fndecl;
        SET_DECL_RTL (x, NULL_RTX);
+       DECL_HAS_VALUE_EXPR_P (x) = 0;
        t = x;
      }
    a = nreverse (t);

Reply to: