Debian Codegraph @

gcc/testsuite/g++.dg/analyzer/pr108003.C

raw
1 /* Regression test for ICE. */
2 /* { dg-additional-options "-Wno-analyzer-possible-null-argument" } */
3 /* { dg-additional-options "-Wno-analyzer-malloc-leak" } */
4 /* { dg-additional-options "-Wno-analyzer-possible-null-dereference" } */
5
6 /* { dg-additional-options "-O1 --param analyzer-max-svalue-depth=5" } */
7
8 struct locale {
9 class _Impl;
10 _Impl *_M_impl;
11
12 template <typename _Facet>
13 locale (const locale &, _Facet *);
14
15 static locale
16 classic ();
17 };
18
19 struct locale::_Impl {
20 _Impl (_Impl, int);
21 };
22
23 template <typename _Facet>
24 locale::locale (const locale &, _Facet *)
25 {
26 new _Impl (*_M_impl, 1);
27 }
28
29 struct codecvt {
30 virtual void do_max_lengththrow ();
31 };
32
33 void
34 test01 ()
35 {
36 locale (locale::classic (), new codecvt);
37 }