diff mbox

Fix PR libstdc++/68739 on hpux

Message ID E5379400-0067-40E9-BB3E-112BCA9A6751@bell.net
State New
Headers show

Commit Message

John David Anglin Feb. 18, 2017, 2:45 p.m. UTC
The attached change fixes the fails noted in PR 68730.  Okay for trunk?

Dave
--
John David Anglin	dave.anglin@bell.net
2016-02-18  John David Anglin  <danglin@gcc.gnu.org>

	PR libstdc++/68739
	testsuite/util/testsuite_common_types.h: Adjust template type.

Comments

Jonathan Wakely Feb. 18, 2017, 3:15 p.m. UTC | #1
On 18/02/17 09:45 -0500, John David Anglin wrote:
>The attached change fixes the fails noted in PR 68730.  Okay for trunk?

No, the whole point of that test type is to check that the type can be
declared as a constexpr variable.

The problem is that types like std::mutex can't be constexpr for some
targets:

#ifdef __GTHREAD_MUTEX_INIT
    constexpr
#endif
    mutex() noexcept = default;

We need to disable the tests for those targets, not weaken the tests
so they don't check the condition for any targets.
diff mbox

Patch

Index: testsuite/util/testsuite_common_types.h
===================================================================
--- testsuite/util/testsuite_common_types.h	(revision 245405)
+++ testsuite/util/testsuite_common_types.h	(working copy)
@@ -700,7 +700,7 @@ 
       struct _Concept<_Tp, true>
       {
 	void __constraint()
-	{ constexpr _Tp __obj; }
+	{ static _Tp __obj; }
       };
 
     // Non-literal type, declare local static and verify no