]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
This commit was manufactured by cvs2svn to create branch
authorNo Author <no-author@gcc.gnu.org>
Sun, 31 Jul 2005 08:35:15 +0000 (08:35 +0000)
committerNo Author <no-author@gcc.gnu.org>
Sun, 31 Jul 2005 08:35:15 +0000 (08:35 +0000)
'gcc-3_4-branch'.

From-SVN: r102604

gcc/testsuite/g++.dg/expr/ptrmem7.C [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/pr20621-1.c [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/expr/ptrmem7.C b/gcc/testsuite/g++.dg/expr/ptrmem7.C
new file mode 100644 (file)
index 0000000..a94990e
--- /dev/null
@@ -0,0 +1,21 @@
+// PR c++/22545
+
+struct A {
+  int member;
+  A() : member(13) {}
+};
+
+A a;
+
+struct B {
+  operator A*() { return &a; }
+};
+
+B b;
+
+int A::* member_pntr = &A::member;
+
+int main()
+{
+  return b ->* member_pntr;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr20621-1.c b/gcc/testsuite/gcc.c-torture/execute/pr20621-1.c
new file mode 100644 (file)
index 0000000..7990187
--- /dev/null
@@ -0,0 +1,6 @@
+/* When generating o32 MIPS PIC, main's $gp save slot was out of range
+   of a single load instruction.  */
+struct big { int i[sizeof (int) >= 4 && sizeof (void *) >= 4 ? 0x4000 : 4]; };
+struct big gb;
+int foo (struct big b, int x) { return b.i[x]; }
+int main (void) { return foo (gb, 0) + foo (gb, 1); }