OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc.dg/] [torture/] [strings/] [string4.m] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 704 jeremybenn
/* Based on a test case contributed by Nicola Pero.  */
2
 
3
/* { dg-do run } */
4
/* { dg-options "-mno-constant-cfstrings -Wno-deprecated-declarations" { target *-*-darwin* } } */
5
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
6
/* { dg-additional-sources "../../../objc-obj-c++-shared/nsconstantstring-class-impl.m" } */
7
 
8
#include <string.h>
9
#include <stdlib.h>
10
 
11
#ifndef __NEXT_RUNTIME__
12
#include <objc/NXConstStr.h>
13
#else
14
#include "../../../objc-obj-c++-shared/nsconstantstring-class.h"
15
#endif
16
 
17
int main(int argc, void **args)
18
{
19
  if ([@"this is a string" length] != strlen ("this is a string"))
20
    abort ();
21
  return 0;
22
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.