aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.apple/R4499790-2.c
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2006-05-02 01:04:46 +0000
committerMike Stump <mrs@apple.com>2006-05-02 01:04:46 +0000
commit60b72337785a4448e99b8b3362d985a63e6370ef (patch)
treed03d9d5901ec8f1af0a3a165a0bda77ce9fc42d6 /gcc/testsuite/gcc.apple/R4499790-2.c
parenta58592bcf8b29b799ce0532e968d1f1d11059b18 (diff)
Merged -r112764:113438 branches/apple-local-200502-branch.apple/gcc-5402
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/apple/trunk@113449 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.apple/R4499790-2.c')
-rw-r--r--gcc/testsuite/gcc.apple/R4499790-2.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.apple/R4499790-2.c b/gcc/testsuite/gcc.apple/R4499790-2.c
new file mode 100644
index 00000000000..9c1d1b7db01
--- /dev/null
+++ b/gcc/testsuite/gcc.apple/R4499790-2.c
@@ -0,0 +1,21 @@
+/* Test case for radar 4499790 */
+/* { dg-do run } */
+/* { dg-options "-fpascal-strings" } */
+
+typedef __WCHAR_TYPE__ wchar_t;
+extern void abort (void);
+int main(int argc, char* argv[])
+{
+
+ char st[] = "\pfoo"; // pascal string
+ wchar_t wt[] = L"\pbar"; // pascal Unicode string
+
+ if (st[0] != 3)
+ abort ();
+ if (wt[0] != 3)
+ abort ();
+
+ return 0;
+}
+
+