public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/35056] [4.3 Regression] ICE in copy_to_mode_reg, at explow.c:621
Date: Sat, 02 Feb 2008 15:58:00 -0000 [thread overview]
Message-ID: <20080202155738.32189.qmail@sourceware.org> (raw)
In-Reply-To: <bug-35056-10053@http.gcc.gnu.org/bugzilla/>
------- Comment #4 from rguenther at suse dot de 2008-02-02 15:57 -------
Subject: Re: [4.3 Regression] ICE in copy_to_mode_reg,
at explow.c:621
On Sat, 2 Feb 2008, matz at gcc dot gnu dot org wrote:
> ------- Comment #3 from matz at gcc dot gnu dot org 2008-02-02 15:52 -------
> Reduced by hand:
>
> % cat x.cc
> enum EBorderStyle { bla = 1 };
> template<typename T, typename U>
> inline bool compareEqual(const T& t, const U& u)
> {
> return t == u;
> }
> struct S {
> unsigned m_style : 4;
> };
>
> void call (S *s, EBorderStyle v)
> {
> if (!compareEqual(s->m_style, v))
> s->m_style = v;
> }
>
> The problem is confusion between the bitmap type and promotion. If you
> rewrite the compare into a direct expression ("if (s->m_style != v) ...")
> the error doesn't occur. Anyway, as written this get's generated as
> (004.gimple):
>
> <unnamed-unsigned:4> D.1670;
> unsigned char D.1673;
> unsigned int D.1668;
>
> D.1670 = s->m_style;
> D.1668 = D.1670;
This is missing a conversion, type checking would complain.
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35056
next prev parent reply other threads:[~2008-02-02 15:58 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-02 12:26 [Bug middle-end/35056] New: " rguenth at gcc dot gnu dot org
2008-02-02 12:28 ` [Bug middle-end/35056] " rguenth at gcc dot gnu dot org
2008-02-02 12:28 ` rguenth at gcc dot gnu dot org
2008-02-02 15:52 ` matz at gcc dot gnu dot org
2008-02-02 15:58 ` rguenther at suse dot de [this message]
2008-02-02 16:07 ` rguenth at gcc dot gnu dot org
2008-02-02 16:09 ` matz at gcc dot gnu dot org
2008-02-02 16:16 ` rguenth at gcc dot gnu dot org
2008-02-02 16:17 ` rguenth at gcc dot gnu dot org
2008-02-02 16:31 ` [Bug c++/35056] " rguenth at gcc dot gnu dot org
2008-02-02 17:47 ` matz at gcc dot gnu dot org
2008-02-02 18:42 ` rguenth at gcc dot gnu dot org
2008-02-03 7:49 ` jakub at gcc dot gnu dot org
2008-02-04 11:49 ` matz at gcc dot gnu dot org
2008-02-04 20:12 ` jakub at gcc dot gnu dot org
2008-02-04 20:44 ` jakub at gcc dot gnu dot org
2008-02-05 3:36 ` aoliva at gcc dot gnu dot org
2008-02-05 5:23 ` mmitchel at gcc dot gnu dot org
2008-02-05 6:21 ` aoliva at gcc dot gnu dot org
2008-02-05 20:09 ` jakub at gcc dot gnu dot org
2008-02-06 20:33 ` aoliva at gcc dot gnu dot org
2008-02-06 20:34 ` aoliva at gcc dot gnu dot org
2008-02-06 20:35 ` aoliva 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=20080202155738.32189.qmail@sourceware.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).