public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/31183]  New: ICE in int_cst_value, at tree.c:7684   with -O3 -ftree-loop-linear
@ 2007-03-15 11:48 wouter dot vermaelen at pi dot be
  2007-03-15 13:05 ` [Bug c++/31183] " rguenth at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: wouter dot vermaelen at pi dot be @ 2007-03-15 11:48 UTC (permalink / raw)
  To: gcc-bugs

> cat bug.cc
int buf[256 * 9];
void f() {
        for (int i = 0; i < 256; ++i) {
                for (int j = 0; j < 8; ++j) {
                        buf[j + 1] = 0;
                }
        }
}

> g++ -O3 -ftree-loop-linear bug.cc
bug.cc: In function 'void f()':
bug.cc:2: internal compiler error: in int_cst_value, at tree.c:7684


I'm using SVN revision 122952


-- 
           Summary: ICE in int_cst_value, at tree.c:7684   with -O3 -ftree-
                    loop-linear
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wouter dot vermaelen at pi dot be


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


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

* [Bug c++/31183] ICE in int_cst_value, at tree.c:7684   with -O3 -ftree-loop-linear
  2007-03-15 11:48 [Bug c++/31183] New: ICE in int_cst_value, at tree.c:7684 with -O3 -ftree-loop-linear wouter dot vermaelen at pi dot be
@ 2007-03-15 13:05 ` rguenth at gcc dot gnu dot org
  2007-03-15 13:13 ` ubizjak at gmail dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-03-15 13:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2007-03-15 13:05 -------
Seems to work for me.  Any details on the architecture you tested on?


-- 


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


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

* [Bug c++/31183] ICE in int_cst_value, at tree.c:7684   with -O3 -ftree-loop-linear
  2007-03-15 11:48 [Bug c++/31183] New: ICE in int_cst_value, at tree.c:7684 with -O3 -ftree-loop-linear wouter dot vermaelen at pi dot be
  2007-03-15 13:05 ` [Bug c++/31183] " rguenth at gcc dot gnu dot org
@ 2007-03-15 13:13 ` ubizjak at gmail dot com
  2007-03-15 13:41 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ubizjak at gmail dot com @ 2007-03-15 13:13 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 988 bytes --]



------- Comment #2 from ubizjak at gmail dot com  2007-03-15 13:13 -------
(In reply to comment #1)
> Seems to work for me.  Any details on the architecture you tested on?

Target: i686-pc-linux-gnu
gcc version 4.3.0 20070315 (experimental)

g++ -O2 -S -ftree-loop-linear pr31183.cc
pr31183.cc: In function âvoid f()â:
pr31183.cc:2: internal compiler error: in int_cst_value, at tree.c:7684
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

Confirmed.


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-03-15 13:13:25
               date|                            |


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


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

* [Bug c++/31183] ICE in int_cst_value, at tree.c:7684   with -O3 -ftree-loop-linear
  2007-03-15 11:48 [Bug c++/31183] New: ICE in int_cst_value, at tree.c:7684 with -O3 -ftree-loop-linear wouter dot vermaelen at pi dot be
  2007-03-15 13:05 ` [Bug c++/31183] " rguenth at gcc dot gnu dot org
  2007-03-15 13:13 ` ubizjak at gmail dot com
@ 2007-03-15 13:41 ` rguenth at gcc dot gnu dot org
  2007-03-15 13:44 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-03-15 13:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2007-03-15 13:40 -------
Ok, it's a HWI 32 issue then.  The caller should use host_integerp () on the
tree before calling int_cst_value.


-- 


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


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

* [Bug c++/31183] ICE in int_cst_value, at tree.c:7684   with -O3 -ftree-loop-linear
  2007-03-15 11:48 [Bug c++/31183] New: ICE in int_cst_value, at tree.c:7684 with -O3 -ftree-loop-linear wouter dot vermaelen at pi dot be
                   ` (2 preceding siblings ...)
  2007-03-15 13:41 ` rguenth at gcc dot gnu dot org
