[Bug middle-end/89998] [7/8 regression] ICE: verify_gimple failed in printf-return-value
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89998 --- Comment #11 from Jakub Jelinek --- Author: jakub Date: Tue Apr 30 20:58:00 2019 New Revision: 270745 URL: https://gcc.gnu.org/viewcvs?rev=270745=gcc=rev Log: Backported from mainline 2019-04-09 Jakub Jelinek PR tree-optimization/89998 * gimple-ssa-sprintf.c (try_substitute_return_value): Use lhs type instead of integer_type_node if possible, don't add ranges if return type is not compatible with int. * gimple-fold.c (gimple_fold_builtin_sprintf, gimple_fold_builtin_snprintf): Use lhs type instead of hardcoded integer_type_node. * gcc.c-torture/compile/pr89998-1.c: New test. * gcc.c-torture/compile/pr89998-2.c: New test. Added: branches/gcc-8-branch/gcc/testsuite/gcc.c-torture/compile/pr89998-1.c branches/gcc-8-branch/gcc/testsuite/gcc.c-torture/compile/pr89998-2.c Modified: branches/gcc-8-branch/gcc/ChangeLog branches/gcc-8-branch/gcc/gimple-fold.c branches/gcc-8-branch/gcc/gimple-ssa-sprintf.c branches/gcc-8-branch/gcc/testsuite/ChangeLog
[Bug middle-end/89998] [7/8 regression] ICE: verify_gimple failed in printf-return-value
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89998 --- Comment #10 from gandalf at winds dot org --- (In reply to Jakub Jelinek from comment #9) > Fixed for trunk. As a workaround I'd suggest using a correct prototype or > -fno-builtin-sprintf if you intentionally use a different one. Thanks. Using the correct prototype (dropping the 'unsigned') indeed works as a workaround.
[Bug middle-end/89998] [7/8 regression] ICE: verify_gimple failed in printf-return-value
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89998 Jakub Jelinek changed: What|Removed |Added Summary|[7/8/9 regression] ICE: |[7/8 regression] ICE: |verify_gimple failed in |verify_gimple failed in |printf-return-value |printf-return-value --- Comment #9 from Jakub Jelinek --- Fixed for trunk. As a workaround I'd suggest using a correct prototype or -fno-builtin-sprintf if you intentionally use a different one.