public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/53410] New: ICE in build_int_cst_wide, at tree.c:1219
@ 2012-05-18 19:47 regehr at cs dot utah.edu
  2012-05-19 19:21 ` [Bug c/53410] [4.8 Regression] " hjl.tools at gmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: regehr at cs dot utah.edu @ 2012-05-18 19:47 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53410
           Summary: ICE in build_int_cst_wide, at tree.c:1219
    Classification: Unclassified
           Product: gcc
           Version: 4.8.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@dyson r51]$ current-gcc -v
Using built-in specs.
COLLECT_GCC=current-gcc
COLLECT_LTO_WRAPPER=/uusoc/exports/scratch/regehr/z/compiler-install/gcc-r187663-install/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.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-r187663-install
--program-prefix=r187663- --enable-languages=c,c++
Thread model: posix
gcc version 4.8.0 20120518 (experimental) (GCC) 


[regehr@dyson r51]$ current-gcc -c -O3 small.c
small.c: In function 'fn1':
small.c:4:1: internal compiler error: in build_int_cst_wide, at tree.c:1219
 fn1 ()
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


[regehr@dyson r51]$ cat small.c 
int *a;
int b, c, d;
void
fn1 ()
{
    for (; d <= 0; d++)
        b &= ((a || d) ^ c) == 1;
}


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

* [Bug c/53410] [4.8 Regression] ICE in build_int_cst_wide, at tree.c:1219
  2012-05-18 19:47 [Bug c/53410] New: ICE in build_int_cst_wide, at tree.c:1219 regehr at cs dot utah.edu
@ 2012-05-19 19:21 ` hjl.tools at gmail dot com
  2012-05-21 10:02 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hjl.tools at gmail dot com @ 2012-05-19 19:21 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-05-19
                 CC|                            |rguenth at gcc dot gnu.org
   Target Milestone|---                         |4.8.0
            Summary|ICE in build_int_cst_wide,  |[4.8 Regression] ICE in
                   |at tree.c:1219              |build_int_cst_wide, at
                   |                            |tree.c:1219
     Ever Confirmed|0                           |1

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2012-05-19 17:42:38 UTC ---
It is caused by revision 186488:

http://gcc.gnu.org/ml/gcc-cvs/2012-04/msg00439.html


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

* [Bug c/53410] [4.8 Regression] ICE in build_int_cst_wide, at tree.c:1219
  2012-05-18 19:47 [Bug c/53410] New: ICE in build_int_cst_wide, at tree.c:1219 regehr at cs dot utah.edu
  2012-05-19 19:21 ` [Bug c/53410] [4.8 Regression] " hjl.tools at gmail dot com
@ 2012-05-21 10:02 ` jakub at gcc dot gnu.org
  2012-05-21 10:05 ` [Bug c/53410] [4.7/4.8 " jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-05-21 10:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

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


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

* [Bug c/53410] [4.7/4.8 Regression] ICE in build_int_cst_wide, at tree.c:1219
  2012-05-18 19:47 [Bug c/53410] New: ICE in build_int_cst_wide, at tree.c:1219 regehr at cs dot utah.edu
  2012-05-19 19:21 ` [Bug c/53410] [4.8 Regression] " hjl.tools at gmail dot com
  2012-05-21 10:02 ` jakub at gcc dot gnu.org
@ 2012-05-21 10:05 ` jakub at gcc dot gnu.org
  2012-05-21 10:11 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-05-21 10:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-05-21 08:53:39 UTC ---
Created attachment 27453
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27453
gcc48-pr53410.patch

Untested fix.  4.7 branch will need only a subset of these, because there
integer_zerop and integer_onep never return true for vectors.


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

* [Bug c/53410] [4.7/4.8 Regression] ICE in build_int_cst_wide, at tree.c:1219
  2012-05-18 19:47 [Bug c/53410] New: ICE in build_int_cst_wide, at tree.c:1219 regehr at cs dot utah.edu
                   ` (2 preceding siblings ...)
  2012-05-21 10:05 ` [Bug c/53410] [4.7/4.8 " jakub at gcc dot gnu.org
@ 2012-05-21 10:11 ` rguenth at gcc dot gnu.org
  2012-05-21 10:15 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-21 10:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-21 09:34:52 UTC ---
Looks good to me.


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

* [Bug c/53410] [4.7/4.8 Regression] ICE in build_int_cst_wide, at tree.c:1219
  2012-05-18 19:47 [Bug c/53410] New: ICE in build_int_cst_wide, at tree.c:1219 regehr at cs dot utah.edu
                   ` (3 preceding siblings ...)
  2012-05-21 10:11 ` rguenth at gcc dot gnu.org
@ 2012-05-21 10:15 ` jakub at gcc dot gnu.org
  2012-05-21 10:21 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-05-21 10:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-05-21 10:11:52 UTC ---
Created attachment 27457
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27457
gcc47-pr53410.patch

4.7 version of the patch.


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

* [Bug c/53410] [4.7/4.8 Regression] ICE in build_int_cst_wide, at tree.c:1219
  2012-05-18 19:47 [Bug c/53410] New: ICE in build_int_cst_wide, at tree.c:1219 regehr at cs dot utah.edu
                   ` (4 preceding siblings ...)
  2012-05-21 10:15 ` jakub at gcc dot gnu.org
@ 2012-05-21 10:21 ` jakub at gcc dot gnu.org
  2012-05-21 15:12 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-05-21 10:21 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.0                       |4.7.1


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

* [Bug c/53410] [4.7/4.8 Regression] ICE in build_int_cst_wide, at tree.c:1219
  2012-05-18 19:47 [Bug c/53410] New: ICE in build_int_cst_wide, at tree.c:1219 regehr at cs dot utah.edu
                   ` (5 preceding siblings ...)
  2012-05-21 10:21 ` jakub at gcc dot gnu.org
@ 2012-05-21 15:12 ` jakub at gcc dot gnu.org
  2012-05-21 21:02 ` jakub at gcc dot gnu.org
  2012-05-22  7:42 ` [Bug tree-optimization/53410] " jakub at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-05-21 15:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-05-21 14:25:13 UTC ---
Author: jakub
Date: Mon May 21 14:25:03 2012
New Revision: 187715

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187715
Log:
    PR tree-optimization/53410
    * fold-const.c (fold_binary_loc): Use build_zero_cst (type)
    instead of build_int_cst (type, 0) where vector types might be
    involved. Instead of build_int_cst (type, 1) convert the original
    integer_onep argument to the desired type.

    * gcc.c-torture/compile/pr53410-1.c: New test.
    * gcc.c-torture/compile/pr53410-2.c: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr53410-1.c
    trunk/gcc/testsuite/gcc.c-torture/compile/pr53410-2.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fold-const.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c/53410] [4.7/4.8 Regression] ICE in build_int_cst_wide, at tree.c:1219
  2012-05-18 19:47 [Bug c/53410] New: ICE in build_int_cst_wide, at tree.c:1219 regehr at cs dot utah.edu
                   ` (6 preceding siblings ...)
  2012-05-21 15:12 ` jakub at gcc dot gnu.org
@ 2012-05-21 21:02 ` jakub at gcc dot gnu.org
  2012-05-22  7:42 ` [Bug tree-optimization/53410] " jakub at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-05-21 21:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-05-21 21:00:50 UTC ---
Author: jakub
Date: Mon May 21 21:00:43 2012
New Revision: 187738

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187738
Log:
    PR tree-optimization/53410
    * fold-const.c (fold_binary_loc): Use build_zero_cst (type)
    instead of build_int_cst (type, 0) where vector types might be
    involved.

    * gcc.c-torture/compile/pr53410-1.c: New test.
    * gcc.c-torture/compile/pr53410-2.c: New test.

Added:
    branches/gcc-4_7-branch/gcc/testsuite/gcc.c-torture/compile/pr53410-1.c
    branches/gcc-4_7-branch/gcc/testsuite/gcc.c-torture/compile/pr53410-2.c
Modified:
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/fold-const.c
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


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

* [Bug tree-optimization/53410] [4.7/4.8 Regression] ICE in build_int_cst_wide, at tree.c:1219
  2012-05-18 19:47 [Bug c/53410] New: ICE in build_int_cst_wide, at tree.c:1219 regehr at cs dot utah.edu
                   ` (7 preceding siblings ...)
  2012-05-21 21:02 ` jakub at gcc dot gnu.org
@ 2012-05-22  7:42 ` jakub at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-05-22  7:42 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
          Component|c                           |tree-optimization
         Resolution|                            |FIXED

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-05-22 07:39:49 UTC ---
Fixed.


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

end of thread, other threads:[~2012-05-22  7:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-18 19:47 [Bug c/53410] New: ICE in build_int_cst_wide, at tree.c:1219 regehr at cs dot utah.edu
2012-05-19 19:21 ` [Bug c/53410] [4.8 Regression] " hjl.tools at gmail dot com
2012-05-21 10:02 ` jakub at gcc dot gnu.org
2012-05-21 10:05 ` [Bug c/53410] [4.7/4.8 " jakub at gcc dot gnu.org
2012-05-21 10:11 ` rguenth at gcc dot gnu.org
2012-05-21 10:15 ` jakub at gcc dot gnu.org
2012-05-21 10:21 ` jakub at gcc dot gnu.org
2012-05-21 15:12 ` jakub at gcc dot gnu.org
2012-05-21 21:02 ` jakub at gcc dot gnu.org
2012-05-22  7:42 ` [Bug tree-optimization/53410] " 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).