This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ Patch] PR 58846
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: "gcc-patches\ at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>
- Date: Tue, 04 Feb 2014 10:55:15 +0100
- Subject: Re: [C++ Patch] PR 58846
- Authentication-results: sourceware.org; auth=none
- References: <52E91B33 dot 8040703 at oracle dot com>
Paolo Carlini <paolo.carlini@oracle.com> writes:
> a very minor ICE on invalid regression, but since we explicitly allow for
> redeclarations (also see comments in declare_global_var) we may as well
> avoid crashing, at least in mainline. Tested x86_64-linux.
The test FAILs on Solaris which doesn't have __cxa_atexit:
FAIL: g++.dg/init/dso_handle2.C -std=c++98 (test for errors, line 10)
FAIL: g++.dg/init/dso_handle2.C -std=c++11 (test for errors, line 10)
Fixed like dso_handle1.C does by forcing -fuse-cxa-atexit.
Tested with the appropriate runtest invocations on i386-pc-solaris2.11
and x86_64-unknown-linux-gnu. Ok for mainline?
Rainer
2014-02-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* g++.dg/init/dso_handle2.C: Compile with -fuse-cxa-atexit.
# HG changeset patch
# Parent 944218077f384619dcc391f55c51e5ba477dd022
Fix g++.dg/init/dso_handle2.C on Solaris
gcc/testsuite:
* g++.dg/init/dso_handle2.C: Compile with -fuse-cxa-atexit.
diff --git a/gcc/testsuite/g++.dg/init/dso_handle2.C b/gcc/testsuite/g++.dg/init/dso_handle2.C
--- a/gcc/testsuite/g++.dg/init/dso_handle2.C
+++ b/gcc/testsuite/g++.dg/init/dso_handle2.C
@@ -1,4 +1,5 @@
// PR c++/58846
+// { dg-options "-fuse-cxa-atexit" }
extern "C" { char* __dso_handle; }
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University