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: x86 PIC regressions


On Wed, 2 September 1998, 11:03:08, rth@cygnus.com wrote:

 > On Wed, Sep 02, 1998 at 01:35:30AM -0500, Robert Lipe wrote:
 > > /play/egcs/gcc/testsuite/gcc.c-torture/execute/930106-1.c:27:
 > > internal error--unrecognizable insn:
 > > (insn 12 11 13 (set:DF (reg:DF 23)
 > >        (mem/u:DF (symbol_ref/u:SI ("*.LC0")))) -1 (nil)
 > >  (expr_list:REG_EQUAL (const_double:DF (mem/u:DF (symbol_ref/u:SI ("*.LC0")))
 > >  0 0 1073790976)
 > >         (nil)))
 > > /play/egcs/gcc/toplev.c:1360: Internal compiler error in function fatal_insn
 > > 
 > > FAIL: gcc.c-torture/execute/930106-1.c compilation,  -O0
 > 
 > The following fixes it.
 > 
 > 
 > r~
 > 
 > 	* varasm.c (force_const_mem): Validize the address of the memory.
 > 
 > Index: varasm.c
 > ===================================================================
 > RCS file: /egcs/carton/cvsfiles/egcs/gcc/varasm.c,v
 > retrieving revision 1.37
 > diff -c -p -d -r1.37 varasm.c
 > *** varasm.c	1998/07/06 22:40:02	1.37
 > --- varasm.c	1998/09/02 18:00:39
 > *************** force_const_mem (mode, x)
 > *** 3512,3517 ****
 > --- 3512,3520 ----
 >     CONSTANT_POOL_ADDRESS_P (XEXP (def, 0)) = 1;
 >     current_function_uses_const_pool = 1;
 >   
 > +   /* Validize after we have set CONSTANT_POOL_ADDRESS_P.  */
 > +   def = validize_mem (def);
 > + 
 >     if (outer_function_chain == 0)
 >       if (GET_CODE (x) == CONST_DOUBLE)
 >         {

With this patch applied the stage1 compiler fails to compile _fixunsdfdi (on i586-linux):

_fixunsdfdi
../../egcs-19980902/gcc/emit-rtl.c:1486: Internal compiler error in function change_address
gmake: *** [libgcc2.a] Error 1

(gdb) bt
#0  change_address (memref=0x82e3ae0, mode=DFmode, addr=0x82e3ad8)
    at ../../egcs-19980902/gcc/emit-rtl.c:1486
#1  0x80ce499 in validize_mem (ref=0x82e3ae0) at ../../egcs-19980902/gcc/explow.c:565
#2  0x80dfa49 in force_const_mem (mode=DFmode, x=0x8264fac) at ../../egcs-19980902/gcc/varasm.c:3518
#3  0x819b417 in find_reloads (insn=0x82965d8, replace=0, ind_levels=0, live_known=1, 
    reload_reg_p=0x8255c40) at ../../egcs-19980902/gcc/reload.c:3633
#4  0x81a409a in reload (first=0x8296178, global=1, dumpfile=0x0)
    at ../../egcs-19980902/gcc/reload1.c:1124
#5  0x818e618 in global_alloc (file=0x0) at ../../egcs-19980902/gcc/global.c:587
#6  0x8072304 in rest_of_compilation (decl=0x82ddad0) at ../../egcs-19980902/gcc/toplev.c:3723
#7  0x805c666 in finish_function (nested=0) at ../../egcs-19980902/gcc/c-decl.c:7185
#8  0x8049c17 in yyparse () at c-parse.y:313
#9  0x80706ff in compile_file (name=0xbffff1ff "libgcc2.i") at ../../egcs-19980902/gcc/toplev.c:2768
#10 0x8073f05 in main (argc=12, argv=0xbffff014, envp=0xbffff048)
    at ../../egcs-19980902/gcc/toplev.c:4834
(gdb) list
1481      /* If reload is in progress or has completed, ADDR must be valid.
1482         Otherwise, we can call memory_address to make it valid.  */
1483      if (reload_completed || reload_in_progress)
1484        {
1485          if (! memory_address_p (mode, addr))
1486            abort ();
1487        }
1488      else
1489        addr = memory_address (mode, addr);
1490
(gdb) 

manfred


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