This is the mail archive of the gcc-patches@gcc.gnu.org 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]

Re: Function to reliably copy insns (repost)


At 02:16 08.10.99 , Bernd Schmidt wrote:
>(This message is a repost; the original one was in May or June)
>
>There doesn't appear to be a function yet that reliably duplicates an
>insn.  copy_rtx won't do, because ASM_OPERANDS and SCRATCH rtx's have
>special sharing rules: parts may be shared within one insn, but not with
>other rtl outside the same insn.  This patch adds two new functions,
>copy_insn and copy_insn_1, which can be used to duplicate insns.  It
>also converts duplicate_loop_exit_test to use these functions.  There may
>be other places in the compiler where this could be used.
>
>The code for copy_insn_1 is more or less copy_rtx with some small additions.

Hmm, this seems to cause a build fail on powerpc-linux-gnu with 
--enable-checking:

/home/fsirl/obj/gccm/gcc/xgcc -B/home/fsirl/obj/gccm/gcc/ 
-B/home/fsirl/gnubin/ppc-redhat-linux/bin/ 
-I/home/fsirl/gnubin/ppc-redhat-linux/include  -DIN_GCC    -g -O2 
-I./include  -I. -I../../../cvsx/gccm/gcc -I../../../cvsx/gccm/gcc/config 
-I../../../cvsx/gccm/gcc/../include  -g0 \
   -finhibit-size-directive -fno-inline-functions -fno-exceptions 
-msdata=none \
   -c ../../../cvsx/gccm/gcc/crtstuff.c -DCRT_BEGIN -o crtbegin.o
../../../cvsx/gccm/gcc/crtstuff.c: In function `__do_global_dtors_aux':
../../../cvsx/gccm/gcc/crtstuff.c:173: RTL check: expected elt 1 type 'e' 
or 'u', have '0' (rtx mem)
../../../cvsx/gccm/gcc/crtstuff.c:173: Internal compiler error in 
`copy_insn_1', at emit-rtl.c:3486
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.
make[1]: *** [crtbegin.o] Error 1

I didn't see this one before, though I believe your patch just reveals the 
real bug.

Franz.


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