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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc.dg/] [torture/] [strings/] [const-cfstring-3.m] - Blame information for rev 704

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 704 jeremybenn
/* Test for assigning compile-time constant-string objects to static variables.  */
2
/* Contributed by Ziemowit Laski <zlaski@apple.com>  */
3
 
4
/* So far, CFString is darwin-only.  */
5
/* { dg-do run { target *-*-darwin* } } */
6
/* { dg-skip-if "NeXT only" { *-*-* } { "-fgnu-runtime" } { "" } } */
7
/* { dg-options "-mconstant-cfstrings -framework Foundation" } */
8
 
9
#include <stdlib.h>
10
 
11
typedef const struct __CFString * CFStringRef;
12
static CFStringRef appKey = (CFStringRef) @"com.apple.soundpref";
13
 
14
static int CFPreferencesSynchronize (CFStringRef ref) {
15
  return ref == appKey;
16
}
17
 
18
static void PrefsSynchronize()
19
{
20
    if(!CFPreferencesSynchronize(appKey))
21
      abort();
22
}
23
 
24
int main(void) {
25
  PrefsSynchronize();
26
  return 0;
27
}

powered by: WebSVN 2.1.0

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