public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/49720] New: Infinite recursion compiling gold binary_test.cc testcase
@ 2011-07-12 18:17 ro at gcc dot gnu.org
  2011-07-12 20:44 ` [Bug rtl-optimization/49720] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: ro at gcc dot gnu.org @ 2011-07-12 18:17 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49720

           Summary: Infinite recursion compiling gold binary_test.cc
                    testcase
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ro@gcc.gnu.org
              Host: i386-pc-solaris2.11
            Target: i386-pc-solaris2.11
             Build: i386-pc-solaris2.11


While compiling the gold testcast binary_test.cc, cc1plus SEGVed:

$ cc1plus -O2 sgr.ii
 int main()
Analyzing compilation unit
Performing interprocedural optimizations
 <*free_lang_data> <visibility> <early_local_cleanups> <whole-program>
<profile_estimate> <cp> <inline> <pure-const> <static-var>Assembling functions:
 int main()Segmentation Fault

In gdb, I find that there's either a deep (depth > 22000) or infinite recursion
in simplify_gen_relational:

#0  0x084c220d in swap_commutative_operands_p (x=0xfed6a1d0, y=0xfed6a200)
    at /vol/gcc/src/hg/trunk/local/gcc/rtlanal.c:3111
#1  0x084ea80a in simplify_binary_operation (code=PLUS, mode=SImode, 
    op0=0xfed6a1d0, op1=0xfed6a200)
    at /vol/gcc/src/hg/trunk/local/gcc/simplify-rtx.c:1899
#2  0x084f0d4f in simplify_plus_minus (code=Unhandled dwarf expression opcode
0xf3
)
    at /vol/gcc/src/hg/trunk/local/gcc/simplify-rtx.c:4064
#3  0x084eb7f9 in simplify_binary_operation_1 (code=MINUS, mode=SImode, 
    op0=0xfd41966c, op1=0xfed6a1d0)
    at /vol/gcc/src/hg/trunk/local/gcc/simplify-rtx.c:2308
#4  simplify_binary_operation (code=MINUS, mode=SImode, op0=0xfd41966c, 
    op1=0xfed6a1d0) at /vol/gcc/src/hg/trunk/local/gcc/simplify-rtx.c:1910
#5  0x084f5d88 in simplify_const_relational_operation (code=EQ, mode=SImode, 
    op0=0xfd41966c, op1=<value optimized out>)
    at /vol/gcc/src/hg/trunk/local/gcc/simplify-rtx.c:4559
#6  0x084e9f5e in simplify_relational_operation (code=EQ, mode=CCZmode, 
    cmp_mode=SImode, op0=0xfed6a1d0, op1=0xfd41966c)
    at /vol/gcc/src/hg/trunk/local/gcc/simplify-rtx.c:4184
#7  0x084ea736 in simplify_gen_relational (code=EQ, mode=CCZmode, 
    cmp_mode=SImode, op0=0xfed6a1d0, op1=0xfd41966c)
    at /vol/gcc/src/hg/trunk/local/gcc/simplify-rtx.c:401
#8  0x084ea736 in simplify_gen_relational (code=EQ, mode=CCZmode, 
    cmp_mode=SImode, op0=0xfed6a1f0, op1=0xfd419660)

Here's the simplified testcase:

extern char t_start[], t_end[], t_size[];
int
main(void)
{
  int size = reinterpret_cast<int>(t_size);
  return (size == t_end - t_start);
}


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-01-04  0:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-12 18:17 [Bug c++/49720] New: Infinite recursion compiling gold binary_test.cc testcase ro at gcc dot gnu.org
2011-07-12 20:44 ` [Bug rtl-optimization/49720] " rguenth at gcc dot gnu.org
2011-10-28  6:36 ` cltang at gcc dot gnu.org
2011-12-15 21:59 ` hjl.tools at gmail dot com
2011-12-16  0:19 ` hjl at gcc dot gnu.org
2012-01-04  0:27 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).