]> gcc.gnu.org Git - gcc.git/commitdiff
new1.C, [...]: Add tests previously added only to 3.1 or 3.2 branch.
authorJoseph Myers <jsm@polyomino.org.uk>
Tue, 24 Dec 2002 19:08:41 +0000 (19:08 +0000)
committerJoseph Myers <jsm28@gcc.gnu.org>
Tue, 24 Dec 2002 19:08:41 +0000 (19:08 +0000)
* 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.

From-SVN: r60479

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/init/new1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/alignof1.C [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/20021015-1.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/20021015-2.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/20021123-1.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/20021123-2.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/20021123-3.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/20021123-4.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/20021024-1.c [new file with mode: 0644]

index c4011100dacf1faa93b86c36f54dcc94b499cc31..7771c26a1d51c0c7d3895929110032d729ce998b 100644 (file)
@@ -1,3 +1,15 @@
+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.
+
 2002-12-23  Mark Mitchell  <mark@codesourcery.com>
 
        * testsuite/gcc.dg/i386-bitfield3.c: New test.
diff --git a/gcc/testsuite/g++.dg/init/new1.C b/gcc/testsuite/g++.dg/init/new1.C
new file mode 100644 (file)
index 0000000..24b60d3
--- /dev/null
@@ -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 --git a/gcc/testsuite/g++.dg/template/alignof1.C b/gcc/testsuite/g++.dg/template/alignof1.C
new file mode 100644 (file)
index 0000000..50a3218
--- /dev/null
@@ -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 --git a/gcc/testsuite/gcc.c-torture/compile/20021015-1.c b/gcc/testsuite/gcc.c-torture/compile/20021015-1.c
new file mode 100644 (file)
index 0000000..789b8a8
--- /dev/null
@@ -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 --git a/gcc/testsuite/gcc.c-torture/compile/20021015-2.c b/gcc/testsuite/gcc.c-torture/compile/20021015-2.c
new file mode 100644 (file)
index 0000000..6b158c5
--- /dev/null
@@ -0,0 +1,7 @@
+/* PR target/8232.  */
+
+int f (char *p, char *q, int i)
+{
+  return bcmp (p, q, i);
+}
+
diff --git a/gcc/testsuite/gcc.c-torture/compile/20021123-1.c b/gcc/testsuite/gcc.c-torture/compile/20021123-1.c
new file mode 100644 (file)
index 0000000..dd2aa7e
--- /dev/null
@@ -0,0 +1,10 @@
+/* PR c/8439 */
+/* Verify that GCC properly handles null increments. */
+
+struct empty {
+};
+
+void foo(struct empty *p)
+{
+   p++;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/20021123-2.c b/gcc/testsuite/gcc.c-torture/compile/20021123-2.c
new file mode 100644 (file)
index 0000000..423f8ec
--- /dev/null
@@ -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 --git a/gcc/testsuite/gcc.c-torture/compile/20021123-3.c b/gcc/testsuite/gcc.c-torture/compile/20021123-3.c
new file mode 100644 (file)
index 0000000..51f0e25
--- /dev/null
@@ -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 --git a/gcc/testsuite/gcc.c-torture/compile/20021123-4.c b/gcc/testsuite/gcc.c-torture/compile/20021123-4.c
new file mode 100644 (file)
index 0000000..d4306b8
--- /dev/null
@@ -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 --git a/gcc/testsuite/gcc.c-torture/execute/20021024-1.c b/gcc/testsuite/gcc.c-torture/execute/20021024-1.c
new file mode 100644 (file)
index 0000000..f7d98e9
--- /dev/null
@@ -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);
+}
This page took 0.106509 seconds and 5 git commands to generate.