public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/14888] New: [3.5 regression] ICE with -O2 -ffast-math in final_scan_insn()
@ 2004-04-08 12:28 martin at mpa-garching dot mpg dot de
  2004-04-08 12:36 ` [Bug target/14888] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2004-04-08 12:28 UTC (permalink / raw)
  To: gcc-bugs

The following testcase causes an ICE in gcc 3.5 when compiled with -O2
-ffast-math, but is compiled properly by earlier versions of gcc and/or without
optimization.

--cut here

class xcomplex
  {
  public:
    float re, im;

    xcomplex &operator*= (const float &fact)
      { re*=fact; im*=fact; return *this; }
  };

void foo (xcomplex &almT, xcomplex &almG)
  {
  double gb;
  almT*=gb;
  almG*=gb*42;
  }

--cut here

~/tmp>g++ -v -O2 -ffast-math -c ./bugrep.cc
Reading specs from /afs/mpa/data/martin/ugcc/lib/gcc/i686-pc-linux-gnu/3.5.0/specs
Configured with: /scratch/gcc/configure --quiet
--prefix=/afs/mpa/data/martin/ugcc --enable-languages=c++
Thread model: posix
gcc version 3.5.0 20040408 (experimental)
 /afs/mpa/data/martin/ugcc/libexec/gcc/i686-pc-linux-gnu/3.5.0/cc1plus -quiet -v
-D_GNU_SOURCE ./bugrep.cc -quiet -dumpbase bugrep.cc -mtune=pentiumpro -auxbase
bugrep -O2 -version -ffast-math -o /tmp/cckVCfL2.s
ignoring nonexistent directory
"/afs/mpa/data/martin/ugcc/lib/gcc/i686-pc-linux-gnu/3.5.0/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /afs/mpa/data/martin/ugcc/lib/gcc/i686-pc-linux-gnu/3.5.0/../../../../include/c++/3.5.0
 /afs/mpa/data/martin/ugcc/lib/gcc/i686-pc-linux-gnu/3.5.0/../../../../include/c++/3.5.0/i686-pc-linux-gnu
 /afs/mpa/data/martin/ugcc/lib/gcc/i686-pc-linux-gnu/3.5.0/../../../../include/c++/3.5.0/backward
 /usr/local/include
 /afs/mpa/data/martin/ugcc/include
 /afs/mpa/data/martin/ugcc/lib/gcc/i686-pc-linux-gnu/3.5.0/include
 /usr/include
End of search list.
GNU C++ version 3.5.0 20040408 (experimental) (i686-pc-linux-gnu)
        compiled by GNU C version 3.5.0 20040408 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
./bugrep.cc: In function `void foo(xcomplex&, xcomplex&)':
./bugrep.cc:15: error: could not split insn
(insn:TI 18 95 3 (set (reg:SF 8 st)
        (float_truncate:SF (reg:DF 8 st))) 91 {truncdfsf2_noop} (nil)
    (nil))
./bugrep.cc:15: internal compiler error: in final_scan_insn, at final.c:2433
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

-- 
           Summary: [3.5 regression] ICE with -O2 -ffast-math in
                    final_scan_insn()
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: martin at mpa-garching dot mpg dot de
                CC: gcc-bugs at gcc dot gnu dot org,martin at mpa-garching
                    dot mpg dot de
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug target/14888] [3.5 regression] ICE with -O2 -ffast-math in final_scan_insn()
  2004-04-08 12:28 [Bug optimization/14888] New: [3.5 regression] ICE with -O2 -ffast-math in final_scan_insn() martin at mpa-garching dot mpg dot de
@ 2004-04-08 12:36 ` pinskia at gcc dot gnu dot org
  2004-04-09  1:36 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-08 12:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-08 12:36 -------
Confirmed, most likely caused by:
2004-03-23  Roger Sayle  <roger@eyesopen.com>

        * reg-stack.c (get_true_reg): Handle FLOAT_TRUNCATE like FLOAT_EXTEND
        if flag_unsafe_math_optimizations.
        * config/i386/i386.md (truncdfsf2): If flag_unsafe_math_optimizations
        and TARGET_80387 expand using truncdfsf2_noop pattern.
        (truncxfsf2): Likewise using truncxfsf2_noop.
        (truncxfdf2): Likewise using truncxfdf2_noop.
        (truncdfsf2_noop, truncxfsf2_noop, truncxfdf2_noop): New patterns.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |roger at eyesopen dot com
             Status|UNCONFIRMED                 |NEW
          Component|optimization                |target
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|0000-00-00 00:00:00         |2004-04-08 12:36:42
               date|                            |
   Target Milestone|---                         |3.5.0


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


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

* [Bug target/14888] [3.5 regression] ICE with -O2 -ffast-math in final_scan_insn()
  2004-04-08 12:28 [Bug optimization/14888] New: [3.5 regression] ICE with -O2 -ffast-math in final_scan_insn() martin at mpa-garching dot mpg dot de
  2004-04-08 12:36 ` [Bug target/14888] " pinskia at gcc dot gnu dot org
@ 2004-04-09  1:36 ` cvs-commit at gcc dot gnu dot org
  2004-04-09  2:49 ` pinskia at gcc dot gnu dot org
  2004-04-14  6:48 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-04-09  1:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-04-09 01:36 -------
Subject: Bug 14888

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	sayle@gcc.gnu.org	2004-04-09 01:36:49

Modified files:
	gcc            : ChangeLog 
	gcc/config/i386: i386.md 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/opt: pr14888.C 

Log message:
	PR target/14888
	* config/i386/i386.md (truncdfsf2_noop, truncxfsf2_noop,
	truncxfdf2_noop): Provide dummy "fmov" implementations.
	
	* g++.dg/opt/pr14888.C: New test case.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3373&r2=2.3374
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.md.diff?cvsroot=gcc&r1=1.524&r2=1.525
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3663&r2=1.3664
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/opt/pr14888.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug target/14888] [3.5 regression] ICE with -O2 -ffast-math in final_scan_insn()
  2004-04-08 12:28 [Bug optimization/14888] New: [3.5 regression] ICE with -O2 -ffast-math in final_scan_insn() martin at mpa-garching dot mpg dot de
  2004-04-08 12:36 ` [Bug target/14888] " pinskia at gcc dot gnu dot org
  2004-04-09  1:36 ` cvs-commit at gcc dot gnu dot org
@ 2004-04-09  2:49 ` pinskia at gcc dot gnu dot org
  2004-04-14  6:48 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-09  2:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-09 02:49 -------
Fixed.

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


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


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

* [Bug target/14888] [3.5 regression] ICE with -O2 -ffast-math in final_scan_insn()
  2004-04-08 12:28 [Bug optimization/14888] New: [3.5 regression] ICE with -O2 -ffast-math in final_scan_insn() martin at mpa-garching dot mpg dot de
                   ` (2 preceding siblings ...)
  2004-04-09  2:49 ` pinskia at gcc dot gnu dot org
@ 2004-04-14  6:48 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-14  6:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-14 01:45 -------
*** Bug 14908 has been marked as a duplicate of this bug. ***

-- 


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


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

end of thread, other threads:[~2004-04-14  1:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-08 12:28 [Bug optimization/14888] New: [3.5 regression] ICE with -O2 -ffast-math in final_scan_insn() martin at mpa-garching dot mpg dot de
2004-04-08 12:36 ` [Bug target/14888] " pinskia at gcc dot gnu dot org
2004-04-09  1:36 ` cvs-commit at gcc dot gnu dot org
2004-04-09  2:49 ` pinskia at gcc dot gnu dot org
2004-04-14  6:48 ` 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).