@ 2007-03-15 13:44 ` rguenth at gcc dot gnu dot org
  2007-03-16 11:31 ` [Bug tree-optimization/31183] " spop at gcc dot gnu dot org
  2007-03-29  6:31 ` [Bug tree-optimization/31183] [4.3 Regression] " pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-03-15 13:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2007-03-15 13:44 -------
Uh:

static void
gather_interchange_stats (VEC (ddr_p, heap) *dependence_relations,
                          VEC (data_reference_p, heap) *datarefs,
                          struct loop *loop,
                          struct loop *first_loop,
                          unsigned int *dependence_steps,
                          unsigned int *nb_deps_not_carried_by_loop,
                          unsigned int *access_strides)
{
...
         (*access_strides) +=
            int_cst_value (array_size) * int_cst_value (tstride);

nonono, int_cst_value returns a HOST_WIDE_INT, you cannot store that into
an unsigned int.  Also int_cst_value does ICE if array_size's type doesn't
fit a HOST_WIDE_INT.  There is host_integerp () to verify if a tree int
fits HOST_WIDE_INT.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sebastian dot pop at cri dot
                   |                            |ensmp dot fr


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


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

* [Bug tree-optimization/31183] ICE in int_cst_value, at tree.c:7684   with -O3 -ftree-loop-linear
  2007-03-15 11:48 [Bug c++/31183] New: ICE in int_cst_value, at tree.c:7684 with -O3 -ftree-loop-linear wouter dot vermaelen at pi dot be
                   ` (3 preceding siblings ...)
  2007-03-15 13:44 ` rguenth at gcc dot gnu dot org
@ 2007-03-16 11:31 ` spop at gcc dot gnu dot org
  2007-03-29  6:31 ` [Bug tree-optimization/31183] [4.3 Regression] " pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: spop at gcc dot gnu dot org @ 2007-03-16 11:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from spop at gcc dot gnu dot org  2007-03-16 11:30 -------
Subject: Bug 31183

Author: spop
Date: Fri Mar 16 11:30:48 2007
New Revision: 122988

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=122988
Log:
        PR tree-optimization/31183
        * tree-loop-linear.c (gather_interchange_stats, try_interchange_loops): 
        Use double_int instead of unsigned int for representing access_strides.
        * testsuite/gcc.dg/tree-ssa/pr31183.c: New.


Added:
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr31183.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-loop-linear.c


-- 


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


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

* [Bug tree-optimization/31183] [4.3 Regression] ICE in int_cst_value, at tree.c:7684   with -O3 -ftree-loop-linear
  2007-03-15 11:48 [Bug c++/31183] New: ICE in int_cst_value, at tree.c:7684 with -O3 -ftree-loop-linear wouter dot vermaelen at pi dot be
                   ` (4 preceding siblings ...)
  2007-03-16 11:31 ` [Bug tree-optimization/31183] " spop at gcc dot gnu dot org
@ 2007-03-29  6:31 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-03-29  6:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2007-03-29 07:30 -------
Fixed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
           Keywords|                            |ice-on-valid-code
         Resolution|                            |FIXED
            Summary|ICE in int_cst_value, at    |[4.3 Regression] ICE in
                   |tree.c:7684   with -O3 -    |int_cst_value, at
                   |ftree-loop-linear           |tree.c:7684   with -O3 -
                   |                            |ftree-loop-linear
   Target Milestone|---                         |4.3.0


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


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

end of thread, other threads:[~2007-03-29  6:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-15 11:48 [Bug c++/31183] New: ICE in int_cst_value, at tree.c:7684 with -O3 -ftree-loop-linear wouter dot vermaelen at pi dot be
2007-03-15 13:05 ` [Bug c++/31183] " rguenth at gcc dot gnu dot org
2007-03-15 13:13 ` ubizjak at gmail dot com
2007-03-15 13:41 ` rguenth at gcc dot gnu dot org
2007-03-15 13:44 ` rguenth at gcc dot gnu dot org
2007-03-16 11:31 ` [Bug tree-optimization/31183] " spop at gcc dot gnu dot org
2007-03-29  6:31 ` [Bug tree-optimization/31183] [4.3 Regression] " pinskia 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).