diff -Nrc3pad gcc-3.2/gcc/testsuite/ChangeLog gcc-3.2.1/gcc/testsuite/ChangeLog *** gcc-3.2/gcc/testsuite/ChangeLog Wed Aug 14 09:00:33 2002 --- gcc-3.2.1/gcc/testsuite/ChangeLog Tue Nov 19 17:49:21 2002 *************** *** 1,3 **** --- 1,225 ---- + 2002-11-19 Release Manager + + * GCC 3.2.1 Released. + + 2002-11-19 Release Manager + + * GCC 3.2.1 Released. + + 2002-11-18 Release Manager + + * GCC 3.2.1 Released. + + 2002-11-11 Franz Sirl + + PR c/8467 + * gcc.c-torture/execute/20021111-1.c + + 2002-11-11 Nathan Sidwell + + PR c++/7788 + * g++.dg/rtti/crash1.C: New test. + + 2002-11-07 Hans-Peter Nilsson + + * gcc.dg/wint_t-1.c, gcc.dg/wchar_t-1.c: Remove excess-errors + markers. + + 2002-11-02 Zack Weinberg + + * g++.dg/ext/typedef-init.C, gcc.dg/typedef-init.C: + Add some more cases. + + 2002-11-01 Mark Mitchell + + PR c++/8391 + * g++.dg/opt/local1.C: New test. + + 2002-10-30 Mark Mitchell + + PR c++/8160 + * g++.dg/template/complit1.C: New test. + + PR c++/8149 + * g++.dg/template/typename4.C: Likewise. + + 2002-10-29 Mark Mitchell + + PR c++/8287 + * g++.dg/init/dtor2.C: New test. + + * g++.dg/template/alignof1.C: New test. + + 2002-10-28 Kaveh R. Ghazi + + * gcc.dg/20021014-1.c: Bypass errors on solaris2 and irix6. + + 2002-10-27 Hans-Peter Nilsson + + * gcc.dg/20021014-1.c: Use dg-error, not dg-build. + * gcc.dg/20021014-1.c: Expect build failure on mmix-*-*. + + 2002-10-25 Zack Weinberg + + * g++.dg/ext/vla1.C, gcc.dg/vla-2.c, + g++.dg/template/typename3.C: New tests. + + 2002-10-24 Jakub Jelinek + + * gcc.c-torture/execute/20021024-1.c: New test. + + 2002-10-23 Mark Mitchell + + PR c++/8067 + * g++.dg/lookup/pretty1.C: New test. + + 2002-10-23 Mark Mitchell + + PR c++/7679 + * g++.dg/parse/inline1.C: New test. + + 2002-10-22 Mark Mitchell + + PR c++/6579 + * g++.dg/parse/stmtexpr3.C: New test. + + 2002-10-22 Nathan Sidwell + + PR c++/7209 + * g++.dg/expr: New directory. + * g++.dg/expr/cond1.C: New test. + + 2002-10-21 Zack Weinberg + + * gcc.dg/noncompile/920923-1.c: Prevent spurious regressions with + bison 1.50 or later. + + 2002-10-18 Nathan Sidwell + + PR c++/7676 + * g++.dg/overload/method2.C: New test. + + 2002-10-17 Mark Mitchell + + PR c++/7584 + * g++.dg/inherit/using3.C: New test. + + 2002-10-16 Mark Mitchell + + PR c++/7478 + * g++.dg/template/ref1.C: New test. + + PR c++/8134 + * g++.dg/init/pm1.C: XFAIL it. + + PR c++/7524 + * g++.dg/init/array7.C: New test. + + 2002-10-15 Ulrich Weigand + + PR target/7370 + * gcc.c-torture/compile/20021015-1.c: New test. + + PR target/8232 + * gcc.c-torture/compile/20021015-2.c: New test. + + 2002-10-15 Ulrich Weigand + + * gcc.c-torture/execute/20021015-1.c: New test. + + 2002-10-14 Jakub Jelinek + + * gcc.dg/20021014-1.c: New test. + + 2002-10-14 Mark Mitchell + + PR optimization/6631 + * g++.dg/opt/const2.C: New test. + + PR c++/7176 + * g++.dg/parse/friend1.C: New test. + * g++.old-deja/g++.pt/memtemp64.C: Adjust. + + 2002-10-11 Mark Mitchell + + PR c++/5661 + * g++.dg/ext/vlm1.C: New test. + * g++.dg/ext/vlm2.C: Likewise. + + 2002-10-09 Zack Weinberg + + PR c/7353 + * g++.dg/ext/typedef-init.C: New test. + * gcc.dg/typedef-init.c: New test. + + 2002-10-06 Neil Booth + + * gcc.dg/cpp/_Pragma4.c: New test. + + 2002-10-02 Mark Mitchell + + PR c++/7754 + * g++.dg/template/union1.C: New test. + + 2002-10-02 Mark Mitchell + + PR c++/7188. + * testsuite/g++.dg/template/meminit1.C: New test. + + Thu Sep 5 00:34:33 2002 J"orn Rennecke + + * gcc.c-torture/execute/loop-14.c: New test. + + 2002-09-27 Zack Weinberg + + * gcc.dg/cpp/20020927-1.c: New. + + 2002-09-26 David S. Miller + + * gcc.c-torture/compile/trunctfdf.c: New. + + 2002-09-26 Kaveh R. Ghazi + + * lib/target-supports.exp (check_weak_available): Handle solaris2. + + 2002-09-27 Alan Modra + + * gcc.c-torture/execute/loop-15.c: New. + + 2002-09-25 David S. Miller + + PR target/7842 + * gcc.c-torture/execute/shiftdi.c: New test. + + 2002-09-20 Hans-Peter Nilsson + + * gcc.c-torture/execute/ieee/mzero3.c: New test. + + 2002-09-06 Alan Modra + + * gcc.c-torture/execute/extzvsi.c: New test. + + 2002-09-04 Jakub Jelinek + + * g++.dg/other/cxa-atexit1.C: New test. + + * gcc.dg/typeof-2.c: New test. + + 2002-09-01 Jakub Jelinek + + * gcc.dg/typeof-1.c: New test. + * g++.dg/ext/typeof2.C: New test. + + 2002-08-27 Mark Mitchell + + * testsuite/g++.dg/abi/bitfield5.C: New test. + * testsuite/g++.dg/abi/vbase10.C: Likewise. + + 2002-08-15 Neil Booth + + * gcc.dg/cpp/_Pragma3.c, gcc.dg/cpp/vararg3.c, gcc.dg/cpp/vararg4.c: + New tests. + 2002-08-14 Release Manager * GCC 3.2 Released. *************** *** 47,53 **** PR c++/7224 * g++.dg/overload/error1.C: New test. ! 2002-07-03 Mark Mitchell PR c++/6706 --- 269,275 ---- PR c++/7224 * g++.dg/overload/error1.C: New test. ! 2002-07-03 Mark Mitchell PR c++/6706 *************** *** 557,564 **** 2002-03-26 Richard Henderson ! * gcc.c-torture/execute/20020307-2.c (main): Pass a variable sized ! structure. 2002-03-26 David Billinghurst --- 779,786 ---- 2002-03-26 Richard Henderson ! * gcc.c-torture/execute/20020307-2.c (main): Pass a variable sized ! structure. 2002-03-26 David Billinghurst *************** Sat Mar 9 07:30:53 2002 Richard Kenner *** 808,814 **** 2002-02-21 Aldy Hernandez ! * gcc.dg/attr-alwaysinline.c: New. 2002-02-21 Jakub Jelinek --- 1030,1036 ---- 2002-02-21 Aldy Hernandez ! * gcc.dg/attr-alwaysinline.c: New. 2002-02-21 Jakub Jelinek *************** Sat Mar 9 07:30:53 2002 Richard Kenner *** 885,891 **** 2002-02-13 Stan Shebs ! * gcc.dg/altivec-3.c: New. 2002-02-12 Jakub Jelinek --- 1107,1113 ---- 2002-02-13 Stan Shebs ! * gcc.dg/altivec-3.c: New. 2002-02-12 Jakub Jelinek *************** Sat Mar 9 07:30:53 2002 Richard Kenner *** 991,1003 **** 2002-02-06 Nick Clifton * g++.dg/ext/align1.C: Do not use an explicit alignment value ! as certain file formats cannot support particularly large ! alignments. * g++.dg/warn/weak1.C: Expect a warning from COFF toolchains, and do not expect to be able to link the executable. ! * g++.old-deja/g++.ext/attrib5.C: Expect the compilation to fail because the COFF format does not support the weak attribute. 2002-02-05 David Billinghurst --- 1213,1225 ---- 2002-02-06 Nick Clifton * g++.dg/ext/align1.C: Do not use an explicit alignment value ! as certain file formats cannot support particularly large ! alignments. * g++.dg/warn/weak1.C: Expect a warning from COFF toolchains, and do not expect to be able to link the executable. ! * g++.old-deja/g++.ext/attrib5.C: Expect the compilation to fail because the COFF format does not support the weak attribute. 2002-02-05 David Billinghurst *************** Sat Mar 9 07:30:53 2002 Richard Kenner *** 1006,1013 **** 2002-02-05 Aldy Hernandez ! * gcc.dg/altivec-4.c: AltiVec builtin predicates changed format. ! Fix testcase accordingly. 2002-02-04 Richard Henderson --- 1228,1235 ---- 2002-02-05 Aldy Hernandez ! * gcc.dg/altivec-4.c: AltiVec builtin predicates changed format. ! Fix testcase accordingly. 2002-02-04 Richard Henderson diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/abi/bitfield5.C gcc-3.2.1/gcc/testsuite/g++.dg/abi/bitfield5.C *** gcc-3.2/gcc/testsuite/g++.dg/abi/bitfield5.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/abi/bitfield5.C Tue Aug 27 22:49:49 2002 *************** *** 0 **** --- 1,14 ---- + // { dg-do compile } + // { dg-options "-Wabi" } + + struct A { + virtual void f(); + int f1 : 1; + }; + + struct B : public A { + int f2 : 1; // { dg-warning "ABI" } + int : 0; + int f3 : 4; + int f4 : 3; + }; diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/abi/mangle11.C gcc-3.2.1/gcc/testsuite/g++.dg/abi/mangle11.C *** gcc-3.2/gcc/testsuite/g++.dg/abi/mangle11.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/abi/mangle11.C Fri Oct 18 08:11:44 2002 *************** *** 0 **** --- 1,10 ---- + // { dg-options "-Wabi" } + + template + void f (typename Q::X) {} + + struct S { + typedef int X; + }; + + template void f (int); // { dg-warning "mangle" } diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/abi/mangle14.C gcc-3.2.1/gcc/testsuite/g++.dg/abi/mangle14.C *** gcc-3.2/gcc/testsuite/g++.dg/abi/mangle14.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/abi/mangle14.C Fri Oct 18 08:11:44 2002 *************** *** 0 **** --- 1,12 ---- + // { dg-do compile } + // { dg-options "-Wabi" } + + struct A { + template int f (); + }; + + typedef int (A::*P)(); + + template

