public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sam at zoy dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/23963] New: MMX intrinsics cause ICE in trunc_int_for_mode
Date: Mon, 19 Sep 2005 11:07:00 -0000	[thread overview]
Message-ID: <20050919110655.23963.sam@zoy.org> (raw)

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

The following code causes an ICE with any -O flag except -O0:

#include <mmintrin.h>
#include <stdint.h>
int main(int argc, char *argv[]) {
    __m64 a, b, c;
    a = b = c = (__m64)(uint64_t)argc; /* Load with arbitrary values */
    a = _mm_slli_pi16(a, 3);
    a = _mm_adds_pi16(a, b);
    c = _mm_srli_pi16(c, 8);
    c = _mm_slli_pi16(c, 3);
    b = _mm_adds_pi16(b, c);
    a = _mm_unpacklo_pi8(a, b);
    return (int)(uint64_t)a;
}

Resulting error is:

crashmmx.c: In function ‘main’:
crashmmx.c:16: internal compiler error: in trunc_int_for_mode, at explow.c:53

-- 
           Summary: MMX intrinsics cause ICE in trunc_int_for_mode
           Product: gcc
           Version: 4.0.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sam at zoy dot org
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: i486-linux-gnu


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


             reply	other threads:[~2005-09-19 11:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-19 11:07 sam at zoy dot org [this message]
2005-09-19 14:32 ` [Bug target/23963] " pinskia at gcc dot gnu dot org
2005-09-19 14:48 ` [Bug target/23963] [4.0 Regression] " pinskia at gcc dot gnu dot org
2005-09-20 22:28 ` sam at zoy dot org
2005-09-27 16:23 ` mmitchel at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050919110655.23963.sam@zoy.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).