aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/g++.old-deja/g++.bugs/900321_05.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/gcc/testsuite/g++.old-deja/g++.bugs/900321_05.C')
-rw-r--r--gcc-4.8/gcc/testsuite/g++.old-deja/g++.bugs/900321_05.C21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/g++.old-deja/g++.bugs/900321_05.C b/gcc-4.8/gcc/testsuite/g++.old-deja/g++.bugs/900321_05.C
new file mode 100644
index 000000000..eb08d1a56
--- /dev/null
+++ b/gcc-4.8/gcc/testsuite/g++.old-deja/g++.bugs/900321_05.C
@@ -0,0 +1,21 @@
+// { dg-do run }
+// g++ 1.37.1 bug 900321_05
+
+// The following code is legal as far as the ANSI C standard, GCC, and
+// cfront are concerned, however g++ issues errors for the lines indicated.
+
+// Cfront 2.0 passes this test.
+
+// keywords: operator[], pointers, index
+
+char c;
+char *cp;
+int i;
+
+void function ()
+{
+ c = 3["abcdef"]; // { dg-bogus "" }
+ c = i[cp]; // { dg-bogus "" }
+}
+
+int main () { return 0; }