From: Jakub Jelinek Date: Thu, 3 Jan 2002 10:01:23 +0000 (+0100) Subject: * g++.dg/other/debug2.C: New test. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5e55c6a2421a0846747002e3e0bda921d9081664;p=gcc.git * g++.dg/other/debug2.C: New test. From-SVN: r48508 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a4afe65ef3d..0fd97019a9a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2002-01-03 Jakub Jelinek + + * g++.dg/other/debug2.C: New test. + 2002-01-02 Jakub Jelinek * gcc.dg/gnu89-init-1.c: Added new tests. diff --git a/gcc/testsuite/g++.dg/other/debug2.C b/gcc/testsuite/g++.dg/other/debug2.C new file mode 100644 index 00000000000..6260f5b7d50 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/debug2.C @@ -0,0 +1,43 @@ +/* Verify that sched re-inserts needed scopes properly. */ +/* { dg-do compile } */ +/* { dg-options "-O2 -g" } */ +/* { dg-options "-O2 -g -mcpu=ev5" { target alpha*-*-* } } */ + +template +inline void foo() +{ + void (T::*x)() __attribute__ ((__unused__)) = &T::bar; +} + +template +struct D +{ + void bar() { + } + T i; +}; + +template +struct E +{ + void bar() { + foo > (); + *i-- = *i; + } + T i; +}; + +struct A {}; +template struct B { typedef typename T::t t; }; +template struct B { typedef T& t; }; +template +struct C +{ + T b; + explicit C (const T& i) : b (i) { } + typename B::t operator* () const { return *b; } + C operator-- (int) { return C (b--); } +}; + +template void foo > > (); +template void foo > > ();