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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [objc.dg/] [const-str-4.m] - Blame information for rev 327

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

Line No. Rev Author Line
1 309 jeremybenn
/* Ensure that the preprocessor handles ObjC string constants gracefully. */
2
/* Author: Ziemowit Laski <zlaski@apple.com> */
3
/* { dg-options "-fconstant-string-class=MyString " } */
4
/* { dg-do run  } */
5
 
6
extern void abort(void);
7
 
8
@interface MyString
9
{
10
  void *isa;
11
  char *str;
12
  int len;
13
}
14
@end
15
 
16
#define kMyStringMacro1 "My String"
17
#define kMyStringMacro2 @"My String"
18
 
19
void *_MyStringClassReference;
20
 
21
@implementation MyString
22
@end
23
 
24
int main(void) {
25
  MyString* aString1 = @kMyStringMacro1;
26
  MyString* aString2 = kMyStringMacro2;
27
  if(aString1 != aString2) {
28
    abort();
29
  }
30
  return 0;
31
}

powered by: WebSVN 2.1.0

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