public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/103961] [12 Regression] gcc-12 apparently miscompiles libcap's cap_to_text() function Date: Tue, 11 Jan 2022 02:02:13 +0000 [thread overview] Message-ID: <bug-103961-4-5YL1jhXSgx@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-103961-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|needs-reduction | --- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Reduced testcase: extern __inline __attribute__ ((__gnu_inline__)) int sprintf (char *__restrict __s, const char *__restrict __fmt, ...) { return __builtin___sprintf_chk (__s, 2 - 1, __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); } void cap_to_text(int cmb) { char buf[(23 * ((2) * 32))+100]; char *p; int n, t; p = 20 + buf; for (t = 8; t--; ) { for (n = 0; n < cmb; n++) p += sprintf(p, "a,"); p--; sprintf(p, "+"); } } When p-- happens, it will always be buf+somesmallvalue.
next prev parent reply other threads:[~2022-01-11 2:02 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-10 12:33 [Bug c/103961] New: " manuel.lauss at googlemail dot com 2022-01-10 12:34 ` [Bug c/103961] " manuel.lauss at googlemail dot com 2022-01-10 12:34 ` manuel.lauss at googlemail dot com 2022-01-10 12:50 ` [Bug middle-end/103961] [12 Regression] " pinskia at gcc dot gnu.org 2022-01-10 13:06 ` pinskia at gcc dot gnu.org 2022-01-10 13:11 ` pinskia at gcc dot gnu.org 2022-01-10 13:12 ` pinskia at gcc dot gnu.org 2022-01-10 13:14 ` pinskia at gcc dot gnu.org 2022-01-10 13:19 ` [Bug tree-optimization/103961] " pinskia at gcc dot gnu.org 2022-01-10 13:35 ` rguenth at gcc dot gnu.org 2022-01-11 2:02 ` pinskia at gcc dot gnu.org [this message] 2022-01-11 2:12 ` pinskia at gcc dot gnu.org 2022-01-11 2:13 ` pinskia at gcc dot gnu.org 2022-01-11 9:10 ` [Bug tree-optimization/103961] [12 Regression] gcc-12 apparently miscompiles libcap's cap_to_text() function since r12-6030-g422f9eb7011b76c1 marxin at gcc dot gnu.org 2022-01-11 9:18 ` marxin at gcc dot gnu.org 2022-01-11 9:27 ` jakub at gcc dot gnu.org 2022-01-11 9:35 ` siddhesh at gcc dot gnu.org 2022-01-11 13:00 ` rguenth at gcc dot gnu.org 2022-01-11 14:48 ` cvs-commit at gcc dot gnu.org 2022-01-11 14:52 ` siddhesh at gcc dot gnu.org 2022-01-11 16:11 ` manuel.lauss at googlemail dot com 2022-01-11 16:20 ` jakub at gcc dot gnu.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=bug-103961-4-5YL1jhXSgx@http.gcc.gnu.org/bugzilla/ \ --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: linkBe 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).