PR c++/71182
* parser.c (cp_lexer_previous_token): Use vec_safe_address in the
assertion, as lexer->buffer may be NULL.
* g++.dg/cpp0x/pr71182.C: New test.
From-SVN: r244070
+2017-01-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/71182
+ * parser.c (cp_lexer_previous_token): Use vec_safe_address in the
+ assertion, as lexer->buffer may be NULL.
+
2017-01-04 Marek Polacek <polacek@redhat.com>
PR c++/77545
/* Skip past purged tokens. */
while (tp->purged_p)
{
- gcc_assert (tp != lexer->buffer->address ());
+ gcc_assert (tp != vec_safe_address (lexer->buffer));
tp--;
}
+2017-01-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/71182
+ * g++.dg/cpp0x/pr71182.C: New test.
+
2017-01-04 Kelvin Nilsen <kelvin@gcc.gnu.org>
PR target/78056
--- /dev/null
+// PR c++/71182
+// { dg-do compile { target c++11 } }
+
+class A {
+ template <typename> void As();
+};
+template <typename T> class B : A {
+ void f() {
+ A *g ;
+ g ? g->As<T>() : nullptr;
+ }
+};