From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23504 invoked by alias); 8 Dec 2002 05:36:00 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 23486 invoked by uid 71); 8 Dec 2002 05:36:00 -0000 Resent-Date: 8 Dec 2002 05:36:00 -0000 Resent-Message-ID: <20021208053600.23485.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, otaylor@redhat.com Received: (qmail 22635 invoked by uid 61); 8 Dec 2002 05:27:49 -0000 Message-Id: <20021208052749.22634.qmail@sources.redhat.com> Date: Sat, 07 Dec 2002 21:36:00 -0000 From: otaylor@redhat.com Reply-To: otaylor@redhat.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: target/8870: ICE converting from unsigned short to MMX type X-SW-Source: 2002-12/txt/msg00457.txt.bz2 List-Id: >Number: 8870 >Category: target >Synopsis: ICE converting from unsigned short to MMX type >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: ice-on-legal-code >Submitter-Id: net >Arrival-Date: Sat Dec 07 21:36:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: otaylor@redhat.com >Release: CVS Head, 7 December 2002 >Organization: >Environment: Linux/ia32 >Description: Conversions directly from a 16-bit unsigned integer to a MMX type cause problems. (Conversion from a 16-bit signed integer works fine, however.) >How-To-Repeat: When compiled with: gcc -c -O1 -mmmx -march=i686 -mcpu=i686 truncate-bug.c === typedef int v4hi __attribute__ ((mode (V4HI))); static inline v4hi cvtsi_v4hi (int i) { long long tmp = (unsigned int)i; return (v4hi) tmp; } v4hi bar (unsigned short a) { return cvtsi_v4hi (a); } === Produces: === truncate-bug.c: In function `bar': truncate-bug.c:14: internal compiler error: in trunc_int_for_mode, at explow.c:54 === This code compiles without error with the Red Hat 8 compiler, so probably with stock gcc-3.2 as well. Changing 'unsigned short' to 'short' above, makes the ICE go away. >Fix: >Release-Note: >Audit-Trail: >Unformatted: