public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/51760] [4.7 Regression] ICE in set_lattice_value, at tree-ssa-ccp.c:456
  2012-01-05 10:54 [Bug tree-optimization/51760] New: [4.7 Regression] ICE in set_lattice_value, at tree-ssa-ccp.c:456 rguenth at gcc dot gnu.org
@ 2012-01-05 10:54 ` rguenth at gcc dot gnu.org
  2012-01-05 10:55 ` rguenth at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-05 10:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-05 10:54:42 UTC ---
Created attachment 26246
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26246
preprocessed source


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

* [Bug tree-optimization/51760] New: [4.7 Regression] ICE in set_lattice_value, at tree-ssa-ccp.c:456
@ 2012-01-05 10:54 rguenth at gcc dot gnu.org
  2012-01-05 10:54 ` [Bug tree-optimization/51760] " rguenth at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-05 10:54 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51760
           Summary: [4.7 Regression] ICE in set_lattice_value, at
                    tree-ssa-ccp.c:456
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rguenth@gcc.gnu.org
            Target: x86_64-*-*, i?86-*-*


Building coreutils reveals

> ./cc1 -quiet expand.i -O -m32
expand.c: In function 'expand_multibyte':
expand.c:591:1: internal compiler error: in set_lattice_value, at
tree-ssa-ccp.c:456
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


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

* [Bug tree-optimization/51760] [4.7 Regression] ICE in set_lattice_value, at tree-ssa-ccp.c:456
  2012-01-05 10:54 [Bug tree-optimization/51760] New: [4.7 Regression] ICE in set_lattice_value, at tree-ssa-ccp.c:456 rguenth at gcc dot gnu.org
  2012-01-05 10:54 ` [Bug tree-optimization/51760] " rguenth at gcc dot gnu.org
@ 2012-01-05 10:55 ` rguenth at gcc dot gnu.org
  2012-01-05 11:11 ` markus at trippelsdorf dot de
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-05 10:55 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.7.0


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

* [Bug tree-optimization/51760] [4.7 Regression] ICE in set_lattice_value, at tree-ssa-ccp.c:456
  2012-01-05 10:54 [Bug tree-optimization/51760] New: [4.7 Regression] ICE in set_lattice_value, at tree-ssa-ccp.c:456 rguenth at gcc dot gnu.org
  2012-01-05 10:54 ` [Bug tree-optimization/51760] " rguenth at gcc dot gnu.org
  2012-01-05 10:55 ` rguenth at gcc dot gnu.org
@ 2012-01-05 11:11 ` markus at trippelsdorf dot de
  2012-01-05 11:33 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: markus at trippelsdorf dot de @ 2012-01-05 11:11 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <markus at trippelsdorf dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markus at trippelsdorf dot
                   |                            |de

--- Comment #2 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-01-05 11:10:46 UTC ---
 typedef size_t;
__attribute__ ( ( __always_inline__ ) ) memmove ( void *__dest, void *__src,
                                                  size_t __len )
{
  return __builtin___memmove_chk ( __dest, __src, 0, __builtin_object_size );
}

expand_multibyte (  )
{
  int buf[0];
  int *bufpos;

  for ( ;; )
    {
      memmove ( buf, bufpos, 0 );
      bufpos = buf;
    }
}


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

* [Bug tree-optimization/51760] [4.7 Regression] ICE in set_lattice_value, at tree-ssa-ccp.c:456
  2012-01-05 10:54 [Bug tree-optimization/51760] New: [4.7 Regression] ICE in set_lattice_value, at tree-ssa-ccp.c:456 rguenth at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-01-05 11:11 ` markus at trippelsdorf dot de
@ 2012-01-05 11:33 ` jakub at gcc dot gnu.org
  2012-01-05 11:42 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-05 11:33 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-01-05
                 CC|                            |jakub at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-05 11:33:03 UTC ---
That reduced testcase is quite questionable.

Anyway, this started with
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177615


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

* [Bug tree-optimization/51760] [4.7 Regression] ICE in set_lattice_value, at tree-ssa-ccp.c:456
  2012-01-05 10:54 [Bug tree-optimization/51760] New: [4.7 Regression] ICE in set_lattice_value, at tree-ssa-ccp.c:456 rguenth at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2012-01-05 11:33 ` jakub at gcc dot gnu.org
@ 2012-01-05 11:42 ` jakub at gcc dot gnu.org
  2012-01-05 11:48 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-05 11:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-05 11:41:56 UTC ---
Reduced testcase:

extern inline __attribute__ ((always_inline)) void *
memmove (void *dest, const void *src, __SIZE_TYPE__ len)
{
  return __builtin___memmove_chk (dest, src, len, __builtin_object_size (dest,
0));
}

void
foo (void)
{
  char a[64], *b;
  for (;;)
    {
      memmove (a, b, 0);
      b = a;
    }
}


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

* [Bug tree-optimization/51760] [4.7 Regression] ICE in set_lattice_value, at tree-ssa-ccp.c:456
  2012-01-05 10:54 [Bug tree-optimization/51760] New: [4.7 Regression] ICE in set_lattice_value, at tree-ssa-ccp.c:456 rguenth at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2012-01-05 11:42 ` jakub at gcc dot gnu.org
