diff -Nrcpad gcc-4.3.1/gcc/testsuite/ChangeLog gcc-4.3.2/gcc/testsuite/ChangeLog *** gcc-4.3.1/gcc/testsuite/ChangeLog Fri Jun 6 14:28:27 2008 --- gcc-4.3.2/gcc/testsuite/ChangeLog Wed Aug 27 18:02:30 2008 *************** *** 1,3 **** --- 1,513 ---- + 2008-08-27 Release Manager + + * GCC 4.3.2 released. + + 2008-08-19 Ulrich Weigand + + * gcc.c-torture/execute/20031003-1.c (main): Update test to + accommodate SPU single-precision rounding mode. + * gcc.c-torture/execute/conversion.c (test_float_to_integer, + test_float_to_longlong_integer): Likewise. + * gcc.c-torture/execute/ieee/rbug.c (main): Likewise. + * gcc.dg/hex-round-1.c: Skip test on SPU. + * gcc.dg/hex-round-2.c: Likewise. + + * gcc.dg/torture/fp-int-convert-float.c: Reenable test on SPU. + * gcc.dg/torture/fp-int-convert-timode.c: Reenable "float" test on SPU. + + 2008-08-19 Jakub Jelinek + + PR debug/37156 + * gcc.dg/pr37156.c: New test. + + 2008-08-18 Ulrich Weigand + + * gcc.c-torture/execute/ieee/inf-2.c (testf): Skip on the SPU. + + 2008-08-18 Andreas Krebbel + + * gcc.c-torture/compile/20080806-1.c: New testcase. + + 2008-08-17 Uros Bizjak + + PR target/37101 + * gcc.target/i386/pr37101.c: New test. + + 2008-08-14 Jakub Jelinek + + PR middle-end/37103 + * gcc.c-torture/execute/20080813-1.c: New test. + + 2008-08-12 Jakub Jelinek + + PR middle-end/37014 + * gcc.c-torture/compile/20080812-1.c: New test. + + PR c++/36688 + * g++.dg/init/const6.C: New test. + + 2008-08-11 Michael Matz + + PR target/36613 + * gcc.target/i386/pr36613.c: New testcase. + + 2008-08-11 Jakub Jelinek + + PR rtl-optimization/36998 + * gcc.dg/pr36998.c: New test. + + 2008-08-07 Simon Baldwin + + Backport from mainline: + 2008-08-04 Simon Baldwin + + PR c++/36999 + * g++.dg/warn/pr36999.C: New. + + 2008-08-07 Richard Guenther + + PR middle-end/37042 + * gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c: New testcase. + + 2008-08-06 Richard Guenther + + PR middle-end/35432 + * gcc.c-torture/compile/pr35432.c: Remove duplicate. + + 2008-08-06 Aldy Hernandez + + PR middle-end/35432 + * gcc.c-torture/compile/pr35432.c: New file. + + 2008-08-06 Maxim Kuvyrkov + + Backport from mainline: + 2008-08-06 Maxim Kuvyrkov + + * gcc.target/ia64/20080802-1.c: New test. + + 2008-08-05 Richard Guenther + + PR middle-end/37026 + * gcc.c-torture/compile/pr37026.c: New testcase. + + 2008-08-04 Richard Guenther + + PR middle-end/36691 + * gcc.c-torture/execute/pr36691.c: New testcase. + + 2008-08-01 Jakub Jelinek + + PR tree-optimization/36991 + * gcc.dg/pr36991.c: New test. + + 2008-07-31 Jakub Jelinek + + PR preprocessor/36649 + * gcc.dg/pch/cpp-3.hs: Add include guards. + * gcc.dg/pch/cpp-3a.h: Likewise. + * gcc.dg/pch/cpp-3b.h: Likewise. + * gcc.dg/cpp/mi8.c: New test. + * gcc.dg/cpp/mi8a.h: New file. + * gcc.dg/cpp/mi8b.h: New file. + * gcc.dg/cpp/mi8c.h: New file. + * gcc.dg/cpp/mi8d.h: New file. + + PR rtl-optimization/36419 + * g++.dg/eh/async-unwind2.C: New test. + + PR c++/36405 + * g++.dg/rtti/typeid8.C: New test. + + PR debug/36278 + * g++.dg/debug/namespace2.C: New test. + + PR preprocessor/36649 + * gcc.dg/pch/cpp-3.c: New test. + * gcc.dg/pch/cpp-3.hs: New file. + * gcc.dg/pch/cpp-3a.h: New file. + * gcc.dg/pch/cpp-3b.h: New file. + + 2008-07-30 Dodji Seketeli + + PR c++/36767 + * g++.dg/parse/crash41.C: New test. + + 2008-07-29 Jakub Jelinek + + PR c++/36852 + * g++.dg/pch/array-1.C: New test. + * g++.dg/pch/array-1.Hs: New file. + + 2008-07-27 Tobias Burnus + + PR fortran/36132 + * gfortran.dg/internal_pack_4.f90: New. + + 2008-07-26 Jerry DeLisle + + PR libfortran/36852 + * gfortran.dg/namelist_52.f90: New test. + + 2008-07-25 Joseph Myers + + * lib/target-supports.exp (check_effective_target_arm_thumb1_ok): + New. + * g++.dg/inherit/thunk8.C: Use it. + + 2008-07-23 Ian Lance Taylor + + * gcc.target/i386/20080723-1.c: New test. + + 2008-07-22 Ulrich Weigand + + * lib/target-supports.exp (check_effective_target_spu_auto_overlay): + New procedure. + * lib/compat.exp (compat-execute): Use it to test whether toolchain + supports automatic overlay generation for the SPU. + + 2008-07-19 Jakub Jelinek + + PR middle-end/36877 + * gcc.dg/gomp/atomic-11.c: New test. + + 2008-07-19 Paul Thomas + + PR fortran/36366 + * gfortran.dg/used_types_20.f90: New test. + + 2008-07-18 Dodji Seketeli + + PR c++/36407 + * g++.dg/conversion/op5.C: New testcase. + + 2008-07-18 Paolo Bonzini + + PR rtl-optimization/35281 + * gcc.target/i386/pr35281.c: New. + + 2008-07-17 Ulrich Weigand + + Backport from mainline: + + 2008-06-02 Andy Hutchinson + * gcc.dg/torture/pr34330.c: Skip test for targets without pthread. + * gcc.dg/torture/pr36244.c: Ditto. + * gcc.dg/tree-ssa/pr36181.c: Ditto. + + 2008-07-17 Ulrich Weigand + + Backport from mainline: + + 2008-05-27 Trevor Smigiel + Sa Liu + + * gcc.target/spu/muldivti3.c: New. Test TImode mul and div + functions on SPU. + + 2008-05-08 Sa Liu + + * gcc.target/spu/subti3.c: New. + + 2008-07-17 Tobias Burnus + + PR fortran/36824 + * gfortran.dg/array_4.f90: New. + + 2008-07-17 Paolo Bonzini + + PR rtl-optimization/36753 + * gcc.target/i386/pr36753.c: New. + + 2008-07-15 Richard Guenther + + PR middle-end/36369 + * gcc.dg/Wstrict-aliasing-bogus-ref-all.c: New testcase. + + 2008-07-14 Hans-Peter Nilsson + + PR target/35492 + * gcc.c-torture/compile/pr35492.c: New test. + + 2008-07-10 Jakub Jelinek + + PR rtl-optimization/36419 + * g++.dg/eh/async-unwind1.C: New test. + + 2008-07-09 Richard Sandiford + + PR target/35802 + * gcc.target/mips/pr35802.c: New test. + + 2008-07-07 Simon Martin + + PR c++/34963 + * g++.dg/parse/dtor13.C: New test. + + 2008-07-03 Eric Botcazou + + * gnat.dg/loop_optimization3.adb: New test. + * gnat.dg/loop_optimization3_pkg.ad[sb]: New helper. + + 2008-07-03 Ulrich Weigand + + * gcc.dg/pr28243.c: Skip on SPU. + * gcc.dg/torture/pr25947-1.c: Likewise. + * gcc.dg/20030702-1.c: Likewise. + * g++.old-deja/g++.other/comdat5.C: Likewise. + * g++.old-deja/g++.other/local-alloc1.C: Likewise. + * g++.dg/opt/vt1.C: Likewise. + + 2008-07-02 Joseph Myers + + * gcc.target/arm/neon/polytypes.c: Use dg-message separately from + dg-error to match separate messages. + + 2008-07-02 Ulrich Weigand + + PR target/36698 + * gcc.c-torture/compile/20001226-1.c: XFAIL -O0 case on SPU. + + * gcc.dg/pr27095.c: Provide target-specific regexp for SPU. + + 2008-07-02 Ulrich Weigand + + * lib/compat.exp (compat-execute): Add -ffunction-sections + and -Wl,--auto-overlay when building for spu-*-elf*. + + 2008-07-02 Ulrich Weigand + + * gcc.dg/nrv3.c (S): Increase size of padding for SPU. + * g++.dg/opt/temp1.C (struct T): Likewise. + + 2008-07-02 Ulrich Weigand + + * gcc.c-torture/execute/20030222-1.x: New file. + * gcc.dg/tree-ssa/ssa-fre-3.c: Disable test on SPU. + * gcc.dg/lower-subreg-1.c: Likewise. + + 2008-07-02 Ulrich Weigand + + SPU single-precision FP does not support subnormals: + * gcc.c-torture/execute/ieee/mul-subnormal-single-1.x: New file. + + SPU single-precision FP does not support Inf or Nan: + * gcc.c-torture/execute/ieee/inf-1.c: Disable "float" Inf test on SPU. + * gcc.c-torture/execute/ieee/compare-fp-1.x: New file. + * gcc.c-torture/execute/ieee/compare-fp-4.x: Disable test on SPU. + * gcc.c-torture/execute/ieee/fp-cmp-2.x: Disable test on SPU. + * gcc.c-torture/execute/ieee/fp-cmp-4f.x: New file. + * gcc.c-torture/execute/ieee/fp-cmp-8f.x: New file. + * gcc.dg/pr15784-3.c: Disable test on SPU. + * gcc.dg/pr28796-2.c: Likewise. + * gcc.dg/float-range-1.c: Likewise. + * gcc.dg/float-range-3.c: Likewise. + * gcc.dg/float-range-4.c: Likewise. + * gcc.dg/float-range-5.c: Likewise. + * gcc.dg/fold-overflow-1.c: Likewise. + * gcc.dg/builtins-1.c: SPU does not support __builtin_inff. + * gcc.dg/builtin-inf-1.c: SPU does not support __builtin_inff. + Check for error instead of warning "does not support infinity". + * gcc.dg/builtins-43.c: Disable "float" Inf/Nan tests on SPU. + * gcc.dg/builtins-44.c: Likewise. + * gcc.dg/builtins-45.c: Likewise. + * gcc.dg/torture/builtin-math-2.c: Likewise. + * gcc.dg/torture/builtin-logb-1.c: Likewise. + * gcc.dg/torture/builtin-modf-1.c: Likewise. + * gcc.dg/torture/builtin-ldexp-1.c: Likewise. + * gcc.dg/torture/builtin-frexp-1.c: Likewise. + * gcc.dg/torture/type-generic-1.c: Disable test on SPU. + * g++.dg/torture/type-generic-1.C: Likewise. + + SPU single-precision FP always rounds towards zero: + * gcc.c-torture/execute/ieee/920518-1.x: New file. + * gcc.c-torture/execute/ieee/20010114-2.x: New file. + * gcc.c-torture/execute/ieee/20030331-1.x: New file. + * gcc.dg/torture/fp-int-convert-float.c: Disable test on SPU. + * gcc.dg/torture/fp-int-convert-timode.c: Disable "float" test on SPU. + + 2008-07-02 Ira Rosen + + * gcc.dg/vect/costmodel/spu/costmodel-vect-iv-9.c: Add noinline + attribute to main1(). + * gcc.dg/vect/costmodel/spu/costmodel-vect-33.c: Increase the loop + bound in order to make it worth to vectorize the loop. + * gcc.dg/vect/costmodel/spu/costmodel-vect-76b.c: Likewise. + + 2008-07-01 Jerry DeLisle + + PR tree-optimization/36648 + * g++.dg/vect/pr36648.cc: New testcase. + + 2008-06-30 Jakub Jelinek + + PR c++/36662 + * g++.dg/ext/altivec-16.C: New test. + + 2008-06-29 Jakub Jelinek + + PR testsuite/36620 + * gcc.dg/pr36504.c: Add -w to dg-options. + + 2008-06-29 Ira Rosen + + * gcc.dg/vect/pr36493.c: Require vect_long. + + 2008-06-28 Joseph Myers + + * gcc.c-torture/compile/20080628-1.c: New test. + + 2008-06-28 Jakub Jelinek + + PR c++/36364 + * g++.dg/template/repo9.C: New test. + + 2008-06-26 Joseph Myers + + * gcc.dg/inline-31.c, gcc.dg/inline-32.c, gcc.dg/inline-32a.c: New + tests. + + 2008-06-26 Ira Rosen + + * testsuite/lib/target-supports.exp + (check_effective_target_vect_cmdline_needed): Add SPU to the list + of targets that do not need command line argument to enable SIMD. + + 2008-06-26 Ira Rosen + + PR target/36510 + * gcc.dg/vect/costmodel/ppc/costmodel-vect-31d.c: Change the loop + bound. + * gcc.dg/vect/costmodel/ppc/costmodel-vect-68d.c: Likewise. + + 2008-06-25 Richard Guenther + + * gcc.c-torture/compile/20080625-1.c: New testcase. + + 2008-06-25 Richard Guenther + + * g++.dg/torture/20080625-1.C: New testcase. + + 2008-06-24 Eric Botcazou + + * gnat.dg/warn5.adb: New test. + + 2008-06-24 Jakub Jelinek + + PR tree-optimization/36504 + * gcc.dg/pr36504.c: New test. + + 2008-06-23 Uros Bizjak + + PR middle-end/36584 + * testsuite/gcc.dg/pr36584.c: New test. + * testsuite/gcc.target/i386/local2.c: Remove invalid test. + + 2008-06-23 Jakub Jelinek + + PR target/36533 + * gcc.target/i386/pr36533.c: New test. + + PR tree-optimization/36508 + * gcc.dg/pr36508.c: New test. + + 2008-06-18 Joseph Myers + + * lib/target-supports.exp + (check_effective_target_powerpc_hard_double): New. + * gcc.dg/tree-ssa/loop-19.c: Use powerpc_hard_double instead of + powerpc*-*-*. + + 2008-06-16 Ira Rosen + + PR tree-optimization/36493 + * gcc.dg/vect/pr36493.c: New testcase. + + 2008-06-15 Simon Martin + + PR c++/35320 + * g++.dg/parse/bitfield3.C: New test. + + 2008-06-15 Simon Martin + + PR c++/35317 + * g++.dg/other/dtor2.C: New test. + + 2008-06-13 Jakub Jelinek + + PR c/36507 + * gcc.dg/inline-28.c: New test. + * gcc.dg/inline-29.c: New test. + * gcc.dg/inline-30.c: New test. + + 2008-06-12 Joseph Myers + + * gcc.dg/compat/struct-layout-1.exp (orig_gcc_exec_prefix_saved): + Always initialize. + * g++.dg/compat/struct-layout-1.exp (orig_gcc_exec_prefix_saved): + Always initialize. + + 2008-06-12 Richard Guenther + + Backport from mainline + 2008-06-04 Richard Guenther + + * gcc.c-torture/execute/20080604-1.c: New testcase. + + 2008-06-12 Jakub Jelinek + + PR testsuite/36443 + * gcc.dg/compat/struct-layout-1.exp: Temporarily unset + GCC_EXEC_PREFIX from environment when running $HOSTCC. + * g++.dg/compat/struct-layout-1.exp: Likewise. + + 2008-06-11 Richard Guenther + + PR tree-optimization/36474 + * gcc.dg/tree-ssa/alias-15.c: Adjust testcase. + + 2008-06-09 Eric Botcazou + + * gnat.dg/specs/pack3.ads: New test. + * gnat.dg/specs/pack3_pkg.ads: New helper. + + 2008-06-07 Sebastian Pop + + * testsuite/gcc.dg/tree-ssa/ltrans-8.c: Fix outer loop strides + to be large enough to not be in L1 cache. + + 2008-06-07 Uros Bizjak + + Backport from mainline: + 2008-05-12 Uros Bizjak + + PR rtl-optimization/36111 + * gcc.dg/pr36111.c: New test. + + 2008-06-06 Joseph Myers + + * lib/target-supports.exp (check_effective_target_powerpc_spu): + Call check_effective_target_powerpc_altivec_ok. + * gcc.target/powerpc/dfp-dd.c, gcc.target/powerpc/dfp-td.c, + gcc.target/powerpc/ppc32-abi-dfp-1.c, + gcc.target/powerpc/ppu-intrinsics.c: Require powerpc_fprs. + + 2008-06-06 Jakub Jelinek + + PR target/36362 + * gcc.c-torture/execute/20080529-1.c: New test. + 2008-06-06 Release Manager * GCC 4.3.1 released. *************** *** 9863,9869 **** vectorizable. 2007-07-01 Uros Bizjak ! Volker Reichelt PR middle-end/32559 * gcc.dg/pr32559.c: New test. --- 10373,10379 ---- vectorizable. 2007-07-01 Uros Bizjak ! Volker Reichelt PR middle-end/32559 * gcc.dg/pr32559.c: New test. *************** *** 13478,13484 **** PR fortran/31011 * gfortran.dg/parameter_array_section_2.f90: New test. ! 2007-03-08 Volker Reichelt PR c++/30852 * g++.dg/ext/offsetof1.C: Add cases with volatile. --- 13988,13994 ---- PR fortran/31011 * gfortran.dg/parameter_array_section_2.f90: New test. ! 2007-03-08 Volker Reichelt PR c++/30852 * g++.dg/ext/offsetof1.C: Add cases with volatile. diff -Nrcpad gcc-4.3.1/gcc/testsuite/g++.dg/compat/struct-layout-1.exp gcc-4.3.2/gcc/testsuite/g++.dg/compat/struct-layout-1.exp *** gcc-4.3.1/gcc/testsuite/g++.dg/compat/struct-layout-1.exp Wed Aug 1 16:25:11 2007 --- gcc-4.3.2/gcc/testsuite/g++.dg/compat/struct-layout-1.exp Thu Jun 12 12:19:43 2008 *************** set generator_src "$generator_src $srcdi *** 128,135 **** --- 128,147 ---- set generator_src "$generator_src $srcdir/$subdir/../../gcc.dg/compat/generate-random_r.c" set generator_cmd "-o $generator $generator_src" + # Temporarily unset GCC_EXEC_PREFIX from environment, as that might + # confuse the $HOSTCC. + set orig_gcc_exec_prefix_saved 0 + if [info exists env(GCC_EXEC_PREFIX)] { + set orig_gcc_exec_prefix "$env(GCC_EXEC_PREFIX)" + set orig_gcc_exec_prefix_saved 1 + unsetenv GCC_EXEC_PREFIX + } set status [remote_exec host "$HOSTCC $HOSTCFLAGS $generator_cmd"] set status [lindex $status 0] + if { $orig_gcc_exec_prefix_saved } { + set orig_gcc_exec_prefix_saved 0 + setenv GCC_EXEC_PREFIX "$orig_gcc_exec_prefix" + } if { $status == 0 } then { file delete -force $tstobjdir file mkdir $tstobjdir diff -Nrcpad gcc-4.3.1/gcc/testsuite/g++.dg/conversion/op5.C gcc-4.3.2/gcc/testsuite/g++.dg/conversion/op5.C *** gcc-4.3.1/gcc/testsuite/g++.dg/conversion/op5.C Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/g++.dg/conversion/op5.C Fri Jul 18 20:15:22 2008 *************** *** 0 **** --- 1,20 ---- + // Contributed by Dodji Seketeli + // Origin: PR c++/36407 + // { dg-do compile } + + struct A + { + A (const A&); + }; + + struct B + { + operator A&(); + }; + + void + foo (const B& b) + { + const A a = b; // { dg-error "conversion from 'const B' to non-scalar type 'const A' requested" } + } + diff -Nrcpad gcc-4.3.1/gcc/testsuite/g++.dg/debug/namespace2.C gcc-4.3.2/gcc/testsuite/g++.dg/debug/namespace2.C *** gcc-4.3.1/gcc/testsuite/g++.dg/debug/namespace2.C Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/g++.dg/debug/namespace2.C Thu Jul 31 08:48:26 2008 *************** *** 0 **** --- 1,8 ---- + // PR debug/36278 + // { dg-do compile } + + namespace N + { + typedef void T; + } + using N::T; diff -Nrcpad gcc-4.3.1/gcc/testsuite/g++.dg/eh/async-unwind1.C gcc-4.3.2/gcc/testsuite/g++.dg/eh/async-unwind1.C *** gcc-4.3.1/gcc/testsuite/g++.dg/eh/async-unwind1.C Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/g++.dg/eh/async-unwind1.C Thu Jul 10 07:52:36 2008 *************** *** 0 **** --- 1,61 ---- + // PR rtl-optimization/36419 + // { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } } + // { dg-options "-Os -fasynchronous-unwind-tables -mpreferred-stack-boundary=4" } + + extern "C" void abort (); + + int v = -1; + unsigned int n; + + __attribute__((noinline, used)) + void foo (int a, int) + { + if (v < 0) + v = ((unsigned long) &a) & 15; + else if ((((unsigned long) &a) & 15) != v) + abort (); + if (n++ == 0) + throw 1; + } + + __attribute__((noinline, used)) + void baz (int a, int, int, int, int, int, int) + { + if (v < 0) + v = ((unsigned long) &a) & 15; + else if ((((unsigned long) &a) & 15) != v) + abort (); + if (n++ == 0) + throw 1; + } + + struct A { A () { }; ~A (); char c[24]; }; + + __attribute__((noinline)) + A::~A () + { + asm volatile ("" : : : "memory"); + } + + __attribute__((noinline)) + void bar () + { + A a; + try + { + foo (1, 2); + baz (3, 4, 5, 6, 7, 8, 9); + } + catch (...) + { + } + foo (1, 2); + baz (3, 4, 5, 6, 7, 8, 9); + } + + int + main () + { + bar (); + return 0; + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/g++.dg/eh/async-unwind2.C gcc-4.3.2/gcc/testsuite/g++.dg/eh/async-unwind2.C *** gcc-4.3.1/gcc/testsuite/g++.dg/eh/async-unwind2.C Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/g++.dg/eh/async-unwind2.C Thu Jul 31 19:07:51 2008 *************** *** 0 **** --- 1,254 ---- + // PR rtl-optimization/36419 + // { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } } + // { dg-options "-Os -fasynchronous-unwind-tables -fpic -fno-inline" } + + #include + + extern "C" void abort (); + + extern "C" + { + struct R { int r1; unsigned short r2[1]; }; + int bar1 (unsigned short *, int, short) throw (); + void bar2 (R *) throw (); + void bar3 (R **, const unsigned short *, int) throw (); + void bar4 (R **, const char *) throw (); + void bar5 (void *, const char *, ...); + } + + struct S + { + R *s; + struct T { }; + S (R *x, T *) { s = x; } + ~S () { bar2 (s); } + S &operator= (const S &x); + S &operator+= (const S &x); + S sfn1 (const S &x) const; + friend S operator+ (const S &x1, const S &x2); + static S sfn2 (int i) + { + unsigned short q[33]; + R *p = 0; + bar3 (&p, q, bar1 (q, i, 10)); + return S (p, (T *) 0); + } + static S sfn3 (const char *x) + { + R *p = 0; + bar4 (&p, x); + return S (p, (T *) 0); + } + }; + + struct U { }; + template unsigned char operator >>= (const U &, C &); + + struct V; + struct W + { + V *w; + unsigned char is () const; + }; + + template struct X : public W + { + inline ~X (); + X (); + X (const W &); + T *operator -> () const; + }; + + struct E + { + E (); + E (const S &, const X &); + E (E const &); + ~E (); + E &operator = (E const &); + }; + + struct V + { + virtual void release () throw (); + }; + + template X ::~X () + { + if (w) + w->release (); + } + + struct Y + { + virtual U yfn1 (const S &); + }; + + struct Z; + + X baz1 (const S &) throw (E); + X baz2 (const X &) throw (E); + + template X::X () + { + w = __null; + } + + template X::X (W const &) + { + w = __null; + } + + U Y::yfn1 (const S &) + { + throw 12; + } + + Y y; + + template T *X::operator -> () const + { + return &y; + } + + X baz1 (const S &) throw (E) + { + return X (); + } + + E::E () + { + } + + E::~E () + { + } + + X baz2 (const X &) throw (E) + { + throw E (); + } + + int bar1 (unsigned short *, int, short) throw () + { + asm volatile ("" : : : "memory"); + return 0; + } + + void bar2 (R *) throw () + { + asm volatile ("" : : : "memory"); + } + + void bar3 (R **, const unsigned short *, int) throw () + { + asm volatile ("" : : : "memory"); + } + + void bar4 (R **, const char *) throw () + { + asm volatile ("" : : : "memory"); + } + + int events[2]; + void *sp; + + void bar5 (void *p, const char *s, ...) + { + va_list ap; + va_start (ap, s); + if (p) + throw 19; + switch (*s) + { + case 't': + if (events[0] != va_arg (ap, int)) + abort (); + events[0]++; + break; + case 'f': + abort (); + case 'c': + if (events[1] != va_arg (ap, int)) + abort (); + events[1]++; + if (events[1] == 1) + sp = va_arg (ap, void *); + else if (sp != va_arg (ap, void *)) + abort (); + break; + } + } + + unsigned char W::is () const + { + return 1; + } + + S &S::operator += (const S &) + { + return *this; + } + + template unsigned char operator >>= (const U &, C &) + { + throw 1; + } + + template X::X (); + template X::X (); + template unsigned char operator >>= (const U &, X &); + template X::X (W const &); + + template Y *X::operator-> () const; + + X foo () throw () + { + X a; + X b; + try + { + b = X (baz1 (S::sfn3 ("defg"))); + } + catch (E &) + { + } + if (b.is ()) + { + for (int n = 0; n < 10; n++) + { + S c = S::sfn3 ("abcd"); + c += S::sfn2 (n); + X d; + try + { + bar5 ((void *) 0, "trying %d\n", n); + if ((b->yfn1 (c) >>= d)) + if (d.is ()) + { + bar5 ((void *) 0, "failure1 on %d\n", n); + a = baz2 (d); + if (a.is ()) + break; + } + bar5 ((void *) 0, "failure2 on %d\n", n); + } + catch (...) + { + void *p; + asm volatile ("movl %%esp, %0" : "=r" (p)); + bar5 ((void *) 0, "caught %d %p\n", n, p); + } + } + } + return a; + } + + int + main () + { + foo (); + if (events[0] != 10 || events[1] != 10) + abort (); + return 0; + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/g++.dg/ext/altivec-16.C gcc-4.3.2/gcc/testsuite/g++.dg/ext/altivec-16.C *** gcc-4.3.1/gcc/testsuite/g++.dg/ext/altivec-16.C Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/g++.dg/ext/altivec-16.C Mon Jun 30 20:49:51 2008 *************** *** 0 **** --- 1,19 ---- + // PR c++/36662 + // { dg-do compile { target powerpc*-*-* } } + // { dg-require-effective-target powerpc_altivec_ok } + // { dg-options "-maltivec" } + + #define vector __attribute__((altivec (vector__))) + + template struct S {}; + + template <> struct S + { + static vector float zero; + }; + + template + void g (void) + { + vector float t = S::zero; + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/g++.dg/inherit/thunk8.C gcc-4.3.2/gcc/testsuite/g++.dg/inherit/thunk8.C *** gcc-4.3.1/gcc/testsuite/g++.dg/inherit/thunk8.C Wed May 30 19:24:28 2007 --- gcc-4.3.2/gcc/testsuite/g++.dg/inherit/thunk8.C Fri Jul 25 15:51:03 2008 *************** *** 3,9 **** Make sure that won't happen anymore. */ /* { dg-do compile } */ ! /* { dg-require-effective-target arm32 } */ /* { dg-options "-mthumb -fPIC" } */ struct A { --- 3,9 ---- Make sure that won't happen anymore. */ /* { dg-do compile } */ ! /* { dg-require-effective-target arm_thumb1_ok } */ /* { dg-options "-mthumb -fPIC" } */ struct A { diff -Nrcpad gcc-4.3.1/gcc/testsuite/g++.dg/init/const6.C gcc-4.3.2/gcc/testsuite/g++.dg/init/const6.C *** gcc-4.3.1/gcc/testsuite/g++.dg/init/const6.C Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/g++.dg/init/const6.C Tue Aug 12 08:31:15 2008 *************** *** 0 **** --- 1,27 ---- + // PR c++/36688 + // { dg-do run } + // { dg-options "-O2" } + + struct S + { + long long a; + long long b; + long long c; + }; + + struct T + { + S g; + long long h[12]; + }; + + static const S s = { 1, 2, 3 }; + static const T t = { s, 0 }; + + int + main () + { + T x = t; + if (__builtin_memcmp (&x, &t, sizeof (T))) + __builtin_abort (); + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/g++.dg/opt/pmf1.C gcc-4.3.2/gcc/testsuite/g++.dg/opt/pmf1.C *** gcc-4.3.1/gcc/testsuite/g++.dg/opt/pmf1.C Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/g++.dg/opt/pmf1.C Wed Aug 6 01:54:31 2008 *************** *** 0 **** --- 1,76 ---- + // PR c++/37016 + // { dg-do run } + // { dg-options "-O2 -Wall" } + + /* + Basic design concept is that WorldObject implements remote method call + functionality using the "curiously recurring template pattern" to enable + forwarding calls from the generic base class that implements the transport + layer to the derived class. + + The specific failure was in forwarding calls to items in a container. + This is emulated here by wrapping a single item. + + In the main program there are two forms of the call. In the last + (uncommented) form the member function pointer is for clarity + assigned to a variable (itemfunptr) before making the call. + With 4.3.0 and 4.3.1 this code compiles incorrectly with -O1 or greater + to produce this warning + + reproduce.cc: In function ‘int main()’: + reproduce.cc:26: warning: ‘itemfunptr.void (Container::*)(void + (Item::*)(int), int)::__pfn’ is used uninitialized in this function + reproduce.cc:47: note: ‘itemfunptr.void (Container::*)(void (Item::*)(int), + int)::__pfn’ was declared here + + and the resulting executable segvs. It works correctly with -O0. + + With 4.2.3 and earlier it works correctly with optimization. + + In the first (commented out) form of the call in the main program + we directly refer to desired member function. This compiles + and executes correctly with all tested versions. + */ + + extern "C" int printf (const char *, ...); + + template + struct WorldObject { + template + void forward(memfunT memfun, arg1T arg1, arg2T arg2) { + Derived* obj = static_cast(this); + (obj->*memfun)(arg1, arg2); + } + }; + + struct Item { + void fred(int a) { + printf ("a=%d\n", a); + } + }; + + struct Container : public WorldObject { + Item item; + template + void itemfun(itemfunT itemfun, int a) { + (item.*itemfun)(a); + } + }; + + int main() { + typedef void (Item::*itemfun)(int); + + Container t; + + // This call compiles and executes correctly with all versions tested + //t.forward(&Container::itemfun, &Item::fred, 1); + + // This call compiles with a warning and segvs on execution if using + // -O1 or greater with 4.3.*. 4.2.* is correct. + void (Container::*itemfunptr)(itemfun, int) = + &Container::itemfun; + t.forward(itemfunptr, &Item::fred, 1); + + return 0; + } + diff -Nrcpad gcc-4.3.1/gcc/testsuite/g++.dg/opt/temp1.C gcc-4.3.2/gcc/testsuite/g++.dg/opt/temp1.C *** gcc-4.3.1/gcc/testsuite/g++.dg/opt/temp1.C Thu Feb 9 09:54:36 2006 --- gcc-4.3.2/gcc/testsuite/g++.dg/opt/temp1.C Wed Jul 2 15:43:34 2008 *************** void *memcpy (void *dest, const void *sr *** 24,30 **** --- 24,35 ---- } struct T { + #ifdef __SPU__ + /* SPU returns aggregates up to 1172 bytes in registers. */ + int a[300]; + #else int a[128]; + #endif T &operator+=(T const &v) __attribute__((noinline)); T operator+(T const &v) const { T t = *this; t += v; return t; } }; diff -Nrcpad gcc-4.3.1/gcc/testsuite/g++.dg/opt/vt1.C gcc-4.3.2/gcc/testsuite/g++.dg/opt/vt1.C *** gcc-4.3.1/gcc/testsuite/g++.dg/opt/vt1.C Sun Oct 16 01:14:19 2005 --- gcc-4.3.2/gcc/testsuite/g++.dg/opt/vt1.C Thu Jul 3 12:32:24 2008 *************** *** 1,6 **** --- 1,7 ---- // Test whether vtable for S is not put into read-only section. // { dg-do compile { target fpic } } // { dg-options "-O2 -fpic -fno-rtti" } + // { dg-skip-if "requires unsupported run-time relocation" { spu-*-* } { "*" } { "" } } // Origin: Jakub Jelinek struct S diff -Nrcpad gcc-4.3.1/gcc/testsuite/g++.dg/other/dtor2.C gcc-4.3.2/gcc/testsuite/g++.dg/other/dtor2.C *** gcc-4.3.1/gcc/testsuite/g++.dg/other/dtor2.C Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/g++.dg/other/dtor2.C Sun Jun 15 11:57:33 2008 *************** *** 0 **** --- 1,7 ---- + /* PR c++/35317 */ + /* { dg-do "compile" } */ + + struct A + { + void operator delete[] (void*, ...); + }; diff -Nrcpad gcc-4.3.1/gcc/testsuite/g++.dg/parse/bitfield3.C gcc-4.3.2/gcc/testsuite/g++.dg/parse/bitfield3.C *** gcc-4.3.1/gcc/testsuite/g++.dg/parse/bitfield3.C Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/g++.dg/parse/bitfield3.C Sun Jun 15 12:05:37 2008 *************** *** 0 **** --- 1,9 ---- + /* PR c++/35320 */ + /* { dg-do "compile" } */ + + typedef void (func_type)(); + + struct A + { + friend func_type f : 2; /* { dg-error "with non-integral type" } */ + }; diff -Nrcpad gcc-4.3.1/gcc/testsuite/g++.dg/parse/crash41.C gcc-4.3.2/gcc/testsuite/g++.dg/parse/crash41.C *** gcc-4.3.1/gcc/testsuite/g++.dg/parse/crash41.C Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/g++.dg/parse/crash41.C Wed Jul 30 13:18:31 2008 *************** *** 0 **** --- 1,9 ---- + // Created by: Dodji Seketeli + // { dg-do compile } + // { dg-options "-O2 -fprofile-arcs" } + // Origin: PR C++/36767 + + struct A { A (); ~A (); }; + A a[2]; + + diff -Nrcpad gcc-4.3.1/gcc/testsuite/g++.dg/parse/dtor13.C gcc-4.3.2/gcc/testsuite/g++.dg/parse/dtor13.C *** gcc-4.3.1/gcc/testsuite/g++.dg/parse/dtor13.C Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/g++.dg/parse/dtor13.C Mon Jul 7 20:42:03 2008 *************** *** 0 **** --- 1,8 ---- + /* PR c++/34963 This used to ICE */ + /* { dg-do "compile" } */ + + struct A + { + static friend A::~A(); /* { dg-error "storage class specifiers|extra qualification|implicitly friend" } */ + }; + diff -Nrcpad gcc-4.3.1/gcc/testsuite/g++.dg/pch/array-1.C gcc-4.3.2/gcc/testsuite/g++.dg/pch/array-1.C *** gcc-4.3.1/gcc/testsuite/g++.dg/pch/array-1.C Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/g++.dg/pch/array-1.C Tue Jul 29 16:40:15 2008 *************** *** 0 **** --- 1,15 ---- + // PR c++/36852 + + #include "array-1.H" + + template + T + A::foo (T t[3][3]) + { + return t[0][1]; + } + + int + main () + { + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/g++.dg/pch/array-1.Hs gcc-4.3.2/gcc/testsuite/g++.dg/pch/array-1.Hs *** gcc-4.3.1/gcc/testsuite/g++.dg/pch/array-1.Hs Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/g++.dg/pch/array-1.Hs Tue Jul 29 16:40:15 2008 *************** *** 0 **** --- 1,4 ---- + struct A + { + template static T foo (T[3][3]); + }; diff -Nrcpad gcc-4.3.1/gcc/testsuite/g++.dg/rtti/typeid8.C gcc-4.3.2/gcc/testsuite/g++.dg/rtti/typeid8.C *** gcc-4.3.1/gcc/testsuite/g++.dg/rtti/typeid8.C Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/g++.dg/rtti/typeid8.C Thu Jul 31 19:02:33 2008 *************** *** 0 **** --- 1,26 ---- + // PR c++/36405 + // { dg-do compile } + + #include + + struct A + { + void foo () + { + typeid (foo).name (); // { dg-error "invalid use of member" } + typeid (A::foo).name (); // { dg-error "invalid use of member" } + } + void bar () + { + typeid (foo).name (); // { dg-error "invalid use of member" } + typeid (A::foo).name (); // { dg-error "invalid use of member" } + } + static void baz () + { + typeid (baz).name (); + typeid (A::baz).name (); + } + }; + + const char *p1 = typeid (A::foo).name (); // { dg-error "invalid use of non-static member" } + const char *p2 = typeid (A::baz).name (); diff -Nrcpad gcc-4.3.1/gcc/testsuite/g++.dg/template/repo9.C gcc-4.3.2/gcc/testsuite/g++.dg/template/repo9.C *** gcc-4.3.1/gcc/testsuite/g++.dg/template/repo9.C Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/g++.dg/template/repo9.C Fri Jun 27 22:35:14 2008 *************** *** 0 **** --- 1,48 ---- + // PR c++/36364 + // { dg-options "-frepo" } + // { dg-final { cleanup-repo-files } } + // { dg-require-host-local "" } + + template struct A + { + static void assign (C &c1, const C &c2) { c1 = c2; } + }; + + template struct B + { + struct D + { + static const C terminal; + static unsigned long stor[]; + static D &empty_rep () + { + void *p = reinterpret_cast (&stor); + return *reinterpret_cast (p); + } + void test (unsigned long n) + { + T::assign (this->refdata ()[n], terminal); + } + C *refdata () throw () + { + return reinterpret_cast (this + 1); + } + }; + C *dataplus; + C *data () const { return dataplus; } + D *rep () const { return &((reinterpret_cast < D * >(data ()))[-1]); } + static D & empty_rep () { return D::empty_rep (); } + B () : dataplus (empty_rep ().refdata ()) { } + ~B () { } + void push_back (C c) { rep ()->test (10); } + }; + + template const C B ::D::terminal = C (); + template unsigned long B ::D::stor[64]; + + int + main () + { + B > s; + s.push_back ('a'); + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/g++.dg/torture/20080625-1.C gcc-4.3.2/gcc/testsuite/g++.dg/torture/20080625-1.C *** gcc-4.3.1/gcc/testsuite/g++.dg/torture/20080625-1.C Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/g++.dg/torture/20080625-1.C Wed Jun 25 09:48:48 2008 *************** *** 0 **** --- 1,27 ---- + extern "C" { + typedef unsigned char sal_Bool; + typedef struct _rtl_uString { + } rtl_uString; + void rtl_uString_release( rtl_uString * str ) throw (); + } + class OUString { + rtl_uString * pData; + public: + OUString() {} + ~OUString() { + rtl_uString_release( pData ); + } + sal_Bool equalsIgnoreAsciiCase( const OUString & str ) const; + }; + bool findAndRemove(); + long getAttributeProps() + { + long nAttrs = 0; + OUString aValue; + if (findAndRemove() + && aValue.equalsIgnoreAsciiCase(OUString())) + ; + else + nAttrs |= 1; + return nAttrs; + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/g++.dg/torture/type-generic-1.C gcc-4.3.2/gcc/testsuite/g++.dg/torture/type-generic-1.C *** gcc-4.3.1/gcc/testsuite/g++.dg/torture/type-generic-1.C Tue Aug 7 01:41:27 2007 --- gcc-4.3.2/gcc/testsuite/g++.dg/torture/type-generic-1.C Wed Jul 2 15:37:17 2008 *************** *** 3,8 **** --- 3,9 ---- /* { dg-do run } */ /* { dg-options "-mieee" { target sh*-*-* } } */ + /* { dg-skip-if "No Inf/NaN support" { spu-*-* } } */ #include "../../gcc.dg/tg-tests.h" diff -Nrcpad gcc-4.3.1/gcc/testsuite/g++.dg/vect/pr36648.cc gcc-4.3.2/gcc/testsuite/g++.dg/vect/pr36648.cc *** gcc-4.3.1/gcc/testsuite/g++.dg/vect/pr36648.cc Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/g++.dg/vect/pr36648.cc Tue Jul 1 05:31:55 2008 *************** *** 0 **** --- 1,24 ---- + /* { dg-require-effective-target vect_float } */ + + struct vector + { + vector() : x(0), y(0), z(0) { } + float x,y,z; + }; + + struct Foo + { + int dummy; + /* Misaligned access. */ + vector array_of_vectors[4]; + }; + + Foo foo; + + int main() { } + + /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } }*/ + /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" } } */ + /* { dg-final { cleanup-tree-dump "vect" } } */ + + diff -Nrcpad gcc-4.3.1/gcc/testsuite/g++.dg/warn/pr36999.C gcc-4.3.2/gcc/testsuite/g++.dg/warn/pr36999.C *** gcc-4.3.1/gcc/testsuite/g++.dg/warn/pr36999.C Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/g++.dg/warn/pr36999.C Thu Aug 7 12:27:48 2008 *************** *** 0 **** --- 1,40 ---- + /* PR36999: Erroneous "does not declare anything" warnings. */ + /* { dg-do compile } */ + + class C1 { + public: class C2 { }; + }; + + void cf1 (class C1::C2, void*); // { dg-bogus "does not declare anything" } + void cf2 (void*, class C1::C2); + void cf3 (C1::C2, void*); + + namespace N { + + enum E1 { foo }; + enum E2 { bar }; + + template + class TC1 { }; + + template + class TC2 : public TC1 { }; + + } + + void + tcf1 (N::TC2 *arg1, // { dg-bogus "does not declare anything" } + N::TC2 *arg2, + N::TC2 *arg3) + { + } + + void * + tcf2 (void *x) + { + return (void *) + (N::TC2 *) // { dg-bogus "does not declare anything" } + (N::TC2 *) + (N::TC2 *) + x; + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog gcc-4.3.2/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog *** gcc-4.3.1/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog Fri Jun 6 14:28:32 2008 --- gcc-4.3.2/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog Wed Aug 27 18:02:34 2008 *************** *** 1,3 **** --- 1,7 ---- + 2008-08-27 Release Manager + + * GCC 4.3.2 released. + 2008-06-06 Release Manager * GCC 4.3.1 released. diff -Nrcpad gcc-4.3.1/gcc/testsuite/g++.old-deja/g++.other/comdat5.C gcc-4.3.2/gcc/testsuite/g++.old-deja/g++.other/comdat5.C *** gcc-4.3.1/gcc/testsuite/g++.old-deja/g++.other/comdat5.C Sat Dec 10 02:19:09 2005 --- gcc-4.3.2/gcc/testsuite/g++.old-deja/g++.other/comdat5.C Thu Jul 3 12:32:24 2008 *************** *** 2,6 **** --- 2,7 ---- // { dg-do link { target fpic } } // { dg-additional-sources " comdat5-aux.cc" } // { dg-options "-O2 -fPIC" } + // { dg-skip-if "requires unsupported run-time relocation" { spu-*-* } { "*" } { "" } } #include "comdat4.C" diff -Nrcpad gcc-4.3.1/gcc/testsuite/g++.old-deja/g++.other/local-alloc1.C gcc-4.3.2/gcc/testsuite/g++.old-deja/g++.other/local-alloc1.C *** gcc-4.3.1/gcc/testsuite/g++.old-deja/g++.other/local-alloc1.C Sun Oct 16 01:14:19 2005 --- gcc-4.3.2/gcc/testsuite/g++.old-deja/g++.other/local-alloc1.C Thu Jul 3 12:32:24 2008 *************** *** 1,5 **** --- 1,6 ---- // { dg-do assemble { target fpic } } // { dg-options "-O0 -fpic" } + // { dg-skip-if "requires unsupported run-time relocation" { spu-*-* } { "*" } { "" } } // Origin: Jakub Jelinek struct bar { diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/compile/20001226-1.c gcc-4.3.2/gcc/testsuite/gcc.c-torture/compile/20001226-1.c *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/compile/20001226-1.c Thu Nov 1 16:22:36 2007 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/compile/20001226-1.c Wed Jul 2 15:58:09 2008 *************** *** 3,8 **** --- 3,9 ---- /* { dg-do assemble } */ /* { dg-xfail-if "function larger than 64K" { m6811-*-* } { "*" } { "" } } */ /* { dg-xfail-if "jump beyond 128K not supported" { xtensa-*-* } { "-O0" } { "" } } */ + /* { dg-xfail-if "PR36698" { spu-*-* } { "-O0" } { "" } } */ /* { dg-skip-if "" { m32c-*-* } { "*" } { "" } } */ /* This testcase exposed two branch shortening bugs on powerpc. */ diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/compile/20080625-1.c gcc-4.3.2/gcc/testsuite/gcc.c-torture/compile/20080625-1.c *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/compile/20080625-1.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/compile/20080625-1.c Wed Jun 25 11:11:30 2008 *************** *** 0 **** --- 1,16 ---- + struct peakbufStruct { + unsigned int lnum [5000]; + int lscan [5000][4000]; + double lmz [5000][4000]; + double lint [5000][4000]; + int PeaksInBuf; + unsigned char freelists [350000]; + unsigned char freelistl [5000]; + unsigned int LastFreeL; + } peakbuf; + void foo(int); + void findmzROI(int i, int *p_scan) + { + foo(peakbuf.PeaksInBuf); + __builtin_memmove(p_scan, peakbuf.lscan[i], peakbuf.lnum[i]*sizeof(int)); + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/compile/20080628-1.c gcc-4.3.2/gcc/testsuite/gcc.c-torture/compile/20080628-1.c *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/compile/20080628-1.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/compile/20080628-1.c Sat Jun 28 19:41:29 2008 *************** *** 0 **** --- 1,15 ---- + void f (long double, long double); + + struct s { + char c; + struct s *p; + } *p; + + void + g (void) + { + long double ld; + p->p->c = 1; + ld = p->p->c; + f (ld, 1.0L); + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/compile/20080806-1.c gcc-4.3.2/gcc/testsuite/gcc.c-torture/compile/20080806-1.c *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/compile/20080806-1.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/compile/20080806-1.c Mon Aug 18 08:38:48 2008 *************** *** 0 **** --- 1,41 ---- + /* This used to ICE on s390x due to a reload bug. */ + + #if defined(STACK_SIZE) && (STACK_SIZE < 65536) + #define BYTES 64 + #else + #define BYTES 65400 + #endif + + int gl2; + typedef __SIZE_TYPE__ size_t; + + extern void *memcpy (void *dest, const void *src, size_t n); + + void + f1 () + { + int i2; + unsigned char bf[BYTES]; + + for (i2 = 0; i2 < 3; i2++) + { + unsigned char *p2 = bf; + unsigned char *p3 = ((void *) 0); + unsigned short ctf2; + + p2 += sizeof (short); + + for (ctf2 = 0; ctf2 < 3; ctf2++) + { + if (ctf2 == 1) + { + unsigned short of = p2 - bf - 6; + unsigned short *ofp = (unsigned short *) &of; + memcpy (p3, ofp, sizeof (short)); + } + + if (gl2 == 1) + p2 += 3; + } + } + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/compile/20080812-1.c gcc-4.3.2/gcc/testsuite/gcc.c-torture/compile/20080812-1.c *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/compile/20080812-1.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/compile/20080812-1.c Tue Aug 12 18:36:28 2008 *************** *** 0 **** --- 1,21 ---- + /* PR middle-end/37014 */ + + void bar (signed char *); + + void + foo (int x, int y) + { + int i; + signed char a[123], b[123], c; + for (i = 0; i < 123; i++) + { + int e = y - x; + int d = e < 0 ? -e : e; + c = d < 75; + a[y] = c; + b[y] = c; + y--; + } + bar (b); + bar (a); + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/compile/pr35432.c gcc-4.3.2/gcc/testsuite/gcc.c-torture/compile/pr35432.c *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/compile/pr35432.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/compile/pr35432.c Wed Aug 6 21:03:07 2008 *************** *** 0 **** --- 1,11 ---- + /* PR middle-end/35432 */ + + struct A + { + char c[0]; + }; + + void foo(struct A a) + { + (a = a).c; + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/compile/pr35492.c gcc-4.3.2/gcc/testsuite/gcc.c-torture/compile/pr35492.c *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/compile/pr35492.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/compile/pr35492.c Mon Jul 14 00:25:52 2008 *************** *** 0 **** --- 1,26 ---- + void prepare_to_wait (void *, void *, int); + void finish_wait (void *, void *); + extern signed long schedule_timeout (signed long); + struct sock + { + unsigned char skc_state; + void *sk_sleep; + int sk_err; + }; + + void + sk_stream_wait_connect (struct sock *sk, long *timeo_p) + { + int done; + int wait; + do + { + if ((1 << sk->skc_state) & ~12) + return; + prepare_to_wait (sk->sk_sleep, &wait, 1); + *(timeo_p) = schedule_timeout (0); + done = !sk->sk_err; + finish_wait (sk->sk_sleep, &wait); + } + while (!done); + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/compile/pr37026.c gcc-4.3.2/gcc/testsuite/gcc.c-torture/compile/pr37026.c *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/compile/pr37026.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/compile/pr37026.c Tue Aug 5 11:40:48 2008 *************** *** 0 **** --- 1,12 ---- + struct a { + long a1; + long a2; + }; + struct b { + struct a b1; + struct a b2; + }; + void bar (struct b *c) + { + c->b1 = c->b2 = ((struct a) { foo(), 0 }); + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/20030222-1.x gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/20030222-1.x *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/20030222-1.x Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/20030222-1.x Wed Jul 2 15:40:24 2008 *************** *** 0 **** --- 1,6 ---- + if [istarget "spu-*-*"] { + # Using inline assembly to convert long long to int is not working quite + # right # on the SPU. An extra shift-left-4-byte is needed. + return 1 + } + return 0 diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/20031003-1.c gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/20031003-1.c *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/20031003-1.c Thu Oct 16 10:58:14 2003 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/20031003-1.c Tue Aug 19 16:37:13 2008 *************** int main() *** 19,27 **** --- 19,33 ---- #if INT_MAX == 2147483647 if (f1() != 2147483647) abort (); + #ifdef __SPU__ + /* SPU float rounds towards zero. */ + if (f2() != 0x7fffff80) + abort (); + #else if (f2() != 2147483647) abort (); #endif + #endif return 0; } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/20080529-1.c gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/20080529-1.c *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/20080529-1.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/20080529-1.c Fri Jun 6 19:26:53 2008 *************** *** 0 **** --- 1,17 ---- + /* PR target/36362 */ + + extern void abort (void); + + int + test (float c) + { + return !!c * 7LL == 0; + } + + int + main (void) + { + if (test (1.0f) != 0) + abort (); + return 0; + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/20080604-1.c gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/20080604-1.c *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/20080604-1.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/20080604-1.c Thu Jun 12 12:02:55 2008 *************** *** 0 **** --- 1,32 ---- + struct barstruct { char const* some_string; } x; + extern void abort (void); + void __attribute__((noinline)) + foo(void) + { + if (!x.some_string) + abort (); + } + void baz(int b) + { + struct barstruct bar; + struct barstruct* barptr; + if (b) + barptr = &bar; + else + { + barptr = &x + 1; + barptr = barptr - 1; + } + barptr->some_string = "Everything OK"; + foo(); + barptr->some_string = "Everything OK"; + } + int main() + { + x.some_string = (void *)0; + baz(0); + if (!x.some_string) + abort (); + return 0; + } + diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/20080813-1.c gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/20080813-1.c *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/20080813-1.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/20080813-1.c Thu Aug 14 09:11:03 2008 *************** *** 0 **** --- 1,30 ---- + /* PR middle-end/37103 */ + + extern void abort (void); + + void + foo (unsigned short x) + { + signed char y = -1; + if (x == y) + abort (); + } + + void + bar (unsigned short x) + { + unsigned char y = -1; + if (x == y) + abort (); + } + + int + main (void) + { + if (sizeof (int) == sizeof (short)) + return 0; + foo (-1); + if (sizeof (short) > 1) + bar (-1); + return 0; + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/conversion.c gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/conversion.c *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/conversion.c Mon May 13 02:24:12 2002 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/conversion.c Tue Aug 19 16:37:13 2008 *************** test_float_to_integer() *** 284,292 **** --- 284,298 ---- abort(); if (f2u(1.99) != 1) abort(); + #ifdef __SPU__ + /* SPU float rounds towards zero. */ + if (f2u((float) ((~0U) >> 1)) != 0x7fffff80) + abort(); + #else if (f2u((float) ((~0U) >> 1)) != (~0U) >> 1 && /* 0x7fffffff */ f2u((float) ((~0U) >> 1)) != ((~0U) >> 1) + 1) abort(); + #endif if (f2u((float) ~((~0U) >> 1)) != ~((~0U) >> 1)) /* 0x80000000 */ abort(); *************** test_float_to_longlong_integer() *** 439,447 **** --- 445,459 ---- abort(); if (f2ull(1.99) != 1LL) abort(); + #ifdef __SPU__ + /* SPU float rounds towards zero. */ + if (f2ull((float) ((~0ULL) >> 1)) != 0x7fffff8000000000ULL) + abort(); + #else if (f2ull((float) ((~0ULL) >> 1)) != (~0ULL) >> 1 && /* 0x7fffffff */ f2ull((float) ((~0ULL) >> 1)) != ((~0ULL) >> 1) + 1) abort(); + #endif if (f2ull((float) ~((~0ULL) >> 1)) != ~((~0ULL) >> 1)) /* 0x80000000 */ abort(); diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/ieee/20010114-2.x gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/20010114-2.x *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/ieee/20010114-2.x Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/20010114-2.x Wed Jul 2 15:37:17 2008 *************** *** 0 **** --- 1,6 ---- + if [istarget "spu-*-*"] { + # This doesn't work on the SPU because single precision floats are + # always rounded toward 0. + return 1 + } + return 0 diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/ieee/20030331-1.x gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/20030331-1.x *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/ieee/20030331-1.x Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/20030331-1.x Wed Jul 2 15:37:17 2008 *************** *** 0 **** --- 1,6 ---- + if [istarget "spu-*-*"] { + # This doesn't work on the SPU because single precision floats are + # always rounded toward 0. + return 1 + } + return 0 diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/ieee/920518-1.x gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/920518-1.x *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/ieee/920518-1.x Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/920518-1.x Wed Jul 2 15:37:17 2008 *************** *** 0 **** --- 1,6 ---- + if [istarget "spu-*-*"] { + # This doesn't work on the SPU because single precision floats are + # always rounded toward 0. + return 1 + } + return 0 diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/ieee/compare-fp-1.x gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/compare-fp-1.x *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/ieee/compare-fp-1.x Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/compare-fp-1.x Wed Jul 2 15:37:17 2008 *************** *** 0 **** --- 1,6 ---- + if [istarget "spu-*-*"] { + # The SPU single-precision floating point format does not + # support Nan & Inf. + return 1 + } + return 0 diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/ieee/compare-fp-4.x gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/compare-fp-4.x *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/ieee/compare-fp-4.x Wed Jul 4 11:25:32 2007 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/compare-fp-4.x Wed Jul 2 15:37:17 2008 *************** if [istarget "arm*-*-vxworks*"] { *** 13,17 **** --- 13,23 ---- } } + if [istarget "spu-*-*"] { + # The SPU single-precision floating point format does not + # support Nan & Inf. + return 1 + } + lappend additional_flags "-fno-trapping-math" return 0 diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-2.x gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-2.x *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-2.x Wed Jul 4 11:25:32 2007 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-2.x Wed Jul 2 15:37:17 2008 *************** if [istarget "arm*-*-vxworks*"] { *** 13,16 **** --- 13,22 ---- } } + if [istarget "spu-*-*"] { + # The SPU single-precision floating point format does not + # support Nan & Inf. + return 1 + } + return 0 diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4f.x gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4f.x *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4f.x Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4f.x Wed Jul 2 15:37:17 2008 *************** *** 0 **** --- 1,6 ---- + if [istarget "spu-*-*"] { + # The SPU single-precision floating point format does not + # support Nan & Inf. + return 1 + } + return 0 diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-8f.x gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-8f.x *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-8f.x Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-8f.x Wed Jul 2 15:37:17 2008 *************** *** 0 **** --- 1,6 ---- + if [istarget "spu-*-*"] { + # The SPU single-precision floating point format does not + # support Nan & Inf. + return 1 + } + return 0 diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/ieee/inf-1.c gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/inf-1.c *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/ieee/inf-1.c Sun Sep 8 02:15:27 2002 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/inf-1.c Wed Jul 2 15:37:17 2008 *************** extern void abort (void); *** 2,8 **** --- 2,11 ---- int main() { + #ifndef __SPU__ + /* The SPU single-precision floating point format does not support Inf. */ float fi = __builtin_inff(); + #endif double di = __builtin_inf(); long double li = __builtin_infl(); *************** int main() *** 10,31 **** --- 13,40 ---- double dh = __builtin_huge_val(); long double lh = __builtin_huge_vall(); + #ifndef __SPU__ if (fi + fi != fi) abort (); + #endif if (di + di != di) abort (); if (li + li != li) abort (); + #ifndef __SPU__ if (fi != fh) abort (); + #endif if (di != dh) abort (); if (li != lh) abort (); + #ifndef __SPU__ if (fi <= 0) abort (); + #endif if (di <= 0) abort (); if (li <= 0) diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/ieee/inf-2.c gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/inf-2.c *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/ieee/inf-2.c Fri May 23 03:46:53 2003 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/inf-2.c Mon Aug 18 14:46:49 2008 *************** void test(double f, double i) *** 25,30 **** --- 25,33 ---- void testf(float f, float i) { + #ifndef __SPU__ + /* The SPU single-precision floating point format does not support Inf. */ + if (f == __builtin_inff()) abort (); if (f == -__builtin_inff()) *************** void testf(float f, float i) *** 44,49 **** --- 47,53 ---- abort (); if (f < -__builtin_inff()) abort (); + #endif } void testl(long double f, long double i) diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/ieee/mul-subnormal-single-1.x gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/mul-subnormal-single-1.x *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/ieee/mul-subnormal-single-1.x Tue May 22 21:06:22 2007 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/mul-subnormal-single-1.x Wed Jul 2 15:37:17 2008 *************** if {[istarget "m68k-*-*"] && [check_effe *** 8,11 **** --- 8,16 ---- # not aware of any system that has this. set torture_execute_xfail "m68k-*-*" } + if [istarget "spu-*-*"] { + # The SPU single-precision floating point format does not + # support subnormals. + return 1 + } return 0 diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/ieee/rbug.c gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/rbug.c *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/ieee/rbug.c Fri Jan 4 23:13:54 2002 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/rbug.c Tue Aug 19 16:37:13 2008 *************** main () *** 41,48 **** --- 41,54 ---- k = 0x8234508000000001ULL; x = s (k); k = (unsigned long long) x; + #ifdef __SPU__ + /* SPU float rounds towards zero. */ + if (k != 0x8234500000000000ULL) + abort (); + #else if (k != 0x8234510000000000ULL) abort (); + #endif exit (0); } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/pr36691.c gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/pr36691.c *** gcc-4.3.1/gcc/testsuite/gcc.c-torture/execute/pr36691.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/pr36691.c Mon Aug 4 18:30:59 2008 *************** *** 0 **** --- 1,17 ---- + unsigned char g_5; + + void func_1 (void) + { + for (g_5 = 9; g_5 >= 4; g_5 -= 5) + ; + } + + extern void abort (void); + int main (void) + { + func_1 (); + if (g_5 != 0) + abort (); + return 0; + } + diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/20030702-1.c gcc-4.3.2/gcc/testsuite/gcc.dg/20030702-1.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/20030702-1.c Sun Oct 16 01:14:19 2005 --- gcc-4.3.2/gcc/testsuite/gcc.dg/20030702-1.c Thu Jul 3 12:32:24 2008 *************** *** 2,7 **** --- 2,8 ---- correctly in combine. */ /* { dg-do compile { target fpic } } */ /* { dg-options "-O2 -fpic -fprofile-arcs" } */ + /* { dg-skip-if "requires unsupported run-time relocation" { spu-*-* } { "*" } { "" } } */ void test (void) { diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c gcc-4.3.2/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c Thu Aug 7 09:59:58 2008 *************** *** 0 **** --- 1,24 ---- + /* { dg-do compile } */ + /* { dg-options "-O2 -Wall" } */ + + typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__)); + + extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) + _mm_load_si128 (__m128i const *__P) + { + return *__P; + } + + static const short __attribute__((__aligned__(16))) tbl[8] = + { 1, 2, 3, 4, 5, 6, 7, 8}; + + + __m128i get_vec(void) + { + __m128i ret; + + ret = _mm_load_si128((__m128i *)tbl); /* { dg-bogus "type-punning" } */ + + return ret; + } + diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-ref-all.c gcc-4.3.2/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-ref-all.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-ref-all.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-ref-all.c Tue Jul 15 15:52:35 2008 *************** *** 0 **** --- 1,41 ---- + /* { dg-do compile } */ + /* { dg-options "-O2 -Wall" } */ + + struct g { long a; }; + unsigned long f(struct g *a) { return *(unsigned long *)&a->a; } + + struct A + { + void *a; + }; + + int g(const struct A *x, long *y) + { + typedef long __attribute__ ((may_alias)) long_a; + *y = *(const long_a *) (&x->a); + return 1; + } + + void *a; + + int + f0 (long *y) + { + *y = *(const long *) &a; /* { dg-warning "will break" } */ + return 1; + } + + int + f1 (long *y) + { + typedef long __attribute__ ((may_alias)) long_a; + *y = *(const long_a *) &a; + return 1; + } + + int + f2 (long *y) + { + *y = *(const long *) &a; /* { dg-warning "will break" } */ + return 1; + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/builtin-inf-1.c gcc-4.3.2/gcc/testsuite/gcc.dg/builtin-inf-1.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/builtin-inf-1.c Fri Jan 25 20:49:04 2008 --- gcc-4.3.2/gcc/testsuite/gcc.dg/builtin-inf-1.c Wed Jul 2 15:37:17 2008 *************** float fh = __builtin_huge_valf(); *** 8,13 **** double dh = __builtin_huge_val(); long double lh = __builtin_huge_vall(); ! /* { dg-warning "does not support infinity" "INF unsupported" { target vax-*-* } 3 } */ ! /* { dg-warning "does not support infinity" "INF unsupported" { target vax-*-* } 4 } */ ! /* { dg-warning "does not support infinity" "INF unsupported" { target vax-*-* } 5 } */ --- 8,13 ---- double dh = __builtin_huge_val(); long double lh = __builtin_huge_vall(); ! /* { dg-error "does not support infinity" "INF unsupported" { target vax-*-* spu-*-* } 3 } */ ! /* { dg-error "does not support infinity" "INF unsupported" { target vax-*-* } 4 } */ ! /* { dg-error "does not support infinity" "INF unsupported" { target vax-*-* } 5 } */ diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/builtins-1.c gcc-4.3.2/gcc/testsuite/gcc.dg/builtins-1.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/builtins-1.c Fri May 18 01:42:15 2007 --- gcc-4.3.2/gcc/testsuite/gcc.dg/builtins-1.c Wed Jul 2 15:37:17 2008 *************** FPTEST2ARG2_REENT (gamma, int *) /* gamm *** 144,150 **** FPTEST0 (huge_val) FPTEST2 (hypot) FPTEST1 (ilogb) ! FPTEST0 (inf) FPTEST1 (j0) FPTEST1 (j1) FPTEST2ARG1 (jn, int) --- 144,150 ---- FPTEST0 (huge_val) FPTEST2 (hypot) FPTEST1 (ilogb) ! FPTEST0 (inf) /* { dg-warning "target format does not support infinity" "inf" {target spu-*-*} } */ FPTEST1 (j0) FPTEST1 (j1) FPTEST2ARG1 (jn, int) diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/builtins-43.c gcc-4.3.2/gcc/testsuite/gcc.dg/builtins-43.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/builtins-43.c Fri Oct 27 22:04:35 2006 --- gcc-4.3.2/gcc/testsuite/gcc.dg/builtins-43.c Wed Jul 2 15:37:17 2008 *************** int *** 12,26 **** --- 12,31 ---- main () { double nan = __builtin_nan (""); + #ifndef __SPU__ + /* The SPU single-precision floating point format does not support NANs. */ float nanf = __builtin_nanf (""); + #endif long double nanl = __builtin_nanl (""); if (!__builtin_isnan (nan)) link_error (); + #ifndef __SPU__ if (!__builtin_isnan (nanf)) link_error (); if (!__builtin_isnanf (nanf)) link_error (); + #endif if (!__builtin_isnan (nanl)) link_error (); if (!__builtin_isnanl (nanl)) diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/builtins-44.c gcc-4.3.2/gcc/testsuite/gcc.dg/builtins-44.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/builtins-44.c Fri Oct 27 22:04:35 2006 --- gcc-4.3.2/gcc/testsuite/gcc.dg/builtins-44.c Wed Jul 2 15:37:17 2008 *************** int *** 12,26 **** --- 12,31 ---- main () { double pinf = __builtin_inf (); + #ifndef __SPU__ + /* The SPU single-precision floating point format does not support Inf. */ float pinff = __builtin_inff (); + #endif long double pinfl = __builtin_infl (); if (__builtin_isinf (pinf) != 1) link_error (); + #ifndef __SPU__ if (__builtin_isinf (pinff) != 1) link_error (); if (__builtin_isinff (pinff) != 1) link_error (); + #endif if (__builtin_isinf (pinfl) != 1) link_error (); if (__builtin_isinfl (pinfl) != 1) *************** main () *** 28,37 **** --- 33,44 ---- if (__builtin_isinf (-pinf) != -1) link_error (); + #ifndef __SPU__ if (__builtin_isinf (-pinff) != -1) link_error (); if (__builtin_isinff (-pinff) != -1) link_error (); + #endif if (__builtin_isinf (-pinfl) != -1) link_error (); if (__builtin_isinfl (-pinfl) != -1) diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/builtins-45.c gcc-4.3.2/gcc/testsuite/gcc.dg/builtins-45.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/builtins-45.c Fri Oct 27 22:04:35 2006 --- gcc-4.3.2/gcc/testsuite/gcc.dg/builtins-45.c Wed Jul 2 15:37:17 2008 *************** int *** 12,35 **** --- 12,45 ---- main () { double nan = __builtin_nan (""); + #ifndef __SPU__ + /* The SPU single-precision floating point format does not support NANs. */ float nanf = __builtin_nanf (""); + #endif long double nanl = __builtin_nanl (""); double pinf = __builtin_inf (); + #ifndef __SPU__ + /* The SPU single-precision floating point format does not support Inf. */ float pinff = __builtin_inff (); + #endif long double pinfl = __builtin_infl (); if (__builtin_finite (pinf)) link_error (); + #ifndef __SPU__ if (__builtin_finitef (pinff)) link_error (); + #endif if (__builtin_finitel (pinfl)) link_error (); if (__builtin_finite (nan)) link_error (); + #ifndef __SPU__ if (__builtin_finitef (nanf)) link_error (); + #endif if (__builtin_finitel (nanl)) link_error (); diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp gcc-4.3.2/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp *** gcc-4.3.1/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp Wed Aug 1 16:25:11 2007 --- gcc-4.3.2/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp Thu Jun 12 12:19:43 2008 *************** set generator_src "$generator_src $srcdi *** 90,97 **** --- 90,109 ---- set generator_src "$generator_src $srcdir/$subdir/generate-random_r.c" set generator_cmd "-o $generator $skip_dfp $generator_src" + # Temporarily unset GCC_EXEC_PREFIX from environment, as that might + # confuse the $HOSTCC. + set orig_gcc_exec_prefix_saved 0 + if [info exists env(GCC_EXEC_PREFIX)] { + set orig_gcc_exec_prefix "$env(GCC_EXEC_PREFIX)" + set orig_gcc_exec_prefix_saved 1 + unsetenv GCC_EXEC_PREFIX + } set status [remote_exec host "$HOSTCC $HOSTCFLAGS $generator_cmd"] set status [lindex $status 0] + if { $orig_gcc_exec_prefix_saved } { + set orig_gcc_exec_prefix_saved 0 + setenv GCC_EXEC_PREFIX "$orig_gcc_exec_prefix" + } if { $status == 0 } then { file delete -force $tstobjdir file mkdir $tstobjdir diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/cpp/mi8.c gcc-4.3.2/gcc/testsuite/gcc.dg/cpp/mi8.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/cpp/mi8.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/cpp/mi8.c Thu Jul 31 19:15:08 2008 *************** *** 0 **** --- 1,8 ---- + /* Test multiple include guards suggestions. */ + + /* { dg-do preprocess } + { dg-options "-H" } + { dg-message "mi8a\.h\n\[^\n\]*mi8c\.h\n\[^\n\]*mi8b\.h\n\[^\n\]*mi8d\.h\nMultiple include guards may be useful for:\n\[^\n\]*mi8a\.h\n\[^\n\]*mi8d\.h\n" "" { target *-*-* } 0 } */ + + #include "mi8a.h" + #include "mi8b.h" diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/cpp/mi8a.h gcc-4.3.2/gcc/testsuite/gcc.dg/cpp/mi8a.h *** gcc-4.3.1/gcc/testsuite/gcc.dg/cpp/mi8a.h Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/cpp/mi8a.h Thu Jul 31 19:15:08 2008 *************** *** 0 **** --- 1 ---- + #include "mi8c.h" diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/cpp/mi8b.h gcc-4.3.2/gcc/testsuite/gcc.dg/cpp/mi8b.h *** gcc-4.3.1/gcc/testsuite/gcc.dg/cpp/mi8b.h Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/cpp/mi8b.h Thu Jul 31 19:15:08 2008 *************** *** 0 **** --- 1,4 ---- + #ifndef GUARDB + #define GUARDB + #include "mi8d.h" + #endif diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/cpp/mi8c.h gcc-4.3.2/gcc/testsuite/gcc.dg/cpp/mi8c.h *** gcc-4.3.1/gcc/testsuite/gcc.dg/cpp/mi8c.h Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/cpp/mi8c.h Thu Jul 31 19:15:08 2008 *************** *** 0 **** --- 1,4 ---- + #ifndef GUARDC + #define GUARDC + /* Empty */ + #endif diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/cpp/mi8d.h gcc-4.3.2/gcc/testsuite/gcc.dg/cpp/mi8d.h *** gcc-4.3.1/gcc/testsuite/gcc.dg/cpp/mi8d.h Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/cpp/mi8d.h Thu Jul 31 19:15:08 2008 *************** *** 0 **** --- 1 ---- + /* Empty */ diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/float-range-1.c gcc-4.3.2/gcc/testsuite/gcc.dg/float-range-1.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/float-range-1.c Thu Jul 12 22:57:32 2007 --- gcc-4.3.2/gcc/testsuite/gcc.dg/float-range-1.c Wed Jul 2 15:37:17 2008 *************** *** 4,9 **** --- 4,10 ---- /* Origin: Joseph Myers */ /* { dg-do compile } */ /* { dg-options "-ansi -pedantic-errors -Woverflow" } */ + /* { dg-skip-if "No Inf support" { spu-*-* } } */ void f (void) diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/float-range-3.c gcc-4.3.2/gcc/testsuite/gcc.dg/float-range-3.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/float-range-3.c Tue Oct 2 02:17:50 2007 --- gcc-4.3.2/gcc/testsuite/gcc.dg/float-range-3.c Wed Jul 2 15:37:17 2008 *************** *** 1,6 **** --- 1,7 ---- /* PR 23572 : warnings for out of range floating-point constants. */ /* { dg-compile } */ /* { dg-options "-std=c99" } */ + /* { dg-skip-if "No Inf support" { spu-*-* } } */ #include #ifndef INFINITY diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/float-range-4.c gcc-4.3.2/gcc/testsuite/gcc.dg/float-range-4.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/float-range-4.c Tue Oct 2 02:17:50 2007 --- gcc-4.3.2/gcc/testsuite/gcc.dg/float-range-4.c Wed Jul 2 15:37:17 2008 *************** *** 1,6 **** --- 1,7 ---- /* PR 23572 : warnings for out of range floating-point constants. */ /* { dg-compile } */ /* { dg-options "-Wno-overflow -std=c99" } */ + /* { dg-skip-if "No Inf support" { spu-*-* } } */ #include #ifndef INFINITY diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/float-range-5.c gcc-4.3.2/gcc/testsuite/gcc.dg/float-range-5.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/float-range-5.c Tue Oct 2 02:17:50 2007 --- gcc-4.3.2/gcc/testsuite/gcc.dg/float-range-5.c Wed Jul 2 15:37:17 2008 *************** *** 2,7 **** --- 2,8 ---- Test that they are NOT pedantic warnings. */ /* { dg-compile } */ /* { dg-options "-pedantic-errors -std=c99" } */ + /* { dg-skip-if "No Inf support" { spu-*-* } } */ #include #ifndef INFINITY diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/fold-overflow-1.c gcc-4.3.2/gcc/testsuite/gcc.dg/fold-overflow-1.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/fold-overflow-1.c Thu Apr 13 23:14:25 2006 --- gcc-4.3.2/gcc/testsuite/gcc.dg/fold-overflow-1.c Wed Jul 2 15:37:17 2008 *************** *** 1,5 **** --- 1,6 ---- /* { dg-compile } */ /* { dg-skip-if "consts are shorts, not longs" { "m32c-*-*" } { "*" } { "" } } */ + /* { dg-skip-if "No Inf support" { spu-*-* } } */ /* { dg-options "-O -ftrapping-math" } */ /* There should be exactly 2 +Inf in the assembly file. */ diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/gomp/atomic-11.c gcc-4.3.2/gcc/testsuite/gcc.dg/gomp/atomic-11.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/gomp/atomic-11.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/gomp/atomic-11.c Sat Jul 19 19:21:40 2008 *************** *** 0 **** --- 1,17 ---- + /* PR middle-end/36877 */ + /* { dg-do compile } */ + /* { dg-options "-fopenmp" } */ + /* { dg-options "-fopenmp -march=i386" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */ + + int i; + float f; + + void foo (void) + { + #pragma omp atomic + i++; + #pragma omp atomic + f += 1.0; + } + + /* { dg-final { scan-assembler-not "__sync_(fetch|add|bool|val)" { target i?86-*-* x86_64-*-* powerpc*-*-* ia64-*-* s390*-*-* sparc*-*-* } } } */ diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/hex-round-1.c gcc-4.3.2/gcc/testsuite/gcc.dg/hex-round-1.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/hex-round-1.c Fri Jul 29 21:14:22 2005 --- gcc-4.3.2/gcc/testsuite/gcc.dg/hex-round-1.c Tue Aug 19 16:37:13 2008 *************** *** 1,6 **** --- 1,7 ---- /* Test for hexadecimal float rounding: bug 21720. */ /* { dg-do link } */ /* { dg-options "-O -std=gnu99" } */ + /* { dg-skip-if "SPU float rounds towards zero" { spu-*-* } } */ #include diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/hex-round-2.c gcc-4.3.2/gcc/testsuite/gcc.dg/hex-round-2.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/hex-round-2.c Fri Jul 29 21:14:22 2005 --- gcc-4.3.2/gcc/testsuite/gcc.dg/hex-round-2.c Tue Aug 19 16:37:13 2008 *************** *** 2,7 **** --- 2,8 ---- in number. */ /* { dg-do link } */ /* { dg-options "-O -std=gnu99" } */ + /* { dg-skip-if "SPU float rounds towards zero" { spu-*-* } } */ #include diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/inline-28.c gcc-4.3.2/gcc/testsuite/gcc.dg/inline-28.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/inline-28.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/inline-28.c Fri Jun 13 09:40:21 2008 *************** *** 0 **** --- 1,28 ---- + /* PR c/36507 */ + /* { dg-do run } */ + /* { dg-options "-O0 -std=gnu89" } */ + + int + main (void) + { + int i = 2; + auto inline int f1 (void) + { + return i; + } + inline int f2 (void) + { + return i; + } + auto inline int f3 (void); + auto inline int f3 (void) + { + return i; + } + auto inline int f4 (void); + inline int f4 (void) + { + return i; + } + return f1 () + f2 () + f3 () + f4 () - 8; + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/inline-29.c gcc-4.3.2/gcc/testsuite/gcc.dg/inline-29.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/inline-29.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/inline-29.c Fri Jun 13 09:40:21 2008 *************** *** 0 **** --- 1,28 ---- + /* PR c/36507 */ + /* { dg-do run } */ + /* { dg-options "-O0 -std=gnu99" } */ + + int + main (void) + { + int i = 2; + auto inline int f1 (void) + { + return i; + } + inline int f2 (void) + { + return i; + } + auto inline int f3 (void); + auto inline int f3 (void) + { + return i; + } + auto inline int f4 (void); + inline int f4 (void) + { + return i; + } + return f1 () + f2 () + f3 () + f4 () - 8; + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/inline-30.c gcc-4.3.2/gcc/testsuite/gcc.dg/inline-30.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/inline-30.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/inline-30.c Fri Jun 13 09:40:21 2008 *************** *** 0 **** --- 1,28 ---- + /* PR c/36507 */ + /* { dg-do run } */ + /* { dg-options "-O0 -std=gnu99 -fgnu89-inline" } */ + + int + main (void) + { + int i = 2; + auto inline int f1 (void) + { + return i; + } + inline int f2 (void) + { + return i; + } + auto inline int f3 (void); + auto inline int f3 (void) + { + return i; + } + auto inline int f4 (void); + inline int f4 (void) + { + return i; + } + return f1 () + f2 () + f3 () + f4 () - 8; + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/inline-31.c gcc-4.3.2/gcc/testsuite/gcc.dg/inline-31.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/inline-31.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/inline-31.c Thu Jun 26 15:42:07 2008 *************** *** 0 **** --- 1,9 ---- + /* { dg-do compile } */ + /* { dg-options "-std=c99 -pedantic-errors" } */ + inline int f (void) { return 0; } + + void + g (void) + { + extern int f(); + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/inline-32.c gcc-4.3.2/gcc/testsuite/gcc.dg/inline-32.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/inline-32.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/inline-32.c Thu Jun 26 15:42:07 2008 *************** *** 0 **** --- 1,11 ---- + /* { dg-do link } */ + /* { dg-options "-std=c99 -pedantic-errors" } */ + /* { dg-additional-sources inline-32a.c } */ + inline int f (void) { return 0; } + + int + main (void) + { + extern int f(); + return f (); + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/inline-32a.c gcc-4.3.2/gcc/testsuite/gcc.dg/inline-32a.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/inline-32a.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/inline-32a.c Thu Jun 26 15:42:07 2008 *************** *** 0 **** --- 1,3 ---- + /* { dg-do compile } */ + /* { dg-options "-std=c99 -pedantic-errors" } */ + int f (void) { return 0; } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/lower-subreg-1.c gcc-4.3.2/gcc/testsuite/gcc.dg/lower-subreg-1.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/lower-subreg-1.c Thu Sep 20 20:17:45 2007 --- gcc-4.3.2/gcc/testsuite/gcc.dg/lower-subreg-1.c Wed Jul 2 15:40:24 2008 *************** *** 1,4 **** ! /* { dg-do compile { target { ! mips64 } } } */ /* { dg-options "-O -fdump-rtl-subreg" } */ /* { dg-require-effective-target ilp32 } */ --- 1,4 ---- ! /* { dg-do compile { target { { ! mips64 } && { ! spu-*-* } } } } */ /* { dg-options "-O -fdump-rtl-subreg" } */ /* { dg-require-effective-target ilp32 } */ diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/nrv3.c gcc-4.3.2/gcc/testsuite/gcc.dg/nrv3.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/nrv3.c Mon Sep 11 18:54:29 2006 --- gcc-4.3.2/gcc/testsuite/gcc.dg/nrv3.c Wed Jul 2 15:43:34 2008 *************** *** 3,9 **** --- 3,14 ---- /* { dg-do compile } */ /* { dg-options "-O -fdump-tree-optimized" } */ + #ifdef __SPU__ + /* SPU returns aggregates up to 1172 bytes in registers. */ + typedef struct { int x[300]; void *y; } S; + #else typedef struct { int x[20]; void *y; } S; + #endif typedef struct { int a; S b; } T; S nrv_candidate (void); void use_result (S, int); diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/pch/cpp-3.c gcc-4.3.2/gcc/testsuite/gcc.dg/pch/cpp-3.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/pch/cpp-3.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/pch/cpp-3.c Thu Jul 31 08:44:24 2008 *************** *** 0 **** --- 1,13 ---- + /* PR preprocessor/36649 */ + /* { dg-do compile } */ + /* { dg-options "-H -I." } */ + /* { dg-message "cpp-3.h\[^\n\]*(\n\[^\n\]*cpp-3.c)?\n\[^\n\]*cpp-3a.h\n\[^\n\]*cpp-3b.h" "" { target *-*-* } 0 } */ + + #include "cpp-3.h" + #include "cpp-3a.h" + + int + main (void) + { + return 0; + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/pch/cpp-3.hs gcc-4.3.2/gcc/testsuite/gcc.dg/pch/cpp-3.hs *** gcc-4.3.1/gcc/testsuite/gcc.dg/pch/cpp-3.hs Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/pch/cpp-3.hs Thu Jul 31 19:15:08 2008 *************** *** 0 **** --- 1,4 ---- + #ifndef CPP_3_H + #define CPP_3_H + /* empty */ + #endif diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/pch/cpp-3a.h gcc-4.3.2/gcc/testsuite/gcc.dg/pch/cpp-3a.h *** gcc-4.3.1/gcc/testsuite/gcc.dg/pch/cpp-3a.h Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/pch/cpp-3a.h Thu Jul 31 19:15:08 2008 *************** *** 0 **** --- 1,4 ---- + #ifndef CPP_3A_H + #define CPP_3A_H + #include "cpp-3b.h" + #endif diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/pch/cpp-3b.h gcc-4.3.2/gcc/testsuite/gcc.dg/pch/cpp-3b.h *** gcc-4.3.1/gcc/testsuite/gcc.dg/pch/cpp-3b.h Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/pch/cpp-3b.h Thu Jul 31 19:15:08 2008 *************** *** 0 **** --- 1,4 ---- + #ifndef CPP_3B_H + #define CPP_3B_H + /* empty */ + #endif diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/pr15784-3.c gcc-4.3.2/gcc/testsuite/gcc.dg/pr15784-3.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/pr15784-3.c Fri May 13 13:57:19 2005 --- gcc-4.3.2/gcc/testsuite/gcc.dg/pr15784-3.c Wed Jul 2 15:37:17 2008 *************** *** 1,4 **** --- 1,5 ---- /* { dg-do compile } */ + /* { dg-skip-if "No NaN support" { spu-*-* } } */ /* SH4 without -mieee defaults to -ffinite-math-only. */ /* { dg-options "-fdump-tree-gimple -fno-finite-math-only" } */ /* Test for folding abs(x) where appropriate. */ diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/pr27095.c gcc-4.3.2/gcc/testsuite/gcc.dg/pr27095.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/pr27095.c Fri Apr 20 17:38:10 2007 --- gcc-4.3.2/gcc/testsuite/gcc.dg/pr27095.c Wed Jul 2 15:58:09 2008 *************** main (int argc, char **argv) *** 11,17 **** memset (x, argc, strlen (x)); return 0; } ! /* { dg-final { scan-assembler-not "(?n)strlen\(.*\n\)+.*strlen" { target { ! { powerpc*-*-darwin* hppa*-*-hpux* ia64-*-hpux* alpha*-*-* } } } } } */ /* hppa*-*-hpux* has an IMPORT statement for strlen (plus the branch). */ /* *-*-darwin* has something similar. */ /* { dg-final { scan-assembler-not "(?n)strlen\(.*\n\)+.*strlen\(.*\n\)+.*strlen" { target hppa*-*-hpux* } } } */ --- 11,17 ---- memset (x, argc, strlen (x)); return 0; } ! /* { dg-final { scan-assembler-not "(?n)strlen\(.*\n\)+.*strlen" { target { ! { powerpc*-*-darwin* hppa*-*-hpux* ia64-*-hpux* alpha*-*-* spu-*-* } } } } } */ /* hppa*-*-hpux* has an IMPORT statement for strlen (plus the branch). */ /* *-*-darwin* has something similar. */ /* { dg-final { scan-assembler-not "(?n)strlen\(.*\n\)+.*strlen\(.*\n\)+.*strlen" { target hppa*-*-hpux* } } } */ *************** main (int argc, char **argv) *** 20,22 **** --- 20,24 ---- /* { dg-final { scan-assembler-not "(?n)strlen\(.*\n\)+.*strlen\(.*\n\)+.*strlen\(.*\n\)+.*strlen" { target ia64-*-hpux* } } } */ /* alpha-*-* has a GOT load and the call. */ /* { dg-final { scan-assembler-not "(?n)jsr .*,strlen\(.*\n\)+.*jsr .*,strlen" { target alpha*-*-* } } } */ + /* spu-*-* has a branch hint and the call. */ + /* { dg-final { scan-assembler-not "(?n)brsl.*,strlen\(.*\n\)+.*brsl.*,strlen" { target spu-*-* } } } */ diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/pr28243.c gcc-4.3.2/gcc/testsuite/gcc.dg/pr28243.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/pr28243.c Mon Mar 12 08:59:07 2007 --- gcc-4.3.2/gcc/testsuite/gcc.dg/pr28243.c Thu Jul 3 12:32:24 2008 *************** *** 4,9 **** --- 4,10 ---- /* { dg-do compile } */ /* { dg-require-effective-target fpic } */ /* { dg-options "-O2 -ftracer -fPIC" } */ + /* { dg-skip-if "requires unsupported run-time relocation" { spu-*-* } { "*" } { "" } } */ struct displayfuncs { void (*init) (); diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/pr28796-2.c gcc-4.3.2/gcc/testsuite/gcc.dg/pr28796-2.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/pr28796-2.c Thu Aug 2 02:57:26 2007 --- gcc-4.3.2/gcc/testsuite/gcc.dg/pr28796-2.c Wed Jul 2 15:37:17 2008 *************** *** 1,6 **** --- 1,7 ---- /* { dg-do run } */ /* { dg-options "-O2 -funsafe-math-optimizations -fno-finite-math-only" } */ /* { dg-options "-mieee -O2 -funsafe-math-optimizations -fno-finite-math-only" { target alpha*-*-* } } */ + /* { dg-skip-if "No Inf/NaN support" { spu-*-* } } */ #include "tg-tests.h" diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/pr35746.c gcc-4.3.2/gcc/testsuite/gcc.dg/pr35746.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/pr35746.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/pr35746.c Tue Aug 12 14:04:18 2008 *************** *** 0 **** --- 1,13 ---- + /* { dg-do compile } */ + /* { dg-options "-std=gnu99" } */ + + int foo(int i); + + void bar() + { + __complex__ int i; + X j; /* { dg-error "undeclared.*appears.*expected" } */ + + if (i = foo(j)) /* { dg-error "undeclared" } */ + ; + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/pr36111.c gcc-4.3.2/gcc/testsuite/gcc.dg/pr36111.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/pr36111.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/pr36111.c Sat Jun 7 21:13:29 2008 *************** *** 0 **** --- 1,16 ---- + /* { dg-do compile { target fpic } } */ + /* { dg-options "-O2 -fpic" } */ + + typedef struct { + int lock; + int pad0_; + } mutex_t; + + static mutex_t main_arena; + + void __malloc_check_init() + { + for(;;) + __asm__ __volatile__ ("": "+m"(main_arena.lock) ); + } + diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/pr36504.c gcc-4.3.2/gcc/testsuite/gcc.dg/pr36504.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/pr36504.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/pr36504.c Sun Jun 29 10:41:17 2008 *************** *** 0 **** --- 1,25 ---- + /* PR tree-optimization/36504 */ + /* { dg-do compile } */ + /* { dg-options "-O3 -fprefetch-loop-arrays -w" } */ + + struct A { struct { int a; } b[8]; }; + struct B { int c; int d; }; + struct C { struct B d; }; + + void bar (struct C *, int); + + struct B + foo (struct C *p, struct A *e, int b) + { + struct B q; + bar (p, e->b[b].a); + return q; + } + + void + baz (int b, struct A *e) + { + struct C p; + for (; b; ++b) + p.d = foo (&p, e, b); + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/pr36508.c gcc-4.3.2/gcc/testsuite/gcc.dg/pr36508.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/pr36508.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/pr36508.c Mon Jun 23 11:57:19 2008 *************** *** 0 **** --- 1,29 ---- + /* PR tree-optimization/36508 */ + /* { dg-do compile } */ + /* { dg-options "-O -ftree-pre" } */ + + void + foo (short *sp) + { + int k; + k = 1; + #define SP0 *sp++ = 1; + while (1) + { + if (k > 6) + break; + SP0 + k++; + } + k = 1; + while (1) + { + if (k > 6) + break; + SP0 + k++; + } + #define SP1 SP0 SP0 SP0 SP0 SP0 SP0 SP0 SP0 SP0 SP0 SP0 + #define SP2 SP1 SP1 SP1 SP1 SP1 SP1 SP1 SP1 SP1 SP1 SP1 + SP2 + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/pr36584.c gcc-4.3.2/gcc/testsuite/gcc.dg/pr36584.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/pr36584.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/pr36584.c Tue Jun 24 07:58:17 2008 *************** *** 0 **** --- 1,281 ---- + /* { dg-do run } */ + /* { dg-options "-O2" } */ + /* { dg-options "-O2 -msse2 -mfpmath=sse" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */ + + + #ifdef __i386__ + #include "cpuid.h" + #endif + + extern double fabs (double); + extern void abort (void); + + const int MAX_ITERATIONS = 50; + const double SMALL_ENOUGH = 1.0e-10; + const double RELERROR = 1.0e-12; + + typedef struct p + { + int ord; + double coef[7]; + } + polynomial; + + static double + polyeval (double x, int n, double *Coeffs) + { + register int i; + double val; + + val = Coeffs[n]; + for (i = n - 1; i >= 0; i--) + val = val * x + Coeffs[i]; + + return (val); + } + + static int + regula_falsa (int order, double *coef, double a, double b, double *val) + { + int its; + double fa, fb, x, fx, lfx; + + fa = polyeval (a, order, coef); + fb = polyeval (b, order, coef); + + if (fa * fb > 0.0) + return 0; + + if (fabs (fa) < SMALL_ENOUGH) + { + *val = a; + return 1; + } + + if (fabs (fb) < SMALL_ENOUGH) + { + *val = b; + return 1; + } + + lfx = fa; + + for (its = 0; its < MAX_ITERATIONS; its++) + { + x = (fb * a - fa * b) / (fb - fa); + fx = polyeval (x, order, coef); + if (fabs (x) > RELERROR) + { + if (fabs (fx / x) < RELERROR) + { + *val = x; + return 1; + } + } + else + { + if (fabs (fx) < RELERROR) + { + *val = x; + return 1; + } + } + + if (fa < 0) + { + if (fx < 0) + { + a = x; + fa = fx; + if ((lfx * fx) > 0) + fb /= 2; + } + else + { + b = x; + fb = fx; + if ((lfx * fx) > 0) + fa /= 2; + } + } + else + { + if (fx < 0) + { + b = x; + fb = fx; + if ((lfx * fx) > 0) + fa /= 2; + } + else + { + a = x; + fa = fx; + if ((lfx * fx) > 0) + fb /= 2; + } + } + + if (fabs (b - a) < RELERROR) + { + *val = x; + return 1; + } + + lfx = fx; + } + + return 0; + } + + static int + numchanges (int np, polynomial * sseq, double a) + { + int changes; + double f, lf; + polynomial *s; + changes = 0; + + lf = polyeval (a, sseq[0].ord, sseq[0].coef); + + for (s = sseq + 1; s <= sseq + np; s++) + { + f = polyeval (a, s->ord, s->coef); + if (lf == 0.0 || lf * f < 0) + changes++; + + lf = f; + } + + return changes; + } + + int + sbisect (int np, polynomial * sseq, double min_value, double max_value, + int atmin, int atmax, double *roots) + { + double mid; + int n1, n2, its, atmid; + + if ((atmin - atmax) == 1) + { + if (regula_falsa (sseq->ord, sseq->coef, min_value, max_value, roots)) + return 1; + else + { + for (its = 0; its < MAX_ITERATIONS; its++) + { + mid = (min_value + max_value) / 2; + atmid = numchanges (np, sseq, mid); + if ((atmid < atmax) || (atmid > atmin)) + return 0; + + if (fabs (mid) > RELERROR) + { + if (fabs ((max_value - min_value) / mid) < RELERROR) + { + roots[0] = mid; + return 1; + } + } + else + { + if (fabs (max_value - min_value) < RELERROR) + { + roots[0] = mid; + return 1; + } + } + + if ((atmin - atmid) == 0) + min_value = mid; + else + max_value = mid; + } + + roots[0] = mid; + return 1; + } + } + + for (its = 0; its < MAX_ITERATIONS; its++) + { + mid = (min_value + max_value) / 2; + atmid = numchanges (np, sseq, mid); + if ((atmid < atmax) || (atmid > atmin)) + return 0; + + if (fabs (mid) > RELERROR) + { + if (fabs ((max_value - min_value) / mid) < RELERROR) + { + roots[0] = mid; + return 1; + } + } + else + { + if (fabs (max_value - min_value) < RELERROR) + { + roots[0] = mid; + return 1; + } + } + + n1 = atmin - atmid; + n2 = atmid - atmax; + + if ((n1 != 0) && (n2 != 0)) + { + n1 = sbisect (np, sseq, min_value, mid, atmin, atmid, roots); + n2 = sbisect (np, sseq, mid, max_value, atmid, atmax, &roots[n1]); + + return (n1 + n2); + } + + if (n1 == 0) + min_value = mid; + else + max_value = mid; + } + + roots[0] = mid; + return 1; + } + + int + main () + { + polynomial sseq[7] = { + {6, {0.15735259075109281, -5.1185263411378736, 1.8516070705868664, + 7.348009172322695, -2.2152395279161343, -2.7543325329350692, 1.0}}, + {5, {-0.8530877235229789, 0.61720235686228875, 3.6740045861613475, + -1.4768263519440896, -2.2952771107792245, 1.0}}, + {4, {0.13072124257049417, 2.2220687798791126, -1.6299431586726509, + -1.6718404582408546, 1.0}}, + {3, {0.86776597575462633, -2.1051099695282511, -0.49008580100694688, + 1.0}}, + {2, {-11.117984175064155, 10.89886635045883, 1.0}}, + {1, {0.94453099602191237, -1.0}}, + {0, {-0.068471716890574186}} + }; + + double roots[7]; + int nroots; + + #ifdef __i386__ + unsigned int eax, ebx, ecx, edx; + + if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx)) + return 0; + + if (!(edx & bit_SSE2)) + return 0; + #endif + + nroots = sbisect (6, sseq, 0.0, 10000000.0, 5, 1, roots); + if (nroots != 4) + abort (); + + return 0; + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/pr36991.c gcc-4.3.2/gcc/testsuite/gcc.dg/pr36991.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/pr36991.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/pr36991.c Fri Aug 1 18:58:24 2008 *************** *** 0 **** --- 1,12 ---- + /* PR tree-optimization/36991 */ + /* { dg-do compile } */ + /* { dg-options "-O2" } */ + + typedef float V __attribute__ ((vector_size (16))); + typedef union { V v[4][4]; } U; + + void + foo (float x, float y, U *z) + { + z->v[1][0] = z->v[0][1] = (V) { x, y, 0, 0 }; + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/pr36998.c gcc-4.3.2/gcc/testsuite/gcc.dg/pr36998.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/pr36998.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/pr36998.c Mon Aug 11 10:26:08 2008 *************** *** 0 **** --- 1,23 ---- + /* PR rtl-optimization/36998 */ + /* { dg-do compile } */ + /* { dg-options "-Os -fasynchronous-unwind-tables" } */ + /* { dg-options "-Os -mpreferred-stack-boundary=2 -fasynchronous-unwind-tables" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */ + + void foo (const char *, ...) __attribute__ ((noreturn)); + int bar (const char *, ...); + extern __SIZE_TYPE__ strlen (const char *); + int baz (char *, char *, int, void *); + + void + test (char *w, int x, char *y, char *z) + { + char *p, b[32]; + for (p = y; *p; p += strlen (p) + 1) + { + baz (w, p, x, z); + foo ("msg1 %s", b); + } + for (p = y; *p; p += strlen (p) + 1) + bar (" %s", p); + foo ("msg2 %s", b); + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/pr37156.c gcc-4.3.2/gcc/testsuite/gcc.dg/pr37156.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/pr37156.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/pr37156.c Tue Aug 19 11:50:11 2008 *************** *** 0 **** --- 1,21 ---- + /* PR debug/37156 */ + /* { dg-do compile } */ + /* { dg-options "-O2 -g" } */ + + __attribute__ ((warning ("is experimental"))) int bar (int, int *, int *, int); + + long long foo (void) + { + int n, m; + long long r; + bar (0, &n, &m, 0); /* { dg-warning "is experimental" } */ + r = (long long) n; + return r; + } + + void + baz (int n) + { + int o; + o = foo () - n; + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/torture/builtin-frexp-1.c gcc-4.3.2/gcc/testsuite/gcc.dg/torture/builtin-frexp-1.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/torture/builtin-frexp-1.c Wed Feb 28 21:53:07 2007 --- gcc-4.3.2/gcc/testsuite/gcc.dg/torture/builtin-frexp-1.c Wed Jul 2 15:37:17 2008 *************** extern void link_error(int); *** 53,58 **** --- 53,59 ---- /* Test that FUNCRES(frexp(NEG FUNCARG(ARGARG),&i)) is false. Check the sign as well. Ensure side-effects are evaluated in i. */ + #ifndef __SPU__ #define TESTIT_FREXP2(NEG,FUNCARG,ARGARG,FUNCRES) do { \ int i=5; \ if (!__builtin_##FUNCRES##f(__builtin_frexpf(NEG __builtin_##FUNCARG##f(ARGARG),&i)) \ *************** extern void link_error(int); *** 68,73 **** --- 69,88 ---- || CKEXP(i,8)) \ link_error(__LINE__); \ } while (0) + #else + #define TESTIT_FREXP2(NEG,FUNCARG,ARGARG,FUNCRES) do { \ + int i=6; \ + /* SPU single-precision floating point format does not support Inf or Nan. */ \ + if (!__builtin_##FUNCRES(__builtin_frexp(NEG __builtin_##FUNCARG(ARGARG),&i)) \ + || CKSGN(__builtin_frexp(NEG __builtin_##FUNCARG(ARGARG),(i++,&i)), NEG __builtin_##FUNCARG(ARGARG)) \ + || CKEXP(i,7)) \ + link_error(__LINE__); \ + if (!__builtin_##FUNCRES##l(__builtin_frexpl(NEG __builtin_##FUNCARG##l(ARGARG),&i)) \ + || CKSGN_L(__builtin_frexpl(NEG __builtin_##FUNCARG##l(ARGARG),(i++,&i)), NEG __builtin_##FUNCARG##l(ARGARG)) \ + || CKEXP(i,8)) \ + link_error(__LINE__); \ + } while (0) + #endif void __attribute__ ((__noinline__)) foo(void) diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/torture/builtin-ldexp-1.c gcc-4.3.2/gcc/testsuite/gcc.dg/torture/builtin-ldexp-1.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/torture/builtin-ldexp-1.c Wed Feb 21 22:03:15 2007 --- gcc-4.3.2/gcc/testsuite/gcc.dg/torture/builtin-ldexp-1.c Wed Jul 2 15:37:17 2008 *************** extern void link_error(int); *** 45,50 **** --- 45,51 ---- /* Test that FUNCRES(FUNC(NEG FUNCARG(ARGARG),ARG2)) is false. Check the sign as well. */ + #ifndef __SPU__ #define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,ARG2,FUNCRES) do { \ if (!__builtin_##FUNCRES##f(__builtin_##FUNC##f(NEG __builtin_##FUNCARG##f(ARGARG),ARG2)) \ || CKSGN_F(__builtin_##FUNC##f(NEG __builtin_##FUNCARG##f(ARGARG),ARG2), NEG __builtin_##FUNCARG##f(ARGARG))) \ *************** extern void link_error(int); *** 56,61 **** --- 57,73 ---- || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG),ARG2), NEG __builtin_##FUNCARG##l(ARGARG))) \ link_error(__LINE__); \ } while (0) + #else + #define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,ARG2,FUNCRES) do { \ + /* SPU single-precision floating point format does not support Inf or Nan. */ \ + if (!__builtin_##FUNCRES(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG),ARG2)) \ + || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG),ARG2), NEG __builtin_##FUNCARG(ARGARG))) \ + link_error(__LINE__); \ + if (!__builtin_##FUNCRES##l(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG),ARG2)) \ + || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG),ARG2), NEG __builtin_##FUNCARG##l(ARGARG))) \ + link_error(__LINE__); \ + } while (0) + #endif /* Using foo==MIN/MAX float values, test that FUNC(foo,EXP) == foo*exp2(EXP), and also that FUNC(foo,-EXP) == foo*exp2(-EXP). */ diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/torture/builtin-logb-1.c gcc-4.3.2/gcc/testsuite/gcc.dg/torture/builtin-logb-1.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/torture/builtin-logb-1.c Wed Feb 28 21:53:07 2007 --- gcc-4.3.2/gcc/testsuite/gcc.dg/torture/builtin-logb-1.c Wed Jul 2 15:37:17 2008 *************** extern void link_error(int); *** 47,52 **** --- 47,53 ---- /* Test if FUNCRES(FUNC(NEG FUNCARG(ARGARG))) is false. Check the sign as well. */ + #ifndef __SPU__ #define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES) do { \ if (!__builtin_##FUNCRES##f(__builtin_##FUNC(NEG __builtin_##FUNCARG##f(ARGARG))) \ || CKSGN_F(__builtin_##FUNC##f(NEG __builtin_##FUNCARG##f(ARGARG)), NEG __builtin_##FUNCARG##f(ARGARG))) \ *************** extern void link_error(int); *** 58,63 **** --- 59,75 ---- || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG __builtin_##FUNCARG##l(ARGARG))) \ link_error(__LINE__); \ } while (0) + #else + #define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES) do { \ + /* SPU single-precision floating point format does not support Inf or Nan. */ \ + if (!__builtin_##FUNCRES(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG))) \ + || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG __builtin_##FUNCARG(ARGARG))) \ + link_error(__LINE__); \ + if (!__builtin_##FUNCRES##l(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG))) \ + || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG __builtin_##FUNCARG##l(ARGARG))) \ + link_error(__LINE__); \ + } while (0) + #endif void __attribute__ ((__noinline__)) foo(void) diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/torture/builtin-math-2.c gcc-4.3.2/gcc/testsuite/gcc.dg/torture/builtin-math-2.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/torture/builtin-math-2.c Sat May 19 04:18:05 2007 --- gcc-4.3.2/gcc/testsuite/gcc.dg/torture/builtin-math-2.c Wed Jul 2 15:37:17 2008 *************** extern void fool (long double); *** 59,73 **** --- 59,79 ---- void bar() { /* An argument of NaN is not evaluated at compile-time. */ + #ifndef __SPU__ foof (__builtin_exp2f (__builtin_nanf(""))); + #endif foo (__builtin_exp2 (__builtin_nan(""))); fool (__builtin_exp2l (__builtin_nanl(""))); /* An argument of Inf/-Inf is not evaluated at compile-time. */ + #ifndef __SPU__ foof (__builtin_exp2f (__builtin_inff())); + #endif foo (__builtin_exp2 (__builtin_inf())); fool (__builtin_exp2l (__builtin_infl())); + #ifndef __SPU__ foof (__builtin_exp2f (-__builtin_inff())); + #endif foo (__builtin_exp2 (-__builtin_inf())); fool (__builtin_exp2l (-__builtin_infl())); *************** void bar() *** 130,153 **** --- 136,171 ---- TESTIT (tgamma, -3.0); /* An argument of NaN is not evaluated at compile-time. */ + #ifndef __SPU__ foof (__builtin_powf (__builtin_nanf(""), 2.5F)); + #endif foo (__builtin_pow (__builtin_nan(""), 2.5)); fool (__builtin_powl (__builtin_nanl(""), 2.5L)); + #ifndef __SPU__ foof (__builtin_powf (2.5F, __builtin_nanf(""))); + #endif foo (__builtin_pow (2.5, __builtin_nan(""))); fool (__builtin_powl (2.5L, __builtin_nanl(""))); /* An argument of Inf/-Inf is not evaluated at compile-time. */ + #ifndef __SPU__ foof (__builtin_powf (__builtin_inff(), 2.5F)); + #endif foo (__builtin_pow (__builtin_inf(), 2.5)); fool (__builtin_powl (__builtin_infl(), 2.5L)); + #ifndef __SPU__ foof (__builtin_powf (-__builtin_inff(), 2.5F)); + #endif foo (__builtin_pow (-__builtin_inf(), 2.5)); fool (__builtin_powl (-__builtin_infl(), 2.5L)); + #ifndef __SPU__ foof (__builtin_powf (2.5F, __builtin_inff())); + #endif foo (__builtin_pow (2.5, __builtin_inf())); fool (__builtin_powl (2.5L, __builtin_infl())); + #ifndef __SPU__ foof (__builtin_powf (2.5F, -__builtin_inff())); + #endif foo (__builtin_pow (2.5, -__builtin_inf())); fool (__builtin_powl (2.5L, -__builtin_infl())); *************** void bar() *** 235,251 **** --- 253,277 ---- TESTIT (ilogb, 0.0); TESTIT (ilogb, -0.0); + #ifndef __SPU__ foof (__builtin_ilogbf (__builtin_inff())); + #endif foo (__builtin_ilogb (__builtin_inf())); fool (__builtin_ilogbl (__builtin_infl())); + #ifndef __SPU__ foof (__builtin_ilogbf (-__builtin_inff())); + #endif foo (__builtin_ilogb (-__builtin_inf())); fool (__builtin_ilogbl (-__builtin_infl())); + #ifndef __SPU__ foof (__builtin_ilogbf (__builtin_nanf(""))); + #endif foo (__builtin_ilogb (__builtin_nan(""))); fool (__builtin_ilogbl (__builtin_nanl(""))); + #ifndef __SPU__ foof (__builtin_ilogbf (-__builtin_nanf(""))); + #endif foo (__builtin_ilogb (-__builtin_nan(""))); fool (__builtin_ilogbl (-__builtin_nanl(""))); *************** void bar() *** 291,297 **** } /* { dg-final { scan-tree-dump-times "exp2 " 9 "original" } } */ ! /* { dg-final { scan-tree-dump-times "exp2f" 9 "original" } } */ /* { dg-final { scan-tree-dump-times "exp2l" 9 "original" } } */ /* { dg-final { scan-tree-dump-times "asin " 2 "original" } } */ /* { dg-final { scan-tree-dump-times "asinf" 2 "original" } } */ --- 317,324 ---- } /* { dg-final { scan-tree-dump-times "exp2 " 9 "original" } } */ ! /* { dg-final { scan-tree-dump-times "exp2f" 9 "original" { target { ! { spu*-*-* } } } } } */ ! /* { dg-final { scan-tree-dump-times "exp2f" 6 "original" { target { spu*-*-* } } } } */ /* { dg-final { scan-tree-dump-times "exp2l" 9 "original" } } */ /* { dg-final { scan-tree-dump-times "asin " 2 "original" } } */ /* { dg-final { scan-tree-dump-times "asinf" 2 "original" } } */ *************** void bar() *** 321,327 **** /* { dg-final { scan-tree-dump-times "tgammaf" 5 "original" } } */ /* { dg-final { scan-tree-dump-times "tgammal" 5 "original" } } */ /* { dg-final { scan-tree-dump-times "pow " 13 "original" } } */ ! /* { dg-final { scan-tree-dump-times "powf" 13 "original" } } */ /* { dg-final { scan-tree-dump-times "powl" 13 "original" } } */ /* { dg-final { scan-tree-dump-times "fma " 3 "original" } } */ /* { dg-final { scan-tree-dump-times "fmaf" 3 "original" } } */ --- 348,355 ---- /* { dg-final { scan-tree-dump-times "tgammaf" 5 "original" } } */ /* { dg-final { scan-tree-dump-times "tgammal" 5 "original" } } */ /* { dg-final { scan-tree-dump-times "pow " 13 "original" } } */ ! /* { dg-final { scan-tree-dump-times "powf" 13 "original" { target { ! { spu*-*-* } } } } } */ ! /* { dg-final { scan-tree-dump-times "powf" 7 "original" { target { spu*-*-* } } } } */ /* { dg-final { scan-tree-dump-times "powl" 13 "original" } } */ /* { dg-final { scan-tree-dump-times "fma " 3 "original" } } */ /* { dg-final { scan-tree-dump-times "fmaf" 3 "original" } } */ *************** void bar() *** 342,348 **** /* { dg-final { scan-tree-dump-times "_logbf" 2 "original" } } */ /* { dg-final { scan-tree-dump-times "_logbl" 2 "original" } } */ /* { dg-final { scan-tree-dump-times "ilogb " 6 "original" } } */ ! /* { dg-final { scan-tree-dump-times "ilogbf" 6 "original" } } */ /* { dg-final { scan-tree-dump-times "ilogbl" 6 "original" } } */ /* { dg-final { scan-tree-dump-times "y0 " 3 "original" } } */ /* { dg-final { scan-tree-dump-times "y0f" 3 "original" } } */ --- 370,377 ---- /* { dg-final { scan-tree-dump-times "_logbf" 2 "original" } } */ /* { dg-final { scan-tree-dump-times "_logbl" 2 "original" } } */ /* { dg-final { scan-tree-dump-times "ilogb " 6 "original" } } */ ! /* { dg-final { scan-tree-dump-times "ilogbf" 6 "original" { target { ! { spu*-*-* } } } } } */ ! /* { dg-final { scan-tree-dump-times "ilogbf" 2 "original" { target { spu*-*-* } } } } */ /* { dg-final { scan-tree-dump-times "ilogbl" 6 "original" } } */ /* { dg-final { scan-tree-dump-times "y0 " 3 "original" } } */ /* { dg-final { scan-tree-dump-times "y0f" 3 "original" } } */ diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/torture/builtin-modf-1.c gcc-4.3.2/gcc/testsuite/gcc.dg/torture/builtin-modf-1.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/torture/builtin-modf-1.c Fri Dec 21 07:51:33 2007 --- gcc-4.3.2/gcc/testsuite/gcc.dg/torture/builtin-modf-1.c Wed Jul 2 15:37:17 2008 *************** extern void link_error(int); *** 62,67 **** --- 62,68 ---- /* Test that modf(NEG FUNCARG(ARGARG, &iptr)) == FRACRES && FUNCRES(iptr) is true. Check the sign of both as well. This is for checking an argument of Inf. */ + #ifndef __SPU__ #define TESTIT_MODF2(NEG,FUNCARG,ARGARG,FUNCRES,FRACRES) do { \ float iptrf = 0.5; double iptr = 0.5; long double iptrl = 0.5; \ if (__builtin_modff(NEG __builtin_##FUNCARG##f(ARGARG),&iptrf) != FRACRES##f \ *************** extern void link_error(int); *** 80,89 **** --- 81,107 ---- || CKSGN_IPTR_L(iptrl,FRACRES##l)) \ link_error(__LINE__); \ } while (0) + #else + #define TESTIT_MODF2(NEG,FUNCARG,ARGARG,FUNCRES,FRACRES) do { \ + /* SPU single-precision floating point format does not support Inf or Nan. */ \ + double iptr = 0.5; long double iptrl = 0.5; \ + if (__builtin_modf(NEG __builtin_##FUNCARG(ARGARG),&iptr) != FRACRES \ + || CKSGN(__builtin_modf(NEG __builtin_##FUNCARG(ARGARG),&iptr), FRACRES) \ + || CKIPTR(!__builtin_##FUNCRES(iptr),0) \ + || CKSGN_IPTR(iptr,FRACRES)) \ + link_error(__LINE__); \ + if (__builtin_modfl(NEG __builtin_##FUNCARG##l(ARGARG),&iptrl) != FRACRES##l \ + || CKSGN_L(__builtin_modfl(NEG __builtin_##FUNCARG##l(ARGARG),&iptrl), FRACRES##l) \ + || CKIPTR(!__builtin_##FUNCRES##l(iptrl),0) \ + || CKSGN_IPTR_L(iptrl,FRACRES##l)) \ + link_error(__LINE__); \ + } while (0) + #endif /* Test that FUNCRES(modf(NEG FUNCARG(ARGARG, &iptr))) is true && FUNCRES(iptr) is true. Check the sign of both as well. This is for checking an argument of NaN. */ + #ifndef __SPU__ #define TESTIT_MODF3(NEG,FUNCARG,ARGARG,FUNCRES) do { \ float iptrf = 0.5; double iptr = 0.5; long double iptrl = 0.5; \ if (CKRES(!__builtin_##FUNCRES##f(__builtin_modff(NEG __builtin_##FUNCARG##f(ARGARG),&iptrf))) \ *************** extern void link_error(int); *** 102,107 **** --- 120,141 ---- || CKSGN_IPTR_L(iptrl,NEG 1)) \ link_error(__LINE__); \ } while (0) + #else + #define TESTIT_MODF3(NEG,FUNCARG,ARGARG,FUNCRES) do { \ + /* SPU single-precision floating point format does not support Inf or Nan. */ \ + double iptr = 0.5; long double iptrl = 0.5; \ + if (CKRES(!__builtin_##FUNCRES(__builtin_modf(NEG __builtin_##FUNCARG(ARGARG),&iptr))) \ + || CKSGN(__builtin_modf(NEG __builtin_##FUNCARG(ARGARG),&iptr), NEG 1) \ + || CKIPTR(!__builtin_##FUNCRES(iptr),0) \ + || CKSGN_IPTR(iptr,NEG 1)) \ + link_error(__LINE__); \ + if (CKRES(!__builtin_##FUNCRES##l(__builtin_modfl(NEG __builtin_##FUNCARG##l(ARGARG),&iptrl))) \ + || CKSGN_L(__builtin_modfl(NEG __builtin_##FUNCARG##l(ARGARG),&iptrl), NEG 1) \ + || CKIPTR(!__builtin_##FUNCRES##l(iptrl),0) \ + || CKSGN_IPTR_L(iptrl,NEG 1)) \ + link_error(__LINE__); \ + } while (0) + #endif void __attribute__ ((__noinline__)) foo(void) diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/torture/pr25947-1.c gcc-4.3.2/gcc/testsuite/gcc.dg/torture/pr25947-1.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/torture/pr25947-1.c Thu Jan 26 02:53:15 2006 --- gcc-4.3.2/gcc/testsuite/gcc.dg/torture/pr25947-1.c Thu Jul 3 12:32:24 2008 *************** *** 1,5 **** --- 1,6 ---- /* PR target/25947: define_split in cris.md caused unrecognized insn. */ /* { dg-options "-fpic" { target fpic } } */ + /* { dg-skip-if "requires unsupported run-time relocation" { spu-*-* } { "-O0" } { "" } } */ extern char *rl_line_buffer; extern int rl_point; diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/torture/pr34330.c gcc-4.3.2/gcc/testsuite/gcc.dg/torture/pr34330.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/torture/pr34330.c Tue May 20 21:03:59 2008 --- gcc-4.3.2/gcc/testsuite/gcc.dg/torture/pr34330.c Thu Jul 17 22:24:22 2008 *************** *** 1,4 **** --- 1,5 ---- /* { dg-do compile } */ + /* { dg-require-effective-target pthread } */ /* { dg-options "-ftree-parallelize-loops=4 -ftree-vectorize" } */ struct T diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/torture/pr36244.c gcc-4.3.2/gcc/testsuite/gcc.dg/torture/pr36244.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/torture/pr36244.c Tue May 20 21:03:59 2008 --- gcc-4.3.2/gcc/testsuite/gcc.dg/torture/pr36244.c Thu Jul 17 22:24:22 2008 *************** *** 1,4 **** --- 1,5 ---- /* { dg-do compile } */ + /* { dg-require-effective-target pthread } */ /* { dg-options "-O3 -ftree-parallelize-loops=4" } */ struct p7prior_s { diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/torture/type-generic-1.c gcc-4.3.2/gcc/testsuite/gcc.dg/torture/type-generic-1.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/torture/type-generic-1.c Tue Aug 7 01:41:27 2007 --- gcc-4.3.2/gcc/testsuite/gcc.dg/torture/type-generic-1.c Wed Jul 2 15:37:17 2008 *************** *** 3,8 **** --- 3,9 ---- /* { dg-do run } */ /* { dg-options "-mieee" { target sh*-*-* } } */ + /* { dg-skip-if "No Inf/NaN support" { spu-*-* } } */ #include "../tg-tests.h" diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/tree-ssa/alias-15.c gcc-4.3.2/gcc/testsuite/gcc.dg/tree-ssa/alias-15.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/tree-ssa/alias-15.c Sun Oct 28 16:14:44 2007 --- gcc-4.3.2/gcc/testsuite/gcc.dg/tree-ssa/alias-15.c Wed Jun 11 09:16:09 2008 *************** static inline struct X *wrap(struct X *p *** 11,20 **** int test2(void) { struct X *p = wrap(&m.b); ! /* Both memory references need to alias the same SFT. */ return p->b[3] - m.b.b[3]; } ! /* { dg-final { scan-tree-dump "SFT.5 created for var m offset 128" "salias" } } */ ! /* { dg-final { scan-tree-dump-times "VUSE b[3] - m.b.b[3]; } ! /* { dg-final { scan-tree-dump-times "VUSE " 2 "salias" } } */ /* { dg-final { cleanup-tree-dump "salias" } } */ diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/tree-ssa/loop-19.c gcc-4.3.2/gcc/testsuite/gcc.dg/tree-ssa/loop-19.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/tree-ssa/loop-19.c Wed Jan 16 16:29:11 2008 --- gcc-4.3.2/gcc/testsuite/gcc.dg/tree-ssa/loop-19.c Wed Jun 18 21:15:20 2008 *************** *** 4,10 **** The testcase comes from PR 29256 (and originally, the stream benchmark). */ ! /* { dg-do compile { target i?86-*-* x86_64-*-* powerpc*-*-*} } */ /* { dg-require-effective-target nonpic } */ /* { dg-options "-O3 -fdump-tree-final_cleanup" } */ --- 4,10 ---- The testcase comes from PR 29256 (and originally, the stream benchmark). */ ! /* { dg-do compile { target { i?86-*-* || { x86_64-*-* || powerpc_hard_double } } } } */ /* { dg-require-effective-target nonpic } */ /* { dg-options "-O3 -fdump-tree-final_cleanup" } */ diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/tree-ssa/ltrans-8.c gcc-4.3.2/gcc/testsuite/gcc.dg/tree-ssa/ltrans-8.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/tree-ssa/ltrans-8.c Tue Sep 13 23:46:26 2005 --- gcc-4.3.2/gcc/testsuite/gcc.dg/tree-ssa/ltrans-8.c Sat Jun 7 22:57:55 2008 *************** double foo(double *a) *** 4,12 **** { int i,j; double r = 0.0; ! for (i=0; i<8; ++i) ! for (j=0; j<8; ++j) ! r += a[j*8+i]; return r; } --- 4,12 ---- { int i,j; double r = 0.0; ! for (i=0; i<100; ++i) ! for (j=0; j<1000; ++j) ! r += a[j*100+i]; return r; } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/tree-ssa/pr36181.c gcc-4.3.2/gcc/testsuite/gcc.dg/tree-ssa/pr36181.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/tree-ssa/pr36181.c Wed May 21 15:56:57 2008 --- gcc-4.3.2/gcc/testsuite/gcc.dg/tree-ssa/pr36181.c Thu Jul 17 22:24:22 2008 *************** *** 1,4 **** --- 1,5 ---- /* { dg-do compile } */ + /* { dg-require-effective-target pthread } */ /* { dg-options "-O3 -ftree-parallelize-loops=2" } */ int foo () diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-3.c gcc-4.3.2/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-3.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-3.c Thu Sep 20 20:17:45 2007 --- gcc-4.3.2/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-3.c Wed Jul 2 15:40:24 2008 *************** *** 5,11 **** When the condition is true, we distribute "(int) (a + b)" as "(int) a + (int) b", otherwise we keep the original. */ ! /* { dg-do compile { target { ! mips64 } } } */ /* { dg-options "-O -fwrapv -fdump-tree-fre-details" } */ /* From PR14844. */ --- 5,11 ---- When the condition is true, we distribute "(int) (a + b)" as "(int) a + (int) b", otherwise we keep the original. */ ! /* { dg-do compile { target { { ! mips64 } && { ! spu-*-* } } } } */ /* { dg-options "-O -fwrapv -fdump-tree-fre-details" } */ /* From PR14844. */ diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-31d.c gcc-4.3.2/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-31d.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-31d.c Thu Jul 5 13:15:20 2007 --- gcc-4.3.2/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-31d.c Thu Jun 26 06:07:47 2008 *************** *** 3,9 **** #include #include "../../tree-vect.h" ! #define N 32 struct t{ int k[N]; --- 3,9 ---- #include #include "../../tree-vect.h" ! #define N 5 struct t{ int k[N]; *************** int main1 () *** 24,36 **** struct s tmp; /* unaligned */ ! for (i = 0; i < N/2; i++) { tmp.e.k[i] = 8; } /* check results: */ ! for (i = 0; i #include "../../tree-vect.h" ! #define N 20 struct s{ int m; --- 3,9 ---- #include #include "../../tree-vect.h" ! #define N 11 struct s{ int m; diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-vect-33.c gcc-4.3.2/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-vect-33.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-vect-33.c Thu Jul 12 12:17:03 2007 --- gcc-4.3.2/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-vect-33.c Wed Jul 2 07:13:28 2008 *************** *** 4,10 **** #include #include "../../tree-vect.h" ! #define N 16 struct test { char ca[N]; }; --- 4,10 ---- #include #include "../../tree-vect.h" ! #define N 17 struct test { char ca[N]; }; diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-vect-76b.c gcc-4.3.2/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-vect-76b.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-vect-76b.c Thu Jul 12 12:17:03 2007 --- gcc-4.3.2/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-vect-76b.c Wed Jul 2 07:13:28 2008 *************** *** 3,22 **** #include #include "../../tree-vect.h" ! #define N 8 #define OFF 4 /* Check handling of accesses for which the "initial condition" - the expression that represents the first location accessed - is more involved than just an ssa_name. */ ! int ib[N+OFF] __attribute__ ((__aligned__(16))) = {0, 1, 3, 5, 7, 11, 13, 17, 0, 2, 6, 10}; int main1 (int *pib) { int i; int ia[N+OFF]; ! int ic[N+OFF] = {0, 1, 3, 5, 7, 11, 13, 17, 0, 2, 6, 10}; for (i = OFF; i < N; i++) { --- 3,22 ---- #include #include "../../tree-vect.h" ! #define N 16 #define OFF 4 /* Check handling of accesses for which the "initial condition" - the expression that represents the first location accessed - is more involved than just an ssa_name. */ ! int ib[N+OFF] __attribute__ ((__aligned__(16))) = {0, 1, 3, 5, 7, 11, 13, 17, 0, 2, 6, 10, 0, 1, 3, 5, 7, 11, 13, 17}; int main1 (int *pib) { int i; int ia[N+OFF]; ! int ic[N+OFF] = {0, 1, 3, 5, 7, 11, 13, 17, 0, 2, 6, 10, 0, 1, 3, 5, 7, 11, 13, 17}; for (i = OFF; i < N; i++) { diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-vect-iv-9.c gcc-4.3.2/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-vect-iv-9.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-vect-iv-9.c Thu Jul 12 12:17:03 2007 --- gcc-4.3.2/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-vect-iv-9.c Wed Jul 2 07:13:28 2008 *************** *** 6,12 **** #define N 26 int a[N]; ! int main1 (int X) { int s = X; int i; --- 6,12 ---- #define N 26 int a[N]; ! __attribute__ ((noinline)) int main1 (int X) { int s = X; int i; diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.dg/vect/pr36493.c gcc-4.3.2/gcc/testsuite/gcc.dg/vect/pr36493.c *** gcc-4.3.1/gcc/testsuite/gcc.dg/vect/pr36493.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.dg/vect/pr36493.c Sun Jun 29 07:16:31 2008 *************** *** 0 **** --- 1,23 ---- + /* { dg-require-effective-target vect_long } */ + + #include "tree-vect.h" + + int + main (void) + { + int i; + long x[12] __attribute__((aligned(16))); + + x[0] = 1; + for (i = 0; i < 12; i++) + x[i] = i; + + if (x[0] != 0) + abort (); + + return 0; + } + + /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ + /* { dg-final { cleanup-tree-dump "vect" } } */ + diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.target/arm/neon/polytypes.c gcc-4.3.2/gcc/testsuite/gcc.target/arm/neon/polytypes.c *** gcc-4.3.1/gcc/testsuite/gcc.target/arm/neon/polytypes.c Wed Jul 25 12:28:31 2007 --- gcc-4.3.2/gcc/testsuite/gcc.target/arm/neon/polytypes.c Wed Jul 2 19:35:52 2008 *************** void foo () *** 28,34 **** poly8x16_t v128_8; poly16x8_t v128_16; ! s64_8 (v64_8); /* { dg-error "use -flax-vector-conversions.*incompatible type for argument 1 of 's64_8'" } */ u64_8 (v64_8); /* { dg-error "incompatible type for argument 1 of 'u64_8'" } */ p64_8 (v64_8); --- 28,35 ---- poly8x16_t v128_8; poly16x8_t v128_16; ! s64_8 (v64_8); /* { dg-message "use -flax-vector-conversions" } */ ! /* { dg-error "incompatible type for argument 1 of 's64_8'" "" { target *-*-* } 31 } */ u64_8 (v64_8); /* { dg-error "incompatible type for argument 1 of 'u64_8'" } */ p64_8 (v64_8); diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.target/i386/20080723-1.c gcc-4.3.2/gcc/testsuite/gcc.target/i386/20080723-1.c *** gcc-4.3.1/gcc/testsuite/gcc.target/i386/20080723-1.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.target/i386/20080723-1.c Thu Jul 24 04:52:52 2008 *************** *** 0 **** --- 1,49 ---- + /* { dg-do run } */ + /* { dg-options "-O2" } */ + + extern void abort (void); + extern void exit (int); + + static inline __attribute__((always_inline)) + void + prefetch (void *x) + { + asm volatile("prefetcht0 %0" : : "m" (*(unsigned long *)x)); + } + + struct hlist_head + { + struct hlist_node *first; + }; + + struct hlist_node + { + struct hlist_node *next; + unsigned long i_ino; + }; + + struct hlist_node * find_inode_fast(struct hlist_head *head, unsigned long ino) + { + struct hlist_node *node; + + for (node = head->first; + node && (prefetch (node->next), 1); + node = node->next) + { + if (node->i_ino == ino) + break; + } + return node ? node : 0; + } + + struct hlist_node g2; + struct hlist_node g1 = { &g2 }; + struct hlist_head h = { &g1 }; + + int + main() + { + if (find_inode_fast (&h, 1) != 0) + abort (); + exit (0); + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.target/i386/local2.c gcc-4.3.2/gcc/testsuite/gcc.target/i386/local2.c *** gcc-4.3.1/gcc/testsuite/gcc.target/i386/local2.c Mon Aug 27 07:23:34 2007 --- gcc-4.3.2/gcc/testsuite/gcc.target/i386/local2.c Thu Jan 1 00:00:00 1970 *************** *** 1,25 **** - /* { dg-do compile } */ - /* { dg-require-effective-target ilp32 } */ - /* { dg-require-effective-target nonpic } */ - /* { dg-options "-O2 -funit-at-a-time -fomit-frame-pointer" } */ - /* { dg-final { scan-assembler-not "sub\[^\\n\]*sp" } } */ - - static __attribute__ ((noinline)) q (); - int a; - - /* This function should not require any stack manipulation - for preferred stack bounday. */ - void - e () - { - if (a) - { - e (); - a--; - } - q (); - } - - static __attribute__ ((noinline)) q () - { - } --- 0 ---- diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.target/i386/pr35281.c gcc-4.3.2/gcc/testsuite/gcc.target/i386/pr35281.c *** gcc-4.3.1/gcc/testsuite/gcc.target/i386/pr35281.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.target/i386/pr35281.c Fri Jul 18 11:44:57 2008 *************** *** 0 **** --- 1,19 ---- + /* { dg-options "-O2" } */ + /* { dg-do compile } */ + /* { dg-require-effective-target ilp32 } */ + + unsigned long long a; + unsigned int b; + unsigned short c; + + unsigned long long mul32() + { + return a * b; + } + + unsigned long long mul16() + { + return a * c; + } + + /* { dg-final { scan-assembler-not "xor" } } */ diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.target/i386/pr36533.c gcc-4.3.2/gcc/testsuite/gcc.target/i386/pr36533.c *** gcc-4.3.1/gcc/testsuite/gcc.target/i386/pr36533.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.target/i386/pr36533.c Mon Jun 23 13:16:07 2008 *************** *** 0 **** --- 1,174 ---- + /* PR target/36533 */ + /* { dg-do run { target { { i?86-*-linux* x86_64-*-linux* } && ilp32 } } } */ + /* { dg-options "-Os" } */ + #include + #include + #ifndef MAP_ANONYMOUS + #define MAP_ANONYMOUS MAP_ANON + #endif + + typedef struct S1 + { + unsigned long s1; + struct S1 *s2; + char *s3; + } S1; + + typedef struct + { + unsigned int s4; + unsigned int s5; + int s6; + unsigned int *s7; + } S2; + + typedef struct + { + unsigned int s8; + unsigned short s9; + unsigned char s10; + unsigned char s11; + char s12[255]; + } S3; + + typedef struct + { + unsigned int s4; + unsigned short s13; + unsigned short s14; + } S4; + + typedef struct + { + char s15[16]; + unsigned long s16; + } S5; + + typedef struct + { + char s15[48]; + S5 *s17; + } S6; + + typedef struct + { + S1 *s18; + } S7; + + __attribute__((regparm (3), noinline)) int + fn1 (const char *x, void *y, S1 *z) + { + asm volatile ("" : : : "memory"); + return *x + (y != 0); + } + + __attribute__((regparm (3), noinline)) int + fn2 (const char *x, int y, S2 *z) + { + asm volatile ("" : : : "memory"); + return 0; + } + + static inline __attribute__ ((always_inline)) unsigned int + fn4 (unsigned short x) + { + unsigned len = x; + if (len == ((1 << 16) - 1)) + return 1 << 16; + return len; + } + + static inline __attribute__ ((always_inline)) S3 * + fn3 (S3 *p) + { + return (S3 *) ((char *) p + fn4 (p->s9)); + } + + __attribute__((regparm (3), noinline)) int + fn5 (void) + { + asm volatile ("" : : : "memory"); + return 0; + } + + static inline __attribute__ ((always_inline)) int + fn6 (S3 *w, int x, S2 *y, S4 *z) + { + int a = 2; + char *b = (char *) w; + S2 c = *y; + + while ((char *) w < b + x - 2 * sizeof (S4)) + { + if (w->s10 && w->s8) + { + fn2 (w->s12, w->s10, &c); + z--; + z->s4 = c.s4; + z->s13 = (unsigned short) ((char *) w - b); + z->s14 = w->s9; + a++; + fn5 (); + } + + w = fn3 (w); + } + return a; + } + + __attribute__((regparm (3), noinline)) unsigned int + test (void *u, S6 *v, S1 **w, S7 *x, S2 *y, S1 *z) + { + unsigned b = v->s17->s16; + unsigned a; + S4 *c; + unsigned d, e, f, i; + + fn1 (__func__, u, x->s18); + c = (S4 *) (z->s3 + b); + a = fn6 ((S3 *) (*w)->s3, b, y, c); + c -= a; + f = 0; + e = 2; + for (i = a - 1; ; i--) + { + if (f + (unsigned short) (c[i].s14 / 2) > b / 2) + break; + f += c[i].s14; + e++; + } + d = a - e; + return c[d].s4; + } + + int main (void) + { + char *p = mmap (NULL, 131072, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + S1 wb, z, *w; + S6 v; + S7 x; + S2 y; + S5 vb; + S4 s4; + if (p == MAP_FAILED) + return 0; + if (munmap (p + 65536, 65536) < 0) + return 0; + memset (&wb, 0, sizeof (wb)); + memset (&z, 0, sizeof (z)); + memset (&v, 0, sizeof (v)); + memset (&x, 0, sizeof (x)); + memset (&y, 0, sizeof (y)); + memset (&vb, 0, sizeof (vb)); + memset (&s4, 0, sizeof (s4)); + s4.s14 = 254; + z.s3 = p + 65536 - 2 * sizeof (S4); + w = &wb; + v.s17 = &vb; + vb.s16 = 2 * sizeof (S4); + memcpy (z.s3, &s4, sizeof (s4)); + memcpy (z.s3 + sizeof (s4), &s4, sizeof (s4)); + test ((void *) 0, &v, &w, &x, &y, &z); + return 0; + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.target/i386/pr36613.c gcc-4.3.2/gcc/testsuite/gcc.target/i386/pr36613.c *** gcc-4.3.1/gcc/testsuite/gcc.target/i386/pr36613.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.target/i386/pr36613.c Mon Aug 11 16:22:00 2008 *************** *** 0 **** --- 1,44 ---- + /* { dg-do run { target { { i?86-*-linux* x86_64-*-linux* } && ilp32 } } } */ + /* { dg-options "-Os" } */ + /* PR target/36613 */ + + extern void abort (void); + + static inline int + lshifts (int val, int cnt) + { + if (val < 0) + return val; + return val << cnt; + } + + static inline unsigned int + lshiftu (unsigned int val, unsigned int cnt) + { + if (cnt >= sizeof (unsigned int) * __CHAR_BIT__ + || val > ((__INT_MAX__ * 2U) >> cnt)) + return val; + return val << cnt; + } + + static inline int + rshifts (int val, unsigned int cnt) + { + if (val < 0 || cnt >= sizeof (int) * __CHAR_BIT__) + return val; + return val >> cnt; + } + + int + foo (unsigned int val) + { + return rshifts (1 + val, lshifts (lshiftu (val, val), 1)); + } + + int + main (void) + { + if (foo (1) != 0) + abort (); + return 0; + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.target/i386/pr36753.c gcc-4.3.2/gcc/testsuite/gcc.target/i386/pr36753.c *** gcc-4.3.1/gcc/testsuite/gcc.target/i386/pr36753.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.target/i386/pr36753.c Thu Jul 17 09:19:31 2008 *************** *** 0 **** --- 1,31 ---- + /* { dg-options "-O2" } */ + /* { dg-do run } */ + + #if defined __i386__ + #define REG "edi" + #else + #define REG "r14" + #endif + + register unsigned long *ds asm(REG); + + extern void abort (void); + + __attribute__ ((noinline)) void + test (void) + { + *++ds = 31337; + } + + int + main () + { + unsigned long stack[2]; + stack[0] = 0; + stack[1] = 0; + ds = stack; + test (); + if (ds != stack + 1 || *ds != 31337) + abort (); + return 0; + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.target/i386/pr37101.c gcc-4.3.2/gcc/testsuite/gcc.target/i386/pr37101.c *** gcc-4.3.1/gcc/testsuite/gcc.target/i386/pr37101.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.target/i386/pr37101.c Sun Aug 17 14:57:00 2008 *************** *** 0 **** --- 1,64 ---- + /* { dg-do compile } */ + /* { dg-options "-O2 -msse2 -ftree-vectorize -march=nocona" } */ + + typedef __SIZE_TYPE__ size_t; + extern void *malloc (size_t); + extern void free (void *); + + typedef struct _Resource + { + struct _Resource *next; + unsigned int id; + } ResourceRec, *ResourcePtr; + + typedef struct _ClientResource + { + ResourcePtr *resources; + int elements; + int buckets; + int hashsize; + } ClientResourceRec; + + static ClientResourceRec clientTable[256]; + + void + RebuildTable (int client) + { + int j; + ResourcePtr res, next; + ResourcePtr **tails, *resources; + ResourcePtr **tptr, *rptr; + + j = 2 * clientTable[client].buckets; + + tails = + (ResourcePtr **) malloc ((unsigned long) (j * sizeof (ResourcePtr *))); + resources = + (ResourcePtr *) malloc ((unsigned long) (j * sizeof (ResourcePtr))); + + for (rptr = resources, tptr = tails; --j >= 0; rptr++, tptr++) + { + *rptr = ((ResourcePtr) ((void *) 0)); + *tptr = rptr; + } + + clientTable[client].hashsize++; + for (j = clientTable[client].buckets, + rptr = clientTable[client].resources; --j >= 0; rptr++) + { + for (res = *rptr; res; res = next) + { + next = res->next; + res->next = ((ResourcePtr) ((void *) 0)); + tptr = &tails[Hash (client, res->id)]; + **tptr = res; + *tptr = &res->next; + } + } + free ((void *) tails); + clientTable[client].buckets *= 2; + free ((void *) clientTable[client].resources); + clientTable[client].resources = resources; + } + + /* { dg-final { scan-assembler-not "movlps" } } */ diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.target/ia64/20080802-1.c gcc-4.3.2/gcc/testsuite/gcc.target/ia64/20080802-1.c *** gcc-4.3.1/gcc/testsuite/gcc.target/ia64/20080802-1.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.target/ia64/20080802-1.c Wed Aug 6 06:32:46 2008 *************** *** 0 **** --- 1,19 ---- + /* { dg-do compile } */ + /* { dg-options "-O2 -msched-control-spec" } */ + + struct cpp_reader; + + extern const char * parse_include (struct cpp_reader *, int *m, void *); + extern int _cpp_compare_file_date (struct cpp_reader *, const char *, int); + + void + _cpp_init_internal_pragmas (struct cpp_reader *pfile) + { + const char *fname; + int angle_brackets, ordering; + + fname = parse_include (pfile, &angle_brackets, (void *) 0); + if (!fname) + return; + ordering = _cpp_compare_file_date (pfile, fname, angle_brackets); + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.target/mips/pr35802.c gcc-4.3.2/gcc/testsuite/gcc.target/mips/pr35802.c *** gcc-4.3.1/gcc/testsuite/gcc.target/mips/pr35802.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.target/mips/pr35802.c Wed Jul 9 20:06:20 2008 *************** *** 0 **** --- 1,17 ---- + /* { dg-mips-options "-O2 -march=74kc -mgp32" } */ + __thread int x __attribute__((tls_model("initial-exec"))); + __thread int y __attribute__((tls_model("initial-exec"))); + + int bar (void); + + NOMIPS16 void + foo (int n) + { + if (n > 5) + { + y = 0; + do + x += bar (); + while (n--); + } + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.target/powerpc/dfp-dd.c gcc-4.3.2/gcc/testsuite/gcc.target/powerpc/dfp-dd.c *** gcc-4.3.1/gcc/testsuite/gcc.target/powerpc/dfp-dd.c Wed Sep 5 22:16:33 2007 --- gcc-4.3.2/gcc/testsuite/gcc.target/powerpc/dfp-dd.c Fri Jun 6 19:38:41 2008 *************** *** 1,6 **** /* Test generation of DFP instructions for POWER6. */ /* Origin: Janis Johnson */ ! /* { dg-do compile { target powerpc*-*-linux* } } */ /* { dg-options "-std=gnu99 -mcpu=power6" } */ /* { dg-final { scan-assembler "dadd" } } */ --- 1,6 ---- /* Test generation of DFP instructions for POWER6. */ /* Origin: Janis Johnson */ ! /* { dg-do compile { target { powerpc*-*-linux* && powerpc_fprs } } } */ /* { dg-options "-std=gnu99 -mcpu=power6" } */ /* { dg-final { scan-assembler "dadd" } } */ diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.target/powerpc/dfp-td.c gcc-4.3.2/gcc/testsuite/gcc.target/powerpc/dfp-td.c *** gcc-4.3.1/gcc/testsuite/gcc.target/powerpc/dfp-td.c Wed Sep 5 22:16:33 2007 --- gcc-4.3.2/gcc/testsuite/gcc.target/powerpc/dfp-td.c Fri Jun 6 19:38:41 2008 *************** *** 1,6 **** /* Test generation of DFP instructions for POWER6. */ /* Origin: Janis Johnson */ ! /* { dg-do compile { target powerpc*-*-linux* } } */ /* { dg-options "-std=gnu99 -mcpu=power6" } */ /* { dg-final { scan-assembler "daddq" } } */ --- 1,6 ---- /* Test generation of DFP instructions for POWER6. */ /* Origin: Janis Johnson */ ! /* { dg-do compile { target { powerpc*-*-linux* && powerpc_fprs } } } */ /* { dg-options "-std=gnu99 -mcpu=power6" } */ /* { dg-final { scan-assembler "daddq" } } */ diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.target/powerpc/ppc32-abi-dfp-1.c gcc-4.3.2/gcc/testsuite/gcc.target/powerpc/ppc32-abi-dfp-1.c *** gcc-4.3.1/gcc/testsuite/gcc.target/powerpc/ppc32-abi-dfp-1.c Thu Jan 17 22:29:46 2008 --- gcc-4.3.2/gcc/testsuite/gcc.target/powerpc/ppc32-abi-dfp-1.c Fri Jun 6 19:38:41 2008 *************** *** 1,4 **** ! /* { dg-do run { target { powerpc*-*-* && { ilp32 && dfprt } } } } */ /* { dg-options "-std=gnu99 -O2 -fno-strict-aliasing" } */ /* Testcase to check for ABI compliance of parameter passing --- 1,4 ---- ! /* { dg-do run { target { powerpc_fprs && { ilp32 && dfprt } } } } */ /* { dg-options "-std=gnu99 -O2 -fno-strict-aliasing" } */ /* Testcase to check for ABI compliance of parameter passing diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.target/powerpc/ppu-intrinsics.c gcc-4.3.2/gcc/testsuite/gcc.target/powerpc/ppu-intrinsics.c *** gcc-4.3.1/gcc/testsuite/gcc.target/powerpc/ppu-intrinsics.c Tue Sep 4 21:10:59 2007 --- gcc-4.3.2/gcc/testsuite/gcc.target/powerpc/ppu-intrinsics.c Fri Jun 6 19:38:41 2008 *************** *** 1,4 **** ! /* { dg-do link { target *-*-linux* } } */ /* { dg-options "-W -Wall -mcpu=cell" } */ /* Test some PPU intrinsics from . */ --- 1,4 ---- ! /* { dg-do link { target { *-*-linux* && powerpc_fprs } } } */ /* { dg-options "-W -Wall -mcpu=cell" } */ /* Test some PPU intrinsics from . */ diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.target/spu/muldivti3.c gcc-4.3.2/gcc/testsuite/gcc.target/spu/muldivti3.c *** gcc-4.3.1/gcc/testsuite/gcc.target/spu/muldivti3.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.target/spu/muldivti3.c Thu Jul 17 22:22:33 2008 *************** *** 0 **** --- 1,46 ---- + /* { dg-do run } */ + /* { dg-options "-std=c99" } */ + #include + typedef unsigned int uqword __attribute__((mode(TI))); + typedef int qword __attribute__((mode(TI))); + + typedef union + { + uqword uq; + qword q; + unsigned long long ull[2]; + } u; + + int main(void) + { + uqword e, f; + qword g, h; + + e = 0x1111111111111111ULL; + f = 0xFULL; + g = 0x0000000000111100ULL; + h = 0x0000000000000000ULL; + + u m, n, o, p, q; + + m.ull[0] = f; + m.ull[1] = e; + n.ull[0] = h; + n.ull[1] = g; + + /* __multi3 */ + o.q = m.q * n.q; + + o.q = o.q + n.q + 0x1110FF; + /* __udivti3, __umodti3 */ + p.uq = o.uq / n.uq; + q.uq = o.uq % n.uq; + if (p.uq != (m.uq+1)) abort(); + if (q.uq != 0x1110FF) abort(); + /* __divti3, __modti3 */ + p.q = -o.q / n.q; + q.q = -o.q % n.q; + if ((-p.q * n.q - q.q) != o.q) abort(); + + return 0; + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gcc.target/spu/subti3.c gcc-4.3.2/gcc/testsuite/gcc.target/spu/subti3.c *** gcc-4.3.1/gcc/testsuite/gcc.target/spu/subti3.c Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gcc.target/spu/subti3.c Thu Jul 17 22:22:33 2008 *************** *** 0 **** --- 1,45 ---- + /* { dg-do run } */ + /* { dg-options "-std=c99" } */ + #include + typedef int TItype __attribute__ ((mode (TI))); + typedef int DItype __attribute__ ((mode (DI))); + typedef unsigned int UDItype __attribute__ ((mode (DI))); + + struct DIstruct {DItype high, low;}; + typedef union + { + struct DIstruct s; + TItype t; + } TIunion; + + static + void sub_ddmmss (UDItype *sh, UDItype *sl, UDItype ah, UDItype al, UDItype bh, UDItype bl) + { + UDItype x; + x = al - bl; + *sh = ah - bh - (x > al); + *sl = x; + } + + int main(void) + { + TIunion aa, bb, cc; + TItype m = 0x1111111111111110ULL; + TItype n = 0x1111111111111111ULL; + TItype d; + + aa.s.high = m; + aa.s.low = m; + bb.s.high = n; + bb.s.low = n; + + + sub_ddmmss (&cc.s.high, &cc.s.low, aa.s.high, aa.s.low, bb.s.high, bb.s.low); + d = aa.t - bb.t; + if (d != cc.t) + abort(); + cc.t = aa.t -d; + if (cc.t != bb.t) + abort(); + return 0; + } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gfortran.dg/array_4.f90 gcc-4.3.2/gcc/testsuite/gfortran.dg/array_4.f90 *** gcc-4.3.1/gcc/testsuite/gfortran.dg/array_4.f90 Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gfortran.dg/array_4.f90 Thu Jul 17 09:44:33 2008 *************** *** 0 **** --- 1,12 ---- + ! { dg-do compile } + ! PR fortran/36824 + ! + ! Dimension of tgclist was not recognized as having constant bounds + ! + program test + implicit none + integer, dimension( 3 ), parameter :: tgc = (/5, 6, 7 /) + type tgccomp + integer, dimension( tgc( 1 ) : tgc( 2 ) ) :: tgclist + end type tgccomp + end program diff -Nrcpad gcc-4.3.1/gcc/testsuite/gfortran.dg/internal_pack_4.f90 gcc-4.3.2/gcc/testsuite/gfortran.dg/internal_pack_4.f90 *** gcc-4.3.1/gcc/testsuite/gfortran.dg/internal_pack_4.f90 Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gfortran.dg/internal_pack_4.f90 Sun Jul 27 11:41:35 2008 *************** *** 0 **** --- 1,31 ---- + ! { dg-do run } + ! { dg-options "-fdump-tree-original" } + ! + ! PR fortran/36132 + ! + ! Before invalid memory was accessed because an absent, optional + ! argument was packed before passing it as absent actual. + ! Getting it to crash is difficult, but valgrind shows the problem. + ! + MODULE M1 + INTEGER, PARAMETER :: dp=KIND(0.0D0) + CONTAINS + SUBROUTINE S1(a) + REAL(dp), DIMENSION(45), INTENT(OUT), & + OPTIONAL :: a + if (present(a)) call abort() + END SUBROUTINE S1 + SUBROUTINE S2(a) + REAL(dp), DIMENSION(:, :), INTENT(OUT), & + OPTIONAL :: a + CALL S1(a) + END SUBROUTINE + END MODULE M1 + + USE M1 + CALL S2() + END + + ! { dg-final { scan-tree-dump-times "a != 0B \\? _gfortran_internal_pack" 1 "original" } } + ! { dg-final { scan-tree-dump-times "if \\(a != 0B &&" 1 "original" } } + ! { dg-final { cleanup-tree-dump "original" } } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gfortran.dg/namelist_48.f90 gcc-4.3.2/gcc/testsuite/gfortran.dg/namelist_48.f90 *** gcc-4.3.1/gcc/testsuite/gfortran.dg/namelist_48.f90 Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gfortran.dg/namelist_48.f90 Wed Jul 2 04:52:47 2008 *************** *** 0 **** --- 1,15 ---- + ! { dg-do run } + ! { dg-options "-fbackslash" } + ! PR36538 namelist failure with tabs preceding object name + program check1 + integer x + namelist/casein/x + open(1, status="scratch") + write(1,'(a)') "&CASEIN" + write(1,'(a)') "\t\tx = 1" + write(1,'(a)') "/" + rewind(1) + x = 0 + read(1,casein) + if (x.ne.1) call abort + end diff -Nrcpad gcc-4.3.1/gcc/testsuite/gfortran.dg/namelist_49.f90 gcc-4.3.2/gcc/testsuite/gfortran.dg/namelist_49.f90 *** gcc-4.3.1/gcc/testsuite/gfortran.dg/namelist_49.f90 Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gfortran.dg/namelist_49.f90 Wed Jul 2 04:52:47 2008 *************** *** 0 **** --- 1,19 ---- + ! { dg-do run } + ! { dg-options "-fbackslash" } + ! PR36546 Namelist error with tab following a comma and newline + program check1 + real a,b,c + namelist/CASEDAT/A,B,C + open(1, status="scratch") + write(1,'(a)') "&CASEDAT" + write(1,'(a)') "\t\tA = 1.0,\t\tB = 2.0," + write(1,'(a)') "\t\tC = 3.0," + write(1,'(a)') " /" + rewind(1) + a = 0.0 + b = 0.0 + c = 0.0 + read(1,casedat) + if ((a.ne.1.0) .or. (b.ne.2.0) .or. (c.ne.3.0)) call abort + end + diff -Nrcpad gcc-4.3.1/gcc/testsuite/gfortran.dg/namelist_50.f90 gcc-4.3.2/gcc/testsuite/gfortran.dg/namelist_50.f90 *** gcc-4.3.1/gcc/testsuite/gfortran.dg/namelist_50.f90 Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gfortran.dg/namelist_50.f90 Wed Jul 2 04:52:47 2008 *************** *** 0 **** --- 1,16 ---- + ! { dg-do run } + ! PR36657 Namelist string constant immediately followed by comment + program gfcbug79 + implicit none + integer, parameter :: nnml = 10 + character(len=8) :: model = "" + namelist /NML/ model + open (nnml, status="scratch") + write(nnml,*) "&nml! This is a just comment" + write(nnml,*) " model='foo'! This is a just comment" + write(nnml,*) "/" + rewind(nnml) + read (nnml, nml=NML) + if (model /= 'foo') call abort + close(nnml) + end program gfcbug79 diff -Nrcpad gcc-4.3.1/gcc/testsuite/gfortran.dg/namelist_51.f90 gcc-4.3.2/gcc/testsuite/gfortran.dg/namelist_51.f90 *** gcc-4.3.1/gcc/testsuite/gfortran.dg/namelist_51.f90 Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gfortran.dg/namelist_51.f90 Wed Jul 2 04:52:47 2008 *************** *** 0 **** --- 1,27 ---- + ! { dg-do run } + ! PR36676 Namelist comment problems + ! test case from PR, reduced by Jerry DeLisle + program mem_nml + implicit none + integer, save :: nxc + nxc = 0 + call readNamelist() + contains + subroutine readNamelist() + implicit none + namelist /INPUT/ nxc + open(unit = 101, status="scratch") + write(101,'(a)')"&INPUT" + write(101,'(a)')"" + write(101,'(a)')"!" + write(101,'(a)')"!" + write(101,'(a)')"!" + write(101,'(a)')"nxc = 100" + write(101,'(a)')"&END" + rewind(101) + read(unit = 101, nml = INPUT) + if (nxc /= 100) call abort + close(unit = 101) + endsubroutine + end program mem_nml + diff -Nrcpad gcc-4.3.1/gcc/testsuite/gfortran.dg/namelist_52.f90 gcc-4.3.2/gcc/testsuite/gfortran.dg/namelist_52.f90 *** gcc-4.3.1/gcc/testsuite/gfortran.dg/namelist_52.f90 Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gfortran.dg/namelist_52.f90 Sat Jul 26 13:06:21 2008 *************** *** 0 **** --- 1,32 ---- + ! { dg-do run } + ! PR36582 Namelist I/O error: Bogus "Cannot match namelist object" + ! Test case derived from PR. + module mod1 + + type screen_io_type + integer :: begin + end type screen_io_type + + type adjoint_type + type(screen_io_type) :: screen_io_fs_ntime + character(12) :: solver_type + end type adjoint_type + + type(adjoint_type) :: adjoint + namelist/info_adjoint/adjoint + + end module mod1 + + program gfortran_error_2 + use mod1 + adjoint%solver_type = "abcdefghijkl" + open(31,status='scratch') + write(31, '(a)') "&info_adjoint" + write(31, '(a)') "adjoint%solver_type = 'direct'" + write(31, '(a)') "adjoint%screen_io_fs_ntime%begin = 42" + write(31, '(a)') "/" + rewind(31) + read(31,nml=info_adjoint) + if (adjoint%solver_type /= 'direct') call abort + if (adjoint%screen_io_fs_ntime%begin /= 42) call abort + end program gfortran_error_2 diff -Nrcpad gcc-4.3.1/gcc/testsuite/gfortran.dg/used_types_20.f90 gcc-4.3.2/gcc/testsuite/gfortran.dg/used_types_20.f90 *** gcc-4.3.1/gcc/testsuite/gfortran.dg/used_types_20.f90 Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gfortran.dg/used_types_20.f90 Sat Jul 19 18:34:21 2008 *************** *** 0 **** --- 1,49 ---- + ! { dg-do compile } + ! Tests the fix for PR36366 a regression in which the order of USE statements + ! in 'test2' would cause the result of 'test1' not to have a reference to + ! the derived type 'inner'. + ! + ! Contributed by Jakub Jelinek + ! + MODULE types + IMPLICIT NONE + TYPE :: inner + INTEGER, POINTER :: i(:) + END TYPE inner + + TYPE :: outer + TYPE(inner), POINTER :: inr(:) + END TYPE outer + END MODULE types + + MODULE mymod + IMPLICIT NONE + CONTAINS + FUNCTION test1() + USE types + IMPLICIT NONE + TYPE(outer), POINTER :: test1 + NULLIFY(test1) + END FUNCTION test1 + END MODULE mymod + + MODULE test + IMPLICIT NONE + CONTAINS + + SUBROUTINE test2(a) + USE mymod + USE types + IMPLICIT NONE + TYPE(outer), INTENT(INOUT) :: a + INTEGER :: i + i = a%inr(1)%i(1) + END SUBROUTINE test2 + + SUBROUTINE test3(a) + USE types + IMPLICIT NONE + TYPE(outer), INTENT(IN) :: a + END SUBROUTINE test3 + END MODULE test + ! { dg-final { cleanup-modules "types mymod test" } } diff -Nrcpad gcc-4.3.1/gcc/testsuite/gnat.dg/loop_optimization3.adb gcc-4.3.2/gcc/testsuite/gnat.dg/loop_optimization3.adb *** gcc-4.3.1/gcc/testsuite/gnat.dg/loop_optimization3.adb Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gnat.dg/loop_optimization3.adb Thu Jul 3 22:03:54 2008 *************** *** 0 **** --- 1,15 ---- + -- { dg-do run } + -- { dg-options "-O" } + + with Loop_Optimization3_Pkg; use Loop_Optimization3_Pkg; + + procedure Loop_Optimization3 is + + type Arr is array (Integer range -3 .. 3) of Integer; + C : constant Arr := (1, others => F(2)); + + begin + if C /= (1, 2, 2, 2, 2, 2, 2) then + raise Program_Error; + end if; + end; diff -Nrcpad gcc-4.3.1/gcc/testsuite/gnat.dg/loop_optimization3_pkg.adb gcc-4.3.2/gcc/testsuite/gnat.dg/loop_optimization3_pkg.adb *** gcc-4.3.1/gcc/testsuite/gnat.dg/loop_optimization3_pkg.adb Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gnat.dg/loop_optimization3_pkg.adb Thu Jul 3 22:03:54 2008 *************** *** 0 **** --- 1,8 ---- + package body Loop_Optimization3_Pkg is + + function F (n : Integer) return Integer is + begin + return n; + end; + + end Loop_Optimization3_Pkg; diff -Nrcpad gcc-4.3.1/gcc/testsuite/gnat.dg/loop_optimization3_pkg.ads gcc-4.3.2/gcc/testsuite/gnat.dg/loop_optimization3_pkg.ads *** gcc-4.3.1/gcc/testsuite/gnat.dg/loop_optimization3_pkg.ads Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gnat.dg/loop_optimization3_pkg.ads Thu Jul 3 22:03:54 2008 *************** *** 0 **** --- 1,5 ---- + package Loop_Optimization3_Pkg is + + function F (n : Integer) return Integer; + + end Loop_Optimization3_Pkg; diff -Nrcpad gcc-4.3.1/gcc/testsuite/gnat.dg/specs/pack3.ads gcc-4.3.2/gcc/testsuite/gnat.dg/specs/pack3.ads *** gcc-4.3.1/gcc/testsuite/gnat.dg/specs/pack3.ads Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gnat.dg/specs/pack3.ads Mon Jun 9 09:42:56 2008 *************** *** 0 **** --- 1,45 ---- + -- { dg-do compile } + + with Pack3_Pkg; + + package Pack3 is + + subtype N_TYPE is INTEGER range 0..5; + + type LIST_ARRAY is array (N_TYPE range <>) of INTEGER; + + type LIST (N : N_TYPE := 0) is record + LIST : LIST_ARRAY(1..N); + end record; + pragma PACK(LIST); + + subtype CS is STRING(1..Pack3_Pkg.F); + + type CSA is array (NATURAL range <>) of CS; + + type REC is record + I1, I2 : INTEGER; + end record ; + + type CMD is (CO, AS); + + type CMD_BLOCK_TYPE (D : CMD := CO) is record + N : CSA (1..4); + case D is + when CO => L : LIST; + when AS => R : REC; + end case ; + end record; + pragma PACK(CMD_BLOCK_TYPE); + + type CMD_TYPE is (RIGHT, WRONG); + + type CMD_RESULT (D : CMD_TYPE) is record + case D is + when RIGHT => C : CMD_BLOCK_TYPE; + when WRONG => null; + end case; + end record ; + pragma PACK(CMD_RESULT); + + end Pack3; diff -Nrcpad gcc-4.3.1/gcc/testsuite/gnat.dg/specs/pack3_pkg.ads gcc-4.3.2/gcc/testsuite/gnat.dg/specs/pack3_pkg.ads *** gcc-4.3.1/gcc/testsuite/gnat.dg/specs/pack3_pkg.ads Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gnat.dg/specs/pack3_pkg.ads Mon Jun 9 09:42:56 2008 *************** *** 0 **** --- 1,7 ---- + -- { dg-excess-errors "no code generated" } + + package Pack3_Pkg is + + function F return Integer; + + end Pack3_Pkg; diff -Nrcpad gcc-4.3.1/gcc/testsuite/gnat.dg/warn5.adb gcc-4.3.2/gcc/testsuite/gnat.dg/warn5.adb *** gcc-4.3.1/gcc/testsuite/gnat.dg/warn5.adb Thu Jan 1 00:00:00 1970 --- gcc-4.3.2/gcc/testsuite/gnat.dg/warn5.adb Tue Jun 24 18:15:56 2008 *************** *** 0 **** --- 1,34 ---- + -- { dg-do compile } + + with System; + with Unchecked_Conversion; + + procedure Warn5 is + + type Digit_Type is range 0..15; + + type Frequency_Type is array( 1..12) of Digit_Type; + pragma Pack(Frequency_Type); + + type Element_Type is record + F : Frequency_Type; + end record; + + type Array_Type is array (Natural range <>) of Element_Type; + + type List_Type is record + A : Array_Type (0..1); + end record; + for List_Type'Alignment use 4; + + type Pointer_Type is access Element_Type; + function To_Ptr is new Unchecked_Conversion(System.Address, Pointer_Type); + + function Pointer (Pos : Natural; List : List_Type) return Pointer_Type is + begin + return To_Ptr(List.A(Pos)'Address); -- { dg-warning "source alignment" "" { target alpha*-*-* hppa*-*-* ia64-*-* mips*-*-* sparc*-*-* } } + end; + + begin + null; + end; diff -Nrcpad gcc-4.3.1/gcc/testsuite/lib/compat.exp gcc-4.3.2/gcc/testsuite/lib/compat.exp *** gcc-4.3.1/gcc/testsuite/lib/compat.exp Wed Aug 1 16:25:11 2007 --- gcc-4.3.2/gcc/testsuite/lib/compat.exp Tue Jul 22 17:23:12 2008 *************** proc compat-execute { src1 sid use_alt } *** 275,280 **** --- 275,289 ---- set extra_flags_3 [compat-get-options $src3] set compile_xfail_3 $compiler_conditional_xfail_data + # On the SPU, most of the compat test cases exceed local store size. + # Use automatic overlay support to make them fit. + if { [check_effective_target_spu_auto_overlay] } { + set extra_flags_1 "$extra_flags_1 -Wl,--auto-overlay" + set extra_flags_1 "$extra_flags_1 -ffunction-sections" + set extra_flags_2 "$extra_flags_2 -ffunction-sections" + set extra_flags_3 "$extra_flags_3 -ffunction-sections" + } + # Define the names of the object files. regsub "sid" "sid_main_tst.o" $sid obj1 regsub "sid" "sid_x_tst.o" $sid obj2_tst diff -Nrcpad gcc-4.3.1/gcc/testsuite/lib/target-supports.exp gcc-4.3.2/gcc/testsuite/lib/target-supports.exp *** gcc-4.3.1/gcc/testsuite/lib/target-supports.exp Fri Mar 21 09:18:37 2008 --- gcc-4.3.2/gcc/testsuite/lib/target-supports.exp Fri Jul 25 15:51:03 2008 *************** proc check_effective_target_vect_cmdline *** 1084,1090 **** && [check_effective_target_lp64]) || ([istarget powerpc*-*-*] && ([check_effective_target_powerpc_spe] ! || [check_effective_target_powerpc_altivec]))} { set et_vect_cmdline_needed_saved 0 } } --- 1084,1091 ---- && [check_effective_target_lp64]) || ([istarget powerpc*-*-*] && ([check_effective_target_powerpc_spe] ! || [check_effective_target_powerpc_altivec])) ! || [istarget spu-*-*] } { set et_vect_cmdline_needed_saved 0 } } *************** proc check_effective_target_arm_neon_ok *** 1200,1205 **** --- 1201,1217 ---- } } + # Return 1 is this is an ARM target where -mthumb causes Thumb-1 to be + # used. + + proc check_effective_target_arm_thumb1_ok { } { + return [check_no_compiler_messages arm_thumb1_ok assembly { + #if !defined(__arm__) || !defined(__thumb__) || defined(__thumb2__) + #error FOO + #endif + } "-mthumb"] + } + # Return 1 if the target supports executing NEON instructions, 0 # otherwise. Cache the result. *************** proc check_effective_target_powerpc_fprs *** 1234,1239 **** --- 1246,1269 ---- } } + # Return 1 if this is a PowerPC target with hardware double-precision + # floating point. + + proc check_effective_target_powerpc_hard_double { } { + if { [istarget powerpc*-*-*] + || [istarget rs6000-*-*] } { + return [check_no_compiler_messages powerpc_hard_double object { + #ifdef _SOFT_DOUBLE + #error soft double + #else + int dummy; + #endif + }] + } else { + return 0 + } + } + # Return 1 if this is a PowerPC target supporting -maltivec. proc check_effective_target_powerpc_altivec_ok { } { *************** proc check_effective_target_powerpc_alti *** 1257,1263 **** # Return 1 if this is a PowerPC target that supports SPU. proc check_effective_target_powerpc_spu { } { ! return [istarget powerpc*-*-linux*] } # Return 1 if this is a PowerPC target with SPE enabled. --- 1287,1297 ---- # Return 1 if this is a PowerPC target that supports SPU. proc check_effective_target_powerpc_spu { } { ! if [istarget powerpc*-*-linux*] { ! return [check_effective_target_powerpc_altivec_ok] ! } else { ! return 0 ! } } # Return 1 if this is a PowerPC target with SPE enabled. *************** proc check_effective_target_powerpc_alti *** 1292,1297 **** --- 1326,1344 ---- } } + # Return 1 if this is a SPU target with a toolchain that + # supports automatic overlay generation. + + proc check_effective_target_spu_auto_overlay { } { + if { [istarget spu*-*-elf*] } { + return [check_no_compiler_messages spu_auto_overlay executable { + int main (void) { } + } "-Wl,--auto-overlay" ] + } else { + return 0 + } + } + # The VxWorks SPARC simulator accepts only EM_SPARC executables and # chokes on EM_SPARC32PLUS or EM_SPARCV9 executables. Return 1 if the # test environment appears to run executables on such a simulator. diff -Nrcpad gcc-4.3.1/gcc/testsuite/treelang/ChangeLog gcc-4.3.2/gcc/testsuite/treelang/ChangeLog *** gcc-4.3.1/gcc/testsuite/treelang/ChangeLog Fri Jun 6 14:28:37 2008 --- gcc-4.3.2/gcc/testsuite/treelang/ChangeLog Wed Aug 27 18:02:40 2008 *************** *** 1,3 **** --- 1,7 ---- + 2008-08-27 Release Manager + + * GCC 4.3.2 released. + 2008-06-06 Release Manager * GCC 4.3.1 released.