summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.law/code-gen4.C
blob: 362ecc18ed868260740026b77b007eb9cabb3038 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// { dg-do run  }
// GROUPS passed code-generation
// code-gen file
// From: david.binderman@pmsr.philips.co.uk
// Date:     Tue, 17 Aug 93 10:09:38 BST
// Subject:  .* broken in 2.4.5
// Message-ID: <9308170909.AA05509@pmsr.philips.co.uk>

class A {
public:
        char c;
};

typedef char A::*PMA;

PMA pmA = &A::c;

A oA;

extern "C" int printf( const char *, ...);

int main()
{
        oA.c = 'q';

        if ( (oA .* pmA))
                        printf( "PASS\n");
        else
                        printf(" FAIL\n");
}