From: No Author Date: Mon, 29 Dec 2003 05:32:32 +0000 (+0000) Subject: This commit was manufactured by cvs2svn to create branch X-Git-Tag: releases/gcc-3.3.3~144 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c434cd29745e6bbd925faeb8360fcd23113fadb7;p=thirdparty%2Fgcc.git This commit was manufactured by cvs2svn to create branch 'gcc-3_3-branch'. From-SVN: r75193 --- diff --git a/gcc/testsuite/g++.dg/init/assign1.C b/gcc/testsuite/g++.dg/init/assign1.C new file mode 100644 index 000000000000..690a481910a3 --- /dev/null +++ b/gcc/testsuite/g++.dg/init/assign1.C @@ -0,0 +1,30 @@ +// PR c++/13009 +// { dg-do run } + +struct A { + char a; +}; + +struct B: public virtual A { + #if 0 // this piece of code works around the problem + B& operator= (const B& other) + { + A::operator= (other); + } + #endif +}; + +struct C: public B { + char c; +}; + +int main() { + B b; + b.a = 'b'; + C c; + c.a = c.c = 'c'; + + c.B::operator= (b); + if (c.a != 'b' || c.c != 'c') + return 1; +} diff --git a/gcc/testsuite/g++.dg/opt/inline6.C b/gcc/testsuite/g++.dg/opt/inline6.C new file mode 100644 index 000000000000..21872210558c --- /dev/null +++ b/gcc/testsuite/g++.dg/opt/inline6.C @@ -0,0 +1,14 @@ +// PR c++/13081 +// { dg-options "-O2" } +// { dg-final { scan-assembler-not "foo" } } + +template T foo(T); + +template inline T foo(T t) +{ + return t; +} + +void bar (long& l) { + l = foo(l); +} diff --git a/gcc/testsuite/g++.dg/warn/format3.C b/gcc/testsuite/g++.dg/warn/format3.C new file mode 100644 index 000000000000..0bdaaee17724 --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/format3.C @@ -0,0 +1,12 @@ +// PR c++/13070 +// { dg-do compile } +// { dg-options "-Wformat" } + +extern "C" int printf (const char*, ...); + +int main() +{ + printf("%d\n", 1, 1); // { dg-warning "too many" "printf warning" } + return 0; +} +