public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/38932]  New: ICE in set_value_range, at tree-vrp.c:398
@ 2009-01-22  8:08 bonzini at gnu dot org
  2009-01-22  8:08 ` [Bug middle-end/38932] " bonzini at gnu dot org
                   ` (19 more replies)
  0 siblings, 20 replies; 22+ messages in thread
From: bonzini at gnu dot org @ 2009-01-22  8:08 UTC (permalink / raw)
  To: gcc-bugs

>From PR38572, but unrelated to it:

void f (long long int p)
{
  int x;
  static unsigned char g;
  long long int min = -9223372036854775807LL - 1;
  g = 1;
  x = (signed char) (g | 249) / 4;
  if (p >= min - (long long int) x)
    p = 1;

  if (p)
    abort ();
}

gives

small.c: In function 'f':
small.c:3: internal compiler error: in set_value_range, at tree-vrp.c:398

Note that after FRE the code becomes the simpler

void f (long long int p)
{
  long long int min = 9223372036854775807LL + 2; /*0x7fffffffffffffff */
  if (min <= p)
    p = 1;

  if (p)
    abort ();
}

but this does not ICE because in this testcase the "min <= p" is changed to "p
!= min - 1" by the first CCP pass, so this is also a missed folding in FRE.

I'm looking at the VRP failure though.


-- 
           Summary: ICE in set_value_range, at tree-vrp.c:398
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bonzini at gnu dot org
GCC target triplet: i686-pc-linux-gnu


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


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

end of thread, other threads:[~2009-01-26 15:54 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-22  8:08 [Bug middle-end/38932] New: ICE in set_value_range, at tree-vrp.c:398 bonzini at gnu dot org
2009-01-22  8:08 ` [Bug middle-end/38932] " bonzini at gnu dot org
2009-01-22  8:09 ` bonzini at gnu dot org
2009-01-22  8:17 ` bonzini at gnu dot org
2009-01-22  8:23 ` bonzini at gnu dot org
2009-01-22  9:00 ` bonzini at gnu dot org
2009-01-22  9:17   ` Andrew Thomas Pinski
2009-01-22  9:17 ` pinskia at gmail dot com
2009-01-22  9:29 ` rguenther at suse dot de
2009-01-22 11:04 ` [Bug middle-end/38932] [4.4 Regression] " bonzini at gnu dot org
2009-01-22 12:10 ` bonzini at gnu dot org
2009-01-22 12:28 ` rguenther at suse dot de
2009-01-22 16:09 ` [Bug middle-end/38932] [4.3/4.4 " hjl dot tools at gmail dot com
2009-01-22 17:13 ` dberlin at dberlin dot org
2009-01-23 15:57 ` bonzini at gcc dot gnu dot org
2009-01-23 16:18 ` [Bug middle-end/38932] [4.3 " rguenth at gcc dot gnu dot org
2009-01-24  8:59 ` bonzini at gnu dot org
2009-01-24  9:35 ` rguenther at suse dot de
2009-01-24  9:54 ` bonzini at gnu dot org
2009-01-24  9:55 ` rguenther at suse dot de
2009-01-26 15:54 ` bonzini at gnu dot org
2009-01-26 15:54 ` bonzini at gcc dot gnu dot 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).