diff options
author | Julian Brown <julian@codesourcery.com> | 2008-07-17 14:03:50 +0000 |
---|---|---|
committer | Julian Brown <jules@gcc.gnu.org> | 2008-07-17 14:03:50 +0000 |
commit | 711b299844b8eb77451d96a360f4525fc005279e (patch) | |
tree | 227fab594ab803abac56d2e5bd12c689005f8eac /gcc/testsuite | |
parent | 0eae6babe5d9101e825cb8f32bba494642db45af (diff) | |
download | gcc-711b299844b8eb77451d96a360f4525fc005279e.zip gcc-711b299844b8eb77451d96a360f4525fc005279e.tar.gz gcc-711b299844b8eb77451d96a360f4525fc005279e.tar.bz2 |
decl2.c (determine_visibility): Allow target to override visibility of class data.
gcc/cp/
* decl2.c (determine_visibility): Allow target to override
visibility of class data.
gcc/
* config/arm/arm.c (arm_cxx_determine_class_data_visibility): Make
no-op for targets which don't use DLLs.
gcc/testsuite/
* g++.dg/ext/visibility/arm3.C: Add explanatory text. Skip on
non-DLL targets.
* g++.dg/ext/visibility/arm1.C: Skip on non-DLL targets.
Co-Authored-By: Mark Mitchell <mark@codesourcery.com>
From-SVN: r137922
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/ext/visibility/arm1.C | 1 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/ext/visibility/arm3.C | 26 |
3 files changed, 33 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 528a111..55d0839 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2008-07-17 Julian Brown <julian@codesourcery.com> + Mark Mitchell <mark@codesourcery.com> + + * g++.dg/ext/visibility/arm3.C: Add explanatory text. Skip on + non-DLL targets. + * g++.dg/ext/visibility/arm1.C: Skip on non-DLL targets. + 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com> PR c++/36855 diff --git a/gcc/testsuite/g++.dg/ext/visibility/arm1.C b/gcc/testsuite/g++.dg/ext/visibility/arm1.C index 8b49494..2c2e3d0 100644 --- a/gcc/testsuite/g++.dg/ext/visibility/arm1.C +++ b/gcc/testsuite/g++.dg/ext/visibility/arm1.C @@ -1,4 +1,5 @@ // { dg-do compile { target arm*-*-eabi* arm*-*-symbianelf* } } +// { dg-require-dll "" } // { dg-options "-fvisibility=hidden" } // Most class data should be exported. // { dg-final { scan-not-hidden "_ZTV1S" } } diff --git a/gcc/testsuite/g++.dg/ext/visibility/arm3.C b/gcc/testsuite/g++.dg/ext/visibility/arm3.C index f97813d..9be7082 100644 --- a/gcc/testsuite/g++.dg/ext/visibility/arm3.C +++ b/gcc/testsuite/g++.dg/ext/visibility/arm3.C @@ -1,6 +1,30 @@ // { dg-do compile { target arm*-*-*eabi* } } +// { dg-require-dll "" } // { dg-options "-fvisibility=hidden" } -// Class data should be exported. + +/* From ARM C++ ABI \S 3.2.5.5: + + A class should be exported unless explicitly tagged otherwise. + + This admonition applies even on DLL-based systems where hidden + visibility is the default. We want -fvisibility=hidden to behave + identically to the situation where hidden visibility is the + hard-wired default. So, both A and B are exported classes. + + Furthermore: + + If CAG symbol Y names one of the impedimenta associated with an + exported class X: + + ... + + * Otherwise, if X has no key function: + + - Y is exported from ... each DLL that refers to X and uses Y. + + So, the type-info and virtual-table symbols associated with A and B + must be exported. */ + // { dg-final { scan-not-hidden "_ZTI1A" } } // { dg-final { scan-not-hidden "_ZTS1A" } } // { dg-final { scan-not-hidden "_ZTV1B" } } |