28 lines
960 B
C++
Raw Normal View History

2019-06-02 17:48:37 +02:00
// Copyright (C) 2015-2019 Free Software Foundation, Inc.
2012-03-28 01:13:14 +02:00
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
2015-08-28 17:33:40 +02:00
2012-03-28 01:13:14 +02:00
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
2015-08-28 17:33:40 +02:00
2012-03-28 01:13:14 +02:00
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// { dg-do compile { target c++11 } }
2015-08-28 17:33:40 +02:00
#include <atomic>
2012-03-28 01:13:14 +02:00
2015-08-28 17:33:40 +02:00
struct S16 {
char c[16];
};
2012-03-28 01:13:14 +02:00
2015-08-28 17:33:40 +02:00
static_assert( alignof(std::atomic<S16>) >= 16,
"atomic<S16> must be aligned to at least its size" );