Debian Codegraph @

gcc/testsuite/g++.dg/pr117919.C

raw
1 /* PR tree-optimization/117919 */
2 /* { dg-do compile } */
3 /* { dg-options "-O1 -fno-tree-forwprop -fnon-call-exceptions --param=early-inlining-insns=192 -std=c++20" } */
4
5 char _M_p, _M_construct___beg;
6 struct _Alloc_hider {
7 _Alloc_hider(char);
8 };
9 long _M_string_length;
10 void _M_destroy();
11 void _S_copy_chars(char *, char *, char *) noexcept;
12 char _M_local_data();
13 struct Trans_NS___cxx11_basic_string {
14 _Alloc_hider _M_dataplus;
15 bool _M_is_local() {
16 if (_M_local_data())
17 if (_M_string_length)
18 return true;
19 return false;
20 }
21 void _M_dispose() {
22 if (!_M_is_local())
23 _M_destroy();
24 }
25 char *_M_construct___end;
26 Trans_NS___cxx11_basic_string(Trans_NS___cxx11_basic_string &)
27 : _M_dataplus(0) {
28 struct _Guard {
29 ~_Guard() { _M_guarded->_M_dispose(); }
30 Trans_NS___cxx11_basic_string *_M_guarded;
31 } __guard0;
32 _S_copy_chars(&_M_p, &_M_construct___beg, _M_construct___end);
33 }
34 };
35 namespace filesystem {
36 struct path {
37 path();
38 Trans_NS___cxx11_basic_string _M_pathname;
39 };
40 } // namespace filesystem
41 struct FileWriter {
42 filesystem::path path;
43 FileWriter() : path(path) {}
44 };
45 struct LanguageFileWriter : FileWriter {
46 LanguageFileWriter(filesystem::path) {}
47 };
48 int
49 main() {
50 filesystem::path output_file;
51 LanguageFileWriter writer(output_file);
52 }