public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/17055] New: ICE while folding int/float vectors
@ 2004-08-17  0:39 wilson at gcc dot gnu dot org
  2004-08-17  0:41 ` [Bug middle-end/17055] " wilson at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: wilson at gcc dot gnu dot org @ 2004-08-17  0:39 UTC (permalink / raw)
  To: gcc-bugs

A simple testcase compiled with -O -ffast-math aborts because we try to fold a
vector operation 0-0 to 0 by doing
  fold_convert (type, integer_zero_node);
However, we don't allow conversions from scalar types to vector types, so this
does not work.

This fails for both integer and float vectors.

There are a number of places in fold.c where this same idiom is used.  Many of
them are probably unreachable for vector types, but it isn't obvious which ones
are safe and which ones aren't.

-- 
           Summary: ICE while folding int/float vectors
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wilson at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: x86_64-unknown-linux-gnu


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


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

* [Bug middle-end/17055] ICE while folding int/float vectors
  2004-08-17  0:39 [Bug middle-end/17055] New: ICE while folding int/float vectors wilson at gcc dot gnu dot org
@ 2004-08-17  0:41 ` wilson at gcc dot gnu dot org
  2004-08-17  3:22 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: wilson at gcc dot gnu dot org @ 2004-08-17  0:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From wilson at gcc dot gnu dot org  2004-08-17 00:41 -------
Created an attachment (id=6945)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6945&action=view)
A testcase to demonstrate ICE with folding of vector arithmetic.

Compile with -O -ffast-math, and this dies with an ICE in fold_convert for both
the integer and float vector folding.

-- 


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


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

* [Bug middle-end/17055] ICE while folding int/float vectors
  2004-08-17  0:39 [Bug middle-end/17055] New: ICE while folding int/float vectors wilson at gcc dot gnu dot org
  2004-08-17  0:41 ` [Bug middle-end/17055] " wilson at gcc dot gnu dot org
@ 2004-08-17  3:22 ` pinskia at gcc dot gnu dot org
  2004-08-17  3:23 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-17  3:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-17 03:22 -------
Note the path which we abort is two different paths for integer types and floating point ones.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-valid-code
      Known to fail|                            |3.4.0 3.5.0 3.3.3
   Last reconfirmed|0000-00-00 00:00:00         |2004-08-17 03:22:10
               date|                            |


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


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

* [Bug middle-end/17055] ICE while folding int/float vectors
  2004-08-17  0:39 [Bug middle-end/17055] New: ICE while folding int/float vectors wilson at gcc dot gnu dot org
  2004-08-17  0:41 ` [Bug middle-end/17055] " wilson at gcc dot gnu dot org
  2004-08-17  3:22 ` pinskia at gcc dot gnu dot org
@ 2004-08-17  3:23 ` pinskia at gcc dot gnu dot org
  2004-09-10  2:39 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-17  3:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-17 03:23 -------
Woops I was wrong, I was looking up a frame too much :).

-- 


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


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

* [Bug middle-end/17055] ICE while folding int/float vectors
  2004-08-17  0:39 [Bug middle-end/17055] New: ICE while folding int/float vectors wilson at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-08-17  3:23 ` pinskia at gcc dot gnu dot org
@ 2004-09-10  2:39 ` cvs-commit at gcc dot gnu dot org
  2004-09-13 20:17 ` roger at eyesopen dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-10  2:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-09-10 02:39 -------
Subject: Bug 17055

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	sayle@gcc.gnu.org	2004-09-10 02:39:18

Modified files:
	gcc            : ChangeLog fold-const.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: pr17055-1.c 

Log message:
	PR middle-end/17055
	* fold-const.c (build_zero_vector): New function to construct a
	vector (either floating point or integer) of zeros.
	(fold_convert): Internally, enable conversions of integer zero
	to arbitrary vector types, using the new build_zero_vector.
	
	* gcc.dg/pr17055-1.c: New test case.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5348&r2=2.5349
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fold-const.c.diff?cvsroot=gcc&r1=1.452&r2=1.453
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4253&r2=1.4254
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr17055-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug middle-end/17055] ICE while folding int/float vectors
  2004-08-17  0:39 [Bug middle-end/17055] New: ICE while folding int/float vectors wilson at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-09-10  2:39 ` cvs-commit at gcc dot gnu dot org
@ 2004-09-13 20:17 ` roger at eyesopen dot com
  2004-09-19 17:57 ` pinskia at gcc dot gnu dot org
  2004-09-19 17:57 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: roger at eyesopen dot com @ 2004-09-13 20:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From roger at eyesopen dot com  2004-09-13 20:17 -------
This has now been fixed on mainline for 4.0.0, and as its not a regression
from a previous release of GCC, the release manager has classified it as a
"WONTFIX" for the 3.3 and 3.4 branches.

http://gcc.gnu.org/ml/gcc-patches/2004-09/msg01179.html
http://gcc.gnu.org/ml/gcc-patches/2004-09/msg01335.html


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
      Known to fail|3.4.0 4.0 3.3.3             |3.4.0 3.3.3
      Known to work|                            |4.0.0
         Resolution|                            |FIXED


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


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

* [Bug middle-end/17055] ICE while folding int/float vectors
  2004-08-17  0:39 [Bug middle-end/17055] New: ICE while folding int/float vectors wilson at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-09-13 20:17 ` roger at eyesopen dot com
@ 2004-09-19 17:57 ` pinskia at gcc dot gnu dot org
  2004-09-19 17:57 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-19 17:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-19 17:57 -------
*** Bug 17561 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sbo at mis dot mpg dot de


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


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

* [Bug middle-end/17055] ICE while folding int/float vectors
  2004-08-17  0:39 [Bug middle-end/17055] New: ICE while folding int/float vectors wilson at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2004-09-19 17:57 ` pinskia at gcc dot gnu dot org
@ 2004-09-19 17:57 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-19 17:57 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.0


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


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

end of thread, other threads:[~2004-09-19 17:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-17  0:39 [Bug middle-end/17055] New: ICE while folding int/float vectors wilson at gcc dot gnu dot org
2004-08-17  0:41 ` [Bug middle-end/17055] " wilson at gcc dot gnu dot org
2004-08-17  3:22 ` pinskia at gcc dot gnu dot org
2004-08-17  3:23 ` pinskia at gcc dot gnu dot org
2004-09-10  2:39 ` cvs-commit at gcc dot gnu dot org
2004-09-13 20:17 ` roger at eyesopen dot com
2004-09-19 17:57 ` pinskia at gcc dot gnu dot org
2004-09-19 17:57 ` 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).