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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [other/] [pragma-re-1.C] - Blame information for rev 801

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

Line No. Rev Author Line
1 693 jeremybenn
/* { dg-final { scan-assembler "bar" } } */
2
/* { dg-final { scan-assembler-not "foo" } } */
3
/* { dg-final { scan-assembler "_Z3bazv" } } */
4
/* { dg-final { scan-assembler-not "baq" } } */
5
/* { dg-final { scan-assembler "tut" } } */
6
/* { dg-final { scan-assembler-not "gee" } } */
7
/* { dg-final { scan-assembler "bang" } } */
8
/* { dg-final { scan-assembler-not "whiz" } } */
9
/* { dg-final { scan-assembler "eek" } } */
10
/* { dg-final { scan-assembler-not "boo" } } */
11
 
12
#ifndef __PRAGMA_REDEFINE_EXTNAME
13
#error
14
#endif
15
 
16
/* This one is expected to work.  */
17
#pragma redefine_extname foo bar
18
extern "C" int foo(void);
19
int (*p)(void) = foo;
20
 
21
/* This one is expected not to work (redefine_extname
22
   can only be applied to extern "C" names).  */
23
#pragma redefine_extname baz baq
24
extern int baz(void);
25
int (*q)(void) = baz;
26
 
27
// PR c++/30112
28
// These are expected to work.
29
#pragma redefine_extname gee tut
30
namespace somewhere {
31
  extern "C" int gee(void);
32
  int (*r)(void) = gee;
33
 
34
  extern "C" int whiz(void);
35
  int whiz(int);
36
}
37
#pragma redefine_extname whiz bang
38
int (*s)() = somewhere::whiz;
39
 
40
namespace elsewhere {
41
  extern "C" int whiz(void);
42
}
43
int (*t)() = elsewhere::whiz;
44
 
45
namespace A
46
{
47
  extern "C" int boo(void);
48
}
49
 
50
namespace B
51
{
52
  extern "C" int boo(void);
53
}
54
#pragma redefine_extname boo eek
55
 
56
int (*u)() = A::boo;
57
int (*v)() = B::boo;

powered by: WebSVN 2.1.0

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