This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/82700] ICE in printf-return-value with -fexec-charset=EBCDIC-US: converting to execution character set: Invalid or incomplete multibyte or wide character
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 24 Oct 2017 17:29:17 +0000
- Subject: [Bug tree-optimization/82700] ICE in printf-return-value with -fexec-charset=EBCDIC-US: converting to execution character set: Invalid or incomplete multibyte or wide character
- Auto-submitted: auto-generated
- References: <bug-82700-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82700
--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
The ICE is caused by the EBCDIC-US character set in Fedora 25 apparently not
including the equivalent of the backslash character. That makes the charset
invalid, since C requires both the basic source and basic character sets to
include it. From the comment in the file:
/* The subset of the source character set used by printf conversion
specifications (strictly speaking, not all letters are used but
they are included here for the sake of simplicity). The dollar
sign must be included even though it's not in the basic source
character set. */
const char srcset[] = " 0123456789!\"#%&'()*+,-./:;<=>?[\\]^_{|}~$"
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
The sprintf pass calls lang_hooks.to_target_charset () to convert each of these
characters from the source set to the execution set and the function aborts
when it can't do the conversion. That seems unfriendly -- it should instead
return some failure code and let the caller decide how to deal with it.