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
* [Bug rtl-optimization/49720] Infinite recursion compiling gold binary_test.cc testcase
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 ` rguenth at gcc dot gnu.org
2011-10-28 6:36 ` cltang at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-07-12 20:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49720
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target|i386-pc-solaris2.11 |i386-pc-solaris2.11,
| |i?86-*-*
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.07.12 20:43:20
Component|c++ |rtl-optimization
Ever Confirmed|0 |1
Known to fail| |4.5.3, 4.6.1, 4.7.0
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-07-12 20:43:20 UTC ---
I think I've also seen this ICE with 4.6 and on i?86-linux.
Confirmed on x86_64-darwin with -O2 -m32 back to the 4.5 branch
(no idea for earlier releases).
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/49720] Infinite recursion compiling gold binary_test.cc testcase
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
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: cltang at gcc dot gnu.org @ 2011-10-28 6:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49720
--- Comment #2 from Chung-Lin Tang <cltang at gcc dot gnu.org> 2011-10-28 06:35:37 UTC ---
Author: cltang
Date: Fri Oct 28 06:35:31 2011
New Revision: 180604
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180604
Log:
2011-10-28 Chung-Lin Tang <cltang@codesourcery.com>
PR rtl-optimization/49720
* simplify-rtx.c (simplify_relational_operation_1): Detect
infinite recursion condition in "(eq/ne (plus x cst1) cst2)
simplifies to (eq/ne x (cst2 - cst1))" case.
testsuite/
* g++.dg/torture/pr49720.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/torture/pr49720.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/simplify-rtx.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/49720] Infinite recursion compiling gold binary_test.cc testcase
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
4 siblings, 0 replies; 6+ messages in thread
From: hjl.tools at gmail dot com @ 2011-12-15 21:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49720
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hjl.tools at gmail dot com
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2011-12-15 21:59:00 UTC ---
*** Bug 51574 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/49720] Infinite recursion compiling gold binary_test.cc testcase
2011-07-12 18:17 [Bug c++/49720] New: Infinite recursion compiling gold binary_test.cc testcase ro at gcc dot gnu.org
` (2 preceding siblings ...)
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
4 siblings, 0 replies; 6+ messages in thread
From: hjl at gcc dot gnu.org @ 2011-12-16 0:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49720
--- Comment #4 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2011-12-15 23:50:36 UTC ---
Author: hjl
Date: Thu Dec 15 23:50:32 2011
New Revision: 182394
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182394
Log:
Detect infinite recursion condition
gcc/
2011-12-15 H.J. Lu <hongjiu.lu@intel.com>
Backport from mainline.
2011-10-28 Chung-Lin Tang <cltang@codesourcery.com>
PR rtl-optimization/49720
* simplify-rtx.c (simplify_relational_operation_1): Detect
infinite recursion condition in "(eq/ne (plus x cst1) cst2)
simplifies to (eq/ne x (cst2 - cst1))" case.
gcc/testsuite/
2011-12-15 H.J. Lu <hongjiu.lu@intel.com>
Backport from mainline.
2011-10-28 Chung-Lin Tang <cltang@codesourcery.com>
PR rtl-optimization/49720
* g++.dg/torture/pr49720.C: New test.
Added:
branches/gcc-4_6-branch/gcc/testsuite/g++.dg/torture/pr49720.C
Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/simplify-rtx.c
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/49720] Infinite recursion compiling gold binary_test.cc testcase
2011-07-12 18:17 [Bug c++/49720] New: Infinite recursion compiling gold binary_test.cc testcase ro at gcc dot gnu.org
` (3 preceding siblings ...)
2011-12-16 0:19 ` hjl at gcc dot gnu.org
@ 2012-01-04 0:27 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-01-04 0:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49720
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Known to work| |4.6.3
Resolution| |FIXED
Target Milestone|--- |4.6.3
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-04 00:26:51 UTC ---
Fixed.
^ 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).