This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Tests added only on 3.1/3.2 branch


This patch readds testcases previously added only to the 3.1 or 3.2
branch.  Previously preapproved by Mark; applied to mainline and 3.3
branch.

The testcases were derived by examining all testcase files in the
Attic and eliminating those that had been deleted on mainline (leaving
those added on a branch), then those that had been added on some
branch other than a release branch or had been added in a different
location on the mainline.  Additionally, the following were added only
on the 3.0 branch, but may have been added to mainline in the g++.dg
framework instead; I haven't examined them:

g++.old-deja/g++.abi/Attic/empty4.C,v
g++.old-deja/g++.abi/Attic/vbase8-10.C,v
g++.old-deja/g++.abi/Attic/vbase8-21.C,v
g++.old-deja/g++.abi/Attic/vbase8-22.C,v
g++.old-deja/g++.abi/Attic/vbase9.C,v
g++.old-deja/g++.abi/Attic/vthunk1.C,v
g++.old-deja/g++.other/Attic/empty3.C,v
g++.old-deja/g++.other/Attic/ptrmem11.C,v
g++.old-deja/g++.other/Attic/vector1.C,v

The following were added only to the gcc-3_2-rhl8-branch, and I don't
know whether they too belong on mainline and 3.3 branch:

g++.dg/ext/Attic/pretty1.C,v
g++.dg/ext/Attic/pretty2.C,v
g++.dg/opt/Attic/life1.C,v
g++.dg/other/Attic/inline1.C,v
gcc.c-torture/compile/Attic/20020807-1.c,v
gcc.c-torture/compile/Attic/20021008-1.c,v
gcc.c-torture/execute/Attic/20020810-1.c,v
gcc.c-torture/execute/Attic/20020920-1.c,v
gcc.dg/Attic/20020525-1.c,v
gcc.dg/Attic/20020729-1.c,v
gcc.dg/tls/Attic/opt-1.c,v

2002-12-24  Joseph S. Myers  <jsm@polyomino.org.uk>

	* g++.dg/init/new1.C, g++.dg/template/alignof1.C,
	gcc.c-torture/compile/20021015-1.c,
	gcc.c-torture/compile/20021015-2.c,
	gcc.c-torture/compile/20021123-1.c,
	gcc.c-torture/compile/20021123-2.c,
	gcc.c-torture/compile/20021123-3.c,
	gcc.c-torture/compile/20021123-4.c,
	gcc.c-torture/execute/20021024-1.c: Add tests previously added
	only to 3.1 or 3.2 branch.

