public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/39764]  New: ICE in set_lattice_value, at tree-ssa-ccp.c:468
@ 2009-04-14 14:56 rmansfield at qnx dot com
  2009-04-15  5:14 ` [Bug middle-end/39764] ICE in set_lattice_value, at tree-ssa-ccp.c:468 with -ffinite-math-only kkojima at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: rmansfield at qnx dot com @ 2009-04-14 14:56 UTC (permalink / raw)
  To: gcc-bugs

$ cat ice.ii
class A;
class B { };
extern const double NaN;
B foo(A* exec, double d);
inline B baz(A* a)     {
        return foo(a, NaN);
}
B bar(A* a) {
        return baz(a);
}
extern const double NaN = (__builtin_nanf(""));

$ ./xgcc -B. -m4 -ml  -fvisibility=hidden -O2 -finline-functions ice.ii
ice.ii: In function 'B baz(A*)':
ice.ii:11: internal compiler error: in set_lattice_value, at tree-ssa-ccp.c:468
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

$ ./xgcc -v
Using built-in specs.
Target: sh4-unknown-linux-gnu
Configured with: ../configure --build=i486-build_pc-linux-gnu
--host=i486-build_pc-linux-gnu --target=sh4-unknown-linux-gnu
--prefix=/home/ryan/crosstool-ng-1.3.1/targets/sh4-unknown-linux-gnu/build/gcc-core-static
--with-local-prefix=/home/ryan/x-tools/sh4-unknown-linux-gnu/sh4-unknown-linux-gnu/sys-root
--disable-multilib
--with-sysroot=/home/ryan/x-tools/sh4-unknown-linux-gnu/sh4-unknown-linux-gnu/sys-root
--with-newlib --enable-threads=no --disable-shared --enable-__cxa_atexit
--disable-nls --enable-symvers=gnu --enable-languages=c++
--enable-target-optspace
Thread model: single
gcc version 4.5.0 20090413 (experimental) [trunk revision 146016] (GCC)

I also reproduced the ICE in 4.3.3 and 4.4.0


-- 
           Summary: ICE in set_lattice_value, at tree-ssa-ccp.c:468
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rmansfield at qnx dot com
 GCC build triplet: i486-build_pc-linux-gnu
  GCC host triplet: i486-build_pc-linux-gnu
GCC target triplet: sh4-unknown-linux-gnu


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


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

* [Bug middle-end/39764] ICE in set_lattice_value, at tree-ssa-ccp.c:468 with -ffinite-math-only
  2009-04-14 14:56 [Bug middle-end/39764] New: ICE in set_lattice_value, at tree-ssa-ccp.c:468 rmansfield at qnx dot com
@ 2009-04-15  5:14 ` kkojima at gcc dot gnu dot org
  2009-04-15  7:30 ` [Bug tree-optimization/39764] " ubizjak at gmail dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2009-04-15  5:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from kkojima at gcc dot gnu dot org  2009-04-15 05:14 -------
NaN requires -mieee for SH target and you could avoid the ICE
with -mieee or -fno-finite-math-only.  Although the test case
doesn't make much sense for this target without these options,
the ICE might show the compiler problem anyway.  I've confirmed
that the provided test fails similarly with -O -ffinite-math-only
also for i686-pc-linux-gnu on the trunk.


-- 

kkojima at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kkojima at gcc dot gnu dot
                   |                            |org
 GCC target triplet|sh4-unknown-linux-gnu       |
           Keywords|                            |ice-on-valid-code
            Summary|ICE in set_lattice_value, at|ICE in set_lattice_value, at
                   |tree-ssa-ccp.c:468          |tree-ssa-ccp.c:468 with -
                   |                            |ffinite-math-only


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


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

* [Bug tree-optimization/39764] ICE in set_lattice_value, at tree-ssa-ccp.c:468 with -ffinite-math-only
  2009-04-14 14:56 [Bug middle-end/39764] New: ICE in set_lattice_value, at tree-ssa-ccp.c:468 rmansfield at qnx dot com
  2009-04-15  5:14 ` [Bug middle-end/39764] ICE in set_lattice_value, at tree-ssa-ccp.c:468 with -ffinite-math-only kkojima at gcc dot gnu dot org
@ 2009-04-15  7:30 ` ubizjak at gmail dot com
  2009-04-15 12:31 ` rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ubizjak at gmail dot com @ 2009-04-15  7:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from ubizjak at gmail dot com  2009-04-15 07:30 -------
Confirmed on i686-pc-linux-gnu with '-O -ffinite-math-only' on trunk.


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|middle-end                  |tree-optimization
     Ever Confirmed|0                           |1
      Known to fail|                            |4.3.3 4.4.0
   Last reconfirmed|0000-00-00 00:00:00         |2009-04-15 07:30:13
               date|                            |


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


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

* [Bug tree-optimization/39764] ICE in set_lattice_value, at tree-ssa-ccp.c:468 with -ffinite-math-only
  2009-04-14 14:56 [Bug middle-end/39764] New: ICE in set_lattice_value, at tree-ssa-ccp.c:468 rmansfield at qnx dot com
  2009-04-15  5:14 ` [Bug middle-end/39764] ICE in set_lattice_value, at tree-ssa-ccp.c:468 with -ffinite-math-only kkojima at gcc dot gnu dot org
  2009-04-15  7:30 ` [Bug tree-optimization/39764] " ubizjak at gmail dot com
@ 2009-04-15 12:31 ` rguenth at gcc dot gnu dot org
  2009-04-15 14:18 ` rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-04-15 12:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2009-04-15 12:31 -------
