public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/51247] New: ICE in set_value_range, at tree-vrp.c:417
@ 2011-11-20 22:27 regehr at cs dot utah.edu
  2011-11-24  9:53 ` [Bug tree-optimization/51247] [4.7 Regression] " jakub at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: regehr at cs dot utah.edu @ 2011-11-20 22:27 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51247
           Summary: ICE in set_value_range, at tree-vrp.c:417
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: regehr@cs.utah.edu
                CC: chenyang@cs.utah.edu


[regehr@gamow tmp066]$ current-gcc -v

Using built-in specs.
COLLECT_GCC=current-gcc
COLLECT_LTO_WRAPPER=/uusoc/exports/scratch/regehr/z/compiler-install/gcc-r181530-install/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --with-libelf=/usr/local --enable-lto
--prefix=/home/regehr/z/compiler-install/gcc-r181530-install
--program-prefix=r181530- --enable-languages=c,c++
Thread model: posix
gcc version 4.7.0 20111120 (experimental) (GCC) 

[regehr@gamow tmp066]$ current-gcc -c -w -O2 small.c

small.c: In function 'func_93':
small.c:9:1: internal compiler error: in set_value_range, at tree-vrp.c:417
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

[regehr@gamow tmp066]$ cat small.c 


struct S0
{
  int f1:1;
};
int g_155;
int g_229;
int g_360;
struct S0
func_93 (int p_94, int p_95, int p_96)
{
  struct S0 l_272 = {
  };
  for (; g_155;)
    if (0)
      {
      }
    else
      l_272.f1 = 1;
  for (;;)
    {
      unsigned l_663 = 94967295;
      if (g_229++, g_360 = p_94 || (l_272.f1 &= l_663))
    {
    }
    }
}


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

* [Bug tree-optimization/51247] [4.7 Regression] ICE in set_value_range, at tree-vrp.c:417
  2011-11-20 22:27 [Bug c/51247] New: ICE in set_value_range, at tree-vrp.c:417 regehr at cs dot utah.edu
@ 2011-11-24  9:53 ` jakub at gcc dot gnu.org
  2011-11-24 10:21 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-11-24  9:53 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org
   Target Milestone|---                         |4.7.0
            Summary|ICE in set_value_range, at  |[4.7 Regression] ICE in
                   |tree-vrp.c:417              |set_value_range, at
                   |                            |tree-vrp.c:417

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-11-24 09:22:23 UTC ---
Caused by http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172871
Shorter testcase at -O2:
struct S { int s : 1; };
int a;

void
foo (int x, int y)
{
  struct S s;
  s.s = !!y;
  while (1)
    {
      unsigned l = 94967295;
      a = x || (s.s &= l);
    }
}


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

* [Bug tree-optimization/51247] [4.7 Regression] ICE in set_value_range, at tree-vrp.c:417
  2011-11-20 22:27 [Bug c/51247] New: ICE in set_value_range, at tree-vrp.c:417 regehr at cs dot utah.edu
  2011-11-24  9:53 ` [Bug tree-optimization/51247] [4.7 Regression] " jakub at gcc dot gnu.org
@ 2011-11-24 10:21 ` jakub at gcc dot gnu.org
  2011-11-24 11:12 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-11-24 10:21 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-11-24
     Ever Confirmed|0                           |1


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

* [Bug tree-optimization/51247] [4.7 Regression] ICE in set_value_range, at tree-vrp.c:417
  2011-11-20 22:27 [Bug c/51247] New: ICE in set_value_range, at tree-vrp.c:417 regehr at cs dot utah.edu
  2011-11-24  9:53 ` [Bug tree-optimization/51247] [4.7 Regression] " jakub at gcc dot gnu.org
  2011-11-24 10:21 ` jakub at gcc dot gnu.org
@ 2011-11-24 11:12 ` jakub at gcc dot gnu.org
  2011-11-29 21:57 ` jakub at gcc dot gnu.org
  2011-11-29 22:09 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-11-24 11:12 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-11-24 10:32:02 UTC ---
Created attachment 25908
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25908
gcc47-pr51247.patch

Untested fix.


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

* [Bug tree-optimization/51247] [4.7 Regression] ICE in set_value_range, at tree-vrp.c:417
  2011-11-20 22:27 [Bug c/51247] New: ICE in set_value_range, at tree-vrp.c:417 regehr at cs dot utah.edu
                   ` (2 preceding siblings ...)
  2011-11-24 11:12 ` jakub at gcc dot gnu.org
@ 2011-11-29 21:57 ` jakub at gcc dot gnu.org
  2011-11-29 22:09 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-11-29 21:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-11-29 21:03:18 UTC ---
Author: jakub
Date: Tue Nov 29 21:03:09 2011
New Revision: 181818

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181818
Log:
    PR tree-optimization/51247
    * tree-vrp.c (extract_range_from_assert): For signed 1-bit precision
    types instead of adding 1 subtract -1 and instead of subtracting 1
    add -1 to avoid overflows.

    * gcc.c-torture/compile/pr51247.c: New test.

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


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

* [Bug tree-optimization/51247] [4.7 Regression] ICE in set_value_range, at tree-vrp.c:417
  2011-11-20 22:27 [Bug c/51247] New: ICE in set_value_range, at tree-vrp.c:417 regehr at cs dot utah.edu
                   ` (3 preceding siblings ...)
  2011-11-29 21:57 ` jakub at gcc dot gnu.org
@ 2011-11-29 22:09 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-11-29 22:09 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-11-29 21:07:08 UTC ---
Fixed.


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

end of thread, other threads:[~2011-11-29 21:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-20 22:27 [Bug c/51247] New: ICE in set_value_range, at tree-vrp.c:417 regehr at cs dot utah.edu
2011-11-24  9:53 ` [Bug tree-optimization/51247] [4.7 Regression] " jakub at gcc dot gnu.org
2011-11-24 10:21 ` jakub at gcc dot gnu.org
2011-11-24 11:12 ` jakub at gcc dot gnu.org
2011-11-29 21:57 ` jakub at gcc dot gnu.org
2011-11-29 22:09 ` jakub 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).