diff mbox

[Testsuite] getpid in gcc.c-torture/execute/pr58419.c

Message ID 54196F45A68D5F44A17DBFF39883E26F84DE2CE0@penmbx02.corp.atmel.com
State New
Headers show

Commit Message

Dhakshinamoorthy, Soundararajan April 25, 2014, 9:16 a.m. UTC
Hi, 

I have attached a patch based on the recommendation. Can you please review and apply, if it looks ok ?. I don't have commit access.


gcc/testsuite/ChangeLog

2014-04-25  Soundararajan Dhakshinamoorthy  <sounderarajan.d@atmel.com>

	* gcc.c-torture/execute/pr58419.c: Adjust the test to work with bare metal targets. The 
           test code references to functions that is not implemented for the avr target (getpid()).

Thanks,
Soundararajan

Comments

Jeff Law April 30, 2014, 9:09 p.m. UTC | #1
On 04/25/14 03:16, Dhakshinamoorthy, Soundararajan wrote:
> 2014-04-25  Soundararajan Dhakshinamoorthy<sounderarajan.d@atmel.com>
>
> 	* gcc.c-torture/execute/pr58419.c: Adjust the test to work with bare metal targets. The
>             test code references to functions that is not implemented for the avr target (getpid()).
THanks.  I tweaked the ChangeLog slightly and installed your patch.

Jeff
diff mbox

Patch

diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58419.c b/gcc/testsuite/gcc.c-torture/execute/pr58419.c
index 69cc040..78bf437 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr58419.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58419.c
@@ -1,4 +1,9 @@ 
-int printf(const char *, ...);
+__attribute__((__noinline__))
+void
+dummy ()
+{
+  asm volatile("");
+}
 
 int a, g, i, k, *p;
 signed char b;
@@ -31,6 +36,6 @@  main ()
       *l = a;
       g = foo (*m = k && *d, 1 > i) || bar (); 
     }
-  getpid();
+  dummy();
   return 0;
 }