public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/31345]  New: [4.3 Regression] ICE in  in set_value_range, at tree-vrp.c:269
@ 2007-03-25 10:24 tbm at cyrius dot com
  2007-03-25 10:28 ` [Bug tree-optimization/31345] " tbm at cyrius dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: tbm at cyrius dot com @ 2007-03-25 10:24 UTC (permalink / raw)
  To: gcc-bugs

Hi Ian,

Your fix for PR31034 worked for 18 out of 20 affected applications in Debian,
but there are 2 applications that still exhibit a related ICE:

tbm@coconut0:~$ /usr/lib/gcc-snapshot/bin/gcc -c -O2 qdbm-depot.c
qdbm-depot.c: In function 'dpsnaffle':
qdbm-depot.c:2: internal compiler error: in set_value_range, at tree-vrp.c:269
Please submit a full bug report,
with preprocessed source if appropriate.

Test case:
dpsnaffle (const char *kbuf)
{
  int hash, thash, head[2], off;
    {
      int _DP_i;
      (hash) = 19780211;
        {
          (hash) = (hash) + (kbuf)[_DP_i];
        }
      (hash) = ((hash) * 43321879) & 0x7FFFFFFF;
    }
  while (off != 0)
    {
      if (hash > thash) {}
      else if (hash < thash)
        {
          off = head[2];
        }
    }
}


-- 
           Summary: [4.3 Regression] ICE in  in set_value_range, at tree-
                    vrp.c:269
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tbm at cyrius dot com


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


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

* [Bug tree-optimization/31345] [4.3 Regression] ICE in  in set_value_range, at tree-vrp.c:269
  2007-03-25 10:24 [Bug tree-optimization/31345] New: [4.3 Regression] ICE in in set_value_range, at tree-vrp.c:269 tbm at cyrius dot com
@ 2007-03-25 10:28 ` tbm at cyrius dot com
  2007-03-25 11:38 ` rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: tbm at cyrius dot com @ 2007-03-25 10:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from tbm at cyrius dot com  2007-03-25 12:28 -------
Created an attachment (id=13282)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13282&action=view)
preprocessed source


-- 


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


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

* [Bug tree-optimization/31345] [4.3 Regression] ICE in  in set_value_range, at tree-vrp.c:269
  2007-03-25 10:24 [Bug tree-optimization/31345] New: [4.3 Regression] ICE in in set_value_range, at tree-vrp.c:269 tbm at cyrius dot com
  2007-03-25 10:28 ` [Bug tree-optimization/31345] " tbm at cyrius dot com
@ 2007-03-25 11:38 ` rguenth at gcc dot gnu dot org
  2007-03-25 16:41 ` [Bug tree-optimization/31345] [4.3 Regression] ICE " pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-03-25 11:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2007-03-25 13:37 -------
Confirmed.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-03-25 12:37:51
               date|                            |


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


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

* [Bug tree-optimization/31345] [4.3 Regression] ICE in set_value_range, at tree-vrp.c:269
  2007-03-25 10:24 [Bug tree-optimization/31345] New: [4.3 Regression] ICE in in set_value_range, at tree-vrp.c:269 tbm at cyrius dot com
  2007-03-25 10:28 ` [Bug tree-optimization/31345] " tbm at cyrius dot com
  2007-03-25 11:38 ` rguenth at gcc dot gnu dot org
@ 2007-03-25 16:41 ` pinskia at gcc dot gnu dot org
  2007-03-26 16:57 ` ian at airs dot com
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-03-25 16:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2007-03-25 18:41 -------
I think this is a regression also on the 4.2 branch now since the set of
patches that caused this is also there.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
           Severity|normal                      |blocker
   Target Milestone|---                         |4.3.0


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


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

* [Bug tree-optimization/31345] [4.3 Regression] ICE in set_value_range, at tree-vrp.c:269
  2007-03-25 10:24 [Bug tree-optimization/31345] New: [4.3 Regression] ICE in in set_value_range, at tree-vrp.c:269 tbm at cyrius dot com
                   ` (2 preceding siblings ...)
  2007-03-25 16:41 ` [Bug tree-optimization/31345] [4.3 Regression] ICE " pinskia at gcc dot gnu dot org
@ 2007-03-26 16:57 ` ian at airs dot com
  2007-03-26 17:27 ` ian at airs dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ian at airs dot com @ 2007-03-26 16:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from ian at airs dot com  2007-03-26 17:57 -------
I'm continuing to look into the best way to avoid the compiler crash.  I want
to note that this code is being clobbered by undefined signed overflow. 
Computing (19780211 + [-128,127]) * 43321879 is always going to overflow, so
VRP is converting that into hash = INT_MAX.  That is almost certainly not what
is intended.  This is independent of my -Wstrict-overflow work, although my
-Wstrict-overflow work is indeed causing the compiler crash.


-- 

ian at airs dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |ian at airs dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-03-25 12:37:51         |2007-03-26 17:57:02
               date|                            |


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


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

* [Bug tree-optimization/31345] [4.3 Regression] ICE in set_value_range, at tree-vrp.c:269
  2007-03-25 10:24 [Bug tree-optimization/31345] New: [4.3 Regression] ICE in in set_value_range, at tree-vrp.c:269 tbm at cyrius dot com
                   ` (3 preceding siblings ...)
  2007-03-26 16:57 ` ian at airs dot com
@ 2007-03-26 17:27 ` ian at airs dot com
  2007-03-26 21:44 ` ian at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ian at airs dot com @ 2007-03-26 17:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from ian at airs dot com  2007-03-26 18:27 -------
