diff -Nrc3pad gcc-3.3/gcc/testsuite/ChangeLog gcc-3.3.1/gcc/testsuite/ChangeLog *** gcc-3.3/gcc/testsuite/ChangeLog 2003-05-14 00:10:28.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/ChangeLog 2003-08-04 12:49:15.000000000 +0000 *************** *** 1,3 **** --- 1,399 ---- + 2003-08-04 Release Manager + + * GCC 3.3.1 Released. + + 2003-08-04 Release Manager + + * GCC 3.3.1 Released. + + 2003-08-04 Mark Mitchell + + * g++.dg/overload/operator1.C: New test. + + 2003-07-24 Alexandre Oliva + + * g++.dg/init/enum2.C: New. + + 2003-07-24 Mark Mitchell + + * g++.dg/inherit/access5.C: New test. + + 2003-07-24 Kriang Lerdsuwanakij + + PR c++/11513 + * g++.dg/template/crash8.C: New test. + + 2003-07-23 Mark Mitchell + + PR c++/11645 + * g++.dg/inherit/access4.C: New test. + + 2003-07-23 Nathan Sidwell + + PR c++/11282 + * g++.dg/parse/crash7.C: New test. + + 2003-07-23 Mark Mitchell + + PR optimization/10679 + * g++.dg/opt/inline4.C: New test. + + 2003-07-21 Eric Botcazou + + PR optimization/11536 + * gcc.dg/20030721-1.c: New test. + + 2003-07-19 Mark Mitchell + + PR c++/11546 + * g++.dg/template/lookup1.C: New test. + + 2003-07-18 Eric Botcazou + + * g++.dg/opt/cfg1.C: New test. + + 2003-07-17 Mark Mitchell + + PR optimization/11557 + * gcc.dg/20030717-1.c: New test. + + 2003-07-15 Mark Mitchell + + PR debug/11473 + * g++.dg/debug/debug8.C: New test. + + 2003-07-15 Eric Botcazou + + * gcc.c-torture/execute/20030715-1.c: New test. + + 2003-07-14 Mark Mitchell + + PR c++/7053 + * g++.dg/template/friend20.C: New test. + + 2003-07-14 Franz Sirl + + PR optimization/11440 + * gcc.c-torture/execute/20030714-1.c: New test. + + 2003-07-14 Kriang Lerdsuwanakij + + PR c++/11154 + * g++.dg/template/partial2.C: New test. + + 2003-07-13 Mark Mitchell + + PR c++/11503 + * g++.dg/template/anon1.C: New test. + + 2003-07-13 Roger Sayle + + PR optimization/11059 + * g++.dg/opt/emptyunion.C: New testcase. + + 2003-07-11 Danny Smith + + Backport from mainline. + + 2003-05-21 Danny Smith + + PR c++/9738 + * g++.dg/ext/dllimport2.C: New file. + * g++.dg/ext/dllimport3.C: New file. + + 2003-07-04 Danny Smith + + PR c++/5287, PR c++/7910, PR c++/11021 + * testsuite/g++.dg/ext/dllimport1.C: Add mingw32 as target. Add + tests for warnings. + * g++.dg/ext/dllimport2.C: Add tests for warnings. + * g++.dg/ext/dllimport3.C: Likewise. + * g++.dg/ext/dllimport4.C: New file. + * g++.dg/ext/dllimport5.C: New file. + * g++.dg/ext/dllimport6.C: New file. + * g++.dg/ext/dllimport7.C: New file. + * g++.dg/ext/dllimport8.C: New file. + * g++.dg/ext/dllimport9.C: New file. + * g++.dg/ext/dllimport10.C: New file. + * g++.dg/ext/dllexport1.C: New file. + + 2003-07-11 Mark Mitchell + + PR c++/8164 + * g++.dg/template/nontype2.C: New test. + + PR c++/10558 + * g++.dg/parse/template8.C: New test. + + 2003-07-10 Mark Mitchell + + PR c++/10032 + * g++.dg/warn/pedantic1.C: New test. + + 2003-07-10 Kriang Lerdsuwanakij + + PR c++/10849 + * g++.dg/template/access12.C: New test. + + 2003-07-08 Jakub Jelinek + + PR c/11420 + * gcc.dg/20030707-1.c: New test. + + * g++.dg/opt/strength-reduce.C: New test. + + 2003-07-07 Richard Kenner + Eric Botcazou + + * g++.dg/opt/stack1.C: New test. + + 2003-07-06 Mark Mitchell + + PR c++/11345 + * g++.old-deja/g++.jason/access8.C: Reove error marker. + + 2003-07-05 Mark Mitchell + + PR c++/11431 + * g++.dg/expr/static_cast3.C: New test. + + 2003-07-03 Eric Botcazou + + * gcc.dg/i386-call-1.c: New test. + + 2003-07-03 Roger Sayle + + PR target/10700 + * gcc.c-torture/compile/20030703-1.c: New test case. + + 2003-07-03 Eric Botcazou + + * gcc.dg/i386-volatile-1.c: New test. + + 2003-07-01 Mark Mitchell + + PR c++/6949 + * g++.dg/template/local3.C: New test. + + 2003-06-30 Giovanni Bajo + + * g++.dg/other/error5.C: Change line number of expected error. + + 2003-07-01 Mark Mitchell + + PR c++/11137 + * g++.dg/init/attrib1.C: New test. + + PR c++/11149 + * g++.dg/lookup/scoped6.C: New test. + + 2003-07-01 Mark Mitchell + + PR c++/9559 + * g++.dg/init/static1.C: New test. + + 2003-06-30 Giovanni Bajo + + * g++.dg/other/error6.C: New test. + + 2003-06-30 Giovanni Bajo + + PR c++/11106 + * g++.dg/other/error5.C: New test. + + 2003-06-27 Mark Mitchell + + PR c++/10468 + * g++.dg/ext/typeof5.C: New test. + + 2003-06-27 Mark Mitchell + + PR c++/10796 + * g++.dg/init/enum1.C: New test. + + 2003-06-27 Ulrich Weigand + + * gcc.dg/20030627-1.c: New test. + + 2003-06-26 Mark Mitchell + + PR c++/11332 + * g++.dg/expr/static_cast2.C: New test. + + 2003-06-25 Mark Mitchell + + PR c++/10990 + * g++.dg/rtti/dyncast1.C: New test. + * g++.dg/abi/mangle4.C: Correct base-specifier access. + * g++.dg/lookup/scoped1.C: Remove XFAIL. + * g++.old-deja/g++.martin/pmf1.C: Correct base-specifier access. + + PR c++/10931 + * g++.dg/expr/static_cast1.C: New test. + + 2003-06-25 Richard Sandiford + + * gcc.c-torture/compile/20030625-1.c: New test. + + 2003-06-25 Josef Zlomek + + * gcc.dg/20030625-1.c: New test. + + 2003-06-24 Mark Mitchell + + PR c++/5754 + * g++.dg/parse/crash6.C: New test. + + 2003-06-23 Jakub Jelinek + + * g++.dg/opt/operator1.C: New test. + + 2003-06-21 Gabriel Dos Reis + + * g++.old-deja/g++.benjamin/16077.C: Add -Wconversion option. + * g++.old-deja/g++.other/conv7.C: Likewise + * g++.old-deja/g++.other/overcnv2.C: Likewise. + * g++.old-deja/g++.other/overload14.C: Likewise. + + 2003-06-21 Gabriel Dos Reis + + * g++.old-deja/g++.jason/conversion5.C: Adjust option. + * g++.old-deja/g++.bugs/900215_01.C: Likewise. + + 2003-06-20 Mark Mitchell + + PR c++/10888 + * g++.dg/warn/Winline-2.C: New test. + + PR c++/10845 + * g++.dg/template/member3.C: New test. + + 2003-06-19 Mark Mitchell + + PR c++/10939 + * g++.dg/template/func1.C: New test. + + PR c++/9649 + * g++.dg/template/static4.C: New test. + * g++.old-deja/g++.other/anon7.C: Remove spurious error messages. + + 2003-06-19 Mark Mitchell + + PR c++/11041 + * g++.dg/init/ref7.C: New test. + + 2003-06-19 Matt Austern + + PR c++/11228 + * g++.dg/anew1.C: New test. + * g++.dg/anew2.C: New test. + * g++.dg/anew3.C: New test. + * g++.dg/anew4.C: New test. + + 2003-06-19 Loren James Rittle + + * gcc.dg/cpp/redef3.c: New file. + + 2003-06-17 Mark Mitchell + + PR c++/10712 + * g++.dg/lookup/using3.C: New test. + + PR c++/11105 + * g++.dg/abi/conv1.C: Remove it. + * g++.dg/template/conv7.C: New test. + * g++.dg/template/conv8.C: Likewise. + * g++.old-deja/g++.ext/pretty2.C: Do not test __FUNCTION__ for a + conversion operator. + + 2003-06-13 Eric Botcazou + + * gcc.c-torture/execute/20030611-1.c: New test. + + 2003-06-12 Mark Mitchell + + PR c++/10635 + * g++.dg/expr/cast1.C: New test. + + 2003-06-10 Jakub Jelinek + + * gcc.dg/noreturn-1.c: Move noreturn warning line. + * gcc.dg/return-type-1.c: Move control reaches end warning line. + + 2003-06-10 Richard Henderson + + * gcc.dg/asm-7.c: Adjust expected warning text. + + 2003-06-08 Richard Henderson + + * gcc.dg/20011029-2.c: Fix the array reference. + * gcc.dg/asm-7.c: New. + + 2003-06-08 Kriang Lerdsuwanakij + + PR c++/11039 + * g++.dg/warn/implicit-typename2.C: New test. + * g++.dg/warn/implicit-typename3.C: New test. + + 2003-06-04 Richard Henderson + + * gcc.dg/cleanup-1.c: New. + * gcc.dg/cleanup-2.c: New. + * gcc.dg/cleanup-3.c: New. + * gcc.dg/cleanup-4.c: New. + * gcc.dg/cleanup-5.c: New. + * gcc.dg/cleanup-6.c: New. + * gcc.dg/cleanup-7.c: New. + + 2003-06-04 Eric Botcazou + + * gcc.dg/ultrasp9.c: New test. + + 2003-06-04 Eric Botcazou + + * gcc.c-torture/compile/20030604-1.c: New test. + * gcc.dg/sparc-constant-1.c: New test. + + 2003-06-03 Kriang Lerdsuwanakij + + PR c++/10940 + * g++.dg/template/spec10.C: New test. + + 2003-06-01 Eric Botcazou + + * gcc.dg/i386-loop-3.c: New test. + + 2003-05-31 Kriang Lerdsuwanakij + + PR c++/10956 + * g++.dg/template/spec9.C: New test. + + 2003-05-25 Kriang Lerdsuwanakij + + PR c++/10849 + * g++.dg/template/access10.C: New test. + + 2003-05-24 Eric Botcazou + Kaveh R. Ghazi + + * gcc.c-torture/compile/simd-5.x: XFAIL on SPARC64. + + 2003-05-23 Kriang Lerdsuwanakij + + PR c++/10682 + * g++.dg/template/instantiate4.C: New test. + + 2003-05-16 Matthias Klose + + * parse/crash2.C: Use "(parse|syntax)" error. + + Backport from mainline + + 2003-03-17 Zack Weinberg + + * objc.dg/naming-1.m: Use "(parse|syntax)" error. + * objc.dg/naming-2.m: Likewise. + 2003-05-13 Release Manager * GCC 3.3 Released. diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.c-torture/compile/20030604-1.c gcc-3.3.1/gcc/testsuite/gcc.c-torture/compile/20030604-1.c *** gcc-3.3/gcc/testsuite/gcc.c-torture/compile/20030604-1.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.c-torture/compile/20030604-1.c 2003-06-04 07:05:04.000000000 +0000 *************** *** 0 **** --- 1,18 ---- + /* PR optimization/10876 */ + /* Contributed by Christian Ehrhardt */ + + /* Verify that the SPARC port doesn't emit + (minus) (reg) (const_int) insns. */ + + void f(void) + { + unsigned int butterfly, block, offset; + double *Z; + + for (block = 0; block < 512; block += 512) { + double T1re, T2re; + offset = butterfly + block; + T1re += T2re; + T2re = Z[offset] + T1re; + } + } diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.c-torture/compile/20030625-1.c gcc-3.3.1/gcc/testsuite/gcc.c-torture/compile/20030625-1.c *** gcc-3.3/gcc/testsuite/gcc.c-torture/compile/20030625-1.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.c-torture/compile/20030625-1.c 2003-06-25 06:50:57.000000000 +0000 *************** *** 0 **** --- 1 ---- + void foo (const char *s, ...) { bar (&s); } diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.c-torture/compile/20030703-1.c gcc-3.3.1/gcc/testsuite/gcc.c-torture/compile/20030703-1.c *** gcc-3.3/gcc/testsuite/gcc.c-torture/compile/20030703-1.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.c-torture/compile/20030703-1.c 2003-07-03 13:18:08.000000000 +0000 *************** *** 0 **** --- 1,10 ---- + /* Extracted from PR target/10700. */ + /* The following code used to cause an ICE on 64-bit targets. */ + + int SAD_Block(int *); + void MBMotionEstimation(int *act_block, int block) + { + SAD_Block(act_block + ( (8 * (block == 1 || block == 3)) + + (8 * (block == 2 || block == 3)))); + } + diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.c-torture/compile/simd-5.x gcc-3.3.1/gcc/testsuite/gcc.c-torture/compile/simd-5.x *** gcc-3.3/gcc/testsuite/gcc.c-torture/compile/simd-5.x 2003-03-26 23:18:32.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.c-torture/compile/simd-5.x 2003-05-24 11:55:35.000000000 +0000 *************** if { [istarget "h8300-*-*"] } { *** 3,15 **** return 1; } ! # PowerPC-64 doesn't handle this; see PR target/9680 ! set torture_eval_before_compile { ! set compiler_conditional_xfail_data { ! "PR target/9680" \ ! "powerpc64-*-*" \ ! { "*" } \ ! { "" } } } --- 3,40 ---- return 1; } ! if { [istarget "sparc64-*-*"] || [istarget "sparcv9-*-*"] } { ! # On SPARC64/SPARC-V9 it fails, except with -m32. ! set torture_eval_before_compile { ! global compiler_conditional_xfail_data ! set compiler_conditional_xfail_data { ! "PR target/9200" \ ! { "*-*-*" } \ ! { "*" } \ ! { "-m32" } ! } ! } ! } elseif { [istarget "sparc-*-*"] } { ! # On regular SPARC it doesn't fail, except with -m64. ! set torture_eval_before_compile { ! global compiler_conditional_xfail_data ! set compiler_conditional_xfail_data { ! "PR target/9200" \ ! { "*-*-*" } \ ! { "-m64" } \ ! { "" } ! } ! } ! } elseif { [istarget "powerpc64-*-*"] } { ! # On PowerPC-64 it fails unconditionally. ! set torture_eval_before_compile { ! global compiler_conditional_xfail_data ! set compiler_conditional_xfail_data { ! "PR target/9680" \ ! "*-*-*" \ ! { "*" } \ ! { "" } ! } } } diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.c-torture/execute/20030613-1.c gcc-3.3.1/gcc/testsuite/gcc.c-torture/execute/20030613-1.c *** gcc-3.3/gcc/testsuite/gcc.c-torture/execute/20030613-1.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.c-torture/execute/20030613-1.c 2003-06-13 03:45:32.000000000 +0000 *************** *** 0 **** --- 1,62 ---- + /* PR optimization/10955 */ + /* Originator: */ + + /* This used to fail on SPARC32 at -O3 because the loop unroller + wrongly thought it could eliminate a pseudo in a loop, while + the pseudo was used outside the loop. */ + + extern void abort(void); + + #define COMPLEX struct CS + + COMPLEX { + long x; + long y; + }; + + + static COMPLEX CCID (COMPLEX x) + { + COMPLEX a; + + a.x = x.x; + a.y = x.y; + + return a; + } + + + static COMPLEX CPOW (COMPLEX x, int y) + { + COMPLEX a; + a = x; + + while (--y > 0) + a=CCID(a); + + return a; + } + + + static int c5p (COMPLEX x) + { + COMPLEX a,b; + a = CPOW (x, 2); + b = CCID( CPOW(a,2) ); + + return (b.x == b.y); + } + + + int main (void) + { + COMPLEX x; + + x.x = -7; + x.y = -7; + + if (!c5p(x)) + abort(); + + return 0; + } diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.c-torture/execute/20030714-1.c gcc-3.3.1/gcc/testsuite/gcc.c-torture/execute/20030714-1.c *** gcc-3.3/gcc/testsuite/gcc.c-torture/execute/20030714-1.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.c-torture/execute/20030714-1.c 2003-07-14 16:04:41.000000000 +0000 *************** *** 0 **** --- 1,193 ---- + /* derived from PR optimization/11440 */ + + extern void abort (void); + extern void exit (int); + + typedef _Bool bool; + const bool false = 0; + const bool true = 1; + + enum EPosition + { + STATIC, RELATIVE, ABSOLUTE, FIXED + }; + typedef enum EPosition EPosition; + + enum EFloat + { + FNONE = 0, FLEFT, FRIGHT + }; + typedef enum EFloat EFloat; + + struct RenderBox + { + int unused[6]; + short m_verticalPosition; + + bool m_layouted : 1; + bool m_unused : 1; + bool m_minMaxKnown : 1; + bool m_floating : 1; + + bool m_positioned : 1; + bool m_overhangingContents : 1; + bool m_relPositioned : 1; + bool m_paintSpecial : 1; + + bool m_isAnonymous : 1; + bool m_recalcMinMax : 1; + bool m_isText : 1; + bool m_inline : 1; + + bool m_replaced : 1; + bool m_mouseInside : 1; + bool m_hasFirstLine : 1; + bool m_isSelectionBorder : 1; + + bool (*isTableCell) (struct RenderBox *this); + }; + + typedef struct RenderBox RenderBox; + + struct RenderStyle + { + struct NonInheritedFlags + { + union + { + struct + { + unsigned int _display : 4; + unsigned int _bg_repeat : 2; + bool _bg_attachment : 1; + unsigned int _overflow : 4 ; + unsigned int _vertical_align : 4; + unsigned int _clear : 2; + EPosition _position : 2; + EFloat _floating : 2; + unsigned int _table_layout : 1; + bool _flowAroundFloats :1; + + unsigned int _styleType : 3; + bool _hasHover : 1; + bool _hasActive : 1; + bool _clipSpecified : 1; + unsigned int _unicodeBidi : 2; + int _unused : 1; + } f; + int _niflags; + }; + } noninherited_flags; + }; + + typedef struct RenderStyle RenderStyle; + + extern void RenderObject_setStyle(RenderBox *this, RenderStyle *_style); + extern void removeFromSpecialObjects(RenderBox *this); + + + + void RenderBox_setStyle(RenderBox *thisin, RenderStyle *_style) + { + RenderBox *this = thisin; + bool oldpos, tmp; + EPosition tmppo; + + tmp = this->m_positioned; + + oldpos = tmp; + + RenderObject_setStyle(this, _style); + + tmppo = _style->noninherited_flags.f._position; + + switch(tmppo) + { + case ABSOLUTE: + case FIXED: + { + bool ltrue = true; + this->m_positioned = ltrue; + break; + } + + default: + { + EFloat tmpf; + EPosition tmpp; + if (oldpos) + { + bool ltrue = true; + this->m_positioned = ltrue; + removeFromSpecialObjects(this); + } + { + bool lfalse = false; + this->m_positioned = lfalse; + } + + tmpf = _style->noninherited_flags.f._floating; + + if(!this->isTableCell (this) && !(tmpf == FNONE)) + { + bool ltrue = true; + this->m_floating = ltrue; + } + else + { + tmpp = _style->noninherited_flags.f._position; + if (tmpp == RELATIVE) + { + bool ltrue = true; + this->m_relPositioned = ltrue; + } + } + } + } + } + + + + + RenderBox g_this; + RenderStyle g__style; + + void RenderObject_setStyle(RenderBox *this, RenderStyle *_style) + { + (void) this; + (void) _style; + } + + void removeFromSpecialObjects(RenderBox *this) + { + (void) this; + } + + bool RenderBox_isTableCell (RenderBox *this) + { + (void) this; + return false; + } + + int main (void) + { + + g_this.m_relPositioned = false; + g_this.m_positioned = false; + g_this.m_floating = false; + g_this.isTableCell = RenderBox_isTableCell; + + g__style.noninherited_flags.f._position = FIXED; + g__style.noninherited_flags.f._floating = FNONE; + + RenderBox_setStyle (&g_this, &g__style); + + if (g_this.m_positioned != true) + abort (); + if (g_this.m_relPositioned != false) + abort (); + if (g_this.m_floating != false) + abort (); + + exit (0); + } diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.c-torture/execute/20030715-1.c gcc-3.3.1/gcc/testsuite/gcc.c-torture/execute/20030715-1.c *** gcc-3.3/gcc/testsuite/gcc.c-torture/execute/20030715-1.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.c-torture/execute/20030715-1.c 2003-07-15 13:09:15.000000000 +0000 *************** *** 0 **** --- 1,35 ---- + /* PR optimization/11320 */ + /* Origin: Andreas Schwab */ + + /* Verify that the scheduler correctly computes the dependencies + in the presence of conditional instructions. */ + + int strcmp (const char *, const char *); + int ap_standalone; + + const char *ap_check_cmd_context (void *a, int b) + { + return 0; + } + + const char *server_type (void *a, void *b, char *arg) + { + const char *err = ap_check_cmd_context (a, 0x01|0x02|0x04|0x08|0x10); + if (err) + return err; + + if (!strcmp (arg, "inetd")) + ap_standalone = 0; + else if (!strcmp (arg, "standalone")) + ap_standalone = 1; + else + return "ServerType must be either 'inetd' or 'standalone'"; + + return 0; + } + + int main () + { + server_type (0, 0, "standalone"); + return 0; + } diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.dg/20011029-2.c gcc-3.3.1/gcc/testsuite/gcc.dg/20011029-2.c *** gcc-3.3/gcc/testsuite/gcc.dg/20011029-2.c 2002-02-06 20:40:17.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.dg/20011029-2.c 2003-06-09 03:28:29.000000000 +0000 *************** int foo (int s) *** 16,22 **** continue; else if (({ register char r; __asm__ __volatile__ ("" : "=q" (r) ! : "r" (0), "m" (a) : "cc"); r; })) continue; } --- 16,22 ---- continue; else if (({ register char r; __asm__ __volatile__ ("" : "=q" (r) ! : "r" (0), "m" (a[0]) : "cc"); r; })) continue; } diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.dg/20030625-1.c gcc-3.3.1/gcc/testsuite/gcc.dg/20030625-1.c *** gcc-3.3/gcc/testsuite/gcc.dg/20030625-1.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.dg/20030625-1.c 2003-06-25 06:31:07.000000000 +0000 *************** *** 0 **** --- 1,9 ---- + /* Testcase from http://gcc.gnu.org/ml/gcc-patches/2003-06/msg02557.html */ + /* { dg-do compile } */ + /* { dg-options "-g" } */ + + typedef struct _foo foo; + struct _foo { + struct _moo moo; /* { dg-error "moo" "has incomplete type" } */ + }; + diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.dg/20030627-1.c gcc-3.3.1/gcc/testsuite/gcc.dg/20030627-1.c *** gcc-3.3/gcc/testsuite/gcc.dg/20030627-1.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.dg/20030627-1.c 2003-06-27 21:15:40.000000000 +0000 *************** *** 0 **** --- 1,20 ---- + /* This tests whether non-offsettable memory operands are reloaded + correctly in certain corner cases on s390 targets. */ + /* { dg-do compile } */ + /* { dg-options "-std=gnu89" } */ + + void test_inout (char *bd, int xd, char *bs, int xs) + { + *(long long *)(bd + xd + 4093) = *(long long *)(bs + xs + 4093); + } + + void test_in (char *bd, int xd, char *bs, int xs) + { + *(long long *)(bd + xd) = *(long long *)(bs + xs + 4093); + } + + void test_out (char *bd, int xd, char *bs, int xs) + { + *(long long *)(bd + xd + 4093) = *(long long *)(bs + xs); + } + diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.dg/20030708-1.c gcc-3.3.1/gcc/testsuite/gcc.dg/20030708-1.c *** gcc-3.3/gcc/testsuite/gcc.dg/20030708-1.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.dg/20030708-1.c 2003-07-08 19:16:45.000000000 +0000 *************** *** 0 **** --- 1,14 ---- + /* PR c/11420 */ + /* { dg-do link } */ + /* { dg-options "-O2 -fpic" } */ + + void (* volatile fn) (void); + static void foo (void) + { + } + + int main (void) + { + fn = foo; + return 0; + } diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.dg/20030717-1.c gcc-3.3.1/gcc/testsuite/gcc.dg/20030717-1.c *** gcc-3.3/gcc/testsuite/gcc.dg/20030717-1.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.dg/20030717-1.c 2003-07-18 02:58:29.000000000 +0000 *************** *** 0 **** --- 1,24 ---- + /* { dg-do run } */ + /* { dg-options "-O2" } */ + + extern void abort (void); + + int zero (void) + { + return 0; + } + + int one (void) + { + return 1; + } + + int main (void) + { + int i = 1; + int r = (i ? one : zero)(); + if (r != 1) + abort(); + return 0; + } + diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.dg/20030721-1.c gcc-3.3.1/gcc/testsuite/gcc.dg/20030721-1.c *** gcc-3.3/gcc/testsuite/gcc.dg/20030721-1.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.dg/20030721-1.c 2003-07-21 17:50:05.000000000 +0000 *************** *** 0 **** --- 1,41 ---- + /* { dg-options "-O2" } */ + /* PR optimization/11536 */ + /* Origin: samal@kam.mff.cuni.cz */ + /* Testcase by Andrew Pinski */ + + /* Verify that the loop optimizer doesn't use moving targets + to calculate the number of iterations of a loop. */ + + extern void abort(void); + + void foo(int) __attribute__((__noinline__)); + + void foo(int i) + { + abort(); + } + + int main() + { + int i; + int first= 0; + int last= 0; + + while (last<3) { + last = first; + + while (first<=last) { + first++; + + for (i=0;i<3;i++) + last++; + + if (last>10) + return 0; + } + + foo(first); + } + + return 0; + } diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.dg/asm-7.c gcc-3.3.1/gcc/testsuite/gcc.dg/asm-7.c *** gcc-3.3/gcc/testsuite/gcc.dg/asm-7.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.dg/asm-7.c 2003-06-12 01:05:48.000000000 +0000 *************** *** 0 **** --- 1,28 ---- + /* Gcc 3.3.1 deprecates memory inputs of non-lvalues. */ + /* { dg-do compile } */ + + void test(void) + { + register int r; + register int r2; + int i; + static int m; + int *p; + + __asm__ ("" : : "m"(r)); /* { dg-warning "address of register" } */ + __asm__ ("" : : "m"(i)); + __asm__ ("" : : "m"(m)); + __asm__ ("" : : "m"(0)); /* { dg-warning "input without lvalue" } */ + __asm__ ("" : : "m"(i+1)); /* { dg-warning "input without lvalue" } */ + __asm__ ("" : : "m"(*p++)); + + __asm__ ("" : : "g"(r)); + __asm__ ("" : : "g"(i)); + __asm__ ("" : : "g"(m)); + __asm__ ("" : : "g"(0)); + __asm__ ("" : : "g"(i+1)); + + __asm__ ("" : "=m"(r2)); /* { dg-warning "address of register" } */ + __asm__ ("" : "=m"(i)); + __asm__ ("" : "=m"(m)); + } diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.dg/cleanup-1.c gcc-3.3.1/gcc/testsuite/gcc.dg/cleanup-1.c *** gcc-3.3/gcc/testsuite/gcc.dg/cleanup-1.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.dg/cleanup-1.c 2003-06-04 16:56:13.000000000 +0000 *************** *** 0 **** --- 1,36 ---- + /* { dg-do compile } */ + /* { dg-options "-Wall" } */ + /* Validate expected warnings and errors. */ + + #define U __attribute__((unused)) + #define C(x) __attribute__((cleanup(x))) + + static int f1(void *x U) { return 0; } + static void f2() { } + static void f3(void) { } + static void f4(void *x U) { } + static void f5(int *x U) { } + static void f6(double *x U) { } + static void f7(const int *x U) { } + static void f8(const int *x U, int y U) { } + static void f9(int x U) { } + + void test(void) + { + int o1 C(f1); + int o2 C(f2); + int o3 C(f3); /* { dg-error "too many arguments" } */ + int o4 C(f4); + int o5 C(f5); + int o6 C(f6); /* { dg-warning "incompatible pointer type" } */ + int o7 C(f7); + int o8 C(f8); /* { dg-error "too few arguments" } */ + int o9 C(f9); /* { dg-warning "from pointer without a cast" } */ + int o10 U C(undef); /* { dg-error "not a function" } */ + int o11 U C(o1); /* { dg-error "not a function" } */ + int o12 U C("f1"); /* { dg-error "not an identifier" } */ + static int o13 U C(f1); /* { dg-warning "attribute ignored" } */ + } + + int o14 C(f1); /* { dg-warning "attribute ignored" } */ + void t15(int o U C(f1)) {} /* { dg-warning "attribute ignored" } */ diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.dg/cleanup-2.c gcc-3.3.1/gcc/testsuite/gcc.dg/cleanup-2.c *** gcc-3.3/gcc/testsuite/gcc.dg/cleanup-2.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.dg/cleanup-2.c 2003-06-04 16:56:13.000000000 +0000 *************** *** 0 **** --- 1,22 ---- + /* { dg-do run } */ + /* { dg-options "" } */ + /* Verify that cleanup works in the most basic of ways. */ + + extern void exit(int); + extern void abort(void); + + static void handler(void *p __attribute__((unused))) + { + exit (0); + } + + static void doit(void) + { + int x __attribute__((cleanup (handler))); + } + + int main() + { + doit (); + abort (); + } diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.dg/cleanup-3.c gcc-3.3.1/gcc/testsuite/gcc.dg/cleanup-3.c *** gcc-3.3/gcc/testsuite/gcc.dg/cleanup-3.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.dg/cleanup-3.c 2003-06-04 16:56:13.000000000 +0000 *************** *** 0 **** --- 1,45 ---- + /* { dg-do run } */ + /* { dg-options "" } */ + /* Verify that the cleanup handler receives the proper contents + of the variable. */ + + extern void exit(int); + extern void abort(void); + + static int expected; + + static void + handler(int *p) + { + if (*p != expected) + abort (); + } + + static void __attribute__((noinline)) + bar(void) + { + } + + static void doit(int x, int y) + { + int r __attribute__((cleanup (handler))); + if (x < y) + { + r = 0; + return; + } + + bar(); + r = x + y; + } + + int main() + { + expected = 0; + doit (1, 2); + + expected = 3; + doit (2, 1); + + return 0; + } diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.dg/cleanup-4.c gcc-3.3.1/gcc/testsuite/gcc.dg/cleanup-4.c *** gcc-3.3/gcc/testsuite/gcc.dg/cleanup-4.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.dg/cleanup-4.c 2003-06-04 16:56:13.000000000 +0000 *************** *** 0 **** --- 1,39 ---- + /* { dg-do run } */ + /* { dg-options "" } */ + /* Verify cleanup execution on non-trivial exit from a block. */ + + extern void exit(int); + extern void abort(void); + + static int counter; + + static void + handler(int *p) + { + counter += *p; + } + + static void __attribute__((noinline)) + bar(void) + { + } + + static void doit(int n, int n2) + { + int i; + for (i = 0; i < n; ++i) + { + int dummy __attribute__((cleanup (handler))) = i; + if (i == n2) + break; + bar(); + } + } + + int main() + { + doit (10, 6); + if (counter != 0 + 1 + 2 + 3 + 4 + 5 + 6) + abort (); + return 0; + } diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.dg/cleanup-5.c gcc-3.3.1/gcc/testsuite/gcc.dg/cleanup-5.c *** gcc-3.3/gcc/testsuite/gcc.dg/cleanup-5.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.dg/cleanup-5.c 2003-06-04 16:56:13.000000000 +0000 *************** *** 0 **** --- 1,50 ---- + /* { dg-do run } */ + /* { dg-options "-fexceptions" } */ + /* Verify that cleanups work with exception handling. */ + + #include + #include + + static _Unwind_Reason_Code + force_unwind_stop (int version, _Unwind_Action actions, + _Unwind_Exception_Class exc_class, + struct _Unwind_Exception *exc_obj, + struct _Unwind_Context *context, + void *stop_parameter) + { + if (actions & _UA_END_OF_STACK) + abort (); + return _URC_NO_REASON; + } + + static void force_unwind () + { + struct _Unwind_Exception *exc = malloc (sizeof (*exc)); + exc->exception_class = 0; + exc->exception_cleanup = 0; + + #ifndef __USING_SJLJ_EXCEPTIONS__ + _Unwind_ForcedUnwind (exc, force_unwind_stop, 0); + #else + _Unwind_SjLj_ForcedUnwind (exc, force_unwind_stop, 0); + #endif + + abort (); + } + + static void handler (void *p __attribute__((unused))) + { + exit (0); + } + + static void doit () + { + char dummy __attribute__((cleanup (handler))); + force_unwind (); + } + + int main() + { + doit (); + abort (); + } diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.dg/cleanup-6.c gcc-3.3.1/gcc/testsuite/gcc.dg/cleanup-6.c *** gcc-3.3/gcc/testsuite/gcc.dg/cleanup-6.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.dg/cleanup-6.c 2003-06-04 16:56:13.000000000 +0000 *************** *** 0 **** --- 1,14 ---- + /* { dg-do compile } */ + /* { dg-options "-O" } */ + /* Verify that a cleanup marked "inline" gets inlined. */ + + static inline void xyzzy(void *p __attribute__((unused))) + { + } + + void doit(void) + { + int x __attribute__((cleanup (xyzzy))); + } + + /* { dg-final { scan-assembler-not "xyzzy" } } */ diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.dg/cleanup-7.c gcc-3.3.1/gcc/testsuite/gcc.dg/cleanup-7.c *** gcc-3.3/gcc/testsuite/gcc.dg/cleanup-7.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.dg/cleanup-7.c 2003-06-04 16:56:13.000000000 +0000 *************** *** 0 **** --- 1,22 ---- + /* { dg-do run } */ + /* { dg-options "" } */ + /* Verify that the search for function happens in the proper scope. */ + + extern void exit(int); + extern void abort(void); + + int main() + { + auto void xyzzy(void *p __attribute__((unused))) + { + exit (0); + } + + auto void doit () + { + int x __attribute__((cleanup (xyzzy))); + } + + doit (); + abort (); + } diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.dg/cpp/redef3.c gcc-3.3.1/gcc/testsuite/gcc.dg/cpp/redef3.c *** gcc-3.3/gcc/testsuite/gcc.dg/cpp/redef3.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.dg/cpp/redef3.c 2003-06-19 05:40:33.000000000 +0000 *************** *** 0 **** --- 1,21 ---- + /* Test for redefining macros with mismatch token count (and the oddity). */ + + /* { dg-do preprocess } */ + /* { dg-options "-DC -DD=1 -DE" } */ + + #define A + #define A 1 + #define B 2 3 + #define B 2 + #define C 1 + #define D 1 2 + #define E + + /* { dg-warning "redefined" "redef A" { target *-*-* } 7 } + { dg-warning "redefined" "redef B" { target *-*-* } 9 } + { dg-warning "redefined" "redef D" { target *-*-* } 11 } + { dg-warning "redefined" "redef E" { target *-*-* } 12 } + { dg-warning "previous" "prev def A" { target *-*-* } 6 } + { dg-warning "previous" "prev def B" { target *-*-* } 8 } + { dg-warning "previous" "prev def D/E" { target *-*-* } 0 } + */ diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.dg/i386-call-1.c gcc-3.3.1/gcc/testsuite/gcc.dg/i386-call-1.c *** gcc-3.3/gcc/testsuite/gcc.dg/i386-call-1.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.dg/i386-call-1.c 2003-07-03 18:04:30.000000000 +0000 *************** *** 0 **** --- 1,39 ---- + /* PR optimization/11304 */ + /* Originator: */ + /* { dg-do run { target i?86-*-* } } */ + /* { dg-options "-O -fomit-frame-pointer" } */ + + /* Verify that %eax is always restored after a call. */ + + extern void abort(void); + + volatile int r; + + void set_eax(int val) + { + __asm__ __volatile__ ("mov %0, %%eax" : : "m" (val)); + } + + void foo(int val) + { + r = val; + } + + int bar(int x) + { + if (x) + { + set_eax(0); + return x; + } + + foo(x); + } + + int main(void) + { + if (bar(1) != 1) + abort(); + + return 0; + } diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.dg/i386-loop-3.c gcc-3.3.1/gcc/testsuite/gcc.dg/i386-loop-3.c *** gcc-3.3/gcc/testsuite/gcc.dg/i386-loop-3.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.dg/i386-loop-3.c 2003-06-01 16:15:10.000000000 +0000 *************** *** 0 **** --- 1,76 ---- + /* PR target/11044 */ + /* Originator: Tim McGrath */ + /* Testcase contributed by Eric Botcazou */ + /* { dg-do run { target i?86-*-* } } */ + /* { dg-options "-mcpu=k6 -O3 -ffast-math -funroll-loops" } */ + + typedef struct + { + unsigned char colormod; + } entity_state_t; + + typedef struct + { + int num_entities; + entity_state_t *entities; + } packet_entities_t; + + typedef struct + { + double senttime; + float ping_time; + packet_entities_t entities; + } client_frame_t; + + typedef enum + { + cs_free, + cs_server, + cs_zombie, + cs_connected, + cs_spawned + } sv_client_state_t; + + typedef struct client_s + { + sv_client_state_t state; + int ping; + client_frame_t frames[64]; + } client_t; + + int CalcPing (client_t *cl) + { + float ping; + int count, i; + register client_frame_t *frame; + + if (cl->state == cs_server) + return cl->ping; + ping = 0; + count = 0; + for (frame = cl->frames, i = 0; i < 64; i++, frame++) { + if (frame->ping_time > 0) { + ping += frame->ping_time; + count++; + } + } + if (!count) + return 9999; + ping /= count; + + return ping * 1000; + } + + int main(void) + { + client_t cl; + + memset(&cl, 0, sizeof(cl)); + + cl.frames[0].ping_time = 1.0f; + + if (CalcPing(&cl) != 1000) + abort(); + + return 0; + } diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.dg/i386-sse-4.c gcc-3.3.1/gcc/testsuite/gcc.dg/i386-sse-4.c *** gcc-3.3/gcc/testsuite/gcc.dg/i386-sse-4.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.dg/i386-sse-4.c 2003-06-13 06:14:43.000000000 +0000 *************** *** 0 **** --- 1,27 ---- + /* { dg-do compile { target i?86-*-* x86_64-*-* } } */ + /* { dg-options "-O0 -msse" } */ + + typedef void __vr __attribute__ ((__mode__ (__V4SF__))); + + struct vector + { + union + { + __vr v; + float f[4]; + }; + }; + + void + doit () + { + float f[4]; + struct vector v; + + f[0] = 0; + f[1] = 1; + f[2] = 2; + f[3] = 3; + + v.v = __builtin_ia32_loadups (f); + } diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.dg/i386-volatile-1.c gcc-3.3.1/gcc/testsuite/gcc.dg/i386-volatile-1.c *** gcc-3.3/gcc/testsuite/gcc.dg/i386-volatile-1.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.dg/i386-volatile-1.c 2003-07-03 07:38:29.000000000 +0000 *************** *** 0 **** --- 1,14 ---- + /* PR optimization/11381 */ + /* Originator: */ + /* { dg-do compile { target i?86-*-* } } */ + /* { dg-options "-O" } */ + + /* Verify that the comparison is not optimized away. */ + + void foo(volatile unsigned int *vaddr) + { + while (*vaddr != *vaddr) + ; + } + + /* { dg-final { scan-assembler "cmp" } } */ diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.dg/noreturn-1.c gcc-3.3.1/gcc/testsuite/gcc.dg/noreturn-1.c *** gcc-3.3/gcc/testsuite/gcc.dg/noreturn-1.c 2000-06-03 01:53:57.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.dg/noreturn-1.c 2003-06-12 14:38:15.000000000 +0000 *************** extern void exit (int); *** 7,14 **** extern void foo1(void) __attribute__ ((__noreturn__)); void foo1(void) ! { ! } /* { dg-warning "`noreturn' function does return" "detect falling off end of noreturn" } */ extern void foo2(void) __attribute__ ((__noreturn__)); void --- 7,14 ---- extern void foo1(void) __attribute__ ((__noreturn__)); void foo1(void) ! { /* { dg-warning "`noreturn' function does return" "detect falling off end of noreturn" } */ ! } extern void foo2(void) __attribute__ ((__noreturn__)); void diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.dg/return-type-1.c gcc-3.3.1/gcc/testsuite/gcc.dg/return-type-1.c *** gcc-3.3/gcc/testsuite/gcc.dg/return-type-1.c 2000-10-07 22:42:11.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.dg/return-type-1.c 2003-06-12 14:38:15.000000000 +0000 *************** *** 5,9 **** /* { dg-options "-O -Wreturn-type" } */ int foo(void) ! { ! } /* { dg-warning "control reaches end of non-void function" "warning for falling off end of non-void function" } */ --- 5,9 ---- /* { dg-options "-O -Wreturn-type" } */ int foo(void) ! { /* { dg-warning "control reaches end of non-void function" "warning for falling off end of non-void function" } */ ! } diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.dg/sparc-constant-1.c gcc-3.3.1/gcc/testsuite/gcc.dg/sparc-constant-1.c *** gcc-3.3/gcc/testsuite/gcc.dg/sparc-constant-1.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.dg/sparc-constant-1.c 2003-06-04 07:05:04.000000000 +0000 *************** *** 0 **** --- 1,12 ---- + /* PR optimization/10876 */ + /* { dg-do compile { target sparc*-*-* } } */ + + /* Verify that adding the constant 4096 is turned + into substracting the constant -4096. */ + + int foo(int a) + { + return a+4096; + } + + /* { dg-final { scan-assembler "sub" } } */ diff -Nrc3pad gcc-3.3/gcc/testsuite/gcc.dg/ultrasp9.c gcc-3.3.1/gcc/testsuite/gcc.dg/ultrasp9.c *** gcc-3.3/gcc/testsuite/gcc.dg/ultrasp9.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/gcc.dg/ultrasp9.c 2003-06-04 07:19:08.000000000 +0000 *************** *** 0 **** --- 1,39 ---- + /* PR optimization/11018 */ + /* Originator: */ + /* { dg-do run { target sparc*-*-* } } */ + /* { dg-options "-O2 -mcpu=ultrasparc" } */ + + /* This used to fail on 32-bit Ultrasparc because + of broken DImode shift patterns. */ + + extern void abort(void); + + typedef unsigned long long uint64_t; + typedef unsigned int size_t; + + + void to_octal (uint64_t value, char *where, size_t size) + { + uint64_t v = value; + size_t i = size; + + do + { + where[--i] = '0' + (v & ((1 << 3) - 1)); + v >>= 3; + } + while (i); + } + + + int main (void) + { + char buf[8]; + + to_octal(010644, buf, 6); + + if (buf[1] != '1') + abort(); + + return 0; + } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/abi/mangle4.C gcc-3.3.1/gcc/testsuite/g++.dg/abi/mangle4.C *** gcc-3.3/gcc/testsuite/g++.dg/abi/mangle4.C 2001-11-18 06:24:45.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/abi/mangle4.C 2003-06-26 01:05:43.000000000 +0000 *************** *** 2,8 **** // { dg-do compile } class A {}; ! class B : A {}; template class C {}; template class D {}; --- 2,8 ---- // { dg-do compile } class A {}; ! class B : public A {}; template class C {}; template class D {}; diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/debug/debug8.C gcc-3.3.1/gcc/testsuite/g++.dg/debug/debug8.C *** gcc-3.3/gcc/testsuite/g++.dg/debug/debug8.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/debug/debug8.C 2003-07-15 16:53:31.000000000 +0000 *************** *** 0 **** --- 1,2 ---- + struct t{}; + struct g : public t{}; diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/expr/anew1.C gcc-3.3.1/gcc/testsuite/g++.dg/expr/anew1.C *** gcc-3.3/gcc/testsuite/g++.dg/expr/anew1.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/expr/anew1.C 2003-06-20 00:29:26.000000000 +0000 *************** *** 0 **** --- 1,20 ---- + // { dg-do run } + // PR 11228: array operator new, with zero-initialization and a variable sized array. + // Regression test for PR + // Author: Matt Austern + + + int* allocate(int n) + { + return new int[n](); + } + + int main() + { + const int n = 17; + int* p = allocate(n); + for (int i = 0; i < n; ++i) + if (p[i] != 0) + return 1; + return 0; + } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/expr/anew2.C gcc-3.3.1/gcc/testsuite/g++.dg/expr/anew2.C *** gcc-3.3/gcc/testsuite/g++.dg/expr/anew2.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/expr/anew2.C 2003-06-20 00:29:26.000000000 +0000 *************** *** 0 **** --- 1,20 ---- + // { dg-do run } + // PR 11228: array operator new, with zero-initialization and a variable sized array. + // Regression test for PR + // Author: Matt Austern + + + double* allocate(int n) + { + return new double[n](); + } + + int main() + { + const int n = 17; + double* p = allocate(n); + for (int i = 0; i < n; ++i) + if (p[i] != 0.0) + return 1; + return 0; + } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/expr/anew3.C gcc-3.3.1/gcc/testsuite/g++.dg/expr/anew3.C *** gcc-3.3/gcc/testsuite/g++.dg/expr/anew3.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/expr/anew3.C 2003-06-20 00:29:26.000000000 +0000 *************** *** 0 **** --- 1,25 ---- + // { dg-do run } + // PR 11228: array operator new, with zero-initialization and a variable sized array. + // Regression test for PR + // Author: Matt Austern + + struct X + { + int a; + double b; + }; + + X* allocate(int n) + { + return new X[n](); + } + + int main() + { + const int n = 17; + X* p = allocate(n); + for (int i = 0; i < n; ++i) + if (p[i].a != 0 || p[i].b != 0.0) + return 1; + return 0; + } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/expr/anew4.C gcc-3.3.1/gcc/testsuite/g++.dg/expr/anew4.C *** gcc-3.3/gcc/testsuite/g++.dg/expr/anew4.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/expr/anew4.C 2003-06-20 00:29:26.000000000 +0000 *************** *** 0 **** --- 1,37 ---- + // { dg-do run } + // PR 11228: array operator new, with zero-initialization and a variable sized array. + // Regression test for PR + // Author: Matt Austern + + struct B + { + B(); + int n; + }; + + B::B() + { + n = 137; + } + + + struct D : public B + { + double x; + }; + + + D* allocate(int n) + { + return new D[n](); + } + + int main() + { + const int n = 17; + D* p = allocate(n); + for (int i = 0; i < n; ++i) + if (p[i].n != 137 || p[i].x != 0) + return 1; + return 0; + } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/expr/cast1.C gcc-3.3.1/gcc/testsuite/g++.dg/expr/cast1.C *** gcc-3.3/gcc/testsuite/g++.dg/expr/cast1.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/expr/cast1.C 2003-06-12 17:22:29.000000000 +0000 *************** *** 0 **** --- 1,3 ---- + struct S; // { dg-error "forward" } + + void f(S* p) { ((S) (*p)); } // { dg-error "" } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/expr/static_cast1.C gcc-3.3.1/gcc/testsuite/g++.dg/expr/static_cast1.C *** gcc-3.3/gcc/testsuite/g++.dg/expr/static_cast1.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/expr/static_cast1.C 2003-06-26 01:05:44.000000000 +0000 *************** *** 0 **** --- 1,5 ---- + void foo(int x) + { + static_cast(x); + } + diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/expr/static_cast2.C gcc-3.3.1/gcc/testsuite/g++.dg/expr/static_cast2.C *** gcc-3.3/gcc/testsuite/g++.dg/expr/static_cast2.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/expr/static_cast2.C 2003-06-27 16:27:06.000000000 +0000 *************** *** 0 **** --- 1,7 ---- + struct B {}; + + int main () { + B a; + (1 ? static_cast(a) : + *static_cast(&a)); + } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/expr/static_cast3.C gcc-3.3.1/gcc/testsuite/g++.dg/expr/static_cast3.C *** gcc-3.3/gcc/testsuite/g++.dg/expr/static_cast3.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/expr/static_cast3.C 2003-07-06 03:41:29.000000000 +0000 *************** *** 0 **** --- 1,24 ---- + template struct static_abort {}; + + template + struct any + { + const E& self() const { return static_cast(*this); } + }; + + struct range : public any + { + range() {} + + template + range(const U&) + { + typedef typename static_abort::ret t; + } + }; + + int main() + { + const any& r = *new range(); + r.self(); + } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/ext/dllexport1.C gcc-3.3.1/gcc/testsuite/g++.dg/ext/dllexport1.C *** gcc-3.3/gcc/testsuite/g++.dg/ext/dllexport1.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/ext/dllexport1.C 2003-07-11 12:14:42.000000000 +0000 *************** *** 0 **** --- 1,23 ---- + // Test that inline functions are exported with -fkeep-inline-functions. + // { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} } + // { dg-options -fkeep-inline-functions } + + __attribute__((dllexport)) inline int foo (int a) { return a;} + + + class __attribute__((dllexport)) Bar + { + public: + Bar(){}; + int inline_bar(int a) {return a;} + int outline_bar(int a); + }; + + int Bar::outline_bar(int a) {return foo (a);} + + + Bar abar; + + // { dg-final { scan-assembler "\.section\[ \t\]*.drectve\n.*_ZN3Bar11outline_barEi" } } + // { dg-final { scan-assembler " -export:_ZN3Bar10inline_barEi" } } + // { dg-final { scan-assembler " -export:_Z3fooi" } } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/ext/dllimport10.C gcc-3.3.1/gcc/testsuite/g++.dg/ext/dllimport10.C *** gcc-3.3/gcc/testsuite/g++.dg/ext/dllimport10.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/ext/dllimport10.C 2003-07-11 12:14:42.000000000 +0000 *************** *** 0 **** --- 1,16 ---- + // PR c++/5287, c++/11021 + // Inherit a virtual method from a dllimport'd base class. + + // { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} } + + struct __attribute__((dllimport)) A + { + virtual void vfunc(void); + }; + + struct B : public A + { + }; + + + B aB; diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/ext/dllimport1.C gcc-3.3.1/gcc/testsuite/g++.dg/ext/dllimport1.C *** gcc-3.3/gcc/testsuite/g++.dg/ext/dllimport1.C 2003-04-12 20:03:12.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/ext/dllimport1.C 2003-07-11 12:14:42.000000000 +0000 *************** *** 1,12 **** ! // { dg-do compile { target i?86-*-cygwin* } } class __attribute__((dllimport)) Foo { public: virtual void dummy_foo_func(void) ! {} }; class Bar : public Foo { public: --- 1,20 ---- ! // PR c++/7910 ! // { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} } ! // { dg-options { -Wall -W } } class __attribute__((dllimport)) Foo { public: virtual void dummy_foo_func(void) ! {} // { dg-warning "inline function" } ! void Foo::dummy_foo_fun2(); ! virtual ~Foo(); // avoid warning }; + void Foo::dummy_foo_fun2() + { // { dg-warning "defined" } + } + class Bar : public Foo { public: *************** Bar::~Bar() *** 19,21 **** --- 27,31 ---- void Bar::dummy_bar_func() {} + + // { dg-final { scan-assembler-not "__imp___ZN3Foo14dummy_foo_fun" } } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/ext/dllimport2.C gcc-3.3.1/gcc/testsuite/g++.dg/ext/dllimport2.C *** gcc-3.3/gcc/testsuite/g++.dg/ext/dllimport2.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/ext/dllimport2.C 2003-07-11 12:14:42.000000000 +0000 *************** *** 0 **** --- 1,29 ---- + // { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} } + + // PR c++/9738 Dllimport attribute is overriden by later definition/redeclaration + + void __attribute__((dllimport)) Bar(void); + void __attribute__((dllimport)) Baz(void); + __attribute__((dllimport)) int Biz; + __attribute__((dllimport)) int Boz; + + void Foo(void) + { + Bar(); + Baz(); + Biz++; + Boz++; + } + + void Bar(void) + { // { dg-warning "defined" } + } + + void Baz(void); // { dg-warning "redeclared" } + extern int Biz; // { dg-warning "redeclared" } + int Boz; // { dg-warning "defined" } + + void foo() + { + Biz++; + } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/ext/dllimport3.C gcc-3.3.1/gcc/testsuite/g++.dg/ext/dllimport3.C *** gcc-3.3/gcc/testsuite/g++.dg/ext/dllimport3.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/ext/dllimport3.C 2003-07-11 12:14:42.000000000 +0000 *************** *** 0 **** --- 1,25 ---- + // { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} } + + // PR 10148 Dllimport attribute of object is overriden by later + // redefinition without attribute. + + struct Foo + { + int a; + }; + + __attribute__((dllimport)) struct Foo f; + + void Bar(void) + { + void* dummy = &f; + } + + struct Foo f; // { dg-warning "defined" } + + // Dllimport sets DECL_NON_ADDR_CONST_P to 1, so following + // assignment would require static_initialization_and_destruction + // if attribute is retained. + + void* dummy = &f; + diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/ext/dllimport4.C gcc-3.3.1/gcc/testsuite/g++.dg/ext/dllimport4.C *** gcc-3.3/gcc/testsuite/g++.dg/ext/dllimport4.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/ext/dllimport4.C 2003-07-11 12:14:42.000000000 +0000 *************** *** 0 **** --- 1,6 ---- + // Report error if dllimport attribute in definition itself. + // { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} } + + __attribute__((dllimport)) void bar () { } // { dg-error "definition" } + + __attribute__((dllimport)) int foo = 1; // { dg-error "definition" } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/ext/dllimport5.C gcc-3.3.1/gcc/testsuite/g++.dg/ext/dllimport5.C *** gcc-3.3/gcc/testsuite/g++.dg/ext/dllimport5.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/ext/dllimport5.C 2003-07-11 12:14:42.000000000 +0000 *************** *** 0 **** --- 1,28 ---- + // { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} } + // Report error if static symbol definition has dllimport attribute. + + __attribute__((dllimport)) + int impvar; // OK, implicit "extern" + + static __attribute__((dllimport)) + int static_impvar; // { dg-error "external linkage" } + + static __attribute__((dllexport)) + int static_expvar; // { dg-error "external linkage" } + + static __attribute__((dllimport)) + void static_impfun(void); // { dg-error "external linkage" } + + void foo() + { + __attribute__((dllimport)) + int foovar; // OK, implicit "extern" + foovar++; + } + + void bar() + { + __attribute__((dllexport)) + int barvar; // { dg-error "external linkage" } + barvar++; + } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/ext/dllimport6.C gcc-3.3.1/gcc/testsuite/g++.dg/ext/dllimport6.C *** gcc-3.3/gcc/testsuite/g++.dg/ext/dllimport6.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/ext/dllimport6.C 2003-07-11 12:14:42.000000000 +0000 *************** *** 0 **** --- 1,30 ---- + // { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} } + // Mark class static members as dllimport. + + struct Baz + { + Baz(int a_ =0) : a(a_) {}; + int a; + }; + + class __attribute__ ((dllimport)) Bar + { + public: + static const int two = 2; + static const int three; + static const Baz null_baz; + }; + + int foo() + { + Bar foobar; + const int* baz = &Bar::two; + int a = foobar.two; + int b = foobar.three; + int c = foobar.null_baz.a; + return (a + b + c + *baz); + } + + // { dg-final { scan-assembler __imp___ZN3Bar3twoE } } + // { dg-final { scan-assembler __imp___ZN3Bar5threeE } } + // { dg-final { scan-assembler __imp___ZN3Bar8null_bazE } } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/ext/dllimport7.C gcc-3.3.1/gcc/testsuite/g++.dg/ext/dllimport7.C *** gcc-3.3/gcc/testsuite/g++.dg/ext/dllimport7.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/ext/dllimport7.C 2003-07-11 12:14:42.000000000 +0000 *************** *** 0 **** --- 1,33 ---- + // { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} } + + // Report errors on definition of dllimport'd static data member . + + + struct Baz + { + Baz(int a_ =0) : a(a_) {}; + int a; + }; + + class __declspec(dllimport) Bar + { + public: + enum {one = 1}; + static const int two = 2; + static const int three; + static const Baz null_baz; + }; + + const int Bar::three = 3; // { dg-error "definition of static data" } + const Baz Bar::null_baz; // { dg-error "definition of static data" } + + + int foo() + { + Bar foobar; + const int* baz = &Bar::two; + int a = foobar.two; + int b = foobar.three; + int c = foobar.null_baz.a; + return (a + b + c + *baz); + } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/ext/dllimport8.C gcc-3.3.1/gcc/testsuite/g++.dg/ext/dllimport8.C *** gcc-3.3/gcc/testsuite/g++.dg/ext/dllimport8.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/ext/dllimport8.C 2003-07-11 12:14:42.000000000 +0000 *************** *** 0 **** --- 1,29 ---- + // PR c++/8378 + // Ignore dllimport of static members if marked inlined. + // or if definition follows declaration in dllimported class. + + // { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} } + // { dg-options { -Wall -W } } + + struct __attribute__((dllimport)) Foo + { + static int static_int; + static void static_func1(); + static void static_func2(); + }; + + void Foo::static_func1() + { // { dg-warning "defined" } + } + + inline void Foo::static_func2() + { // { dg-warning "inline function" } + } + + void testfoo() + { + Foo::static_func1(); + Foo::static_func2(); + } + + // { dg-final { scan-assembler-not "__imp__" } } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/ext/dllimport9.C gcc-3.3.1/gcc/testsuite/g++.dg/ext/dllimport9.C *** gcc-3.3/gcc/testsuite/g++.dg/ext/dllimport9.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/ext/dllimport9.C 2003-07-11 12:14:42.000000000 +0000 *************** *** 0 **** --- 1,23 ---- + // Handle dllimport attribute for functions declared inline. + // { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} } + // { dg-options { -W } } + + inline __attribute__((dllimport)) void bar() { } // { dg-warning "inline" } + + struct __attribute__ ((dllimport)) Blah + { + void in_blah () { } // { dg-warning "inline" } + void out_blah (); + }; + + inline void Blah::out_blah(){ } // { dg-warning "inline" } + + void use_inlines() + { + Blah aBlah; + bar(); + aBlah.in_blah (); + aBlah.out_blah (); + } + + // { dg-final { scan-assembler-not "__imp__" } } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/ext/typeof5.C gcc-3.3.1/gcc/testsuite/g++.dg/ext/typeof5.C *** gcc-3.3/gcc/testsuite/g++.dg/ext/typeof5.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/ext/typeof5.C 2003-06-27 22:43:48.000000000 +0000 *************** *** 0 **** --- 1,17 ---- + // { dg-options "" } + + template + void test1() { + int x = 0; + const typeof(x) & t1 = x+0; + } + + void test2() { + int x = 0; + const typeof(x) & t1 = x+0; + } + + int main() { + test1(); + test2 (); + } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/inherit/access4.C gcc-3.3.1/gcc/testsuite/g++.dg/inherit/access4.C *** gcc-3.3/gcc/testsuite/g++.dg/inherit/access4.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/inherit/access4.C 2003-07-23 21:35:40.000000000 +0000 *************** *** 0 **** --- 1,8 ---- + struct Container { int Count(); }; + struct List : private Container { + using Container::Count; + }; + struct INetContentTypeParameterList : private List { void Clear(); }; + void INetContentTypeParameterList::Clear() { + Count();//Calling non static but in a non-static method. + } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/inherit/access5.C gcc-3.3.1/gcc/testsuite/g++.dg/inherit/access5.C *** gcc-3.3/gcc/testsuite/g++.dg/inherit/access5.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/inherit/access5.C 2003-07-25 00:31:02.000000000 +0000 *************** *** 0 **** --- 1,4 ---- + struct S { ~S(); }; + struct T : virtual private S {}; + struct U : private T {}; + U u; diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/init/attrib1.C gcc-3.3.1/gcc/testsuite/g++.dg/init/attrib1.C *** gcc-3.3/gcc/testsuite/g++.dg/init/attrib1.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/init/attrib1.C 2003-07-01 18:14:33.000000000 +0000 *************** *** 0 **** --- 1,10 ---- + // { dg-do run } + + void f() __attribute((__constructor__)); + int i; + void f() { i = 1; } + + int main(int, char **) + { + return 1-i; + } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/init/enum1.C gcc-3.3.1/gcc/testsuite/g++.dg/init/enum1.C *** gcc-3.3/gcc/testsuite/g++.dg/init/enum1.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/init/enum1.C 2003-06-27 21:28:15.000000000 +0000 *************** *** 0 **** --- 1,10 ---- + enum test { + acceptable = -1, + unacceptable = 0xffffffffffffffffLL + }; // { dg-error "" } + + enum test t = acceptable, u = unacceptable; + + int main() { + return 0; + } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/init/enum2.C gcc-3.3.1/gcc/testsuite/g++.dg/init/enum2.C *** gcc-3.3/gcc/testsuite/g++.dg/init/enum2.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/init/enum2.C 2003-07-25 00:31:02.000000000 +0000 *************** *** 0 **** --- 1,8 ---- + #include + enum test { + z = 0, + c = UINT_MAX + 1LL + } x = z; + int main() { + return x != z; + } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/init/ref7.C gcc-3.3.1/gcc/testsuite/g++.dg/init/ref7.C *** gcc-3.3/gcc/testsuite/g++.dg/init/ref7.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/init/ref7.C 2003-06-20 01:18:48.000000000 +0000 *************** *** 0 **** --- 1,9 ---- + class hop + { + public: + hop operator* () const; + }; + int main(void) + { + const hop &x = *x; + } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/init/static1.C gcc-3.3.1/gcc/testsuite/g++.dg/init/static1.C *** gcc-3.3/gcc/testsuite/g++.dg/init/static1.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/init/static1.C 2003-07-02 01:53:44.000000000 +0000 *************** *** 0 **** --- 1,4 ---- + struct A { + static const int size = BOGUS; // { dg-error "" } + }; + const int A::size; diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/lookup/scoped1.C gcc-3.3.1/gcc/testsuite/g++.dg/lookup/scoped1.C *** gcc-3.3/gcc/testsuite/g++.dg/lookup/scoped1.C 2002-04-09 13:59:59.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/lookup/scoped1.C 2003-06-26 01:05:44.000000000 +0000 *************** struct C: public B *** 17,22 **** ::A::i1 = 1; ::A::i2 = 1; // { dg-error "access" "" } ::A::f1 (); ! ::A::f2 (); // { dg-error "access" "" { xfail *-*-* } } } }; --- 17,22 ---- ::A::i1 = 1; ::A::i2 = 1; // { dg-error "access" "" } ::A::f1 (); ! ::A::f2 (); // { dg-error "" } } }; diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/lookup/scoped6.C gcc-3.3.1/gcc/testsuite/g++.dg/lookup/scoped6.C *** gcc-3.3/gcc/testsuite/g++.dg/lookup/scoped6.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/lookup/scoped6.C 2003-07-01 17:35:00.000000000 +0000 *************** *** 0 **** --- 1,17 ---- + template + class Foo { + int i; + public: + Foo() { + X::explode(); // { dg-error "" } + } + }; + + class Bar { + Foo foo_; + public: + Bar() {} // { dg-error "instantiated" } + }; + + template class Foo; + diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/lookup/using3.C gcc-3.3.1/gcc/testsuite/g++.dg/lookup/using3.C *** gcc-3.3/gcc/testsuite/g++.dg/lookup/using3.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/lookup/using3.C 2003-06-17 22:09:07.000000000 +0000 *************** *** 0 **** --- 1,11 ---- + template struct A + { + int i; + }; + + template struct B : A + { + using A::i; // { dg-error "" } + }; + + B b; // { dg-error "" } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/opt/cfg1.C gcc-3.3.1/gcc/testsuite/g++.dg/opt/cfg1.C *** gcc-3.3/gcc/testsuite/g++.dg/opt/cfg1.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/opt/cfg1.C 2003-07-18 06:59:24.000000000 +0000 *************** *** 0 **** --- 1,36 ---- + // PR optimization/11083 + // Origin: + // Reduced testcase by Wolfgang Bangerth + + // The compiler used to keep unreachable basic blocks after dead edges + // had been purged, which fooled the LCM code of the GCSE pass. + + // { dg-do compile } + // { dg-options "-O2 -fnon-call-exceptions" } + + extern void *memmove (void *, const void *, unsigned int) throw (); + + struct S { + int *q; + + S(int *i) : q(i) {} + }; + + struct X { + int *p; + + void foo(S first, S last) { + try { memmove(0, 0, last.q - first.q); } + catch(...) { throw; } + } + + void bar (const X& x); + }; + + void X::bar (const X& x) + { + const unsigned int xlen = S(x.p).q - S(x.p).q; + + if (xlen > 0) + foo(S(x.p), S(x.p)); + } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/opt/emptyunion.C gcc-3.3.1/gcc/testsuite/g++.dg/opt/emptyunion.C *** gcc-3.3/gcc/testsuite/g++.dg/opt/emptyunion.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/opt/emptyunion.C 2003-07-13 21:37:49.000000000 +0000 *************** *** 0 **** --- 1,13 ---- + // PR optimization/11059 + // This testcase ICEd because clear_by_pieces was called with zero length. + // { dg-do compile } + // { dg-options "-O2" } + + union uni {}; + + int main() { + uni *h; + + h = (uni *)new uni(); + } + diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/opt/inline4.C gcc-3.3.1/gcc/testsuite/g++.dg/opt/inline4.C *** gcc-3.3/gcc/testsuite/g++.dg/opt/inline4.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/opt/inline4.C 2003-07-23 07:13:42.000000000 +0000 *************** *** 0 **** --- 1,13 ---- + // { dg-options "-O2 -ftemplate-depth-20000 --param min-inline-insns=100 --param max-inline-insns=3" } + + template + inline void g() { g(); return; } + + template <> + inline void g<0>() { int i; return; } + + void h() { + g<1000>(); + } + + // { dg-final { scan-assembler-not "_Z1g" } } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/opt/operator1.C gcc-3.3.1/gcc/testsuite/g++.dg/opt/operator1.C *** gcc-3.3/gcc/testsuite/g++.dg/opt/operator1.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/opt/operator1.C 2003-06-23 14:57:41.000000000 +0000 *************** *** 0 **** --- 1,10 ---- + // Tests whether g++ can handle large number of operators + // { dg-do compile } + + #define OP0(n) struct I##n { int i; }; operator I##n (); + #define OP1(n) OP0(n) + #define OP2(n) OP1(n##0) OP1(n##1) OP1(n##2) OP1(n##3) OP1(n##4) + #define OP3(n) OP2(n##0) OP2(n##1) OP2(n##2) OP2(n##3) OP2(n##4) + struct S { + OP3(0) OP3(1) OP3(2) OP3(3) OP3(4) OP3(5) + }; diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/opt/stack1.C gcc-3.3.1/gcc/testsuite/g++.dg/opt/stack1.C *** gcc-3.3/gcc/testsuite/g++.dg/opt/stack1.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/opt/stack1.C 2003-07-07 07:31:47.000000000 +0000 *************** *** 0 **** --- 1,135 ---- + // PR optimization/11198 + // Origin: Joerg Walter + // Reduced testcase by: Volker Reichelt + // Wolfgang Bangerth + + // The compiler used to allocate the same stack slot for two aggregates, + // overlooking that assignments to members given the same address on the + // stack may not alias and thus may be reordered by the scheduling passes. + + // { dg-do run } + // { dg-options "-O2 -frename-registers" } + + + double zero_; + + inline const int& + min(const int& a, const int& b) { + if (b < a) return b; return a; + } + + struct barrier { barrier () {} }; + + template struct unbounded_array { + inline unbounded_array (): data_ (new double [9]) {} + inline double& operator [] (int i) { return data_ [i]; } + double* data_; + }; + + inline int element (int i, int j) { + return i + j; + } + + template + struct matrix { + inline matrix () : size2_ (3) {} + + inline unbounded_array<> &data () { return data_; } + + inline double& el (int i, int j) { + int dead1 = j; + int dead2 = 1 + i - j; + if (j < size2_ && i-j < 2) + return data () [element (j,i-j+1)]; + barrier (); + return zero_; + } + + struct iterator2; + + inline iterator2 find () { + return iterator2 (*this); + } + + struct iterator1 { + inline iterator1 (matrix *m): + dead1 (m), i (0) {} + void *dead1; + int i; + int dead2; + }; + + const int size2_; + unbounded_array<> data_; + }; + + + template + struct adaptor { + adaptor (matrix<> &m) : m(&m), upper_ (1) {} + + int size1 () const { return m->size1 (); } + int size2 () const { return 3; } + int lower () const { return 1; } + int upper () const { return upper_; } + matrix<> &data () { return *m; } + + double& el (int i, int j) { + int dead1, dead2; + if (j < size2 () && i-j < 1) + return data ().el (i, j); + + barrier (); + return zero_; + } + + struct a_iterator2; + + struct a_iterator1 { + a_iterator1 (adaptor &a, const matrix<>::iterator1 &it1): + a (&a), dead1 (it1) {} + + a_iterator2 begin () const { + return a_iterator2(*a); + } + adaptor *a; + matrix<>::iterator1 dead1; + }; + + struct a_iterator2 { + a_iterator2 (adaptor &a) : a (&a) {} + + double& f () const { + int i = 0; + int l = a->upper () + i; + int q = a->size2 (); + if (0 < q && + l < a->lower () + 1 + a->upper ()) + return a->m->el(0,0); + + return a->el (i, 0); + } + + adaptor *a; + }; + + matrix<> *m; + int upper_; + }; + + void matrix_swap (adaptor<> &bam1, adaptor<> &bam2) + { + adaptor<>::a_iterator1 it1 (bam1,matrix<>::iterator1(bam1.m)), + it2 (bam2,matrix<>::iterator1(bam2.m)); + int dead; + double x = it1.begin().f(); + it2.begin().f() = x; + } + + int main () + { + matrix<> m1,m2; + adaptor<> bam1 (m1), bam2 (m2); + matrix_swap (bam1, bam2); + return 0; + } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/opt/strength-reduce.C gcc-3.3.1/gcc/testsuite/g++.dg/opt/strength-reduce.C *** gcc-3.3/gcc/testsuite/g++.dg/opt/strength-reduce.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/opt/strength-reduce.C 2003-07-08 07:29:04.000000000 +0000 *************** *** 0 **** --- 1,51 ---- + // This testcase was miscompiled on s390x, because strength-reduction + // did not see biv in C::foo as used after loop, but it was used + // in a REG_EQUAL note. + // { dg-do run } + // { dg-options "-O2" } + + extern "C" void abort (void); + + struct C + { + int foo (char ch, int offset = 0x7fffffff) const; + int bar (int offset, char c) const; + char *a; + }; + + int C::bar (int offset, char c) const + { + char ch = a[offset]; + if (ch < c) + return -1; + if (ch > c) + return 1; + return 0; + } + + int C::foo (char ch, int offset) const + { + int len = __builtin_strlen (a); + if (len == 0) + return 0x7fffffff; + if (offset >= len) + offset = len - 1; + + while (bar (offset, ch) != 0) + { + if (offset == 0) + return 0x7fffffff; + offset--; + } + + return offset; + } + + int main (void) + { + C c; + c.a = "/some/dir/file.ext"; + if (c.foo ('/') != 9) + abort (); + return 0; + } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/other/error5.C gcc-3.3.1/gcc/testsuite/g++.dg/other/error5.C *** gcc-3.3/gcc/testsuite/g++.dg/other/error5.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/other/error5.C 2003-07-02 04:07:36.000000000 +0000 *************** *** 0 **** --- 1,13 ---- + // { dg-do compile } + // Origin: Wolfgang Bangerth + // PR c++/11106: Error message gives partially mangled operator name + + template struct S { + struct I {}; + }; + + template struct S2 : S { + using S::operator typename S::I*; + }; // { dg-error "operator S\\" "" } + + template struct S2; // { dg-error "instantiated" "" } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/other/error6.C gcc-3.3.1/gcc/testsuite/g++.dg/other/error6.C *** gcc-3.3/gcc/testsuite/g++.dg/other/error6.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/other/error6.C 2003-06-30 19:05:21.000000000 +0000 *************** *** 0 **** --- 1,19 ---- + // { dg-do compile } + // Make sure we emit a decent error message when trying to mangle an + // expression not supported by the C++ ABI due to a defect. + + template + struct A {}; + + struct B + { + static int foo(void); + }; + + template + A func(void); + + int main() + { + func(); // { dg-error "sorry, unimplemented" } + } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/overload/operator1.C gcc-3.3.1/gcc/testsuite/g++.dg/overload/operator1.C *** gcc-3.3/gcc/testsuite/g++.dg/overload/operator1.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/overload/operator1.C 2003-08-04 11:25:39.000000000 +0000 *************** *** 0 **** --- 1,34 ---- + typedef struct _GdkDrawable GdkDrawable; + typedef struct _GdkDrawable GdkBitmap; + typedef struct _GdkDrawable GdkPixmap; + + class Drawable + { + public: + operator GdkDrawable* () const; + }; + + + class Pixmap : public Drawable + { + public: + operator GdkPixmap* () const; + + }; + + + class Bitmap : public Pixmap + { + public: + operator GdkBitmap* () const; + + }; + + class Event + { + }; + + Bitmap::operator GdkBitmap* () const + { + return 0; + } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/parse/crash2.C gcc-3.3.1/gcc/testsuite/g++.dg/parse/crash2.C *** gcc-3.3/gcc/testsuite/g++.dg/parse/crash2.C 2003-03-31 20:00:28.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/parse/crash2.C 2003-05-16 05:41:51.000000000 +0000 *************** *** 2,7 **** int main(void) { char x, y; ! if ('A' == x) && ('B' == y)) { } /* { dg-error "parse error" } */ if (x == 'A') && (y == 'B')) { } } --- 2,7 ---- int main(void) { char x, y; ! if ('A' == x) && ('B' == y)) { } /* { dg-error "(parse|syntax) error" } */ if (x == 'A') && (y == 'B')) { } } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/parse/crash6.C gcc-3.3.1/gcc/testsuite/g++.dg/parse/crash6.C *** gcc-3.3/gcc/testsuite/g++.dg/parse/crash6.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/parse/crash6.C 2003-06-24 15:22:05.000000000 +0000 *************** *** 0 **** --- 1,10 ---- + struct P {}; + + template + struct O + { + struct I; + }; + + template + struct O::I::S : P {}; // { dg-error "" } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/parse/crash7.C gcc-3.3.1/gcc/testsuite/g++.dg/parse/crash7.C *** gcc-3.3/gcc/testsuite/g++.dg/parse/crash7.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/parse/crash7.C 2003-07-23 16:43:02.000000000 +0000 *************** *** 0 **** --- 1,19 ---- + // { dg-do compile } + + // Copyright (C) 2003 Free Software Foundation, Inc. + // Contributed by Nathan Sidwell 23 Jul 2003 + + // PR 11282. Infinite loop/memory consumption + + struct parameter_struct_t { + char short_option; + char *long_option; + }; + + parameter_struct_t *parameters[] = { + { + 'f'; // { dg-error "error before" "" } + "from"; + }; + }; + diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/parse/template8.C gcc-3.3.1/gcc/testsuite/g++.dg/parse/template8.C *** gcc-3.3/gcc/testsuite/g++.dg/parse/template8.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/parse/template8.C 2003-07-11 08:39:58.000000000 +0000 *************** *** 0 **** --- 1,16 ---- + namespace N + { + + template struct A + { + template A(A); + }; + + } + + void foo(N::A); + + void bar() + { + foo(N::A); // { dg-error "" } + } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/rtti/dyncast1.C gcc-3.3.1/gcc/testsuite/g++.dg/rtti/dyncast1.C *** gcc-3.3/gcc/testsuite/g++.dg/rtti/dyncast1.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/rtti/dyncast1.C 2003-06-26 01:05:45.000000000 +0000 *************** *** 0 **** --- 1,23 ---- + class JunkBase + { + public: + virtual void DoSomething( void ) = 0; + protected: + virtual ~JunkBase( void ) {}; + JunkBase( void ) {} + }; + + class Junk : protected JunkBase + { + public: + Junk( void ) : JunkBase() {} + virtual ~Junk( void ) {} + protected: + inline JunkBase * AsBase( void ) + { return dynamic_cast< JunkBase * >( this ); } + virtual void DoSomething( void ) { } + }; + + + + diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/template/access10.C gcc-3.3.1/gcc/testsuite/g++.dg/template/access10.C *** gcc-3.3/gcc/testsuite/g++.dg/template/access10.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/template/access10.C 2003-05-25 10:30:58.000000000 +0000 *************** *** 0 **** --- 1,16 ---- + // { dg-do compile } + + // Origin: Giovanni Bajo + + // PR c++/10849: Incorrect access checking on template specialization. + + class X { + private: + template struct Y; + }; + + template <> struct X::Y {}; + + template struct X::Y {}; + + template struct X::Y; diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/template/access12.C gcc-3.3.1/gcc/testsuite/g++.dg/template/access12.C *** gcc-3.3/gcc/testsuite/g++.dg/template/access12.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/template/access12.C 2003-07-10 12:43:17.000000000 +0000 *************** *** 0 **** --- 1,13 ---- + // { dg-do compile } + + // Origin: Giovanni Bajo + + // PR c++/10849: Incorrect access checking on class template partial + // specialization. + + class X { + private: + template struct Y; + }; + + template struct X::Y {}; diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/template/anon1.C gcc-3.3.1/gcc/testsuite/g++.dg/template/anon1.C *** gcc-3.3/gcc/testsuite/g++.dg/template/anon1.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/template/anon1.C 2003-07-14 05:18:08.000000000 +0000 *************** *** 0 **** --- 1,21 ---- + struct x { + int foo () {} + }; + + template + struct vector { + T& bar () {} + }; + + template + struct y { + typedef struct { + x t; + } s; + + vector array; + + int foo () + { return array.bar().t.foo(); } + }; + int i = y().foo (); diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/template/conv7.C gcc-3.3.1/gcc/testsuite/g++.dg/template/conv7.C *** gcc-3.3/gcc/testsuite/g++.dg/template/conv7.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/template/conv7.C 2003-06-17 17:05:16.000000000 +0000 *************** *** 0 **** --- 1,12 ---- + // { dg-options "-fabi-version=0" } + + template struct S { + struct I{}; + operator I* (); + }; + + template struct S2 : S { + operator typename S::I* (); + }; + + template struct S2; diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/template/conv8.C gcc-3.3.1/gcc/testsuite/g++.dg/template/conv8.C *** gcc-3.3/gcc/testsuite/g++.dg/template/conv8.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/template/conv8.C 2003-06-17 17:05:16.000000000 +0000 *************** *** 0 **** --- 1,12 ---- + // { dg-options "-fabi-version=1" } + + template struct S { + struct I{}; + operator I* (); + }; + + template struct S2 : S { + operator typename S::I* (); + }; + + template struct S2; diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/template/crash8.C gcc-3.3.1/gcc/testsuite/g++.dg/template/crash8.C *** gcc-3.3/gcc/testsuite/g++.dg/template/crash8.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/template/crash8.C 2003-07-24 11:29:51.000000000 +0000 *************** *** 0 **** --- 1,20 ---- + // { dg-do compile } + + // Origin: David Robinson + + // PR c++/11513: ICE due to incorrect decision whether the tag is template. + + template + struct bar + { + struct foo + { + int a; + }; + + template + int wom(U c) + { + struct foo b; + } + }; diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/template/friend20.C gcc-3.3.1/gcc/testsuite/g++.dg/template/friend20.C *** gcc-3.3/gcc/testsuite/g++.dg/template/friend20.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/template/friend20.C 2003-07-15 00:29:07.000000000 +0000 *************** *** 0 **** --- 1,15 ---- + template + struct A + { + friend void bar(A a) {} + }; + + void bar(A); + + int main() + { + A a; + + bar(a); + } + diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/template/func1.C gcc-3.3.1/gcc/testsuite/g++.dg/template/func1.C *** gcc-3.3/gcc/testsuite/g++.dg/template/func1.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/template/func1.C 2003-06-20 05:57:22.000000000 +0000 *************** *** 0 **** --- 1,13 ---- + template + inline void f(const T1&,const T2&) { } + + template + struct A { + template void g(T& i) { } + }; + + int main() { + int i; + A a; + a.g(i); + } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/template/instantiate4.C gcc-3.3.1/gcc/testsuite/g++.dg/template/instantiate4.C *** gcc-3.3/gcc/testsuite/g++.dg/template/instantiate4.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/template/instantiate4.C 2003-05-23 14:47:09.000000000 +0000 *************** *** 0 **** --- 1,13 ---- + // { dg-do compile } + + // Origin: Wolfgang Bangerth + + // PR c++/10682: Typedef to enum template instantiation logic. + + template + struct Foo { + enum E {a,b,c}; + typedef E EE; + }; + + void Baz(Foo::EE x); diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/template/local3.C gcc-3.3.1/gcc/testsuite/g++.dg/template/local3.C *** gcc-3.3/gcc/testsuite/g++.dg/template/local3.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/template/local3.C 2003-07-02 04:09:40.000000000 +0000 *************** *** 0 **** --- 1,14 ---- + template + void f(const T&) + { + struct B { + + void g (T); + }; + B b; + }; + void g() + { + f(42); + } + diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/template/lookup1.C gcc-3.3.1/gcc/testsuite/g++.dg/template/lookup1.C *** gcc-3.3/gcc/testsuite/g++.dg/template/lookup1.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/template/lookup1.C 2003-07-20 04:49:03.000000000 +0000 *************** *** 0 **** --- 1,17 ---- + template + class A { + public: + class B; + }; + + template + class A::B { + public: + class C; + }; + + template + class A::B::C { + public: + A &a; + }; diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/template/member3.C gcc-3.3.1/gcc/testsuite/g++.dg/template/member3.C *** gcc-3.3/gcc/testsuite/g++.dg/template/member3.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/template/member3.C 2003-06-20 15:46:42.000000000 +0000 *************** *** 0 **** --- 1,19 ---- + template + struct A { + template struct SubA { }; + + template void f(T1 & t1, SubA & t2) { } + template void g(SubA & suba) { } + template void h(SubA & suba) { } + }; + + int main(void) { + int i; + A a; + A::SubA suba; + + a.f(i,suba); + a.g(suba); + a.h(suba); + } + diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/template/nontype2.C gcc-3.3.1/gcc/testsuite/g++.dg/template/nontype2.C *** gcc-3.3/gcc/testsuite/g++.dg/template/nontype2.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/template/nontype2.C 2003-07-11 08:48:20.000000000 +0000 *************** *** 0 **** --- 1,11 ---- + template struct A {}; + + template struct B + { + void foo() + { + const int i=0; + typedef A< i<=1 > C; // { dg-error "" } + typedef A< i<=2 > C; // { dg-error "" } + } + }; diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/template/partial2.C gcc-3.3.1/gcc/testsuite/g++.dg/template/partial2.C *** gcc-3.3/gcc/testsuite/g++.dg/template/partial2.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/template/partial2.C 2003-07-14 10:09:02.000000000 +0000 *************** *** 0 **** --- 1,14 ---- + // { dg-do compile } + + // Origin: lorgon1@yahoo.com + + // PR c++/11154: Multi-level template argument in partial ordering of + // class template + + template struct Outer { + template struct Foo {}; + template struct Foo {}; + template struct Foo {}; + }; + + Outer::Foo f; diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/template/spec10.C gcc-3.3.1/gcc/testsuite/g++.dg/template/spec10.C *** gcc-3.3/gcc/testsuite/g++.dg/template/spec10.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/template/spec10.C 2003-06-03 12:54:02.000000000 +0000 *************** *** 0 **** --- 1,27 ---- + // { dg-do run } + + // Origin: Lynn Akers + + // PR c++/10940: Problem handling parameter list for static member + // that is a specialization of a member template of a template class. + + template + class o + { + public: + template static void do_add(T* p, T v); + }; + + template<> + template + inline void o<32>::do_add(T* p, T v) + { + *p += v; + } + + int main() + { + int a = 0x1000; + o<32>().do_add(&a, 0x2000); + return a; + } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/template/spec9.C gcc-3.3.1/gcc/testsuite/g++.dg/template/spec9.C *** gcc-3.3/gcc/testsuite/g++.dg/template/spec9.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/template/spec9.C 2003-05-31 11:50:14.000000000 +0000 *************** *** 0 **** --- 1,21 ---- + // { dg-do compile } + + // Origin: Lynn Akers + // Wolfgang Bangerth + + // PR c++/10956: Incorrect template substitution for member template + // specialization inside template class. + + template struct C { + template void pre_add(T); + }; + + template<> + template + void C<32>::pre_add(T) { + T pre; + } + + int main() { + C<32>().pre_add(1); + } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/template/static4.C gcc-3.3.1/gcc/testsuite/g++.dg/template/static4.C *** gcc-3.3/gcc/testsuite/g++.dg/template/static4.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/template/static4.C 2003-06-20 05:57:22.000000000 +0000 *************** *** 0 **** --- 1,7 ---- + template + struct A { + static int _test; // { dg-error "" } + static int _test; // { dg-error "" } + }; + template int A::_test = 0; + struct B : public A { }; diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/warn/conversion-function-1.C gcc-3.3.1/gcc/testsuite/g++.dg/warn/conversion-function-1.C *** gcc-3.3/gcc/testsuite/g++.dg/warn/conversion-function-1.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/warn/conversion-function-1.C 2003-06-21 12:56:04.000000000 +0000 *************** *** 0 **** --- 1,8 ---- + // Copyright (C) 2003 Free Software Foundation + // Contributed by Gabriel Dos Reis + // { dg-options "-Wno-conversion" } + + struct A { + operator A&(); + }; + diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/warn/implicit-typename2.C gcc-3.3.1/gcc/testsuite/g++.dg/warn/implicit-typename2.C *** gcc-3.3/gcc/testsuite/g++.dg/warn/implicit-typename2.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/warn/implicit-typename2.C 2003-06-08 10:52:54.000000000 +0000 *************** *** 0 **** --- 1,12 ---- + // { dg-do compile } + + // Origin: Wolfgang Bangerth + + // PR c++/11039: Implicit typename warning in friend class declaration. + + template struct X { + struct Y { + struct Z {}; + }; + friend struct Y::Z; + }; diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/warn/implicit-typename3.C gcc-3.3.1/gcc/testsuite/g++.dg/warn/implicit-typename3.C *** gcc-3.3/gcc/testsuite/g++.dg/warn/implicit-typename3.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/warn/implicit-typename3.C 2003-06-08 10:52:54.000000000 +0000 *************** *** 0 **** --- 1,12 ---- + // { dg-do compile } + + // Origin: Wolfgang Bangerth + + // PR c++/11039: Implicit typename warning in friend class declaration. + + template struct X { + struct Y { + struct Z {}; + }; + template friend struct Y::Z f(U); + }; diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/warn/pedantic1.C gcc-3.3.1/gcc/testsuite/g++.dg/warn/pedantic1.C *** gcc-3.3/gcc/testsuite/g++.dg/warn/pedantic1.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/warn/pedantic1.C 2003-07-10 17:05:27.000000000 +0000 *************** *** 0 **** --- 1,11 ---- + // PR10032 + // { dg-options "-pedantic" } + + int main() { + goto label; // { dg-error "" } + + int temp = 1; // { dg-error "" } + + label: // { dg-error "" } + return 1; + } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.dg/warn/Winline-2.C gcc-3.3.1/gcc/testsuite/g++.dg/warn/Winline-2.C *** gcc-3.3/gcc/testsuite/g++.dg/warn/Winline-2.C 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.dg/warn/Winline-2.C 2003-06-20 19:27:44.000000000 +0000 *************** *** 0 **** --- 1,11 ---- + // { dg-options "-Winline -O" } + + #include + + using namespace std; + + int main(void) + { + vector v(10); + } + diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.old-deja/g++.benjamin/16077.C gcc-3.3.1/gcc/testsuite/g++.old-deja/g++.benjamin/16077.C *** gcc-3.3/gcc/testsuite/g++.old-deja/g++.benjamin/16077.C 1998-12-16 21:21:58.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.old-deja/g++.benjamin/16077.C 2003-06-21 17:36:07.000000000 +0000 *************** *** 1,6 **** // 981203 bkoz // g++/16077 ! // Build don't link: class nicaragua; struct colombia { --- 1,7 ---- // 981203 bkoz // g++/16077 ! // Build don't link: ! // Special Options: -Wconversion class nicaragua; struct colombia { diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.old-deja/g++.bugs/900215_01.C gcc-3.3.1/gcc/testsuite/g++.old-deja/g++.bugs/900215_01.C *** gcc-3.3/gcc/testsuite/g++.old-deja/g++.bugs/900215_01.C 2000-03-08 17:09:57.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.old-deja/g++.bugs/900215_01.C 2003-06-21 12:56:04.000000000 +0000 *************** *** 19,24 **** --- 19,26 ---- // 8/3/2000 (nathan): The std allows you to define such an op, but // it will never be called. [class.conv.fct]. Make it an unconditional warning. + // Special Options: -Wconversion + struct struct0 { operator void (); // WARNING - operator void diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.old-deja/g++.ext/pretty2.C gcc-3.3.1/gcc/testsuite/g++.old-deja/g++.ext/pretty2.C *** gcc-3.3/gcc/testsuite/g++.old-deja/g++.ext/pretty2.C 2000-11-22 23:53:03.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.old-deja/g++.ext/pretty2.C 2003-06-17 22:03:07.000000000 +0000 *************** X::operator int () *** 67,74 **** printf ("__FUNCTION__ %s\n", function); printf ("__PRETTY_FUNCTION__ %s\n", pretty); - if (strcmp (function, "operator i")) - bad = true; if (strcmp (pretty, "X::operator int()")) bad = true; return 0; --- 67,72 ---- diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.old-deja/g++.jason/access8.C gcc-3.3.1/gcc/testsuite/g++.old-deja/g++.jason/access8.C *** gcc-3.3/gcc/testsuite/g++.old-deja/g++.jason/access8.C 2002-04-10 12:18:44.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.old-deja/g++.jason/access8.C 2003-07-06 22:02:19.000000000 +0000 *************** void inh::myf(int i) { *** 25,30 **** } void top_t::myf(int i) { ! inh::myf(i); // ERROR - cannot convert to inh XFAIL *-*-* mel::myf(i); } --- 25,30 ---- } void top_t::myf(int i) { ! inh::myf(i); // ERROR - cannot convert to inh mel::myf(i); } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.old-deja/g++.jason/conversion5.C gcc-3.3.1/gcc/testsuite/g++.old-deja/g++.jason/conversion5.C *** gcc-3.3/gcc/testsuite/g++.old-deja/g++.jason/conversion5.C 1998-12-16 21:32:34.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.old-deja/g++.jason/conversion5.C 2003-06-21 12:56:05.000000000 +0000 *************** *** 1,4 **** --- 1,5 ---- // Build don't link: + // Special Options: -Wconversion struct A { }; struct B: public A { A a; diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.old-deja/g++.martin/pmf1.C gcc-3.3.1/gcc/testsuite/g++.old-deja/g++.martin/pmf1.C *** gcc-3.3/gcc/testsuite/g++.old-deja/g++.martin/pmf1.C 1999-09-18 10:45:56.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.old-deja/g++.martin/pmf1.C 2003-06-26 01:05:46.000000000 +0000 *************** *** 4,10 **** struct B{}; ! struct D:B{ virtual void foo(); }; --- 4,10 ---- struct B{}; ! struct D: public B{ virtual void foo(); }; diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog gcc-3.3.1/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog *** gcc-3.3/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog 2003-05-14 00:10:32.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog 2003-08-04 12:49:18.000000000 +0000 *************** *** 1,3 **** --- 1,11 ---- + 2003-08-04 Release Manager + + * GCC 3.3.1 Released. + + 2003-08-04 Release Manager + + * GCC 3.3.1 Released. + 2003-05-13 Release Manager * GCC 3.3 Released. diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.old-deja/g++.other/conv7.C gcc-3.3.1/gcc/testsuite/g++.old-deja/g++.other/conv7.C *** gcc-3.3/gcc/testsuite/g++.old-deja/g++.other/conv7.C 2001-06-05 12:53:52.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.old-deja/g++.other/conv7.C 2003-06-21 17:36:08.000000000 +0000 *************** *** 5,10 **** --- 5,11 ---- // Bug 2726. We ICE'd trying to say something about possibly confusing // conversion overload resolution. + // Special Options: -Wconversion class foo { diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.old-deja/g++.other/overcnv2.C gcc-3.3.1/gcc/testsuite/g++.old-deja/g++.other/overcnv2.C *** gcc-3.3/gcc/testsuite/g++.old-deja/g++.other/overcnv2.C 1999-07-21 08:53:37.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.old-deja/g++.other/overcnv2.C 2003-06-21 17:36:08.000000000 +0000 *************** *** 2,7 **** --- 2,8 ---- // warn about it. We choose op char* not because it is a member of B -- // the standard says that all conversion ops are treated as coming from // the type of the argument -- but because it is non-const. + // Special Options: -Wconversion struct A { operator const char *() const { return ""; } diff -Nrc3pad gcc-3.3/gcc/testsuite/g++.old-deja/g++.other/overload14.C gcc-3.3.1/gcc/testsuite/g++.old-deja/g++.other/overload14.C *** gcc-3.3/gcc/testsuite/g++.old-deja/g++.other/overload14.C 2001-04-20 08:17:19.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/g++.old-deja/g++.other/overload14.C 2003-06-21 17:36:08.000000000 +0000 *************** *** 1,3 **** --- 1,5 ---- + // Special Options: -Wconversion + extern "C" void abort(); struct A { diff -Nrc3pad gcc-3.3/gcc/testsuite/objc.dg/naming-1.m gcc-3.3.1/gcc/testsuite/objc.dg/naming-1.m *** gcc-3.3/gcc/testsuite/objc.dg/naming-1.m 2001-08-01 08:15:11.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/objc.dg/naming-1.m 2003-05-16 05:41:51.000000000 +0000 *************** void foo(void) *** 17,21 **** void bar(void) { View *view; /* ok */ ! View = 1; /* { dg-error "parse error" } */ } --- 17,21 ---- void bar(void) { View *view; /* ok */ ! View = 1; /* { dg-error "(parse|syntax) error" } */ } diff -Nrc3pad gcc-3.3/gcc/testsuite/objc.dg/naming-2.m gcc-3.3.1/gcc/testsuite/objc.dg/naming-2.m *** gcc-3.3/gcc/testsuite/objc.dg/naming-2.m 2001-08-01 08:15:11.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/objc.dg/naming-2.m 2003-05-16 05:41:51.000000000 +0000 *************** *** 4,10 **** @interface Foo @end ! float Foo; /* { dg-error "parse error before" } */ double Bar; @interface Bar --- 4,10 ---- @interface Foo @end ! float Foo; /* { dg-error "(parse|syntax) error before" } */ double Bar; @interface Bar diff -Nrc3pad gcc-3.3/gcc/testsuite/treelang/ChangeLog gcc-3.3.1/gcc/testsuite/treelang/ChangeLog *** gcc-3.3/gcc/testsuite/treelang/ChangeLog 2003-05-14 00:10:34.000000000 +0000 --- gcc-3.3.1/gcc/testsuite/treelang/ChangeLog 2003-08-04 12:49:22.000000000 +0000 *************** *** 1,3 **** --- 1,11 ---- + 2003-08-04 Release Manager + + * GCC 3.3.1 Released. + + 2003-08-04 Release Manager + + * GCC 3.3.1 Released. + 2003-05-13 Release Manager * GCC 3.3 Released.