This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
rs6000 64-bit combine.c:subst() bug
- To: Jeffrey Law <law at cygnus dot com>, Jim Wilson <wilson at cygnus dot com>
- Subject: rs6000 64-bit combine.c:subst() bug
- From: David Edelsohn <dje at watson dot ibm dot com>
- Date: Tue, 02 Jun 1998 00:00:44 -0400
- Cc: egcs-bugs at cygnus dot com
I'm running into a testsuite failure (execute/950607-2.c) when
using my 64-bit PowerPC work that I have tracked down to the following
event in combine.c:subst(). If I step over the SUBST macro with the state
shown by the following GDB output, the resulting RTL gains a circular
reference which eventually crashes GCC when it blows out the stack trying
to break it apart.
I don't know whether subst() has a bug or this RTL never should
have been created by combine.
Thanks, David
Breakpoint 6, subst (x=0x2003ab8c, from=0x2003aa90, to=0x2003aa98, in_dest=0,
unique_copy=0) at combine.c:3129
3129 new = (unique_copy && n_occurrences ? copy_rtx (to) : to);
(gdb) next
3130 n_occurrences++;
(gdb)
3131 }
(gdb)
3154 if (GET_CODE (new) == CLOBBER && XEXP (new, 0) == const0_rtx)
(gdb)
3157 SUBST (XEXP (x, i), new);
(gdb) print x
$31 = 0x2003ab8c
(gdb) pr
(ior:SI (reg:SI 102)
(reg:SI 103))
(gdb) print new
$32 = 0x2003aa98
(gdb) pr
(and:SI (subreg:SI (subreg:DI (ior:SI (reg:SI 102)
(reg:SI 103)) 0) 0)
(const_int 1))
(gdb) print i
$11 = 0
(gdb) where
#0 subst (x=0x2003ab8c, from=0x2003aa90, to=0x2003aa98, in_dest=0,
unique_copy=0) at combine.c:3129
#1 0x10148178 in subst (x=0x200708e4, from=0x2003aa90, to=0x2003aa98,
in_dest=0, unique_copy=0) at combine.c:3141
#2 0x10148178 in subst (x=0x2003aa84, from=0x2003aa90, to=0x2003aa98,
in_dest=0, unique_copy=0) at combine.c:3141
#3 0x10148178 in subst (x=0x2003aafc, from=0x2003aa90, to=0x2003aa98,
in_dest=0, unique_copy=0) at combine.c:3141
#4 0x10148178 in subst (x=0x2003ab04, from=0x2003aa90, to=0x2003aa98,
in_dest=0, unique_copy=0) at combine.c:3141
#5 0x10144818 in try_combine (i3=0x2003ab10, i2=0x2003aad4, i1=0x0)
at combine.c:1725
#6 0x10142450 in combine_instructions (f=0x2003c844, nregs=537111312)
at combine.c:593
#7 0x10004978 in rest_of_compilation (decl=0x2006c7c8) at toplev.c:3391
#8 0x10084a38 in finish_function (nested=0) at c-decl.c:7124
#9 0x1018d87c in yyparse () at c-parse.y:130
#10 0x10003110 in compile_file (name=0x38270 <Address 0x38270 out of bounds>)
at toplev.c:2528
#11 0x100061ac in main (argc=4, argv=0x2ff2286c, envp=0x2003aa98)
at toplev.c:4353
#12 0x100001f4 in __start ()
===============================================================================
David Edelsohn T.J. Watson Research Center
dje@watson.ibm.com P.O. Box 218
+1 914 945 4364 (TL 862) Yorktown Heights, NY 10598