mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-07 14:57:21 +08:00
* linkage1.C, linkage1-main.cc: New test.
From-SVN: r55288
This commit is contained in:
parent
7ab5c78914
commit
acc0131c14
@ -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.
|
||||
|
13
gcc/testsuite/g++.old-deja/g++.oliva/linkage1-main.cc
Normal file
13
gcc/testsuite/g++.old-deja/g++.oliva/linkage1-main.cc
Normal 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();
|
||||
}
|
21
gcc/testsuite/g++.old-deja/g++.oliva/linkage1.C
Normal file
21
gcc/testsuite/g++.old-deja/g++.oliva/linkage1.C
Normal 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() {}
|
Loading…
Reference in New Issue
Block a user