Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@oss.sgi.com>
To: Keith Owens <kaos@melbourne.sgi.com>
Cc: Kjeld Borch Egevang <kjelde@mips.com>,
	linux-mips mailing list <linux-mips@oss.sgi.com>
Subject: Re: gcc crash
Date: Fri, 28 Sep 2001 19:05:38 +0200	[thread overview]
Message-ID: <20010928190538.B31094@dea.linux-mips.net> (raw)
In-Reply-To: <19900.1001680672@ocs3.intra.ocs.com.au>; from kaos@melbourne.sgi.com on Fri, Sep 28, 2001 at 10:37:52PM +1000

On Fri, Sep 28, 2001 at 10:37:52PM +1000, Keith Owens wrote:

> 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.

Yes said the compiler is crashing so that's definately a gcc bug.  Aside
of course of the code itself being buggy also.

  Ralf

  reply	other threads:[~2001-09-28 17:06 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
2001-09-28 17:05   ` Ralf Baechle [this message]
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=20010928190538.B31094@dea.linux-mips.net \
    --to=ralf@oss.sgi.com \
    --cc=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