diff options
author | no-author <no-author@gcc.gnu.org> | 2004-04-13 20:23:19 +0000 |
---|---|---|
committer | no-author <no-author@gcc.gnu.org> | 2004-04-13 20:23:19 +0000 |
commit | f2bd2cd672109dd60dcde0e10373f26c3526655c (patch) | |
tree | 1bb1dfdaebc052f29bd4c8977b110385ca003850 | |
parent | 57ca0a1c11cec77270c2e2b18391756f69c437fc (diff) |
This commit was manufactured by cvs2svn to create branch
'gcc-3_3-rhl-branch'.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-3_3-rhl-branch@80651 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/testsuite/g++.dg/init/goto1.C | 23 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/init/static2.C | 25 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/template/defarg4.C | 14 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20040331-1.c | 12 |
4 files changed, 74 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/init/goto1.C b/gcc/testsuite/g++.dg/init/goto1.C new file mode 100644 index 00000000000..b0a0c5253b6 --- /dev/null +++ b/gcc/testsuite/g++.dg/init/goto1.C @@ -0,0 +1,23 @@ +// PR c++/14724 +// { dg-do run } + +int j; + +template <class T> +struct C { + C() { ++j; } + ~C() { --j; } +}; + +int main(int, char **) { + { + int i = 0; + again: + C<int> v; + if (++i < 10) + goto again; + } + + return j; +} + diff --git a/gcc/testsuite/g++.dg/init/static2.C b/gcc/testsuite/g++.dg/init/static2.C new file mode 100644 index 00000000000..b0344f48066 --- /dev/null +++ b/gcc/testsuite/g++.dg/init/static2.C @@ -0,0 +1,25 @@ +// PR 14804 +// { dg-do run } + +struct A { + virtual void foo() = 0; +}; + +struct B : public A { + virtual void bar() = 0; +}; + +typedef void (A::*mfptr)(); + +struct D { + mfptr p; +}; + +static const D ds[] = { + { reinterpret_cast<mfptr>(&B::bar) }, +}; + +int main() +{ + return 0; +} diff --git a/gcc/testsuite/g++.dg/template/defarg4.C b/gcc/testsuite/g++.dg/template/defarg4.C new file mode 100644 index 00000000000..293538adbd1 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/defarg4.C @@ -0,0 +1,14 @@ +// PR c++/14763 + +struct A { + int get() const {} + static A *foo(); +}; + +template<bool> struct S { + S(unsigned int = A::foo()->get()) ; +}; + +void foo() throw() { + S<false> f; +} diff --git a/gcc/testsuite/gcc.c-torture/execute/20040331-1.c b/gcc/testsuite/gcc.c-torture/execute/20040331-1.c new file mode 100644 index 00000000000..67b3e3a2e0c --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20040331-1.c @@ -0,0 +1,12 @@ +/* PR c++/14755 */ +extern void abort (void); +extern void exit (int); + +int +main (void) +{ + struct { int count: 31; } s = { 0 }; + while (s.count--) + abort (); + exit (0); +} |