This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Fix ref15.C on bare-metal targets
- From: mitchell at codesourcery dot com (Mark Mitchell)
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 2 Jun 2009 17:52:37 -0700 (PDT)
- Subject: PATCH: Fix ref15.C on bare-metal targets
- Reply-to: mark at codesourcery dot com
The g++.dg/init/ref15.C test depends on being able to return from
"main", and then (via a static destructor) call "_exit" to set the
exit code. That doesn't work on targets that use the testglue
wrappers; the wrapper prints the exit code upon return from "main" and
before "_exit" is called.
Committed as obvious, with testing on arm-eabi.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713
2009-06-02 Mark Mitchell <mark@codesourcery.com>
* g++.dg/init/ref15.C: Require unwrapped targets.
Index: g++.dg/init/ref15.C
===================================================================
--- g++.dg/init/ref15.C (revision 148087)
+++ g++.dg/init/ref15.C (working copy)
@@ -1,6 +1,8 @@
// PR c++/20416. We correctly constructed the temporary S in foo(),
// but incorrectly destroyed it every time foo() was called.
-// { dg-do run }
+// When using a wrapped target, there is no way to override the exit
+// code after returning from main.
+// { dg-do run { target unwrapped } }
extern "C" void abort (void);
extern "C" void _exit (int);