]>
Commit | Line | Data |
---|---|---|
8087e702 | 1 | // { dg-options "-O0" } |
6458742a | 2 | // { dg-do run { target c++17 } } |
ca8f2cb1 | 3 | // { dg-require-debug-mode "" } |
6458742a | 4 | // { dg-xfail-run-if "expect debug mode assertion to fail" { *-*-* } } |
ca8f2cb1 | 5 | |
a945c346 | 6 | // Copyright (C) 2013-2024 Free Software Foundation, Inc. |
ca8f2cb1 VV |
7 | // |
8 | // This file is part of the GNU ISO C++ Library. This library is free | |
9 | // software; you can redistribute it and/or modify it under the | |
10 | // terms of the GNU General Public License as published by the | |
11 | // Free Software Foundation; either version 3, or (at your option) | |
12 | // any later version. | |
13 | ||
14 | // This library is distributed in the hope that it will be useful, | |
15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | // GNU General Public License for more details. | |
18 | ||
19 | // You should have received a copy of the GNU General Public License along | |
20 | // with this library; see the file COPYING3. If not see | |
21 | // <http://www.gnu.org/licenses/>. | |
22 | ||
23 | #include <string_view> | |
24 | ||
25 | // libstdc++/21674 | |
26 | // NB: Should work without any inlining or optimizations (ie. -O0). | |
27 | int | |
28 | main() | |
29 | { | |
30 | typedef std::wstring_view string_view_type; | |
31 | string_view_type s; | |
b911ca42 | 32 | (void) s[0]; // abort |
ca8f2cb1 | 33 | } |