We drop back from CONSTANT (NaN) to UNDEFINED because of
canonicalize_float_value.

I have a fix.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2009-04-15 07:30:13         |2009-04-15 12:31:32
               date|                            |


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


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

* [Bug tree-optimization/39764] ICE in set_lattice_value, at tree-ssa-ccp.c:468 with -ffinite-math-only
  2009-04-14 14:56 [Bug middle-end/39764] New: ICE in set_lattice_value, at tree-ssa-ccp.c:468 rmansfield at qnx dot com
                   ` (2 preceding siblings ...)
  2009-04-15 12:31 ` rguenth at gcc dot gnu dot org
@ 2009-04-15 14:18 ` rguenth at gcc dot gnu dot org
  2009-04-15 14:23 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-04-15 14:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2009-04-15 14:18 -------
Subject: Bug 39764

Author: rguenth
Date: Wed Apr 15 14:17:35 2009
New Revision: 146120

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=146120
Log:
2009-04-15  Richard Guenther  <rguenther@suse.de>

        PR tree-optimization/39764
        * tree-ssa-ccp.c (get_value): Canonicalize value with
        canonicalize_float_value.

        * g++.dg/torture/pr39764.C: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/torture/pr39764.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-ccp.c


-- 


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


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

* [Bug tree-optimization/39764] ICE in set_lattice_value, at tree-ssa-ccp.c:468 with -ffinite-math-only
  2009-04-14 14:56 [Bug middle-end/39764] New: ICE in set_lattice_value, at tree-ssa-ccp.c:468 rmansfield at qnx dot com
                   ` (3 preceding siblings ...)
  2009-04-15 14:18 ` rguenth at gcc dot gnu dot org
@ 2009-04-15 14:23 ` rguenth at gcc dot gnu dot org
  2009-04-16  9:39 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-04-15 14:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2009-04-15 14:23 -------
For some reason 4.3 and 4.4 work for me (though they definitely have the
same problem).


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.5.0


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


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

* [Bug tree-optimization/39764] ICE in set_lattice_value, at tree-ssa-ccp.c:468 with -ffinite-math-only
  2009-04-14 14:56 [Bug middle-end/39764] New: ICE in set_lattice_value, at tree-ssa-ccp.c:468 rmansfield at qnx dot com
                   ` (4 preceding siblings ...)
  2009-04-15 14:23 ` rguenth at gcc dot gnu dot org
@ 2009-04-16  9:39 ` rguenth at gcc dot gnu dot org
  2009-04-16  9:40 ` rguenth at gcc dot gnu dot org
  2009-04-26 17:06 ` rguenth at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-04-16  9:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2009-04-16 09:39 -------
Subject: Bug 39764

Author: rguenth
Date: Thu Apr 16 09:39:20 2009
New Revision: 146157

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=146157
Log:
2009-04-15  Richard Guenther  <rguenther@suse.de>

        PR tree-optimization/39764
        * tree-ssa-ccp.c (get_value): Canonicalize value with
        canonicalize_float_value.

        * g++.dg/torture/pr39764.C: New testcase.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/torture/pr39764.C
Modified:
    branches/gcc-4_4-branch/gcc/ChangeLog
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_4-branch/gcc/tree-ssa-ccp.c


-- 


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


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

* [Bug tree-optimization/39764] ICE in set_lattice_value, at tree-ssa-ccp.c:468 with -ffinite-math-only
  2009-04-14 14:56 [Bug middle-end/39764] New: ICE in set_lattice_value, at tree-ssa-ccp.c:468 rmansfield at qnx dot com
                   ` (5 preceding siblings ...)
  2009-04-16  9:39 ` rguenth at gcc dot gnu dot org
@ 2009-04-16  9:40 ` rguenth at gcc dot gnu dot org
  2009-04-26 17:06 ` rguenth at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-04-16  9:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rguenth at gcc dot gnu dot org  2009-04-16 09:40 -------
Fixed for 4.4.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|4.3.3 4.4.0                 |4.3.3
      Known to work|4.5.0                       |4.4.0 4.5.0


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


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

* [Bug tree-optimization/39764] ICE in set_lattice_value, at tree-ssa-ccp.c:468 with -ffinite-math-only
  2009-04-14 14:56 [Bug middle-end/39764] New: ICE in set_lattice_value, at tree-ssa-ccp.c:468 rmansfield at qnx dot com
                   ` (6 preceding siblings ...)
  2009-04-16  9:40 ` rguenth at gcc dot gnu dot org
@ 2009-04-26 17:06 ` rguenth at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-04-26 17:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from rguenth at gcc dot gnu dot org  2009-04-26 17:06 -------
Fix-ed.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.4.0


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


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

end of thread, other threads:[~2009-04-26 17:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-14 14:56 [Bug middle-end/39764] New: ICE in set_lattice_value, at tree-ssa-ccp.c:468 rmansfield at qnx dot com
2009-04-15  5:14 ` [Bug middle-end/39764] ICE in set_lattice_value, at tree-ssa-ccp.c:468 with -ffinite-math-only kkojima at gcc dot gnu dot org
2009-04-15  7:30 ` [Bug tree-optimization/39764] " ubizjak at gmail dot com
2009-04-15 12:31 ` rguenth at gcc dot gnu dot org
2009-04-15 14:18 ` rguenth at gcc dot gnu dot org
2009-04-15 14:23 ` rguenth at gcc dot gnu dot org
2009-04-16  9:39 ` rguenth at gcc dot gnu dot org
2009-04-16  9:40 ` rguenth at gcc dot gnu dot org
2009-04-26 17:06 ` rguenth 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).