struct S {}; + + void g (S<&A::f >) {} // { dg-warning "mangle" } diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/abi/mangle17.C gcc-3.2.1/gcc/testsuite/g++.dg/abi/mangle17.C *** gcc-3.2/gcc/testsuite/g++.dg/abi/mangle17.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/abi/mangle17.C Fri Oct 18 08:11:44 2002 *************** *** 0 **** --- 1,11 ---- + // { dg-options "-Wabi" } + + enum E { e = 3 }; + + template struct S {}; + + template void f (S) {} + template void f<7>(S); // { dg-warning "mangle" } + + template void g (S) {} + template void g<7>(S); // { dg-warning "mangle" } diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/abi/vbase10.C gcc-3.2.1/gcc/testsuite/g++.dg/abi/vbase10.C *** gcc-3.2/gcc/testsuite/g++.dg/abi/vbase10.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/abi/vbase10.C Tue Aug 27 22:49:49 2002 *************** *** 0 **** --- 1,7 ---- + // { dg-do compile } + // { dg-options "-Wabi" } + + struct A { virtual void f(); char c1; }; + struct B { B(); char c2; }; + struct C : public A, public virtual B {}; // { dg-warning "ABI" } + diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/expr/cond1.C gcc-3.2.1/gcc/testsuite/g++.dg/expr/cond1.C *** gcc-3.2/gcc/testsuite/g++.dg/expr/cond1.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/expr/cond1.C Tue Oct 22 09:06:46 2002 *************** *** 0 **** --- 1,28 ---- + // { dg-do run } + + // Copyright (C) 2001 Free Software Foundation, Inc. + // Contributed by Nathan Sidwell 17 Oct 2002 + + // PR 7209. We didn't SAVE_EXPR in the right place + + char a[2][1][16]={ + {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, + {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}}; + + int f() {return 0;} + + char * Foo (int d) + { + char *c1; + + c1=a[d==0 ? 0 : 1][f()]; + + return c1; + } + + int main () + { + if (Foo (0) != (void *)a) + return 1; + return 0; + } diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/ext/typedef-init.C gcc-3.2.1/gcc/testsuite/g++.dg/ext/typedef-init.C *** gcc-3.2/gcc/testsuite/g++.dg/ext/typedef-init.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/ext/typedef-init.C Sat Nov 2 10:28:48 2002 *************** *** 0 **** --- 1,33 ---- + /* { dg-do compile } */ + /* { dg-options "-fpermissive" } // suppress default -pedantic-errors */ + + /* This code used to be a legitimate, if dubious, extension. However, + it's been broken since GCC 3.0 (caused ICE) and we have now removed + the extension. See PR c/7353. + + For cases A and C, C++ issues a warning in addition to the error, + since this construct appears to be a case of implicit int + (forbidden in std. C++) until we get to the equals sign. */ + + /* Case A: just the bare name = initializer. */ + + typedef A = 0; /* { dg-error "initialized" "A" } */ + /* { dg-warning "no type" "A warns" { target *-*-* } 14 } */ + A a; /* { dg-bogus "" "A error cascade" } */ + + /* Case B: with a type also. */ + + typedef int B = 0; /* { dg-error "initialized" "B" } */ + B b; /* { dg-bogus "" "B error cascade" } */ + + /* C and D are the same as A and B, but wrapped in a structure; + field declarations go by a different code path in C++ (ick). */ + + struct S { + typedef C = 0; /* { dg-error "initialized" "C" } */ + /* { dg-warning "no type" "C warns" { target *-*-* } 27 } */ + C c; /* { dg-bogus "" "C error cascade" } */ + + typedef int D = 0; /* { dg-error "initialized" "D" } */ + D d; /* { dg-bogus "" "D error cascade" } */ + }; diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/ext/typeof2.C gcc-3.2.1/gcc/testsuite/g++.dg/ext/typeof2.C *** gcc-3.2/gcc/testsuite/g++.dg/ext/typeof2.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/ext/typeof2.C Sun Sep 1 20:10:07 2002 *************** *** 0 **** --- 1,29 ---- + // Test typeof with __asm redirection + // { dg-do compile } + // { dg-options "-O2" } + + extern "C" { + extern int foo1; + extern int foo1 __asm ("bar1"); + int foo1 = 1; + + extern int foo2 (int); + extern int foo2 (int) __asm ("bar2"); + int foo2 (int x) + { + return x; + } + + extern int foo3; + extern __typeof (foo3) foo3 __asm ("bar3"); + int foo3 = 1; + + extern int foo4 (int); + extern __typeof (foo4) foo4 __asm ("bar4"); + int foo4 (int x) + { + return x; + } + } + + // { dg-final { scan-assembler-not "foo" } } diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/ext/vla1.C gcc-3.2.1/gcc/testsuite/g++.dg/ext/vla1.C *** gcc-3.2/gcc/testsuite/g++.dg/ext/vla1.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/ext/vla1.C Fri Oct 25 22:11:18 2002 *************** *** 0 **** --- 1,26 ---- + // { dg-do compile } + + // Crash tests from PR middle-end/6994. See also gcc.dg/vla-2.c. + // A::A is acceptable extended C++ (VLA types brought over from C99); + // B::B is not, but is closely related to acceptable extended C, though + // not to acceptable C99. + + class A { A (int); }; + + A::A (int i) + { + int ar[1][i]; // { dg-error "variable-size array" } + + ar[0][0] = 0; + } + + class B { B (int); }; + + B::B (int i) + { + struct S { + int ar[1][i]; // { dg-error "variable-size|variably modified" } + } s; + + s.ar[0][0] = 0; // { dg-error "no member" } + } diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/ext/vlm1.C gcc-3.2.1/gcc/testsuite/g++.dg/ext/vlm1.C *** gcc-3.2/gcc/testsuite/g++.dg/ext/vlm1.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/ext/vlm1.C Fri Oct 11 22:42:21 2002 *************** *** 0 **** --- 1,13 ---- + // { dg-options "" } + + template struct A {}; + + struct B { + static const int s; + A a; // { dg-error "variably modified|no type" } + }; + + const int B::s=16; + + B b; + diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/ext/vlm2.C gcc-3.2.1/gcc/testsuite/g++.dg/ext/vlm2.C *** gcc-3.2/gcc/testsuite/g++.dg/ext/vlm2.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/ext/vlm2.C Fri Oct 11 22:42:21 2002 *************** *** 0 **** --- 1,13 ---- + // { dg-options "" } + + int n; + + struct Y + { + void f () { + typedef int X[n]; + struct Z { + X x; // { dg-error "variably modified" } + }; + } + }; diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/inherit/using3.C gcc-3.2.1/gcc/testsuite/g++.dg/inherit/using3.C *** gcc-3.2/gcc/testsuite/g++.dg/inherit/using3.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/inherit/using3.C Thu Oct 17 22:37:49 2002 *************** *** 0 **** --- 1,19 ---- + class A + { + public: + typedef int T; + int a; + }; + + class B : virtual private A + { + }; + + class C : virtual private A, public B + { + public: + using A::a; + using A::T; + }; + + C::T x; diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/init/array7.C gcc-3.2.1/gcc/testsuite/g++.dg/init/array7.C *** gcc-3.2/gcc/testsuite/g++.dg/init/array7.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/init/array7.C Wed Oct 16 18:53:29 2002 *************** *** 0 **** --- 1,15 ---- + struct S { + virtual void v () {} + void f (const float g[3]); + float h[3]; + }; + + void g () { + S s1, s2; + s1 = s2; + } + + void S::f (const float g[3]) {} + + + diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/init/dtor2.C gcc-3.2.1/gcc/testsuite/g++.dg/init/dtor2.C *** gcc-3.2/gcc/testsuite/g++.dg/init/dtor2.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/init/dtor2.C Tue Oct 29 23:51:12 2002 *************** *** 0 **** --- 1,28 ---- + // { dg-do run } + + extern "C" void abort (); + + struct A + { + ~A(); + }; + + A::~A () { + abort (); + } + + struct B + { + ~B(); + }; + + B::~B () { + if(true) return; + A a; + } + + int main() + { + B b; + return 0; + } diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/init/pm1.C gcc-3.2.1/gcc/testsuite/g++.dg/init/pm1.C *** gcc-3.2/gcc/testsuite/g++.dg/init/pm1.C Thu May 16 02:09:36 2002 --- gcc-3.2.1/gcc/testsuite/g++.dg/init/pm1.C Wed Oct 16 19:36:29 2002 *************** *** 1,4 **** ! // { dg-do run } // Copyright 2002 Free Software Foundation // Contributed by Jason Merrill and Alexandre Oliva --- 1,4 ---- ! // { dg-do run { xfail *-*-* } } // Copyright 2002 Free Software Foundation // Contributed by Jason Merrill and Alexandre Oliva diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/lookup/pretty1.C gcc-3.2.1/gcc/testsuite/g++.dg/lookup/pretty1.C *** gcc-3.2/gcc/testsuite/g++.dg/lookup/pretty1.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/lookup/pretty1.C Thu Oct 24 00:03:16 2002 *************** *** 0 **** --- 1 ---- + void foo() { for ( __PRETTY_FUNCTION__ ; ; ) ; } diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/opt/const2.C gcc-3.2.1/gcc/testsuite/g++.dg/opt/const2.C *** gcc-3.2/gcc/testsuite/g++.dg/opt/const2.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/opt/const2.C Mon Oct 14 21:04:33 2002 *************** *** 0 **** --- 1,40 ---- + // { dg-do run } + // { dg-options "-O" } + + extern "C" void abort (void); + + struct QSize + { + QSize(); + QSize( int w, int h ); + int wd, ht; + friend inline const QSize operator+( const QSize &, const QSize & ); + }; + + inline QSize::QSize() + { wd = ht = -1; } + + inline QSize::QSize( int w, int h ) + { wd = w; ht = h; } + + inline const QSize operator+( const QSize & s1, const QSize & s2 ) + { return QSize(s1.wd+s2.wd, s1.ht+s2.ht); } + + QSize minimumSize() + { + return QSize (100, 200); + } + + QSize totalMinimumSize() + { + QSize s = minimumSize(); + return s + QSize( 0, 0 ); + } + + int main() + { + QSize s = totalMinimumSize(); + if (s.wd != 100 || s.ht != 200) + abort (); + } + diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/opt/local1.C gcc-3.2.1/gcc/testsuite/g++.dg/opt/local1.C *** gcc-3.2/gcc/testsuite/g++.dg/opt/local1.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/opt/local1.C Sat Nov 2 00:57:26 2002 *************** *** 0 **** --- 1,20 ---- + // { dg-options "-O" } + + struct Outer { + struct Inner { virtual bool f() = 0; }; + void g(Inner &) const; + }; + + inline void h(const Outer &o) + { + struct Local : public Outer::Inner { + virtual bool f() {}; + }; + Local l; + o.g(l); + } + + void f(Outer &req) { + h (req); + } + diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/opt/reload1.C gcc-3.2.1/gcc/testsuite/g++.dg/opt/reload1.C *** gcc-3.2/gcc/testsuite/g++.dg/opt/reload1.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/opt/reload1.C Thu Oct 24 08:59:50 2002 *************** *** 0 **** --- 1,43 ---- + // PR 7944 + // { dg-do compile } + // { dg-options -O2 } + + struct B + { + B & operator << (short s) + { + int j; + if (j) + return operator << (s); + else + return operator << (s); + } + }; + + struct A + { + int i; + static void bar (); + static int quux () + { + bar (); + return 0; + } + + A ():i (quux ()) + { + } + ~A () + { + } + }; + + void + foo () + { + short s[4] = { 0, 0, 0, 1 }; + A a[2] = { A (), A () }; + + B b; + b << s[0] << s[2]; + } diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/other/cxa-atexit1.C gcc-3.2.1/gcc/testsuite/g++.dg/other/cxa-atexit1.C *** gcc-3.2/gcc/testsuite/g++.dg/other/cxa-atexit1.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/other/cxa-atexit1.C Wed Sep 4 08:25:52 2002 *************** *** 0 **** --- 1,26 ---- + // { dg-do compile } + // { dg-options "-O2 -fuse-cxa-atexit" } + + # 1 "cxa-atexit1.C" + struct A + { + struct B + { + B (); + ~B (); + }; + }; + static A::B b; + # 1 "cxa-atexit1.h" 1 + #pragma interface + template struct C + { + ~C (void); + }; + struct D : public C + { + D (void) : C () { } + }; + # 55 "cxa-atexit1.C" 2 + + // { dg-final { scan-assembler-not ".gnu.linkonce.t.__tcf_" } } diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/overload/member2.C gcc-3.2.1/gcc/testsuite/g++.dg/overload/member2.C *** gcc-3.2/gcc/testsuite/g++.dg/overload/member2.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/overload/member2.C Fri Oct 18 08:17:57 2002 *************** *** 0 **** --- 1,41 ---- + // { dg-do run } + + // Copyright (C) 2001 Free Software Foundation, Inc. + // Contributed by Nathan Sidwell 17 Oct 2002 + + // PR 7676. We didn't notice template members were different. + + struct foo + { + template + int bar() {return 1;} + + template + int bar() {return 2;} + + }; + + struct baz : foo + { + using foo::bar; + template + int bar () {return 3;} + }; + + int main () + { + baz b; + foo f; + + if (f.bar<1> () != 2) + return 1; + if (f.bar () != 1) + return 2; + + if (b.bar<1> () != 3) + return 1; + if (b.bar () != 1) + return 2; + + return 0; + } diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/parse/decl-specifier-1.C gcc-3.2.1/gcc/testsuite/g++.dg/parse/decl-specifier-1.C *** gcc-3.2/gcc/testsuite/g++.dg/parse/decl-specifier-1.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/parse/decl-specifier-1.C Fri Oct 11 18:00:42 2002 *************** *** 0 **** --- 1,16 ---- + // Contributed by Gabriel Dos Reis + // Origin: PRs 7721 and 7803 + // { dg-do compile } + + namespace N + { + template + struct X { }; + } + + N::X X; // { dg-error "" "" } + + int main() + { + return sizeof(X); // { dg-error "" "" } + } diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/parse/friend1.C gcc-3.2.1/gcc/testsuite/g++.dg/parse/friend1.C *** gcc-3.2/gcc/testsuite/g++.dg/parse/friend1.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/parse/friend1.C Mon Oct 14 07:46:29 2002 *************** *** 0 **** --- 1,9 ---- + namespace N { + template + static void f (); + + struct S { + friend void N::f (); + static void f (int); + }; + } diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/parse/inline1.C gcc-3.2.1/gcc/testsuite/g++.dg/parse/inline1.C *** gcc-3.2/gcc/testsuite/g++.dg/parse/inline1.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/parse/inline1.C Wed Oct 23 21:56:55 2002 *************** *** 0 **** --- 1,7 ---- + struct f + { + int oo() + { + return (2; // { dg-error "" } + } + }; diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/parse/stmtexpr3.C gcc-3.2.1/gcc/testsuite/g++.dg/parse/stmtexpr3.C *** gcc-3.2/gcc/testsuite/g++.dg/parse/stmtexpr3.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/parse/stmtexpr3.C Wed Oct 23 00:31:20 2002 *************** *** 0 **** --- 1,8 ---- + // { dg-do compile } + // { dg-options "" } + + struct B + { + int a; + B() : a(({ 1; })) {} + }; diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/rtti/crash1.C gcc-3.2.1/gcc/testsuite/g++.dg/rtti/crash1.C *** gcc-3.2/gcc/testsuite/g++.dg/rtti/crash1.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/rtti/crash1.C Mon Nov 11 12:42:17 2002 *************** *** 0 **** --- 1,10 ---- + // { dg-do compile } + + // Copyright (C) 2002 Free Software Foundation, Inc. + // Contributed by Nathan Sidwell 29 Sep 2002 + + // PR 7788. ICE + + class foo; + extern const foo bar; + class bar; diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/template/alignof1.C gcc-3.2.1/gcc/testsuite/g++.dg/template/alignof1.C *** gcc-3.2/gcc/testsuite/g++.dg/template/alignof1.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/template/alignof1.C Tue Oct 29 21:12:33 2002 *************** *** 0 **** --- 1,13 ---- + template + int my_alignof() + { + return __alignof__(T); + } + + template + struct X { }; + + int main() + { + return my_alignof >(); + } diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/template/complit1.C gcc-3.2.1/gcc/testsuite/g++.dg/template/complit1.C *** gcc-3.2/gcc/testsuite/g++.dg/template/complit1.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/template/complit1.C Thu Oct 31 00:02:31 2002 *************** *** 0 **** --- 1,11 ---- + // { dg-options "" } + + template struct C { + int d[3]; + C(); + }; + + template + C::C() : d((int[]){1,2,3}) {}; + + template class C<1>; diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/template/meminit1.C gcc-3.2.1/gcc/testsuite/g++.dg/template/meminit1.C *** gcc-3.2/gcc/testsuite/g++.dg/template/meminit1.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/template/meminit1.C Thu Oct 3 06:55:01 2002 *************** *** 0 **** --- 1,7 ---- + template + struct S + { + S() : S() {} // { dg-error "base" } + }; + + S s; // { dg-error "instantiated" } diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/template/ref1.C gcc-3.2.1/gcc/testsuite/g++.dg/template/ref1.C *** gcc-3.2/gcc/testsuite/g++.dg/template/ref1.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/template/ref1.C Thu Oct 17 00:15:39 2002 *************** *** 0 **** --- 1,3 ---- + class a {} a1; + template class b { public: b() { static_cast (p); }; }; + int main() { b b1; }; diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/template/typename3.C gcc-3.2.1/gcc/testsuite/g++.dg/template/typename3.C *** gcc-3.2/gcc/testsuite/g++.dg/template/typename3.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/template/typename3.C Fri Oct 25 22:11:19 2002 *************** *** 0 **** --- 1,7 ---- + // { dg-do compile } + // crash test - PR 7266 + + template + struct B { + typedef A::C::D E; // { dg-error "no type|parse error" } + }; diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/template/typename4.C gcc-3.2.1/gcc/testsuite/g++.dg/template/typename4.C *** gcc-3.2/gcc/testsuite/g++.dg/template/typename4.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/template/typename4.C Thu Oct 31 00:02:31 2002 *************** *** 0 **** --- 1,3 ---- + struct B { template struct C; }; + template struct A { typedef typename T::C V; }; // { dg-error "" } + void f () { A::V p; } // { dg-error "" } diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.dg/template/union1.C gcc-3.2.1/gcc/testsuite/g++.dg/template/union1.C *** gcc-3.2/gcc/testsuite/g++.dg/template/union1.C Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/g++.dg/template/union1.C Fri Oct 4 05:25:12 2002 *************** *** 0 **** --- 1,29 ---- + // { dg-do run } + + extern "C" void abort (); + + void g (char c) + { + if (c != 'a') + abort (); + } + + void h (int i) + { + if (i != 3) + abort (); + } + + template void f(T const &t) + { + union { char c; T t_; }; + + c = 'a'; + g (c); + t_ = 3; + h (t_); + } + + int main () { + f (3); + } diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog gcc-3.2.1/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog *** gcc-3.2/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog Wed Aug 14 09:00:36 2002 --- gcc-3.2.1/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog Tue Nov 19 17:49:27 2002 *************** *** 1,3 **** --- 1,15 ---- + 2002-11-19 Release Manager + + * GCC 3.2.1 Released. + + 2002-11-19 Release Manager + + * GCC 3.2.1 Released. + + 2002-11-18 Release Manager + + * GCC 3.2.1 Released. + 2002-08-14 Release Manager * GCC 3.2 Released. diff -Nrc3pad gcc-3.2/gcc/testsuite/g++.old-deja/g++.pt/memtemp64.C gcc-3.2.1/gcc/testsuite/g++.old-deja/g++.pt/memtemp64.C *** gcc-3.2/gcc/testsuite/g++.old-deja/g++.pt/memtemp64.C Sun Mar 19 05:17:20 2000 --- gcc-3.2.1/gcc/testsuite/g++.old-deja/g++.pt/memtemp64.C Mon Oct 14 07:46:30 2002 *************** template *** 4,10 **** struct S1 {}; template ! void f(T); // ERROR - original declaration. template struct S2 --- 4,10 ---- struct S1 {}; template ! void f(T); template struct S2 diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.c-torture/compile/20020926-1.c gcc-3.2.1/gcc/testsuite/gcc.c-torture/compile/20020926-1.c *** gcc-3.2/gcc/testsuite/gcc.c-torture/compile/20020926-1.c Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/gcc.c-torture/compile/20020926-1.c Fri Sep 27 01:13:28 2002 *************** *** 0 **** --- 1,21 ---- + /* PR c/7160 */ + /* Verify that the register-to-stack converter properly handles + branches without return value containing function calls. */ + + extern int gi; + + extern int foo1(int, int); + extern void foo2(int, int); + extern float foo3(int); + + float bar(int i1, int i2) + { + int i3; + + if (i2) { + i3 = foo1(i1, gi); + foo2(i1, i3); + } + else + return foo3(i2); + } diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.c-torture/compile/20020927-1.c gcc-3.2.1/gcc/testsuite/gcc.c-torture/compile/20020927-1.c *** gcc-3.2/gcc/testsuite/gcc.c-torture/compile/20020927-1.c Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/gcc.c-torture/compile/20020927-1.c Fri Oct 4 21:35:44 2002 *************** *** 0 **** --- 1,26 ---- + /* PR optimization/7520 */ + /* ICE at -O3 on x86 due to register life problems caused by + the return-without-value in bar. */ + + int + foo () + { + int i; + long long int j; + + while (1) + { + if (j & 1) + ++i; + j >>= 1; + if (j) + return i; + } + } + + int + bar () + { + if (foo ()) + return; + } diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.c-torture/compile/20021007-1.c gcc-3.2.1/gcc/testsuite/gcc.c-torture/compile/20021007-1.c *** gcc-3.2/gcc/testsuite/gcc.c-torture/compile/20021007-1.c Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/gcc.c-torture/compile/20021007-1.c Mon Oct 7 07:39:20 2002 *************** *** 0 **** --- 1,11 ---- + /* PR c/7411 */ + /* Verify that GCC simplifies the null addition to i before + virtual register substitution tries it and winds up with + a memory to memory move. */ + + void foo () + { + int i = 0,j; + + i+=j=0; + } diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.c-torture/compile/20021015-1.c gcc-3.2.1/gcc/testsuite/gcc.c-torture/compile/20021015-1.c *** gcc-3.2/gcc/testsuite/gcc.c-torture/compile/20021015-1.c Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/gcc.c-torture/compile/20021015-1.c Tue Oct 15 18:38:25 2002 *************** *** 0 **** --- 1,12 ---- + /* PR target/7370. */ + + int g (int *x, int *y); + + void f () + { + int x, y; + char a[4000]; + + g (&x, &y); + x = x/y + x; + } diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.c-torture/compile/20021015-2.c gcc-3.2.1/gcc/testsuite/gcc.c-torture/compile/20021015-2.c *** gcc-3.2/gcc/testsuite/gcc.c-torture/compile/20021015-2.c Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/gcc.c-torture/compile/20021015-2.c Tue Oct 15 18:38:25 2002 *************** *** 0 **** --- 1,7 ---- + /* PR target/8232. */ + + int f (char *p, char *q, int i) + { + return bcmp (p, q, i); + } + diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.c-torture/compile/trunctfdf.c gcc-3.2.1/gcc/testsuite/gcc.c-torture/compile/trunctfdf.c *** gcc-3.2/gcc/testsuite/gcc.c-torture/compile/trunctfdf.c Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/gcc.c-torture/compile/trunctfdf.c Fri Sep 27 04:15:32 2002 *************** *** 0 **** --- 1,14 ---- + /* Sparc w/128-bit long double bombed on this because even though + the trunctfdf libcall passed the long double by reference, the + libcall was still marked as LCT_CONST instead of LCT_PURE. */ + + double *copy(long double *first, long double *last, double *result) + { + int n; + for (n = last - first; n > 0; --n) { + *result = *first; + ++first; + ++result; + } + return result; + } diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.c-torture/execute/20020904-1.c gcc-3.2.1/gcc/testsuite/gcc.c-torture/execute/20020904-1.c *** gcc-3.2/gcc/testsuite/gcc.c-torture/execute/20020904-1.c Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/gcc.c-torture/execute/20020904-1.c Wed Sep 4 22:29:02 2002 *************** *** 0 **** --- 1,19 ---- + /* PR c/7102 */ + + /* Verify that GCC zero-extends integer constants + in unsigned binary operations. */ + + typedef unsigned char u8; + + u8 fun(u8 y) + { + u8 x=((u8)255)/y; + return x; + } + + int main(void) + { + if (fun((u8)2) != 127) + abort (); + return 0; + } diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.c-torture/execute/20021015-1.c gcc-3.2.1/gcc/testsuite/gcc.c-torture/execute/20021015-1.c *** gcc-3.2/gcc/testsuite/gcc.c-torture/execute/20021015-1.c Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/gcc.c-torture/execute/20021015-1.c Tue Oct 15 14:45:48 2002 *************** *** 0 **** --- 1,30 ---- + /* PR opt/7409. */ + + extern void abort (void); + + char g_list[] = { '1' }; + + void g (void *p, char *list, int length, char **elementPtr, char **nextPtr) + { + if (*nextPtr != g_list) + abort (); + + **nextPtr = 0; + } + + int main (void) + { + char *list = g_list; + char *element; + int i, length = 100; + + for (i = 0; *list != 0; i++) + { + char *prevList = list; + g (0, list, length, &element, &list); + length -= (list - prevList); + } + + return 0; + } + diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.c-torture/execute/20021024-1.c gcc-3.2.1/gcc/testsuite/gcc.c-torture/execute/20021024-1.c *** gcc-3.2/gcc/testsuite/gcc.c-torture/execute/20021024-1.c Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/gcc.c-torture/execute/20021024-1.c Thu Oct 24 17:11:56 2002 *************** *** 0 **** --- 1,43 ---- + /* Origin: PR target/6981 from Mattias Engdegaard . */ + + void exit (int); + void abort (void); + + unsigned long long *cp, m; + + void foo (void) + { + } + + void bar (unsigned rop, unsigned long long *r) + { + unsigned rs1, rs2, rd; + + top: + rs2 = (rop >> 23) & 0x1ff; + rs1 = (rop >> 9) & 0x1ff; + rd = rop & 0x1ff; + + *cp = 1; + m = r[rs1] + r[rs2]; + *cp = 2; + foo(); + if (!rd) + goto top; + r[rd] = 1; + } + + int main(void) + { + static unsigned long long r[64]; + unsigned long long cr; + cp = &cr; + + r[4] = 47; + r[8] = 11; + bar((8 << 23) | (4 << 9) | 15, r); + + if (m != 47 + 11) + abort (); + exit (0); + } diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.c-torture/execute/20021111-1.c gcc-3.2.1/gcc/testsuite/gcc.c-torture/execute/20021111-1.c *** gcc-3.2/gcc/testsuite/gcc.c-torture/execute/20021111-1.c Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/gcc.c-torture/execute/20021111-1.c Mon Nov 11 20:55:31 2002 *************** *** 0 **** --- 1,31 ---- + /* Origin: PR c/8467 */ + + extern void abort (void); + extern void exit (int); + + int aim_callhandler(int sess, int conn, unsigned short family, unsigned short type); + + int aim_callhandler(int sess, int conn, unsigned short family, unsigned short type) + { + static int i = 0; + + if (!conn) + return 0; + + if (type == 0xffff) + { + return 0; + } + + if (i >= 1) + abort (); + + i++; + return aim_callhandler(sess, conn, family, (unsigned short) 0xffff); + } + + int main (void) + { + aim_callhandler (0, 1, 0, 0); + exit (0); + } diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.c-torture/execute/extzvsi.c gcc-3.2.1/gcc/testsuite/gcc.c-torture/execute/extzvsi.c *** gcc-3.2/gcc/testsuite/gcc.c-torture/execute/extzvsi.c Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/gcc.c-torture/execute/extzvsi.c Thu Sep 5 23:05:04 2002 *************** *** 0 **** --- 1,31 ---- + /* Failed on powerpc due to bad extzvsi pattern. */ + + struct ieee + { + unsigned int negative:1; + unsigned int exponent:11; + unsigned int mantissa0:20; + unsigned int mantissa1:32; + } x; + + unsigned int + foo (void) + { + unsigned int exponent; + + exponent = x.exponent; + if (exponent == 0) + return 1; + else if (exponent > 1) + return 2; + return 0; + } + + int + main (void) + { + x.exponent = 1; + if (foo () != 0) + abort (); + return 0; + } diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.c-torture/execute/ieee/mzero3.c gcc-3.2.1/gcc/testsuite/gcc.c-torture/execute/ieee/mzero3.c *** gcc-3.2/gcc/testsuite/gcc.c-torture/execute/ieee/mzero3.c Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/gcc.c-torture/execute/ieee/mzero3.c Fri Sep 20 03:09:39 2002 *************** *** 0 **** --- 1,51 ---- + /* Copyright (C) 2002 Free Software Foundation. + by Hans-Peter Nilsson , derived from mzero2.c + + In the MMIX port, negdf2 was bogusly expanding -x into 0 - x. */ + + double nzerod = -0.0; + float nzerof = -0.0; + double zerod = 0.0; + float zerof = 0.0; + + void expectd (double, double); + void expectf (float, float); + double negd (double); + float negf (float); + + main () + { + expectd (negd (zerod), nzerod); + expectf (negf (zerof), nzerof); + expectd (negd (nzerod), zerod); + expectf (negf (nzerof), zerof); + exit (0); + } + + void + expectd (double value, double expected) + { + if (value != expected + || memcmp ((void *)&value, (void *) &expected, sizeof (double)) != 0) + abort (); + } + + void + expectf (float value, float expected) + { + if (value != expected + || memcmp ((void *)&value, (void *) &expected, sizeof (float)) != 0) + abort (); + } + + double + negd (double v) + { + return -v; + } + + float + negf (float v) + { + return -v; + } diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.c-torture/execute/loop-14.c gcc-3.2.1/gcc/testsuite/gcc.c-torture/execute/loop-14.c *** gcc-3.2/gcc/testsuite/gcc.c-torture/execute/loop-14.c Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/gcc.c-torture/execute/loop-14.c Wed Oct 2 18:08:00 2002 *************** *** 0 **** --- 1,20 ---- + int a3[3]; + + void f(int *a) + { + int i; + + for (i=3; --i;) + a[i] = 42 / i; + } + + int + main () + { + f(a3); + + if (a3[1] != 42 || a3[2] != 21) + abort (); + + exit (0); + } diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.c-torture/execute/loop-15.c gcc-3.2.1/gcc/testsuite/gcc.c-torture/execute/loop-15.c *** gcc-3.2/gcc/testsuite/gcc.c-torture/execute/loop-15.c Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/gcc.c-torture/execute/loop-15.c Thu Sep 26 23:12:17 2002 *************** *** 0 **** --- 1,40 ---- + /* Bombed with a segfault on powerpc-linux. doloop.c generated wrong + loop count. */ + void + foo (unsigned long *start, unsigned long *end) + { + unsigned long *temp = end - 1; + + while (end > start) + *end-- = *temp--; + } + + int + main (void) + { + unsigned long a[5]; + int start, end, k; + + for (start = 0; start < 5; start++) + for (end = 0; end < 5; end++) + { + for (k = 0; k < 5; k++) + a[k] = k; + + foo (a + start, a + end); + + for (k = 0; k <= start; k++) + if (a[k] != k) + abort (); + + for (k = start + 1; k <= end; k++) + if (a[k] != k - 1) + abort (); + + for (k = end + 1; k < 5; k++) + if (a[k] != k) + abort (); + } + + return 0; + } diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.c-torture/execute/shiftdi.c gcc-3.2.1/gcc/testsuite/gcc.c-torture/execute/shiftdi.c *** gcc-3.2/gcc/testsuite/gcc.c-torture/execute/shiftdi.c Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/gcc.c-torture/execute/shiftdi.c Thu Sep 26 10:19:11 2002 *************** *** 0 **** --- 1,20 ---- + /* Failed on sparc with -mv8plus because sparc.c:set_extends() thought + erroneously that SImode ASHIFT chops the upper bits, it does not. */ + + typedef unsigned long long uint64; + + void g(uint64 x, int y, int z, uint64 *p) + { + unsigned w = ((x >> y) & 0xffffffffULL) << (z & 0x1f); + *p |= (w & 0xffffffffULL) << z; + } + + int main(void) + { + uint64 a = 0; + g(0xdeadbeef01234567ULL, 0, 0, &a); + return (a == 0x01234567) ? 0 : 1; + } + + + diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.dg/20021014-1.c gcc-3.2.1/gcc/testsuite/gcc.dg/20021014-1.c *** gcc-3.2/gcc/testsuite/gcc.dg/20021014-1.c Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/gcc.dg/20021014-1.c Mon Oct 28 18:17:22 2002 *************** *** 0 **** --- 1,30 ---- + /* { dg-do run } */ + /* { dg-options "-O2 -p" } */ + /* { dg-error "profiler" "No profiler support" { target mmix-*-* } 0 } */ + /* Support for -p on solaris2 relies on mcrt1.o which comes with the + vendor compiler. We cannot reiably predict the directory where the + vendor compiler (and thus mcrt1.o) is installed so we can't + necessarily find mcrt1.o even if we have it. */ + /* { dg-error "mcrt1.o" "Optional vendor profiler support missing" { target *-*-solaris2* } 0 } */ + /* Support for -p on irix relies on libprof1.a which doesn't appear to + exist on any irix6 system currently posting testsuite results. */ + /* { dg-error "libprof1.a" "Profiler support missing" { target mips*-*-irix* } 0 } */ + + extern void abort (void); + extern void exit (int); + + int foo (void) + { + static int bar (int x) + { + return x + 3; + } + return bar (1) + bar (2); + } + + int main (void) + { + if (foo () != 9) + abort (); + exit (0); + } diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.dg/cpp/20020927-1.c gcc-3.2.1/gcc/testsuite/gcc.dg/cpp/20020927-1.c *** gcc-3.2/gcc/testsuite/gcc.dg/cpp/20020927-1.c Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/gcc.dg/cpp/20020927-1.c Sat Sep 28 00:32:16 2002 *************** *** 0 **** --- 1,94 ---- + /* Test case for buffer overflow bug in token stringification. + See PR preprocessor/8055 for details. + Reported by Alexander N. Kabaev . + Test case written by Zack Weinberg . */ + + /* { dg-do preprocess } */ + + #define S(x) #x + + /* Fill up one internal buffer with data. */ + S(1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 1234567890123456789012345678901234567890123456789012345678901234567890 + 12345678901234567890123456789012345678901234567890123) + + /* When stringify_arg() was called with an empty macro argument, it would + advance the buffer pointer by one but fail to check for running past the + end of the buffer. We can only know where the end of the buffer is to + within about eight bytes, so do this sixteen times to be sure of hitting + it. */ + + S() + S() + S() + S() + S() + S() + S() + S() + S() + S() + S() + S() + S() + S() + S() + S() + + /* Now allocate more memory in the buffer, which should provoke a crash. */ + + S(abcdefghijklmnopqrstuvwxyz) + S(abcdefghijklmnopqrstuvwxyz) diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.dg/cpp/_Pragma3.c gcc-3.2.1/gcc/testsuite/gcc.dg/cpp/_Pragma3.c *** gcc-3.2/gcc/testsuite/gcc.dg/cpp/_Pragma3.c Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/gcc.dg/cpp/_Pragma3.c Thu Aug 15 19:46:43 2002 *************** *** 0 **** --- 1,11 ---- + /* Copyright (C) 2002 Free Software Foundation, Inc. */ + + /* { dg-do preprocess } */ + + /* Pragma buffers have a NULL "inc" member, which we would dereference + when getting a file's date and time. + + Based on PR 7526. 14 Aug 2002. */ + + #define GCC_PRAGMA(x) _Pragma (#x) + GCC_PRAGMA(GCC dependency "mi1c.h") diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.dg/cpp/_Pragma4.c gcc-3.2.1/gcc/testsuite/gcc.dg/cpp/_Pragma4.c *** gcc-3.2/gcc/testsuite/gcc.dg/cpp/_Pragma4.c Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/gcc.dg/cpp/_Pragma4.c Sun Oct 6 09:46:45 2002 *************** *** 0 **** --- 1,12 ---- + /* { dg-do preprocess } */ + + /* Based on Debian GNATS PR 157416. 3 Sep 2002. */ + + #define b foo _Pragma ("bar") baz + a b c + + /* + { dg-final { if ![file exists _Pragma4.i] { return } } } + { dg-final { if { [grep _Pragma4.i "#pragma bar "] != "" } { return } } } + { dg-final { fail "_Pragma4.c: #pragma appearing on its own line" } } + */ diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.dg/cpp/vararg3.c gcc-3.2.1/gcc/testsuite/gcc.dg/cpp/vararg3.c *** gcc-3.2/gcc/testsuite/gcc.dg/cpp/vararg3.c Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/gcc.dg/cpp/vararg3.c Thu Aug 15 19:46:43 2002 *************** *** 0 **** --- 1,17 ---- + /* Copyright (C) 2002 Free Software Foundation, Inc. */ + + /* { dg-do preprocess } */ + /* { dg-options "-std=c99" } */ + + /* Source: Neil Booth, 6 Aug 2002. + + Tests that we DTRT with varargs commas for a single-parameter macro + when in standards-conforming mode. */ + + #define f(...) , ## __VA_ARGS__ + + /* The comma from f's expansion should be retained (standards + conforming mode only). Tests that it isn't in non-standards mode + include macro8.c and vararg1.c. */ + #if 2 f() 3 /* { dg-bogus "missing binary operator" } */ + #endif diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.dg/cpp/vararg4.c gcc-3.2.1/gcc/testsuite/gcc.dg/cpp/vararg4.c *** gcc-3.2/gcc/testsuite/gcc.dg/cpp/vararg4.c Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/gcc.dg/cpp/vararg4.c Thu Aug 15 19:46:43 2002 *************** *** 0 **** --- 1,14 ---- + /* Copyright (C) 2002 Free Software Foundation, Inc. */ + + /* { dg-do preprocess } */ + /* { dg-options -std=gnu99 } */ + + /* Source: Neil Booth, 6 Aug 2002. + + Tests that we DTRT with varargs commas. */ + + #define g(a, ...) a , ## __VA_ARGS__ + + /* The comma from g's expansion should be retained. */ + #if g (2, ) 3 /* { dg-bogus "missing binary operator" } */ + #endif diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.dg/noncompile/920923-1.c gcc-3.2.1/gcc/testsuite/gcc.dg/noncompile/920923-1.c *** gcc-3.2/gcc/testsuite/gcc.dg/noncompile/920923-1.c Thu Nov 15 03:55:26 2001 --- gcc-3.2.1/gcc/testsuite/gcc.dg/noncompile/920923-1.c Mon Oct 21 19:06:16 2002 *************** *** 1,35 **** ! typedef BYTE unsigned char; /* { dg-error "syntax error|empty decl" } */ typedef int item_n; typedef int perm_set; ! struct PENT { caddr_t v_addr; };/* { dg-error "parse error|no semicolon" } */ typedef struct PENT prec; typedef struct PENT *prec_t; prec_t mem_hash; ! BYTE *mem_base; /* { dg-error "parse error|no type" } */ struct PTE { ! BYTE *p_page; /* { dg-error "parse error|no semicolon" } */ perm_set p_perms; ! }; /* { dg-error "parse error" } */ typedef struct PTE pte; struct PTP { union { ! struct *PTP p_tablep; /* { dg-error "parse error|no semicolon" } */ struct *PTE p_entry; ! } u; /* { dg-warning "no type or storage class" } */ int valid; ! }; /* { dg-error "parse error" } */ ! typedef struct PTP (u.p_tablep);/* { dg-error "parse error" } */ int pfree=0; int pcount=0; void mmu_walk_find(va) ! caddr_t va; /* { dg-error "parse error|no type" } */ { BYTE *page_addr; if (mmu_base[Level1(va)]->valid==0x0) { l1_base = mmu_base[Level1(va)]->(u.p_tablep) = p_alloc(); ! mmu_base[Level1(va)]->valid = 0x3; /* { dg-error "parse error" } */ for (idx=0; idxvalid = 0x0; goto build_level2; --- 1,49 ---- ! /* This test case contains a large number of syntactic errors. We ! believe the intent of the test is that the compiler simply not ! crash. The set of error messages reported is different when the C ! parser is generated with bison 1.50 than 1.35. It is not worth ! attempting to prevent this. Instead, we use a single dg-error with ! a regexp that will match _all_ the errors indiscriminately. The ! old error/warning/etc markers are kept around for reference, but ! disabled. ! ! Revisit after new (recursive descent) parser is implemented for C. ! -- zw 2002-10-17 */ ! ! /* { dg-error ".*" "many syntax errors" { target *-*-* } 0 } */ ! ! typedef BYTE unsigned char; /* { error "syntax error|empty decl" } */ typedef int item_n; typedef int perm_set; ! struct PENT { caddr_t v_addr; };/* { error "parse error|no semicolon" } */ typedef struct PENT prec; typedef struct PENT *prec_t; prec_t mem_hash; ! BYTE *mem_base; /* { error "parse error|no type" } */ struct PTE { ! BYTE *p_page; /* { error "parse error|no semicolon" } */ perm_set p_perms; ! }; /* { error "parse error" } */ typedef struct PTE pte; struct PTP { union { ! struct *PTP p_tablep; /* { error "parse error|no semicolon" } */ struct *PTE p_entry; ! } u; /* { warning "no type or storage class" } */ int valid; ! }; /* { error "parse error" } */ ! typedef struct PTP (u.p_tablep);/* { error "parse error" } */ int pfree=0; int pcount=0; void mmu_walk_find(va) ! caddr_t va; /* { error "parse error|no type" } */ { BYTE *page_addr; if (mmu_base[Level1(va)]->valid==0x0) { l1_base = mmu_base[Level1(va)]->(u.p_tablep) = p_alloc(); ! mmu_base[Level1(va)]->valid = 0x3; /* { error "parse error" } */ for (idx=0; idxvalid = 0x0; goto build_level2; *************** caddr_t va; /* { dg-error "parse error *** 39,81 **** if (l1_base[Level2(va)]->valid==0x0) { build_level2: l2_base = l1_base[Level2(va)]->(u.p_tablep) = p_alloc(); ! l1_base[Level2(va)]->valid = 0x3; /* { dg-error "parse error" } */ for (idx=0; idxvalid=0x0; goto build_page; } else l2_base = mmu_base[Level2(va)]->(u.p_tablep); ! page_addr = l2_base[Level2(va)]->valid;/* { dg-error "undeclared|no type" } */ ! } /* { dg-error "parse error" } */ void * a_translate(va_op, v_addr) int va_op; ! caddr_t v_addr; /* { dg-error "parse error" } */ { register prec_t bucket; ! register caddr_t p_addr; /* { dg-error "syntax error" } */ ! bucket = mem_hash+((((v_addr)>>ITEMBITS))&hash_mask); /* { dg-error "undeclared|for each function" } */ do { ! if (bucket->v_addr == ((v_addr)>>ITEMBITS) { /* { dg-error "incomplete type|parse error" } */ if(!(bucket->perm_set&va_op)) goto prot_fault; return mem_base + v_addr; } ! } while((bucket++)->v_addr != ((caddr_t)0)); /* { dg-error "parse error" } */ page_miss: ! p_addr = (--bucket)->p_addr; /* { dg-error "undeclared|pointer to" } */ page_type: switch (p_addr) { ! case BUCKET_FULL: /* { dg-error "undeclared" } */ enlarge_hash_table(mem_hash); ! case((caddr_t)0): /* { dg-error "undeclared|parse error" } */ p_addr = fill_item_entry(va_op, v_addr); goto page_type; ! case((caddr_t)1): /* { dg-error "parse error" } */ ! default: ((void)(((0))?0:(__eprintf("Failed assertion`%s'at line%d of`%s'.\n", "FALSE", 327, "b.c"), 0))); } --- 53,95 ---- if (l1_base[Level2(va)]->valid==0x0) { build_level2: l2_base = l1_base[Level2(va)]->(u.p_tablep) = p_alloc(); ! l1_base[Level2(va)]->valid = 0x3; /* { error "parse error" } */ for (idx=0; idxvalid=0x0; goto build_page; } else l2_base = mmu_base[Level2(va)]->(u.p_tablep); ! page_addr = l2_base[Level2(va)]->valid;/* { error "undeclared|no type" } */ ! } /* { error "parse error" } */ void * a_translate(va_op, v_addr) int va_op; ! caddr_t v_addr; /* { error "parse error" } */ { register prec_t bucket; ! register caddr_t p_addr; /* { error "syntax error" } */ ! bucket = mem_hash+((((v_addr)>>ITEMBITS))&hash_mask); /* { error "undeclared|for each function" } */ do { ! if (bucket->v_addr == ((v_addr)>>ITEMBITS) { /* { error "incomplete type|parse error" } */ if(!(bucket->perm_set&va_op)) goto prot_fault; return mem_base + v_addr; } ! } while((bucket++)->v_addr != ((caddr_t)0)); /* { error "parse error" } */ page_miss: ! p_addr = (--bucket)->p_addr; /* { error "undeclared|pointer to" } */ page_type: switch (p_addr) { ! case BUCKET_FULL: /* { error "undeclared" } */ enlarge_hash_table(mem_hash); ! case((caddr_t)0): /* { error "undeclared|parse error" } */ p_addr = fill_item_entry(va_op, v_addr); goto page_type; ! case((caddr_t)1): /* { error "parse error" } */ ! default: ((void)(((0))?0:(__eprintf("Failed assertion`%s'at line%d of`%s'.\n", "FALSE", 327, "b.c"), 0))); } *************** int hash_size; *** 90,98 **** register int idx; bucket = hasht; for(idx=(hash_size*3)-1; idx>=0; idx--) { ! bucket->v_addr = ((caddr_t)0);/* { dg-error "undeclared|pointer to|parse error" } */ ! bucket->p_addr = ((caddr_t)0);/* { dg-error "pointer to|parse error" } */ ! bucket->perm_set = VA_EMPTY; /* { dg-error "undeclared|pointer to" } */ } } --- 104,112 ---- register int idx; bucket = hasht; for(idx=(hash_size*3)-1; idx>=0; idx--) { ! bucket->v_addr = ((caddr_t)0);/* { error "undeclared|pointer to|parse error" } */ ! bucket->p_addr = ((caddr_t)0);/* { error "pointer to|parse error" } */ ! bucket->perm_set = VA_EMPTY; /* { error "undeclared|pointer to" } */ } } *************** extern void *calloc(__SIZE_TYPE__, __SIZ *** 101,121 **** void init_mem() { ! mem_base = (BYTE *) calloc(1024, (1<<13)); /* { dg-error "undeclared|parse error" } */ ! ((void)((mem_base != (BYTE *)0) /* { dg-error "parse error" } */ ? 0 : (__eprintf("Failed assertion`%s'at line%d of`%s'.\n", "mem_base != (BYTE *)0", 366, "b.c"), 0))); ! hash_num = INIT_NUM_ENTRIES * 3; /* { dg-error "undeclared" } */ ! mem_hash = (prec_t) calloc(hash_num, sizeof(prec)); /* { dg-error "incomplete type" } */ ((void)((mem_hash != (prec_t)0) ? 0 : (__eprintf("Failed assertion`%s'at line%d of`%s'.\n", "mem_hash != (prec_t)0", 370, "b.c"), 0))); flush_hash(mem_hash, 32); ! build_ptables(mem_base, 1024*(1<<13)); /* { dg-bogus "integer overflow" "int smaller than 32 bits" { xfail "xstormy16-*-*" } } */ } struct tm { --- 115,135 ---- void init_mem() { ! mem_base = (BYTE *) calloc(1024, (1<<13)); /* { error "undeclared|parse error" } */ ! ((void)((mem_base != (BYTE *)0) /* { error "parse error" } */ ? 0 : (__eprintf("Failed assertion`%s'at line%d of`%s'.\n", "mem_base != (BYTE *)0", 366, "b.c"), 0))); ! hash_num = INIT_NUM_ENTRIES * 3; /* { error "undeclared" } */ ! mem_hash = (prec_t) calloc(hash_num, sizeof(prec)); /* { error "incomplete type" } */ ((void)((mem_hash != (prec_t)0) ? 0 : (__eprintf("Failed assertion`%s'at line%d of`%s'.\n", "mem_hash != (prec_t)0", 370, "b.c"), 0))); flush_hash(mem_hash, 32); ! build_ptables(mem_base, 1024*(1<<13)); /* { bogus "integer overflow" "int smaller than 32 bits" } */ } struct tm { diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.dg/typedef-init.c gcc-3.2.1/gcc/testsuite/gcc.dg/typedef-init.c *** gcc-3.2/gcc/testsuite/gcc.dg/typedef-init.c Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/gcc.dg/typedef-init.c Sat Nov 2 10:28:50 2002 *************** *** 0 **** --- 1,16 ---- + /* { dg-do compile } */ + /* { dg-options "-std=gnu89" } // suppress default -pedantic-errors */ + + /* This code used to be a legitimate, if dubious, extension. However, + it's been broken since GCC 3.0 (caused ICE) and we have now removed + the extension. See PR c/7353. */ + + /* Case A: just the bare name = initializer. */ + + typedef A = 0; /* { dg-error "initialized" "A" } */ + A a; /* { dg-bogus "" "A error cascade" } */ + + /* Case B: with a type also. */ + + typedef int B = 0; /* { dg-error "initialized" "B" } */ + B b; /* { dg-bogus "" "B error cascade" } */ diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.dg/typeof-1.c gcc-3.2.1/gcc/testsuite/gcc.dg/typeof-1.c *** gcc-3.2/gcc/testsuite/gcc.dg/typeof-1.c Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/gcc.dg/typeof-1.c Sun Sep 1 20:10:07 2002 *************** *** 0 **** --- 1,27 ---- + /* Test typeof with __asm redirection. */ + /* { dg-do compile } */ + /* { dg-options "-O2" } */ + + extern int foo1; + extern int foo1 __asm ("bar1"); + int foo1 = 1; + + extern int foo2 (int); + extern int foo2 (int) __asm ("bar2"); + int foo2 (int x) + { + return x; + } + + extern int foo3; + extern __typeof (foo3) foo3 __asm ("bar3"); + int foo3 = 1; + + extern int foo4 (int); + extern __typeof (foo4) foo4 __asm ("bar4"); + int foo4 (int x) + { + return x; + } + + // { dg-final { scan-assembler-not "foo" } } diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.dg/typeof-2.c gcc-3.2.1/gcc/testsuite/gcc.dg/typeof-2.c *** gcc-3.2/gcc/testsuite/gcc.dg/typeof-2.c Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/gcc.dg/typeof-2.c Wed Sep 4 08:57:30 2002 *************** *** 0 **** --- 1,29 ---- + /* Test typeof with __asm redirection. */ + /* { dg-do compile } */ + /* { dg-options "-O2" } */ + + extern int foo1 (int x) __asm ("baz1"); + int bar1 (int x) { return x; } + extern __typeof (bar1) foo1 __attribute ((weak, alias ("bar1"))); + + extern int foo2 (int x) __attribute__ ((const)); + extern __typeof (foo2) foo2 __asm ("baz2"); + int bar2 (int x) + { + return foo2 (x) + foo2 (x) + foo2 (x) + foo2 (x) + foo2 (x) + foo2 (x); + } + + extern int foo3 (int x); + extern __typeof (foo3) foo3 __asm ("baz3"); + int bar3 (int x) + { + return foo3 (x) + foo3 (x) + foo3 (x) + foo3 (x) + foo3 (x) + foo3 (x); + } + + // { dg-final { scan-assembler-not "foo1" } } + // { dg-final { scan-assembler "baz1" } } + // { dg-final { scan-assembler-not "foo2" } } + // { dg-final { scan-assembler "baz2" } } + // { dg-final { scan-assembler-not "baz2.*baz2.*baz2.*baz2.*baz2.*baz2" } } + // { dg-final { scan-assembler-not "foo3" } } + // { dg-final { scan-assembler "baz3.*baz3.*baz3.*baz3.*baz3.*baz3" } } diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.dg/vla-2.c gcc-3.2.1/gcc/testsuite/gcc.dg/vla-2.c *** gcc-3.2/gcc/testsuite/gcc.dg/vla-2.c Thu Jan 1 00:00:00 1970 --- gcc-3.2.1/gcc/testsuite/gcc.dg/vla-2.c Fri Oct 25 22:11:19 2002 *************** *** 0 **** --- 1,29 ---- + /* { dg-do compile } */ + /* { dg-options "-std=gnu99" } */ + + /* These are crash tests related to PR middle-end/6994; see also + g++.dg/ext/vla1.C. Note that at present A and C cannot be inlined. */ + + static inline void A (int i) + { + struct S { int ar[1][i]; } s; + + s.ar[0][0] = 0; + } + + void B(void) + { + A(23); + } + + static inline void C (int i) + { + union U { int ar[1][i]; } u; + + u.ar[0][0] = 0; + } + + void D(void) + { + C(23); + } diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.dg/wchar_t-1.c gcc-3.2.1/gcc/testsuite/gcc.dg/wchar_t-1.c *** gcc-3.2/gcc/testsuite/gcc.dg/wchar_t-1.c Mon Apr 22 01:36:17 2002 --- gcc-3.2.1/gcc/testsuite/gcc.dg/wchar_t-1.c Thu Nov 7 21:17:18 2002 *************** *** 1,6 **** /* { dg-do compile } */ /* { dg-options "-Wall" } */ - /* { dg-excess-errors "Newlib has no wchar.h" { target mmix-knuth-mmixware cris-*-elf } } */ /* Compile with -Wall to get a warning if built-in and system wchar_t don't match. */ --- 1,5 ---- diff -Nrc3pad gcc-3.2/gcc/testsuite/gcc.dg/wint_t-1.c gcc-3.2.1/gcc/testsuite/gcc.dg/wint_t-1.c *** gcc-3.2/gcc/testsuite/gcc.dg/wint_t-1.c Mon Apr 22 01:36:17 2002 --- gcc-3.2.1/gcc/testsuite/gcc.dg/wint_t-1.c Thu Nov 7 21:17:18 2002 *************** *** 1,6 **** /* { dg-do compile } */ /* { dg-options "-Wall" } */ - /* { dg-excess-errors "Newlib has no wchar.h" { target mmix-knuth-mmixware cris-*-elf } } */ /* Compile with -Wall to get a warning if built-in and system wint_t don't match. */ --- 1,5 ---- diff -Nrc3pad gcc-3.2/gcc/testsuite/lib/target-supports.exp gcc-3.2.1/gcc/testsuite/lib/target-supports.exp *** gcc-3.2/gcc/testsuite/lib/target-supports.exp Thu Jul 19 18:08:17 2001 --- gcc-3.2.1/gcc/testsuite/lib/target-supports.exp Fri Sep 27 02:13:06 2002 *************** proc check_weak_available { } { *** 36,41 **** --- 36,47 ---- return 1 } + # All solaris2 targets should support it + + if { [regexp ".*-solaris2.*" $target_triplet] } { + return 1 + } + # DEC OSF/1/Digital UNIX/Tru64 UNIX supports it if { [regexp "alpha.*osf.*" $target_triplet] } {