This is the mail archive of the gcc-patches@gcc.gnu.org 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]

Re: [PATCH][C++] Fix PR86763, wrong-code with TYPE_TYPELESS_STORAGE


On 20/08/18 10:33, Richard Biener wrote:
On Mon, 20 Aug 2018, Szabolcs Nagy wrote:
On 02/08/18 09:30, Richard Biener wrote:
...
+  clock_gettime(CLOCK_REALTIME, &t);

this fails on targets without clock_gettime (baremetal)
or targets that need -lrt at link time.

can we use something else here?
e.g. time(&t) works on baremetal and does not depend on -lrt.

You'd have to check that the original bug still reproduces.  Since
it depends on scheduling chances may be that it is fragile :/

I suppose we could restrict the testcase to { *-*-linux }?


i decided to restrict it to linux:

clock_gettime is not available on some baremetal targets
and may require -lrt on some non-linux targets.

OK for trunk?

gcc/testsuite/ChangeLog:
2018-08-21  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	* g++.dg/torture/pr86763.C: Restrict to *-*-linux*.

diff --git a/gcc/testsuite/g++.dg/torture/pr86763.C b/gcc/testsuite/g++.dg/torture/pr86763.C
index 79523b24850..8455ac9ce12 100644
--- a/gcc/testsuite/g++.dg/torture/pr86763.C
+++ b/gcc/testsuite/g++.dg/torture/pr86763.C
@@ -1,6 +1,6 @@
-// { dg-do run }
+// { dg-do run { target { *-*-linux* } } }
 // { dg-additional-options "-fschedule-insns2 -fstrict-aliasing" }
-// { dg-additional-options "-lrt" { target *-*-linux-gnu } }
+// { dg-additional-options "-lrt" }
 
 #include <cstdint>
 #include <cassert>

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