I'm testing this patch.

Index: tree-vrp.c
===================================================================
--- tree-vrp.c  (revision 123218)
+++ tree-vrp.c  (working copy)
@@ -1982,10 +1982,18 @@ extract_range_from_binary_expr (value_ra
       return;
     }

+  /* We punt if:
+     1) [-INF, +INF]
+     2) [-INF, +-INF(OVF)]
+     3) [+-INF(OVF), +INF]
+     4) [+-INF(OVF), +-INF(OVF)]
+     We learn nothing when we have INF and INF(OVF) on both sides.
+     Note that we do accept [-INF, -INF] and [+INF, +INF] without
+     overflow.  */
   if ((min == TYPE_MIN_VALUE (TREE_TYPE (min))
-       || is_negative_overflow_infinity (min))
+       || is_overflow_infinity (min))
       && (max == TYPE_MAX_VALUE (TREE_TYPE (max))
-         || is_positive_overflow_infinity (max)))
+         || is_overflow_infinity (max)))
     {
       set_value_range_to_varying (vr);
       return;


-- 


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


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

* [Bug tree-optimization/31345] [4.3 Regression] ICE in set_value_range, at tree-vrp.c:269
  2007-03-25 10:24 [Bug tree-optimization/31345] New: [4.3 Regression] ICE in in set_value_range, at tree-vrp.c:269 tbm at cyrius dot com
                   ` (4 preceding siblings ...)
  2007-03-26 17:27 ` ian at airs dot com
@ 2007-03-26 21:44 ` ian at gcc dot gnu dot org
  2007-03-27  5:47 ` ian at gcc dot gnu dot org
  2007-03-27  5:57 ` ian at airs dot com
  7 siblings, 0 replies; 9+ messages in thread
From: ian at gcc dot gnu dot org @ 2007-03-26 21:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from ian at gcc dot gnu dot org  2007-03-26 22:43 -------
Subject: Bug 31345

Author: ian
Date: Mon Mar 26 22:43:30 2007
New Revision: 123237

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123237
Log:
./:
        PR tree-optimization/31345
        * tree-vrp.c (extract_range_from_binary_expr): Turn ranges like
        [+INF, +INF(OVF)] into VARYING.
testsuite/:
        PR tree-optimization/31345
        * gcc.c-torture/compile/pr31345-1.c: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr31345-1.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vrp.c


-- 


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


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

* [Bug tree-optimization/31345] [4.3 Regression] ICE in set_value_range, at tree-vrp.c:269
  2007-03-25 10:24 [Bug tree-optimization/31345] New: [4.3 Regression] ICE in in set_value_range, at tree-vrp.c:269 tbm at cyrius dot com
                   ` (5 preceding siblings ...)
  2007-03-26 21:44 ` ian at gcc dot gnu dot org
@ 2007-03-27  5:47 ` ian at gcc dot gnu dot org
  2007-03-27  5:57 ` ian at airs dot com
  7 siblings, 0 replies; 9+ messages in thread
From: ian at gcc dot gnu dot org @ 2007-03-27  5:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from ian at gcc dot gnu dot org  2007-03-27 06:47 -------
Subject: Bug 31345

Author: ian
Date: Tue Mar 27 06:46:56 2007
New Revision: 123254

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123254
Log:
./:
        PR tree-optimization/31345
        * tree-vrp.c (extract_range_from_binary_expr): Turn ranges like
        [+INF, +INF(OVF)] into VARYING.
testsuite/:
        PR tree-optimization/31345
        * gcc.c-torture/compile/pr31345-1.c: New test.

Added:
    branches/gcc-4_2-branch/gcc/testsuite/gcc.c-torture/compile/pr31345-1.c
Modified:
    branches/gcc-4_2-branch/gcc/ChangeLog
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_2-branch/gcc/tree-vrp.c


-- 


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


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

* [Bug tree-optimization/31345] [4.3 Regression] ICE in set_value_range, at tree-vrp.c:269
  2007-03-25 10:24 [Bug tree-optimization/31345] New: [4.3 Regression] ICE in in set_value_range, at tree-vrp.c:269 tbm at cyrius dot com
                   ` (6 preceding siblings ...)
  2007-03-27  5:47 ` ian at gcc dot gnu dot org
@ 2007-03-27  5:57 ` ian at airs dot com
  7 siblings, 0 replies; 9+ messages in thread
From: ian at airs dot com @ 2007-03-27  5:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from ian at airs dot com  2007-03-27 06:56 -------
Fixed on mainline and 4.2 branch.


-- 

ian at airs dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.3.0                       |4.2.0


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


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

end of thread, other threads:[~2007-03-27  5:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-25 10:24 [Bug tree-optimization/31345] New: [4.3 Regression] ICE in in set_value_range, at tree-vrp.c:269 tbm at cyrius dot com
2007-03-25 10:28 ` [Bug tree-optimization/31345] " tbm at cyrius dot com
2007-03-25 11:38 ` rguenth at gcc dot gnu dot org
2007-03-25 16:41 ` [Bug tree-optimization/31345] [4.3 Regression] ICE " pinskia at gcc dot gnu dot org
2007-03-26 16:57 ` ian at airs dot com
2007-03-26 17:27 ` ian at airs dot com
2007-03-26 21:44 ` ian at gcc dot gnu dot org
2007-03-27  5:47 ` ian at gcc dot gnu dot org
2007-03-27  5:57 ` ian at airs dot com

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).