diff mbox series

[C++] fix testcase

Message ID 305fafab-b958-dfe4-d62a-2ae8b56fc6c8@acm.org
State New
Headers show
Series [C++] fix testcase | expand

Commit Message

Nathan Sidwell Jan. 6, 2020, 3:20 p.m. UTC
Jason's recent patch
2019-12-17  Jason Merrill  <jason@redhat.com>

	PR c++/79592 - missing explanation of invalid constexpr.

Caused ubsan/vptr-4.C to emit an additional, correct, diagnostic. 
Committing this to update the testcase.

nathan

Comments

Rainer Orth Jan. 6, 2020, 3:31 p.m. UTC | #1
Hi Nathan,

> Jason's recent patch
> 2019-12-17  Jason Merrill  <jason@redhat.com>
>
> 	PR c++/79592 - missing explanation of invalid constexpr.
>
> Caused ubsan/vptr-4.C to emit an additional, correct,
> diagnostic. Committing this to update the testcase.

this is PR testsuite/92991.

	Rainer
diff mbox series

Patch

2020-01-06  Nathan Sidwell  <nathan@acm.org>

	PR c++/79592
	* g++.dg/ubsan/vptr-4.C: Add expected error.

Index: gcc/testsuite/g++.dg/ubsan/vptr-4.C
===================================================================
--- gcc/testsuite/g++.dg/ubsan/vptr-4.C	(revision 279901)
+++ gcc/testsuite/g++.dg/ubsan/vptr-4.C	(working copy)
@@ -36,5 +36,5 @@  struct W : V<U> {
   int g() { return 0; }
   virtual int v() { return 1; }
-  constexpr const W<U> *foo() { return (const W<U> *) reinterpret_cast<const V<U> *> (this); }
+  constexpr const W<U> *foo() { return (const W<U> *) reinterpret_cast<const V<U> *> (this); } // { dg-error "is not a constant expression" }
 };