conv3.C: New test.
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Sun, 11 Oct 1998 19:36:47 +0000 (19:36 +0000)
committerAlexandre Oliva <oliva@gcc.gnu.org>
Sun, 11 Oct 1998 19:36:47 +0000 (19:36 +0000)
* g++.old-deja/g++.other/conv3.C: New test.  conversion discards
const

From-SVN: r22995

gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.other/conv3.C [new file with mode: 0644]

index d877a3de063fd585cd36860a8af5e18fd0021e65..e43637e6acb9a9682929f72b0edffe4ceb012ef1 100644 (file)
@@ -1,5 +1,8 @@
 1998-10-12  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
+       * g++.old-deja/g++.other/conv3.C: New test.  conversion discards
+       const
+
        * g++.old-deja/g++.other/pmf2.C: New test.  invalid
        pointer-to-member expression
 
diff --git a/gcc/testsuite/g++.old-deja/g++.other/conv3.C b/gcc/testsuite/g++.old-deja/g++.other/conv3.C
new file mode 100644 (file)
index 0000000..652f352
--- /dev/null
@@ -0,0 +1,13 @@
+// Build don't link:
+
+// submitted by David C Binderman <dcb@pncl.co.uk>
+
+typedef const int ci;
+typedef ci aci[ 10];
+aci var = { 2, 3, 5, 7, 11, 13 };
+
+void
+f()
+{
+       int * ip = var; // ERROR - requires const_cast - XFAIL *-*-*
+}