@ 2012-01-05 11:48 ` rguenth at gcc dot gnu.org
  2012-01-05 11:50 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-05 11:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-05 11:48:28 UTC ---
This is because likely_value says VARYING for __builtin___memmove_chk (&a, b_1,
0, D.1724_7) if b_1 is not already CONSTANT.  But we evaluate it with

            /* These builtins return their first argument, unmodified.  */
            case BUILT_IN_MEMCPY:
            case BUILT_IN_MEMMOVE:

anyway, so likely_value should return CONSTANT if the first arg of these
builtins is constant.


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

* [Bug tree-optimization/51760] [4.7 Regression] ICE in set_lattice_value, at tree-ssa-ccp.c:456
  2012-01-05 10:54 [Bug tree-optimization/51760] New: [4.7 Regression] ICE in set_lattice_value, at tree-ssa-ccp.c:456 rguenth at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2012-01-05 11:48 ` rguenth at gcc dot gnu.org
@ 2012-01-05 11:50 ` rguenth at gcc dot gnu.org
  2012-01-05 12:05 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-05 11:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-05 11:49:06 UTC ---
Or simply return CONSTANT for all builtins.


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

* [Bug tree-optimization/51760] [4.7 Regression] ICE in set_lattice_value, at tree-ssa-ccp.c:456
  2012-01-05 10:54 [Bug tree-optimization/51760] New: [4.7 Regression] ICE in set_lattice_value, at tree-ssa-ccp.c:456 rguenth at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2012-01-05 11:50 ` rguenth at gcc dot gnu.org
@ 2012-01-05 12:05 ` rguenth at gcc dot gnu.org
  2012-01-05 13:43 ` rguenth at gcc dot gnu.org
  2012-01-05 13:44 ` rguenth at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-05 12:05 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

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

--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-05 12:04:24 UTC ---
I have a patch.


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

* [Bug tree-optimization/51760] [4.7 Regression] ICE in set_lattice_value, at tree-ssa-ccp.c:456
  2012-01-05 10:54 [Bug tree-optimization/51760] New: [4.7 Regression] ICE in set_lattice_value, at tree-ssa-ccp.c:456 rguenth at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2012-01-05 12:05 ` rguenth at gcc dot gnu.org
@ 2012-01-05 13:43 ` rguenth at gcc dot gnu.org
  2012-01-05 13:44 ` rguenth at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-05 13:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-05 13:41:38 UTC ---
Author: rguenth
Date: Thu Jan  5 13:41:34 2012
New Revision: 182909

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182909
Log:
2012-01-05  Richard Guenther  <rguenther@suse.de>

    PR tree-optimization/51760
    * tree-ssa-ccp.c (likely_value): Drop UNDEFINED to CONSTANT,
    not VARYING.
    (bit_value_unop): Handle UNDEFINED operands.
    (bit_value_binop): Likewise.

    * gcc.dg/torture/pr51760.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr51760.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-ccp.c


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

* [Bug tree-optimization/51760] [4.7 Regression] ICE in set_lattice_value, at tree-ssa-ccp.c:456
  2012-01-05 10:54 [Bug tree-optimization/51760] New: [4.7 Regression] ICE in set_lattice_value, at tree-ssa-ccp.c:456 rguenth at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2012-01-05 13:43 ` rguenth at gcc dot gnu.org
@ 2012-01-05 13:44 ` rguenth at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-05 13:44 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

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

--- Comment #9 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-05 13:41:50 UTC ---
Fixed.


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

end of thread, other threads:[~2012-01-05 13:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-05 10:54 [Bug tree-optimization/51760] New: [4.7 Regression] ICE in set_lattice_value, at tree-ssa-ccp.c:456 rguenth at gcc dot gnu.org
2012-01-05 10:54 ` [Bug tree-optimization/51760] " rguenth at gcc dot gnu.org
2012-01-05 10:55 ` rguenth at gcc dot gnu.org
2012-01-05 11:11 ` markus at trippelsdorf dot de
2012-01-05 11:33 ` jakub at gcc dot gnu.org
2012-01-05 11:42 ` jakub at gcc dot gnu.org
2012-01-05 11:48 ` rguenth at gcc dot gnu.org
2012-01-05 11:50 ` rguenth at gcc dot gnu.org
2012-01-05 12:05 ` rguenth at gcc dot gnu.org
2012-01-05 13:43 ` rguenth at gcc dot gnu.org
2012-01-05 13:44 ` 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).