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: Patch to remove unpurged notes containing addressofs


At 11:14 05.11.99 , Nick Clifton wrote:
>Hi Guys,
>
>   With approval from Richard Henderson I have applied the following
>   patch to function.c.  It fixes an abort when compiling the gcc
>   testcase compile/990829-1.c, where a REG_EQUIV note containing an
>   ADDRESSOF could not be purged because the mode of the MEM in the
>   replacement pattern was different from the mode in the note.
>
>Cheers
>         Nick
>
>
>Fri Nov  5 10:07:25 1999  Nick Clifton  <nickc@cygnus.com>
>
>         * function.c (is_addressof): New function.  Returns true if
>         the given piece of RTL is an ADDRESSOF.
>         (purge_addressof_1): Make boolean.  Return false if the
>         ADDRESSOFs could not be purged.
>         (purge_addressof): If ADDRESSOFs could not be purged from the
>         notes attached to an insn, remove the offending note(s),
>         unless they are attached to a libcall.

Hi,

this patch causes an abort during bootstrap on powerpc-linux-gnu:

for name in _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 _lshrdi3 
_ashldi3 _ashrdi3 _ffsdi2 _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf
  _floatdisf _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi 
_fixsfdi _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi _fixtfdi _fixunstfdi 
_float
ditf __gcc_bcmp _varargs __dummy _eprintf _bb _shtab _clear_cache 
_trampoline __main _exit _ctors _pure; \
do \
   echo ${name}; \
   ./xgcc -B/home/fsirl/gnubin/ppc-redhat-linux/bin/ -B./ 
-I/home/fsirl/gnubin/ppc-redhat-linux/include -O2   -DIN_GCC    -g -W -Wall 
-I./include  -fP
IC -g1  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED   -mstrict-align -I. 
-I../../../cvsx/gccm/gcc -I../../../cvsx/gccm/gcc/config 
-I../../../cvsx/gccm/gcc/
../include -c -DL${name} \
        ../../../cvsx/gccm/gcc/libgcc2.c -o ${name}.o; \
   if [ $? -eq 0 ] ; then true; else exit 1; fi; \
   ar rc tmplibgcc2.a ${name}.o; \
   rm -f ${name}.o; \
done
_muldi3
_divdi3
_moddi3
../../../cvsx/gccm/gcc/libgcc2.c: In function `__moddi3':
../../../cvsx/gccm/gcc/libgcc2.c:720: Internal compiler error in 
`purge_addressof', at function.c:3218
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.
make[4]: *** [libgcc2.a] Error 1
make[4]: Leaving directory `/home/fsirl/obj/gccm/gcc'

That corresponds to this code fragment in function.c:

         if (! purge_addressof_1 (&PATTERN (insn), insn,
                                  asm_noperands (PATTERN (insn)) > 0, 0, &ht))
           /* If we could not replace the ADDRESSOFs in the insn,
              something is wrong.  */
           abort ();

Starting program: /home/fsirl/obj/gccm/gcc/./cc1 libgcc2.i -quiet -dumpbase 
libgcc2.c -mstrict-align -g -g1 -O2 -W -Wall -version -fPIC -o libgcc2.s
Cannot insert breakpoint 1:
Temporarily disabling shared library breakpoints:
1 3
GNU C version 2.96 19991105 (experimental) (ppc-redhat-linux) compiled by 
GNU C version egcs-2.91.66 19990314 (egcs-1.1.2 release).

Breakpoint 7, purge_addressof (insns=0x3010b680) at 
../../../cvsx/gccm/gcc/function.c:3214
3214            if (! purge_addressof_1 (&PATTERN (insn), insn,
(gdb) c 30
Will ignore next 29 crossings of breakpoint 7.  Continuing.

Breakpoint 7, purge_addressof (insns=0x3010b680) at 
../../../cvsx/gccm/gcc/function.c:3214
3214            if (! purge_addressof_1 (&PATTERN (insn), insn,
(gdb) p debug_rtx(insn)
(insn 90 933 96 (set (reg:SI 115)
         (addressof:SI (reg/v:DI 112) 87 0x30104b80)) 426 {movsi+1} (nil)
     (nil))
$7 = void
(gdb) c
Continuing.

Breakpoint 4, purge_addressof (insns=0x3010b680) at 
../../../cvsx/gccm/gcc/function.c:3218
3218              abort ();
(gdb) p debug_rtx(insn)

(insn 90 933 96 (set (reg:SI 115)
         (plus:SI (reg:SI 31 r31)
             (const_int 8 [0x8]))) 52 {*addsi3_internal1} (nil)
     (nil))
$8 = void
(gdb)

Franz.


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