diff options
author | Iain Sandoe <iains@gcc.gnu.org> | 2010-11-06 11:06:59 +0000 |
---|---|---|
committer | Iain Sandoe <iains@gcc.gnu.org> | 2010-11-06 11:06:59 +0000 |
commit | cd746c2704ed7cc2204ac3e76d6369c710d05176 (patch) | |
tree | 06574d43626cbf124552b49ea279429ac116f576 /gcc | |
parent | ea0b50bd4615607f3597176ed4f70523459e4f8e (diff) | |
download | gcc-cd746c2704ed7cc2204ac3e76d6369c710d05176.zip gcc-cd746c2704ed7cc2204ac3e76d6369c710d05176.tar.gz gcc-cd746c2704ed7cc2204ac3e76d6369c710d05176.tar.bz2 |
encode-3.mm: Provide a different string check for the NeXT runtime when the type is READONLY.
gcc/testsuite:
* obj-c++.dg/encode-3.mm: Provide a different string check for the
NeXT runtime when the type is READONLY.
From-SVN: r166401
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/obj-c++.dg/encode-3.mm | 11 |
2 files changed, 15 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a175424..c9a0dc6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-11-06 Iain Sandoe <iains@gcc.gnu.org> + + * obj-c++.dg/encode-3.mm: Provide a different string check for the + NeXT runtime when the type is READONLY. + 2010-11-06 Uros Bizjak <ubizjak@gmail.com> * gcc.target/i386/387-2.c: Skip if -march= is specified. diff --git a/gcc/testsuite/obj-c++.dg/encode-3.mm b/gcc/testsuite/obj-c++.dg/encode-3.mm index 44f288d..1486a65 100644 --- a/gcc/testsuite/obj-c++.dg/encode-3.mm +++ b/gcc/testsuite/obj-c++.dg/encode-3.mm @@ -32,6 +32,15 @@ const char *enc3 = @encode(anonymous); #define L "l" #endif +/* Darwin (at least, as of XCode 3.2.3/Darwin10) does not encode the read-only + attribute on the type. Arguably, this is a bug, but we are compatible + with this when -fnext-runtime is selected. */ +#ifdef __NEXT_RUNTIME__ +#define E3 "{?=f[10d]i" L "q{Vec<const signed char>=cc" L "q}}" +#else +#define E3 "{?=f[10d]i" L "q{Vec<const signed char>=rcrc" L "q}}" +#endif + int main(void) { const char *encode = @encode(long); @@ -44,7 +53,7 @@ int main(void) { if (strcmp (enc2, (const char *)"{Vec<double>=dd" L "q}")) abort (); - if (strcmp (enc3, (const char *)"{?=f[10d]i" L "q{Vec<const signed char>=rcrc" L "q}}")) + if (strcmp (enc3, (const char *) E3)) abort (); return 0; |