public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/50436] New: Crash or hang on invalid template code
@ 2011-09-16 19:56 zackw at panix dot com
2011-09-16 20:13 ` [Bug c++/50436] " zackw at panix dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: zackw at panix dot com @ 2011-09-16 19:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50436
Bug #: 50436
Summary: Crash or hang on invalid template code
Classification: Unclassified
Product: gcc
Version: 4.6.1
Status: UNCONFIRMED
Keywords: ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: zackw@panix.com
This (invalid) test case causes gcc 4.6.1 to crash (segmentation fault).
Variations cause it to go into an infinite loop instead. I tripped over the
infinite loop while delta-minimizing a much, much larger test case for an
unrelated problem.
template <bool> struct VI {};
template <typename T>
struct IP
{
static const bool r = IP<T>::r;
};
template <typename T> struct V
{
VI<IP<T>::r> vi;
};
struct X;
struct Y
{
V<X> v;
};
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/50436] Crash or hang on invalid template code
2011-09-16 19:56 [Bug c++/50436] New: Crash or hang on invalid template code zackw at panix dot com
@ 2011-09-16 20:13 ` zackw at panix dot com
2013-06-11 15:33 ` paolo.carlini at oracle dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: zackw at panix dot com @ 2011-09-16 20:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50436
--- Comment #1 from Zack Weinberg <zackw at panix dot com> 2011-09-16 19:13:13 UTC ---
Here's a variant that hangs.
template <bool> struct VI {};
template <typename T>
struct IP
{
static const bool r = IP<T>::r;
};
template <typename T>
struct V
{
static const bool r = IP<T>::r;
VI<r> vi;
};
struct X;
struct Y
{
V<X> v;
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/50436] Crash or hang on invalid template code
2011-09-16 19:56 [Bug c++/50436] New: Crash or hang on invalid template code zackw at panix dot com
2011-09-16 20:13 ` [Bug c++/50436] " zackw at panix dot com
@ 2013-06-11 15:33 ` paolo.carlini at oracle dot com
2013-08-23 11:06 ` paolo.carlini at oracle dot com
2013-11-06 10:14 ` paolo.carlini at oracle dot com
3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-06-11 15:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50436
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-06-11
Ever confirmed|0 |1
Known to fail| |4.8.1, 4.9.0
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Confirmed.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/50436] Crash or hang on invalid template code
2011-09-16 19:56 [Bug c++/50436] New: Crash or hang on invalid template code zackw at panix dot com
2011-09-16 20:13 ` [Bug c++/50436] " zackw at panix dot com
2013-06-11 15:33 ` paolo.carlini at oracle dot com
@ 2013-08-23 11:06 ` paolo.carlini at oracle dot com
2013-11-06 10:14 ` paolo.carlini at oracle dot com
3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-08-23 11:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50436
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Currently both hang for me (after a rather useful error message). We can
certainly do better, of course. Interesting that the error messages produced by
clang and icc are completely different.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/50436] Crash or hang on invalid template code
2011-09-16 19:56 [Bug c++/50436] New: Crash or hang on invalid template code zackw at panix dot com
` (2 preceding siblings ...)
2013-08-23 11:06 ` paolo.carlini at oracle dot com
@ 2013-11-06 10:14 ` paolo.carlini at oracle dot com
3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-11-06 10:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50436
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |paolo.carlini at oracle dot com
--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Mine.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-11-06 10:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-16 19:56 [Bug c++/50436] New: Crash or hang on invalid template code zackw at panix dot com
2011-09-16 20:13 ` [Bug c++/50436] " zackw at panix dot com
2013-06-11 15:33 ` paolo.carlini at oracle dot com
2013-08-23 11:06 ` paolo.carlini at oracle dot com
2013-11-06 10:14 ` paolo.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).