Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / asan / pr64937.C
blob91beee0eedf1ab953290449262bac34768277431
1 // PR middle-end/64937
2 // { dg-do compile }
3 // { dg-options "-fsanitize=address -fcompare-debug" }
5 namespace foo_aux {
6   struct BarParser { };
8 extern "C" {
9   extern void __assert_fail (__const char *__assertion, __const char *__file,
10                              unsigned int __line, __const char *__function);
12 namespace foo {
13   class BarBox {
14   public:
15     BarBox (int xl = 0, int yl = 0) { }
16   };
17   class BarFoo {
18   public:
19     explicit BarFoo (BarBox box) {
20       ((_orig_mask) ? static_cast < void >(0) :
21        __assert_fail ("_orig_mask", "foo.h", 159, __PRETTY_FUNCTION__));
22     }
23     BarBox *_orig_mask;
24   };
26 static void
27 ProcessOp (foo_aux::BarParser * p, int xl, int yr)
29   foo::BarFoo tiles (foo::BarBox (xl, yr));