public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bigotp at acm dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/46337] dse.c:replace_inc_dec mis-use of gen_int_mode
Date: Sun, 07 Nov 2010 14:09:00 -0000	[thread overview]
Message-ID: <bug-46337-4-FACD1BeLxu@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-46337-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from Peter A. Bigot <bigotp at acm dot org> 2010-11-07 14:09:31 UTC ---
Created attachment 22308
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22308
Test case

This test case evokes the bug with the 16-bit msp430 target, which is not
integrated into gcc mainline.  When built with -O2, the copy from cal into tcal
is converted into a series of five one-word moves.  The copies for the values
at word offsets 2 (first half temperature_scale) and 4 (local_modbus_addr) are
apparently eliminated by some other optimization, but the copy for the last
half of temperature_scale hits the dse.c code.

In my case, I end up attempting to convert the value 5 to CCMode, instead of
the value 2 to HIMode, resulting in an ICE in trunc_int_for_mode at
explow.c:56.

I wasn't able to reproduce the ICE on a different architecture, and haven't
tried to check the generated code.  Seems that it's pretty dependent on the
back end.  

Hope this helps, and if not, that it's still ok to fix because it's clearly
wrong.


  parent reply	other threads:[~2010-11-07 14:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-07  1:08 [Bug rtl-optimization/46337] New: " bigotp at acm dot org
2010-11-07  9:57 ` [Bug rtl-optimization/46337] " mikpe at it dot uu.se
2010-11-07 10:18 ` ebotcazou at gcc dot gnu.org
2010-11-07 14:09 ` bigotp at acm dot org [this message]
2010-11-29  9:08 ` ebotcazou at gcc dot gnu.org
2010-11-29  9:09 ` ebotcazou at gcc dot gnu.org
2010-11-29 11:06 ` ebotcazou at gcc dot gnu.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=bug-46337-4-FACD1BeLxu@http.gcc.gnu.org/bugzilla/ \
    --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).