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; 2+ 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] 2+ messages in thread
* [Bug c++/42056] ICE with invalid use of auto in template
2009-11-15 21:23 [Bug c++/42056] New: ICE with invalid use of auto in template reichelt at gcc dot gnu dot org
@ 2010-05-04 16:32 ` paolo dot carlini at oracle dot com
0 siblings, 0 replies; 2+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-05-04 16:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from paolo dot carlini at oracle dot com 2010-05-04 16:32 -------
Apparently now *both* snippets are wrongly accepted, at least in mainline.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42056
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-05-04 16:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-15 21:23 [Bug c++/42056] New: ICE with invalid use of auto in template 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).