This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Fix ref15.C on bare-metal targets

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
(650) 331-3385 x713

2009-06-02  Mark Mitchell  <>

	* 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);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]