* linkage1.C, linkage1-main.cc: New test.

From-SVN: r55288
This commit is contained in:
Alexandre Oliva 2002-07-06 16:16:44 +00:00 committed by Alexandre Oliva
parent 7ab5c78914
commit acc0131c14
3 changed files with 38 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2002-07-06 Alexandre Oliva <aoliva@redhat.com>
* linkage1.C, linkage1-main.cc: New test.
2001-02-15 Alexandre Oliva <aoliva@redhat.com>
* friend1.C: New test.

View File

@ -0,0 +1,13 @@
// Copyright 2002 Free Software Foundation
// Derived by Alexandre Oliva <aoliva@redhat.com> from code posted by
// Mark Mitchell <mark@codesourcery.com>
typedef struct {
void f();
} S;
int main() {
S s;
s.f();
}

View File

@ -0,0 +1,21 @@
// Copyright 2002 Free Software Foundation
// Derived by Alexandre Oliva <aoliva@redhat.com> from code posted by
// Mark Mitchell <mark@codesourcery.com>
// Build don't run:
// Additional sources: linkage1-main.cc
// Verify that a member of a class is given global linkage when it's a
// member of a function whose name is taken from a typedef, by
// checking that another translation unit can call it. We don't do
// the right things on functions, but we do on data members.
// excess errors test - XFAIL *-*-*
typedef struct {
void f();
} S;
void S::f() {}