public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/42528] ICE with -flto and -fsigned-char
Date: Sun, 03 Jan 2010 18:12:00 -0000	[thread overview]
Message-ID: <20100103181215.19005.qmail@sourceware.org> (raw)
In-Reply-To: <bug-42528-8090@http.gcc.gnu.org/bugzilla/>



------- Comment #4 from rguenth at gcc dot gnu dot org  2010-01-03 18:12 -------
Which seems to be because of CCP which folds

D.2023_3 = __builtin___strcpy_chk (&p[1], &"vwxyz"[0], 31);

with unsigned LHS to

D.2023_3 = (<unnamed-signed:8> *) __builtin_memcpy (&p[1], &"vwxyz"[0], 6);

which requires a temporary and thus exposes the mismatched types to the
verifier (we don't verify function assignments).

Which is also because lto1 doesn't understand -f[un]signed-char and always
has flag_signed_char set to the target default because

1044      /* Share char_type_node with whatever would be the default for the
target.
1045         char_type_node will be used for internal types such as
1046         va_list_type_node but will not be present in the lto stream.  */
1047      char_type_node
1048        = DEFAULT_SIGNED_CHAR ? signed_char_type_node :
unsigned_char_type_node;

the comment is true, but still units with different setting of
flag_signed_char will have different va_list_type_node and different
function signatures for builtin string functions.

Now the above together with LTO1 not recognizing -f[un]signed-char
even breaks consistent but non-standard flag_signed_char setting.
Whatever is more important ...


-- 


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


  parent reply	other threads:[~2010-01-03 18:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-28 22:58 [Bug lto/42528] New: " anton at samba dot org
2009-12-31 15:09 ` [Bug lto/42528] " rguenth at gcc dot gnu dot org
2010-01-03 14:33 ` rguenth at gcc dot gnu dot org
2010-01-03 17:31 ` rguenth at gcc dot gnu dot org
2010-01-03 18:12 ` rguenth at gcc dot gnu dot org [this message]
2010-01-03 18:21 ` rguenth at gcc dot gnu dot org
2010-01-07 11:01 ` anton at samba dot org
2010-01-08 16:58 ` rguenth at gcc dot gnu dot org
2010-01-08 16:58 ` rguenth 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=20100103181215.19005.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).