aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/string1.C
blob: 425e9bf817ce0fb355867ea315072d419172a5a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Build don't link:
// Origin: mrs@wrs.com (Mike Stump)

class Wrapper {
public:
  static const char msgPtr[];
  static const char *JunkFunc() {
    return &msgPtr[0];
  }
};
 
const char Wrapper::msgPtr[] = "Hello world.";
 
int main() {
  const char *p1 = &Wrapper::msgPtr[0];
  const char *p2 = Wrapper::JunkFunc();
 
  if (p1 != p2)
    return 1;
}