diff -ruN testsuite/g++.dg/init/new1.C testsuite/g++.dg/init/new1.C
--- testsuite/g++.dg/init/new1.C	1970-01-01 00:00:00.000000000 +0000
+++ testsuite/g++.dg/init/new1.C	2002-03-27 18:40:49.000000000 +0000
@@ -0,0 +1,20 @@
+// Origin: asharji@uwaterloo.ca
+
+// { dg-do compile }
+// { dg-options "-fvolatile" }
+
+typedef __SIZE_TYPE__ size_t;
+
+class bar {
+    int i;
+  public :
+    void * operator new ( size_t , void * storage );
+};
+
+class foo {
+    int storage[ 5 ];
+  public:
+    void mem ( ) {
+        bar *s = new ( ( void * ) & storage ) bar;
+    }
+};
diff -ruN testsuite/g++.dg/template/alignof1.C testsuite/g++.dg/template/alignof1.C
--- testsuite/g++.dg/template/alignof1.C	1970-01-01 00:00:00.000000000 +0000
+++ testsuite/g++.dg/template/alignof1.C	2002-10-29 21:12:33.000000000 +0000
@@ -0,0 +1,13 @@
+template<typename T>
+int my_alignof()
+{
+    return __alignof__(T);
+}
+
+template<typename>
+struct X { };
+
+int main()
+{
+  return my_alignof<X<void> >();
+}
diff -ruN testsuite/gcc.c-torture/compile/20021015-1.c testsuite/gcc.c-torture/compile/20021015-1.c
--- testsuite/gcc.c-torture/compile/20021015-1.c	1970-01-01 00:00:00.000000000 +0000
+++ testsuite/gcc.c-torture/compile/20021015-1.c	2002-10-15 18:38:25.000000000 +0000
@@ -0,0 +1,12 @@
+/* PR target/7370.  */
+
+int g (int *x, int *y);
+
+void f ()
+{
+  int x, y;
+  char a[4000];
+
+  g (&x, &y);
+  x = x/y + x;
+}
diff -ruN testsuite/gcc.c-torture/compile/20021015-2.c testsuite/gcc.c-torture/compile/20021015-2.c
--- testsuite/gcc.c-torture/compile/20021015-2.c	1970-01-01 00:00:00.000000000 +0000
+++ testsuite/gcc.c-torture/compile/20021015-2.c	2002-10-15 18:38:25.000000000 +0000
@@ -0,0 +1,7 @@
+/* PR target/8232.  */
+
+int f (char *p, char *q, int i)
+{
+  return bcmp (p, q, i);
+}
+
diff -ruN testsuite/gcc.c-torture/compile/20021123-1.c testsuite/gcc.c-torture/compile/20021123-1.c
--- testsuite/gcc.c-torture/compile/20021123-1.c	1970-01-01 00:00:00.000000000 +0000
+++ testsuite/gcc.c-torture/compile/20021123-1.c	2002-11-23 08:10:22.000000000 +0000
@@ -0,0 +1,10 @@
+/* PR c/8439 */
+/* Verify that GCC properly handles null increments. */
+
+struct empty {
+};
+
+void foo(struct empty *p)
+{
+   p++;
+}
diff -ruN testsuite/gcc.c-torture/compile/20021123-2.c testsuite/gcc.c-torture/compile/20021123-2.c
--- testsuite/gcc.c-torture/compile/20021123-2.c	1970-01-01 00:00:00.000000000 +0000
+++ testsuite/gcc.c-torture/compile/20021123-2.c	2002-11-23 08:22:13.000000000 +0000
@@ -0,0 +1,9 @@
+/* PR c/8518 */
+/* Contributed by Volker Reichelt. */
+
+/* Verify that GCC doesn't get confused by the
+   redefinition of an extern inline function. */
+
+extern int inline foo () { return 0; }
+extern int inline bar () { return 0; }
+static int inline bar () { return foo(); }
diff -ruN testsuite/gcc.c-torture/compile/20021123-3.c testsuite/gcc.c-torture/compile/20021123-3.c
--- testsuite/gcc.c-torture/compile/20021123-3.c	1970-01-01 00:00:00.000000000 +0000
+++ testsuite/gcc.c-torture/compile/20021123-3.c	2002-11-23 08:22:13.000000000 +0000
@@ -0,0 +1,9 @@
+/* PR c/8518 */
+/* Contributed by Volker Reichelt. */
+
+/* Verify that GCC doesn't get confused by the
+   redefinition of an extern inline function. */
+
+extern int inline foo () { return 0; }
+extern int inline bar () { return 0; }
+static int bar () { return foo(); }
diff -ruN testsuite/gcc.c-torture/compile/20021123-4.c testsuite/gcc.c-torture/compile/20021123-4.c
--- testsuite/gcc.c-torture/compile/20021123-4.c	1970-01-01 00:00:00.000000000 +0000
+++ testsuite/gcc.c-torture/compile/20021123-4.c	2002-11-23 08:38:27.000000000 +0000
@@ -0,0 +1,11 @@
+/* PR c/8588 */
+/* Contributed by Volker Reichelt. */
+
+/* Verify that GCC converts integer constants
+   in shift operations. */
+   
+void foo()
+{
+  unsigned int i, j;
+  j = (i >> 0xf0);
+}
diff -ruN testsuite/gcc.c-torture/execute/20021024-1.c testsuite/gcc.c-torture/execute/20021024-1.c
--- testsuite/gcc.c-torture/execute/20021024-1.c	1970-01-01 00:00:00.000000000 +0000
+++ testsuite/gcc.c-torture/execute/20021024-1.c	2002-10-24 17:11:56.000000000 +0000
@@ -0,0 +1,43 @@
+/* Origin: PR target/6981 from Mattias Engdegaard <mattias@virtutech.se>.  */
+
+void exit (int);
+void abort (void);
+
+unsigned long long *cp, m;
+
+void foo (void)
+{
+}
+
+void bar (unsigned rop, unsigned long long *r)
+{
+  unsigned rs1, rs2, rd;
+
+top:
+  rs2 = (rop >> 23) & 0x1ff;
+  rs1 = (rop >> 9) & 0x1ff;
+  rd = rop & 0x1ff;
+
+  *cp = 1;
+  m = r[rs1] + r[rs2];
+  *cp = 2;
+  foo();
+  if (!rd)
+    goto top;
+  r[rd] = 1;
+}
+
+int main(void)
+{
+  static unsigned long long r[64];
+  unsigned long long cr;
+  cp = &cr;
+
+  r[4] = 47;
+  r[8] = 11;
+  bar((8 << 23) | (4 << 9) | 15, r);
+
+  if (m != 47 + 11)
+    abort ();
+  exit (0);
+}

-- 
Joseph S. Myers
jsm28@cam.ac.uk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]