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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pragma-push_macro-1.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 689 jeremybenn
/* Prove that HANDLE_PRAGMA_PUSH_POP_MACRO handling works somewhat. */
2
 
3
/* { dg-do link { target *-*-mingw* } } */
4
 
5
#define TEXT1  "ABC"
6
#define TEXT2  "DEF"
7
 
8
int main()
9
{
10
  if (__builtin_strcmp (TEXT1 TEXT2, "ABCDEF") != 0)
11
    link_error ();
12
 
13
#pragma push_macro("TEXT1")
14
#undef TEXT1
15
#define TEXT1  "XYZ"
16
 
17
  if (__builtin_strcmp (TEXT1 TEXT2, "XYZDEF") != 0)
18
    link_error ();
19
 
20
#pragma pop_macro("TEXT1")
21
 
22
  if (__builtin_strcmp (TEXT1 TEXT2, "ABCDEF") != 0)
23
    link_error ();
24
 
25
  return 0;
26
}

powered by: WebSVN 2.1.0

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