public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug analyzer/97620] New: -fexec-charset=IBM16804 triggers ICE @ 2020-10-28 18:36 euloanty at live dot com 2020-10-28 19:00 ` [Bug analyzer/97620] " euloanty at live dot com ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: euloanty at live dot com @ 2020-10-28 18:36 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97620 Bug ID: 97620 Summary: -fexec-charset=IBM16804 triggers ICE Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: analyzer Assignee: dmalcolm at gcc dot gnu.org Reporter: euloanty at live dot com Target Milestone: --- gcc -o stdio stdio.c -s -O2 -fexec-charset=IBM16804 during GIMPLE pass: strlen stdio.c: In function 'main': stdio.c:7: internal compiler error: converting to execution character set: Invalid or incomplete multibyte or wide character 0x8f21da c_cpp_diagnostic(cpp_reader*, cpp_diagnostic_level, cpp_warning_reason, rich_location*, char const*, __va_list_tag (*) [1]) ../../gcc/gcc/c-family/c-common.c:6366 0x192798d cpp_diagnostic_at ../../gcc/libcpp/errors.c:42 0x192798d cpp_diagnostic ../../gcc/libcpp/errors.c:75 0x1927a79 cpp_error(cpp_reader*, cpp_diagnostic_level, char const*, ...) ../../gcc/libcpp/errors.c:89 0x1921214 cpp_host_to_exec_charset(cpp_reader*, unsigned int) ../../gcc/libcpp/charset.c:798 0x8f22e3 c_common_to_target_charset(long) ../../gcc/gcc/c-family/c-common.c:6384 0x178f119 init_target_to_host_charmap ../../gcc/gcc/gimple-ssa-sprintf.c:199 0x178f119 handle_printf_call(gimple_stmt_iterator*, range_query*) ../../gcc/gcc/gimple-ssa-sprintf.c:4301 0xfdabfb strlen_check_and_optimize_call ../../gcc/gcc/tree-ssa-strlen.c:5473 0xfdabfb check_and_optimize_stmt ../../gcc/gcc/tree-ssa-strlen.c:5641 0xfdabfb strlen_dom_walker::before_dom_children(basic_block_def*) ../../gcc/gcc/tree-ssa-strlen.c:5874 0x1737467 dom_walker::walk(basic_block_def*) ../../gcc/gcc/domwalk.c:309 0xfcfd91 printf_strlen_execute ../../gcc/gcc/tree-ssa-strlen.c:5940 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug analyzer/97620] -fexec-charset=IBM16804 triggers ICE 2020-10-28 18:36 [Bug analyzer/97620] New: -fexec-charset=IBM16804 triggers ICE euloanty at live dot com @ 2020-10-28 19:00 ` euloanty at live dot com 2020-10-28 19:09 ` [Bug tree-optimization/97620] " msebor at gcc dot gnu.org ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: euloanty at live dot com @ 2020-10-28 19:00 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97620 --- Comment #1 from fdlbxtqi <euloanty at live dot com> --- Program: #include<stdio.h> int main() { printf("Hello World %d\n",6); } ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/97620] -fexec-charset=IBM16804 triggers ICE 2020-10-28 18:36 [Bug analyzer/97620] New: -fexec-charset=IBM16804 triggers ICE euloanty at live dot com 2020-10-28 19:00 ` [Bug analyzer/97620] " euloanty at live dot com @ 2020-10-28 19:09 ` msebor at gcc dot gnu.org 2020-10-28 19:22 ` euloanty at live dot com 2020-10-29 0:20 ` msebor at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: msebor at gcc dot gnu.org @ 2020-10-28 19:09 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97620 Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Assignee|dmalcolm at gcc dot gnu.org |unassigned at gcc dot gnu.org CC| |msebor at gcc dot gnu.org Keywords| |ice-on-valid-code Status|UNCONFIRMED |RESOLVED Component|analyzer |tree-optimization --- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> --- This is almost certainly caused by an incomplete charset, same as in pr82700. *** This bug has been marked as a duplicate of bug 82700 *** ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/97620] -fexec-charset=IBM16804 triggers ICE 2020-10-28 18:36 [Bug analyzer/97620] New: -fexec-charset=IBM16804 triggers ICE euloanty at live dot com 2020-10-28 19:00 ` [Bug analyzer/97620] " euloanty at live dot com 2020-10-28 19:09 ` [Bug tree-optimization/97620] " msebor at gcc dot gnu.org @ 2020-10-28 19:22 ` euloanty at live dot com 2020-10-29 0:20 ` msebor at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: euloanty at live dot com @ 2020-10-28 19:22 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97620 --- Comment #3 from fdlbxtqi <euloanty at live dot com> --- (In reply to Martin Sebor from comment #2) > This is almost certainly caused by an incomplete charset, same as in pr82700. > > *** This bug has been marked as a duplicate of bug 82700 *** Then provide a better error message. Use -fexec-charset=IBM-12712 instead for example. Is that possible to detect fexec-charset from macros? ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/97620] -fexec-charset=IBM16804 triggers ICE 2020-10-28 18:36 [Bug analyzer/97620] New: -fexec-charset=IBM16804 triggers ICE euloanty at live dot com ` (2 preceding siblings ...) 2020-10-28 19:22 ` euloanty at live dot com @ 2020-10-29 0:20 ` msebor at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: msebor at gcc dot gnu.org @ 2020-10-29 0:20 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97620 --- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> --- I don't know of any such macros and -dM -E doesn't show any. Bug 82700 comment 1 explains that "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." The caller could deal with it by issuing a more friendly message. But the ICE happens inside the preprocessor library and there's no API to find out if a charset is valid. It also doesn't seem that handling the failure and issuing an error should be left up to each client of the library. It would probably be best to handle during option validation. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-10-29 0:20 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-10-28 18:36 [Bug analyzer/97620] New: -fexec-charset=IBM16804 triggers ICE euloanty at live dot com 2020-10-28 19:00 ` [Bug analyzer/97620] " euloanty at live dot com 2020-10-28 19:09 ` [Bug tree-optimization/97620] " msebor at gcc dot gnu.org 2020-10-28 19:22 ` euloanty at live dot com 2020-10-29 0:20 ` msebor at gcc dot gnu.org
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).