Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Keith Owens <kaos@melbourne.sgi.com>
To: Kjeld Borch Egevang <kjelde@mips.com>
Cc: linux-mips mailing list <linux-mips@oss.sgi.com>
Subject: Re: gcc crash
Date: Fri, 28 Sep 2001 22:37:52 +1000	[thread overview]
Message-ID: <19900.1001680672@ocs3.intra.ocs.com.au> (raw)
In-Reply-To: Your message of "Thu, 27 Sep 2001 16:59:47 +0200." <Pine.LNX.4.30.0109271657250.1742-100000@coplin19.mips.com>

On Thu, 27 Sep 2001 16:59:47 +0200 (CEST), 
Kjeld Borch Egevang <kjelde@mips.com> wrote:
>When I compile the following function with "gcc -O2" the compiler crashes.
>static float sp_f2l(float x)
>{
>    long l, *xl;
>    float y;
>
>    xl = (void *)&y;
>    l = x;
>    *xl = l;
>    return y;
>}

You are breaking the C rules for data accesses.  Compile with
-fno-strict-aliasing if you want to break the rules.  Or, and this is
much better, use a union of long and float to "convert" one
representation to another.

  reply	other threads:[~2001-09-28 12:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-27 14:59 gcc crash Kjeld Borch Egevang
2001-09-28 12:37 ` Keith Owens [this message]
2001-09-28 17:05   ` Ralf Baechle
2001-09-29  8:35 ` H . J . Lu

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=19900.1001680672@ocs3.intra.ocs.com.au \
    --to=kaos@melbourne.sgi.com \
    --cc=kjelde@mips.com \
    --cc=linux-mips@oss.sgi.com \
    /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