public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/46534] New: [4.3/4.4/4.5/4.6 Regression] ICE optimizing printf ("...>10MBstring\n") into puts
@ 2010-11-18  8:33 jakub at gcc dot gnu.org
  2010-11-18  8:47 ` [Bug middle-end/46534] " jakub at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-18  8:33 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-06-27 12:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-18  8:33 [Bug middle-end/46534] New: [4.3/4.4/4.5/4.6 Regression] ICE optimizing printf ("...>10MBstring\n") into puts jakub at gcc dot gnu.org
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

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).