public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: David Edelsohn <dje@watson.ibm.com>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: optimization/10315: [3.2/3.3 regression] [powerpc] ICE: in extract_insn, at recog.c:2175
Date: Wed, 23 Apr 2003 20:16:00 -0000	[thread overview]
Message-ID: <20030423201600.4849.qmail@sources.redhat.com> (raw)

The following reply was made to PR optimization/10315; it has been noted by GNATS.

From: David Edelsohn <dje@watson.ibm.com>
To: Geoff Keating <geoffk@geoffk.org>
Cc: s.bosscher@student.tudelft.nl, gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org,
   adconrad@0c3.net, 186299@bugs.debian.org, gcc-patches@gcc.gnu.org
Subject: Re: optimization/10315: [3.2/3.3 regression] [powerpc] ICE: in extract_insn, at recog.c:2175 
Date: Wed, 23 Apr 2003 16:09:59 -0400

 >>>>> Geoff Keating writes:
 
 > In that case, the RTL should never have been generated...
 
 	The original C code appears to be buggy and GCC is not handling
 the error very gracefully.  The C code is:
 
 case 'f': {
         float v;
 
         memcpy(&v, &input[inputpos], sizeof(float));
         add_assoc_double(return_value, n, (double)v);
 
         break;
 }
 
 case 'd': {
         double v;
 
         memcpy(&v, &input[inputpos], sizeof(float));
         add_assoc_double(return_value, n, v);
 
         break;
 }
 
 Notice case 'd' memcpy uses sizeof(float), not sizeof(double).  GCC
 inlines the memcpy(), but only half of "v" is set.
 flow.c:initialize_uninitialized_subregs() simply jams in a zero in the
 entry block for the function:
 
         insn = gen_move_insn (param.retval,
                               CONST0_RTX (GET_MODE (param.retval)));
 
 	If I change sizeof(float) to sizeof(double) for case 'd', the
 function compiles without error.  The sizeof(float) seems to be a typo, so
 my first suggestion is fix the source code.
 
 	GCC probably should not fall on its face when presented with this
 type of error, but I am not sure who sure ensure a valid insn.
 gen_move_insn() should not be called that late?
 
 David


             reply	other threads:[~2003-04-23 20:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-23 20:16 David Edelsohn [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-04-25 14:06 David Edelsohn
2003-04-24  4:56 Richard Henderson
2003-04-23 22:56 Richard Henderson
2003-04-23 18:26 Geoff Keating
2003-04-23  3:16 David Edelsohn
2003-04-07  7:16 Steven Bosscher
2003-04-05 13:56 Matthias Klose

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=20030423201600.4849.qmail@sources.redhat.com \
    --to=dje@watson.ibm.com \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@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).