public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "aoliva at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/35056] [4.3 Regression] ICE in copy_to_mode_reg, at explow.c:621
Date: Tue, 05 Feb 2008 03:36:00 -0000	[thread overview]
Message-ID: <20080205033527.30152.qmail@sourceware.org> (raw)
In-Reply-To: <bug-35056-10053@http.gcc.gnu.org/bugzilla/>



------- Comment #16 from aoliva at gcc dot gnu dot org  2008-02-05 03:35 -------
Jakub, build_identity_conv is correct, at least in this case.  In C++, the
bitfieldness :-) of a variable is not to be taken into account for purposes of
overload resolution.  So, when tfrom != from, this means it is an identity
conversion, but one that C++ represents internally using the variant bitfield
type, which leads to this sort of problem.

I'm a bit concerned about adding the type conversion to build_target_expr(),
because of the comment above force_target_expr():
/* Like the above function, but without the checking.  This function should
   only be used by code which is deliberately trying to subvert the type
   system, such as call_builtin_trap.  */

Forcing a conversion might break the deliberate expectations mentioned there,
although I can't see that such expectations are still present in the current
code.  There are only two callers of force_target_expr(), and I don't see that
either has anything to do with subverting the type system.

Anyhow, I think it might be more appropriate to add the type conversion to
build_target_expr_with_type(), which most of C++ uses anyway, and where the
desired type is explicitly specified.


-- 


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


  parent reply	other threads:[~2008-02-05  3:36 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
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 [this message]
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=20080205033527.30152.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).