public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/46534] New: [4.3/4.4/4.5/4.6 Regression] ICE optimizing printf ("...>10MBstring\n") into puts Date: Thu, 18 Nov 2010 08:33:00 -0000 [thread overview] Message-ID: <bug-46534-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46534 Summary: [4.3/4.4/4.5/4.6 Regression] ICE optimizing printf ("...>10MBstring\n") into puts Product: gcc Version: 4.4.5 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned@gcc.gnu.org ReportedBy: jakub@gcc.gnu.org /* { dg-do compile } */ /* { dg-options "-O2" } */ #define S1 " " #define S2 S1 S1 S1 S1 S1 S1 S1 S1 S1 S1 #define S3 S2 S2 S2 S2 S2 S2 S2 S2 S2 S2 #define S4 S3 S3 S3 S3 S3 S3 S3 S3 S3 S3 #define S5 S4 S4 S4 S4 S4 S4 S4 S4 S4 S4 #define S6 S5 S5 S5 S5 S5 S5 S5 S5 S5 S5 #define S7 S6 S6 S6 S6 S6 S6 S6 S6 S6 S6 void foo (void) { __builtin_printf (S7 "\n"); } ICEs, because printf->puts folding uses XALLOCAVEC for the string literal, which for very long strings overflows the stack.
next reply other threads:[~2010-11-18 8:31 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-11-18 8:33 jakub at gcc dot gnu.org [this message] 2010-11-18 8:47 ` [Bug middle-end/46534] " jakub at gcc dot gnu.org 2010-11-18 10:04 ` jakub at gcc dot gnu.org 2010-11-18 10:24 ` rguenth at gcc dot gnu.org 2010-11-18 10:26 ` jakub at gcc dot gnu.org 2010-11-18 11:55 ` rguenth at gcc dot gnu.org 2010-11-18 21:08 ` jakub at gcc dot gnu.org 2010-11-18 22:17 ` [Bug middle-end/46534] [4.3/4.4/4.5 " jakub at gcc dot gnu.org 2010-11-25 16:10 ` rguenth at gcc dot gnu.org 2010-12-07 15:11 ` jakub at gcc dot gnu.org 2010-12-07 18:57 ` [Bug middle-end/46534] [4.3/4.4 " jakub at gcc dot gnu.org 2011-06-27 12:05 ` [Bug middle-end/46534] [4.3 " rguenth 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-46534-4@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).