public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/42056]  New: ICE with invalid use of auto in template
@ 2009-11-15 21:23 reichelt at gcc dot gnu dot org
  2010-05-04 16:32 ` [Bug c++/42056] " paolo dot carlini at oracle dot com
  0 siblings, 1 reply; 10+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2009-11-15 21:23 UTC (permalink / raw)
  To: gcc-bugs

The following invalid testcase triggers an ICE since GCC 4.4.0
(when the meaning of the auto keyword changed).

==========================
template<int> struct A
{
  int a[auto(1)];
};
==========================

bug.cc:3:16: internal compiler error: in fold_convert_loc, at fold-const.c:2671
Please submit a full bug report, [etc.]

A similar code snippet is wrongly accepted:

==========================
template<int> void foo()
{
  int a[auto(1)];
}
==========================

It is rejected when foo is instantiated, but (given the first example)
this is probably too late.


-- 
           Summary: ICE with invalid use of auto in template
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, accepts-invalid, 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=42056


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

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

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-42056-4@http.gcc.gnu.org/bugzilla/>
2011-05-26 16:23 ` [Bug c++/42056] ICE with invalid use of auto in template paolo.carlini at oracle dot com
2011-05-26 16:28 ` jason at gcc dot gnu.org
2011-05-26 17:01 ` paolo.carlini at oracle dot com
2011-05-26 17:12 ` paolo.carlini at oracle dot com
2011-05-26 18:03 ` paolo.carlini at oracle dot com
2011-05-26 18:28 ` jason at gcc dot gnu.org
2011-05-26 19:40 ` paolo.carlini at oracle dot com
2011-05-27 14:23 ` paolo at gcc dot gnu.org
2011-05-27 14:32 ` paolo.carlini at oracle dot com
2009-11-15 21:23 [Bug c++/42056] New: " reichelt at gcc dot gnu dot org
2010-05-04 16:32 ` [Bug c++/42056] " paolo dot carlini at oracle dot com

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