public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/39055] New: [4.2/4.3/4.4 regression] ICE with questionable default parameter of a member function Date: Sun, 01 Feb 2009 10:16:00 -0000 [thread overview] Message-ID: <bug-39055-1771@http.gcc.gnu.org/bugzilla/> (raw) The following valid code snippet triggers an ICE since GCC 3.4.0: ============================== template<int> struct A { int i; A() { void foo(int=i); } }; A<0> a; ============================== bug.cc: In function 'void foo(int) [with int <anonymous> = 0]': bug.cc:4: instantiated from 'A<<anonymous> >::A() [with int <anonymous> = 0]' bug.cc:7: instantiated from here bug.cc:4: internal compiler error: Segmentation fault Please submit a full bug report, [etc.] GCC 3.3.x wrongly rejected the code ('i' as default parameter is not OK, but this should only be diagnosed if the default parameter is actually used). GCC 3.[012].x correctly accepted the code. Btw, the code compiles fine if A is not a template class. -- Summary: [4.2/4.3/4.4 regression] ICE with questionable default parameter of a member function Product: gcc Version: 4.4.0 Status: UNCONFIRMED Keywords: ice-on-valid-code, monitored Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39055
next reply other threads:[~2009-02-01 10:16 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-02-01 10:16 reichelt at gcc dot gnu dot org [this message] 2009-02-01 10:16 ` [Bug c++/39055] " reichelt at gcc dot gnu dot org 2009-02-01 10:58 ` rguenth at gcc dot gnu dot org 2009-02-06 2:25 ` pinskia at gcc dot gnu dot org 2009-02-12 23:23 ` bangerth at gmail dot com 2009-02-20 5:38 ` jason at gcc dot gnu dot org 2009-03-22 14:02 ` jason at gcc dot gnu dot org 2009-03-31 21:09 ` [Bug c++/39055] [4.3/4.4/4.5 " jsm28 at gcc dot gnu dot org 2009-07-18 11:26 ` reichelt at gcc dot gnu dot org 2009-07-18 11:38 ` jason at gcc dot gnu dot org 2009-08-04 12:47 ` rguenth at gcc dot gnu dot org 2009-11-12 22:48 ` jason at gcc dot gnu dot org 2009-11-13 16:16 ` jason at gcc dot gnu dot org 2010-05-22 18:29 ` [Bug c++/39055] [4.3/4.4/4.5/4.6 " rguenth at gcc dot gnu dot org 2010-06-07 15:52 ` jason at gcc dot gnu dot 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-39055-1771@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).