public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/48766] New: Infinite recursion in fold_binary_loc()
@ 2011-04-26  0:26 arthur.j.odwyer at gmail dot com
  2011-04-26 11:31 ` [Bug tree-optimization/48766] [4.3/4.4/4.5/4.6/4.7 Regression] " rguenth at gcc dot gnu.org
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: arthur.j.odwyer at gmail dot com @ 2011-04-26  0:26 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Infinite recursion in fold_binary_loc()
           Product: gcc
           Version: 4.4.5
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: arthur.j.odwyer@gmail.com


Created attachment 24097
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24097
Output of "ajo-gcc -O2 -fwrapv -ftrapv -S test746998981.c -v"

The following test case causes gcc to enter an infinite regress, recursing
among fold_binary_loc() and fold_build2_stat_loc(). They can't decide whether
the tree should contain a MINUS_EXPR or a PLUS_EXPR.  This reproduces for me
with svn revision 172796 (2011-04-20), and at least as far back as gcc 4.4.5.
I'm on Ubuntu 10.10, x86-64.  Attached "gcc-v.txt".

cat >test746998981.c <<EOF
extern short g, a, b;
void f() {
    g -= (a == -32768 && b == -1) ? -32768 : (a / b);
}
EOF
gcc -O2 -fwrapv -ftrapv -S test746998981.c

gcc: Internal error: Segmentation fault (program cc1)


This test case is reduced from the output of Csmith
(http://embed.cs.utah.edu/csmith/), using the following command line:
csmith --bitfields --packed-struct -s 746998981 > test746998981.c


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

end of thread, other threads:[~2014-06-12 13:01 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-26  0:26 [Bug tree-optimization/48766] New: Infinite recursion in fold_binary_loc() arthur.j.odwyer at gmail dot com
2011-04-26 11:31 ` [Bug tree-optimization/48766] [4.3/4.4/4.5/4.6/4.7 Regression] " rguenth at gcc dot gnu.org
2011-04-26 13:28 ` hjl.tools at gmail dot com
2011-04-26 21:19 ` joseph at codesourcery dot com
2011-06-27 14:29 ` rguenth at gcc dot gnu.org
2011-08-01 13:56 ` [Bug tree-optimization/48766] [4.4/4.5/4.6/4.7 " rguenth at gcc dot gnu.org
2011-12-06 10:33 ` rguenth at gcc dot gnu.org
2011-12-06 16:36 ` joseph at codesourcery dot com
2011-12-06 18:42 ` iant at google dot com
2011-12-06 20:13 ` joseph at codesourcery dot com
2011-12-06 21:34 ` iant at google dot com
2012-03-13 15:30 ` [Bug tree-optimization/48766] [4.5/4.6/4.7/4.8 " jakub at gcc dot gnu.org
2012-07-02 11:22 ` rguenth at gcc dot gnu.org
2013-01-14 14:24 ` [Bug tree-optimization/48766] [4.6/4.7/4.8 " jakub at gcc dot gnu.org
2013-01-14 15:49 ` hjl.tools at gmail dot com
2013-01-14 16:02 ` jakub at gcc dot gnu.org
2013-01-15  8:17 ` jakub at gcc dot gnu.org
2013-01-15  8:35 ` [Bug tree-optimization/48766] [4.6/4.7 " jakub at gcc dot gnu.org
2013-04-12 15:17 ` [Bug tree-optimization/48766] [4.7 " jakub at gcc dot gnu.org
2014-06-12 13:01 ` rguenth 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).